Re: [PATCH v3 bpf-next 12/19] bpf: add log_size_actual output field to return log contents size

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

 



On Thu, Apr 6, 2023 at 7:35 PM Andrii Nakryiko
<andrii.nakryiko@xxxxxxxxx> wrote:
>
> ah, in that sense... What's the reasoning for this enforcement? I'm
> just afraid that it will complicate applications that don't care and
> are not aware of this field and do retries with the same attribute. On
> first try, the kernel fills out log_true_size, application retries and
> doesn't clear log_true_size (because it was written a while ago, but
> compiled against latest kernel UAPI, so passes sizeof(union bpf_attr)
> that includes new field). And that suddenly starts failing with
> -EINVAL.
>
> Seems like an unfortunate side effect, no? What's the harm in not
> validating this field, if it's an output-only parameter?

Hmm good point. Just abundance of caution, but in this case it doesn't
make sense.




[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