BPF Archive on lore.kernel.org
 help / color / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: giladreti <gilad.reti@gmail.com>,
	bpf@vger.kernel.org, Yonghong Song <yhs@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Signed-off-by: giladreti <gilad.reti@gmail.com>
Date: Mon, 11 Jan 2021 16:55:46 +0100
Message-ID: <17629073-4fab-a922-ecc3-25b019960f44@iogearbox.net> (raw)
In-Reply-To: <20210111153123.GA423936@ubuntu>

Hello Gilad,

On 1/11/21 4:31 PM, giladreti wrote:
> Added support for pointer to mem register spilling, to allow the verifier
> to track pointer to valid memory addresses. Such pointers are returned
> for example by a successful call of the bpf_ringbuf_reserve helper.
> This patch was suggested as a solution by Yonghong Song.

The SoB should not be in subject line but as part of the commit message instead
and with proper name, e.g.

Signed-off-by: Gilad Reti <gilad.reti@gmail.com>

For subject line, please use a short summary that fits the patch prefixed with
the subsystem "bpf: [...]", see also [0] as an example. Thanks.

It would be good if you could also add a BPF selftest for this [1].

   [0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e22d7f05e445165e58feddb4e40cc9c0f94453bc
   [1] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/

> ---
>   kernel/bpf/verifier.c | 2 ++
>   1 file changed, 2 insertions(+)
> diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
> index 17270b8404f1..36af69fac591 100644
> --- a/kernel/bpf/verifier.c
> +++ b/kernel/bpf/verifier.c
> @@ -2217,6 +2217,8 @@ static bool is_spillable_regtype(enum bpf_reg_type type)
>   	case PTR_TO_RDWR_BUF:
> +	case PTR_TO_MEM:
> +	case PTR_TO_MEM_OR_NULL:
>   		return true;
>   	default:
>   		return false;

  parent reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11 15:31 giladreti
2021-01-11 15:51 ` Marek Behún
2021-01-11 15:55 ` Daniel Borkmann [this message]
2021-01-11 16:03   ` Gilad Reti
2021-01-11 20:39     ` Andrii Nakryiko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17629073-4fab-a922-ecc3-25b019960f44@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=gilad.reti@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yhs@fb.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git