lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Jan 2021 16:55:46 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     giladreti <gilad.reti@...il.com>, bpf@...r.kernel.org,
        Yonghong Song <yhs@...com>
Cc:     Alexei Starovoitov <ast@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Signed-off-by: giladreti <gilad.reti@...il.com>

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@...il.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/
       https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/verifier/spill_fill.c

> ---
>   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_RDWR_BUF_OR_NULL:
>   	case PTR_TO_PERCPU_BTF_ID:
> +	case PTR_TO_MEM:
> +	case PTR_TO_MEM_OR_NULL:
>   		return true;
>   	default:
>   		return false;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ