lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fe0952af-e5b2-e0d3-5695-13405fc9b5a5@iogearbox.net>
Date: Wed, 19 Jul 2023 16:22:52 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: ast@...nel.org, andrii@...nel.org, martin.lau@...ux.dev,
 razor@...ckwall.org, john.fastabend@...il.com, kuba@...nel.org,
 dxu@...uu.xyz, joe@...ium.io, toke@...nel.org, davem@...emloft.net,
 bpf@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH bpf-next v5 1/8] bpf: Add generic attach/detach/query API
 for multi-progs

On 7/17/23 7:14 PM, Stanislav Fomichev wrote:
[...]
> Andrii was asking whether we need to explicitly reject zero in [0] and
> we've been chatting with Alexei about the same in [1]. So are we trying
> to be more flexible here on purpose or should we outright return -EINVAL
> for 0 id_or_fd? (or am I misreading this part?)

I was thinking if we can support it then why not, but fair enough, I changed
it in v6 into ...

   if (id)
     <resolve id>
   else if (id_or_fd)
     <resolve fd>

... format and rejecting 0 fd case with error. The !id_or_fd && !id case I
moved out of bpf_mprog_prog() and one layer up into bpf_mprog_tuple_relative()
with a comment to avoid confusion on why it is there. This is the case when we
have before/after with no object (and no id/link flag) for the prepend/append
case.

> The rest looks great, thanks for the docs indeed!

Thanks!

> 0: https://lore.kernel.org/bpf/CAEf4Bza_X30yLPm0Lhy2c-u1Qw1Ci9AVoy5jo_XXCaT9zz+3jg@mail.gmail.com/
> 1: https://lore.kernel.org/bpf/CAKH8qBsr5vYijQSVv0EO8TF7zfoAdAaWC8jpVKK_nGSgAoyiQg@mail.gmail.com/#t


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ