[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cd17fa0c-3139-3031-4750-62f7f05949bb@fb.com>
Date: Thu, 2 Jan 2020 18:04:48 +0000
From: Yonghong Song <yhs@...com>
To: Martin Lau <kafai@...com>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>
CC: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
David Miller <davem@...emloft.net>,
Kernel Team <Kernel-team@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf-next v3 04/11] bpf: Support bitfield read access in
btf_struct_access
On 12/30/19 10:20 PM, Martin KaFai Lau wrote:
> This patch allows bitfield access as a scalar.
>
> It checks "off + size > t->size" to avoid accessing bitfield
> end up accessing beyond the struct. This check is done
> outside of the loop since it is applicable to all access.
>
> It also takes this chance to break early on the "off < moff" case.
>
> Signed-off-by: Martin KaFai Lau <kafai@...com>
Acked-by: Yonghong Song <yhs@...com>
Powered by blists - more mailing lists