Re: [PATCH v4 bpf-next 14/19] bpf: relax log_buf NULL conditions when log_level>0 is requested

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

 



On Fri, Apr 7, 2023 at 12:42 AM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote:
>
> Drop the log_size>0 and log_buf!=NULL condition when log_level>0. This
> allows users to request log_true_size of a full log without providing
> actual (even if small) log buffer. Verifier log handling code was mostly
> ready to handle NULL log->ubuf, so only few small changes were necessary
> to prevent NULL log->ubuf from causing problems.
>
> Note, that if user provided NULL log_buf with log_level>0 we don't
> consider this a log truncation, and thus won't return -ENOSPC.
>
> We also enforce that either (log_buf==NULL && log_size==0) or
> (log_buf!=NULL && log_size>0).
>
> Suggested-by: Lorenz Bauer <lmb@xxxxxxxxxxxxx>
> Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>

Reviewed-by: Lorenz Bauer <lmb@xxxxxxxxxxxxx>




[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