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]
Date:   Tue, 29 Mar 2022 09:25:52 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>
Cc:     Beau Belgrave <beaub@...ux.microsoft.com>,
        Beau Belgrave <beaub@...rosoft.com>,
        linux-arch <linux-arch@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-trace-devel <linux-trace-devel@...r.kernel.org>,
        rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: Comments on new user events ABI

On Tue, Mar 29, 2022 at 9:17 AM Mathieu Desnoyers
<mathieu.desnoyers@...icios.com> wrote:
>
> >
> >> include/uapi/linux/user_events.h:
> >>
> >> struct user_bpf_iter {
> >>
> >>         /* Offset of the data within the first iovec */
> >>         __u32 iov_offset;
> >>
> >>         /* Number of iovec structures */
> >>         __u32 nr_segs;
> >>
> >>         /* Pointer to iovec structures */
> >>         const struct iovec *iov;
> >>
> >>                            ^ a pointer in a uapi header is usually a no-go. This should be a u64.
> >> };
> >>
> >> include/uapi/linux/user_events.h:
> >>
> >> struct user_bpf_context {
> >>
> >>         /* Data type being passed (see union below) */
> >>         __u32 data_type;
> >>
> >>         /* Length of the data */
> >>         __u32 data_len;
> >>
> >>         /* Pointer to data, varies by data type */
> >>         union {
> >>                 /* Kernel data (data_type == USER_BPF_DATA_KERNEL) */
> >>                 void *kdata;
> >>
> >>                 /* User data (data_type == USER_BPF_DATA_USER) */
> >>                 void *udata;
> >>
> >>                 /* Direct iovec (data_type == USER_BPF_DATA_ITER) */
> >>                 struct user_bpf_iter *iter;
> >>
> >>                                ^ likewise for the 3 pointers above. Should be u64 in uapi headers.
> >>         };
> >> };
> >>
> >
> > The bpf structs are only used within a BPF program. At that point the pointer
> > sizes should all align, right?
>
> I must admit I do not know enough about the eBPF uapi practices to answer this.
> [CCing Alexei on this]

Mathieu,

Thanks for flagging.

Whoever added this user_bpf* stuff please remove it immediately.
It was never reviewed by bpf maintainers.

It's a hard Nack to add a bpf interface to user_events.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ