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]
Date:   Fri, 20 Dec 2019 10:40:25 +0100
From:   Magnus Karlsson <magnus.karlsson@...il.com>
To:     Alex Forster <aforster@...udflare.com>
Cc:     bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: getsockopt(XDP_MMAP_OFFSETS) syscall ABI breakage?

On Thu, Dec 19, 2019 at 10:47 PM Alex Forster <aforster@...udflare.com> wrote:
>
> The getsockopt(XDP_MMAP_OFFSETS) socket option returns a struct
> xdp_mmap_offsets (from uapi/linux/if_xdp.h) which is defined as:
>
>     struct xdp_mmap_offsets {
>         struct xdp_ring_offset rx;
>         struct xdp_ring_offset tx;
>         struct xdp_ring_offset fr; /* Fill */
>         struct xdp_ring_offset cr; /* Completion */
>     };
>
> Prior to kernel 5.4, struct xdp_ring_offset (from the same header) was
> defined as:
>
>     struct xdp_ring_offset {
>         __u64 producer;
>         __u64 consumer;
>         __u64 desc;
>     };
>
> A few months ago, in 77cd0d7, it was changed to the following:
>
>     struct xdp_ring_offset {
>         __u64 producer;
>         __u64 consumer;
>         __u64 desc;
>         __u64 flags;
>     };
>
> I believe this constitutes a syscall ABI breakage, which I did not
> think was allowed. Have I misunderstood the current stability
> guarantees for AF_XDP?

Version 5.4 and above supports both the old definition and the new. If
you enter the size of the old struct xdp_mmap_offsets into the
getsockopt, you get the results in the form that was there before 5.4.
If you enter the size of the new struct, you get the results in the
new form introduced in commit 77cd0d7.

> Alex Forster

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ