Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-29 Thread Xu Kuohai
On 4/30/2024 6:18 AM, Eduard Zingerman wrote: On Mon, 2024-04-29 at 13:58 -0700, Andrii Nakryiko wrote: [...] diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c index 8f0f2e21699e..b69c89bc5cfc 100644 --- a/kernel/bpf/verifier.c +++ b/kernel/bpf/verifier.c @@ -13478,6 +13478,28 @@ stat

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-29 Thread Xu Kuohai
On 4/30/2024 4:58 AM, Andrii Nakryiko wrote: On Sun, Apr 28, 2024 at 8:15 AM Xu Kuohai wrote: On 4/27/2024 4:36 AM, Andrii Nakryiko wrote: On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 A

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-29 Thread Eduard Zingerman
On Mon, 2024-04-29 at 13:58 -0700, Andrii Nakryiko wrote: [...] > > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > > index 8f0f2e21699e..b69c89bc5cfc 100644 > > --- a/kernel/bpf/verifier.c > > +++ b/kernel/bpf/verifier.c > > @@ -13478,6 +13478,28 @@ static void scalar32_min_max_and(

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-29 Thread Eduard Zingerman
On Sun, 2024-04-28 at 23:15 +0800, Xu Kuohai wrote: [...] > diff --git a/kernel/bpf/tnum.c b/kernel/bpf/tnum.c > index 9dbc31b25e3d..9d4480a683ca 100644 > --- a/kernel/bpf/tnum.c > +++ b/kernel/bpf/tnum.c > @@ -150,6 +150,29 @@ struct tnum tnum_intersect(struct tnum a, struct tnum b) > r

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-29 Thread Andrii Nakryiko
On Sun, Apr 28, 2024 at 8:15 AM Xu Kuohai wrote: > > On 4/27/2024 4:36 AM, Andrii Nakryiko wrote: > > On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote: > >> > >> On 4/24/2024 5:55 AM, Yonghong Song wrote: > >>> > >>> On 4/20/24 1:33 AM, Xu Kuohai wrote: > On 4/20/2024 7:00 AM, Eduard Zingerma

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-28 Thread Xu Kuohai
On 4/27/2024 4:36 AM, Andrii Nakryiko wrote: On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-26 Thread Andrii Nakryiko
On Tue, Apr 23, 2024 at 7:26 PM Xu Kuohai wrote: > > On 4/24/2024 5:55 AM, Yonghong Song wrote: > > > > On 4/20/24 1:33 AM, Xu Kuohai wrote: > >> On 4/20/2024 7:00 AM, Eduard Zingerman wrote: > >>> On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: > From: Xu Kuohai > > With lsm r

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-26 Thread Xu Kuohai
On 4/26/2024 12:28 AM, Yonghong Song wrote: On 4/24/24 7:42 PM, Xu Kuohai wrote: On 4/25/2024 6:06 AM, Yonghong Song wrote: On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: O

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-25 Thread Yonghong Song
On 4/24/24 7:42 PM, Xu Kuohai wrote: On 4/25/2024 6:06 AM, Yonghong Song wrote: On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-24 Thread Xu Kuohai
On 4/25/2024 6:06 AM, Yonghong Song wrote: On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm retur

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-24 Thread Yonghong Song
On 4/23/24 7:25 PM, Xu Kuohai wrote: On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm return value check, the no-alu32 version test_l

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-23 Thread Xu Kuohai
On 4/24/2024 5:55 AM, Yonghong Song wrote: On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm return value check, the no-alu32 version test_libbpf_get_fd_by_id_opts is rejected by th

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-23 Thread Yonghong Song
On 4/20/24 1:33 AM, Xu Kuohai wrote: On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm return value check, the no-alu32 version test_libbpf_get_fd_by_id_opts is rejected by the verifier, and the log says:    0: R1=c

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-20 Thread Xu Kuohai
On 4/20/2024 7:00 AM, Eduard Zingerman wrote: On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: From: Xu Kuohai With lsm return value check, the no-alu32 version test_libbpf_get_fd_by_id_opts is rejected by the verifier, and the log says: 0: R1=ctx() R10=fp0 ; int BPF_PROG(check_acces

Re: [PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-19 Thread Eduard Zingerman
On Thu, 2024-04-11 at 20:27 +0800, Xu Kuohai wrote: > From: Xu Kuohai > > With lsm return value check, the no-alu32 version > test_libbpf_get_fd_by_id_opts > is rejected by the verifier, and the log says: > > 0: R1=ctx() R10=fp0 > ; int BPF_PROG(check_access, struct bpf_map *map, fmode_t fm

[PATCH bpf-next v3 07/11] bpf: Fix a false rejection caused by AND operation

2024-04-11 Thread Xu Kuohai
From: Xu Kuohai With lsm return value check, the no-alu32 version test_libbpf_get_fd_by_id_opts is rejected by the verifier, and the log says: 0: R1=ctx() R10=fp0 ; int BPF_PROG(check_access, struct bpf_map *map, fmode_t fmode) @ test_libbpf_get_fd_by_id_opts.c:27 0: (b7) r0 = 0