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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABFh=a7FGM--6M+TKZbx17MydEW5zTksrdfwWQ9dTHnrG=C3zQ@mail.gmail.com>
Date: Thu, 31 Jul 2025 14:26:47 -0400
From: Emil Tsalapatis <linux-lists@...alapatis.com>
To: Amery Hung <ameryhung@...il.com>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, alexei.starovoitov@...il.com, 
	andrii@...nel.org, daniel@...earbox.net, tj@...nel.org, memxor@...il.com, 
	martin.lau@...nel.org, kernel-team@...a.com
Subject: Re: [PATCH bpf-next v7 1/4] bpf: Allow syscall bpf programs to call
 non-recur helpers

On Wed, Jul 30, 2025 at 2:59 PM Amery Hung <ameryhung@...il.com> wrote:
>
> Allow syscall programs to call non-recur helpers too since syscall bpf
> programs runs in process context through bpf syscall, BPF_PROG_TEST_RUN,
> and cannot run recursively.
>
> bpf_task_storage_{get,set} have "_recur" versions that call trylock
> instead of taking the lock directly to avoid deadlock when called by
> bpf programs that run recursively. Currently, only bpf_lsm, bpf_iter,
> struct_ops without private stack are allow to call the non-recur helpers
> since they cannot be recursively called in another bpf program.
>
> Signed-off-by: Amery Hung <ameryhung@...il.com>

Re-adding the tags in the case this is the final version, as we
discussed off-list.

Reviewed-by: Emil Tsalapatis <emil@...alapatis.com>

> ---
>  include/linux/bpf_verifier.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/bpf_verifier.h b/include/linux/bpf_verifier.h
> index 94defa405c85..c823f8efe3ed 100644
> --- a/include/linux/bpf_verifier.h
> +++ b/include/linux/bpf_verifier.h
> @@ -962,6 +962,7 @@ static inline bool bpf_prog_check_recur(const struct bpf_prog *prog)
>         case BPF_PROG_TYPE_STRUCT_OPS:
>                 return prog->aux->jits_use_priv_stack;
>         case BPF_PROG_TYPE_LSM:
> +       case BPF_PROG_TYPE_SYSCALL:
>                 return false;
>         default:
>                 return true;
> --
> 2.47.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ