Re: [PATCH bpf-next v3 00/11] Make check_func_arg type checks table driven

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

 



On Thu, Sep 10, 2020 at 01:56:20PM +0100, Lorenz Bauer wrote:
> Another round of review from Martin, thanks!
> 
> Changes in v3:
> - Fix BTF_ID_LIST_SINGLE if BTF is disabled (Martin)
> - Drop incorrect arg_btf_id in bpf_sk_storage.c (Martin)
> - Check for arg_btf_id in check_func_proto (Martin)
> - Drop incorrect PTR_TO_BTF_ID from fullsock_types (Martin)
> - Introduce btf_seq_file_ids in bpf_trace.c to reduce duplication
> 
> Changes in v2:
> - Make the series stand alone (Martin)
> - Drop incorrect BTF_SET_START fix (Andrii)
> - Only support a single BTF ID per argument (Martin)
> - Introduce BTF_ID_LIST_SINGLE macro (Andrii)
> - Skip check_ctx_reg iff register is NULL
> - Change output of check_reg_type slightly, to avoid touching tests
> 
> Original cover letter:
> 
> Currently, check_func_arg has this pretty gnarly if statement that
> compares the valid arg_type with the actualy reg_type. Sprinkled
> in-between are checks for register_is_null, to short circuit these
> tests if we're dealing with a nullable arg_type. There is also some
> code for later bounds / access checking hidden away in there.
> 
> This series of patches refactors the function into something like this:
> 
>    if (reg_is_null && arg_type_is_nullable)
>      skip type checking
> 
>    do type checking, including BTF validation
> 
>    do bounds / access checking
> 
> The type checking is now table driven, which makes it easy to extend
> the acceptable types. Maybe more importantly, using a table makes it
> easy to provide more helpful verifier output (see the last patch).
This set is currently marked as "Changes Requested".  Since there is
no other comment since then, can you respin v4?



[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