Re: [PATCH bpf 1/4] bpf: Clarify bpf_arena comments.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/14, Alexei Starovoitov wrote:
> From: Alexei Starovoitov <ast@xxxxxxxxxx>
> 
> Clarify two bpf_arena comments, use existing SZ_4G #define,
> improve page_cnt check.
> 
> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx>
> ---
>  kernel/bpf/arena.c | 25 ++++++++++++++++++-------
>  1 file changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/kernel/bpf/arena.c b/kernel/bpf/arena.c
> index 86571e760dd6..343c3456c8dd 100644
> --- a/kernel/bpf/arena.c
> +++ b/kernel/bpf/arena.c
> @@ -38,7 +38,7 @@
>  
>  /* number of bytes addressable by LDX/STX insn with 16-bit 'off' field */
>  #define GUARD_SZ (1ull << sizeof(((struct bpf_insn *)0)->off) * 8)

Unrelated nit, maybe worth doing the following as well:

#define GUARD_SZ (1ull << sizeof_field(struct bpf_insn, off) * 8)




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux