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]
Message-ID: <0be03b75-8666-f18b-bd4f-f6677c448287@huawei.com>
Date:   Tue, 6 Sep 2022 11:06:48 +0800
From:   Hou Tao <houtao1@...wei.com>
To:     Roberto Sassu <roberto.sassu@...weicloud.com>, <ast@...nel.org>,
        <daniel@...earbox.net>, <andrii@...nel.org>,
        <martin.lau@...ux.dev>, <song@...nel.org>, <yhs@...com>,
        <john.fastabend@...il.com>, <kpsingh@...nel.org>, <sdf@...gle.com>,
        <haoluo@...gle.com>, <jolsa@...nel.org>, <mykolal@...com>,
        <dhowells@...hat.com>, <jarkko@...nel.org>, <rostedt@...dmis.org>,
        <mingo@...hat.com>, <paul@...l-moore.com>, <jmorris@...ei.org>,
        <serge@...lyn.com>, <shuah@...nel.org>
CC:     <bpf@...r.kernel.org>, <keyrings@...r.kernel.org>,
        <linux-security-module@...r.kernel.org>,
        <linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <deso@...teo.net>, <memxor@...il.com>,
        Roberto Sassu <roberto.sassu@...wei.com>,
        Joanne Koong <joannelkoong@...il.com>
Subject: Re: [PATCH v16 04/12] bpf: Export bpf_dynptr_get_size()

Hi,

On 9/5/2022 10:33 PM, Roberto Sassu wrote:
> From: Roberto Sassu <roberto.sassu@...wei.com>
>
> Export bpf_dynptr_get_size(), so that kernel code dealing with eBPF dynamic
> pointers can obtain the real size of data carried by this data structure.
>
> Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> Reviewed-by: Joanne Koong <joannelkoong@...il.com>
> Acked-by: KP Singh <kpsingh@...nel.org>
> ---
>  include/linux/bpf.h  | 1 +
>  kernel/bpf/helpers.c | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
SNIP
> diff --git a/kernel/bpf/helpers.c b/kernel/bpf/helpers.c
> index fc08035f14ed..824864ac82d1 100644
> --- a/kernel/bpf/helpers.c
> +++ b/kernel/bpf/helpers.c
> @@ -1408,7 +1408,7 @@ static void bpf_dynptr_set_type(struct bpf_dynptr_kern *ptr, enum bpf_dynptr_typ
>  	ptr->size |= type << DYNPTR_TYPE_SHIFT;
>  }
>  
> -static u32 bpf_dynptr_get_size(struct bpf_dynptr_kern *ptr)
> +u32 bpf_dynptr_get_size(struct bpf_dynptr_kern *ptr)
>  {
>  	return ptr->size & DYNPTR_SIZE_MASK;
>  }
qp-trie also need it. But considering bpf_dynptr_get_size() is just one line,
Would moving it and the related definitions into bpf.h be a better choice ?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ