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
| ||
|
Message-ID: <CAPhsuW7DxW-3MJKd+26eLGZ+hT_sWnV+QOW8BCy-51VzPsXKTA@mail.gmail.com> Date: Fri, 15 Apr 2022 16:55:27 -0700 From: Song Liu <song@...nel.org> To: Alexander Lobakin <alobakin@...me> Cc: Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, Andrii Nakryiko <andrii@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>, Mark Rutland <mark.rutland@....com>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, Namhyung Kim <namhyung@...nel.org>, Martin KaFai Lau <kafai@...com>, Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>, John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>, "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>, Björn Töpel <bjorn@...nel.org>, Magnus Karlsson <magnus.karlsson@...el.com>, Jonathan Lemon <jonathan.lemon@...il.com>, Nathan Chancellor <nathan@...nel.org>, Nick Desaulniers <ndesaulniers@...gle.com>, Dmitrii Dolgov <9erthalion6@...il.com>, Quentin Monnet <quentin@...valent.com>, Tiezhu Yang <yangtiezhu@...ngson.cn>, Kumar Kartikeya Dwivedi <memxor@...il.com>, Chenbo Feng <fengc@...gle.com>, Willem de Bruijn <willemb@...gle.com>, Daniel Wagner <daniel.wagner@...-carit.de>, Thomas Graf <tgraf@...g.ch>, Ong Boon Leong <boon.leong.ong@...el.com>, linux-perf-users@...r.kernel.org, open list <linux-kernel@...r.kernel.org>, Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>, llvm@...ts.linux.dev Subject: Re: [PATCH bpf-next 09/11] samples: bpf: fix include order for non-Glibc environments On Thu, Apr 14, 2022 at 3:47 PM Alexander Lobakin <alobakin@...me> wrote: > > Some standard C library implementations, e.g. Musl, ship the UAPI > definitions themselves to not be dependent on the UAPI headers and > their versions. Their kernel UAPI counterparts are usually guarded > with some definitions which the formers set in order to avoid > duplicate definitions. > In such cases, include order matters. Change it in two samples: in > the first, kernel UAPI ioctl definitions should go before the libc > ones, and the opposite story with the second, where the kernel > includes should go later to avoid struct redefinitions. > > Fixes: b4b8faa1ded7 ("samples/bpf: sample application and documentation for AF_XDP sockets") > Fixes: e55190f26f92 ("samples/bpf: Fix build for task_fd_query_user.c") > Signed-off-by: Alexander Lobakin <alobakin@...me> Acked-by: Song Liu <songliubraving@...com> > --- > samples/bpf/task_fd_query_user.c | 2 +- > samples/bpf/xdpsock_user.c | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_user.c > index 424718c0872c..5d3a60547f9f 100644 > --- a/samples/bpf/task_fd_query_user.c > +++ b/samples/bpf/task_fd_query_user.c > @@ -9,10 +9,10 @@ > #include <stdint.h> > #include <fcntl.h> > #include <linux/bpf.h> > +#include <linux/perf_event.h> > #include <sys/ioctl.h> > #include <sys/types.h> > #include <sys/stat.h> > -#include <linux/perf_event.h> > > #include <bpf/bpf.h> > #include <bpf/libbpf.h> > diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c > index be7d2572e3e6..399b999fcec2 100644 > --- a/samples/bpf/xdpsock_user.c > +++ b/samples/bpf/xdpsock_user.c > @@ -7,14 +7,15 @@ > #include <linux/bpf.h> > #include <linux/if_link.h> > #include <linux/if_xdp.h> > -#include <linux/if_ether.h> > #include <linux/ip.h> > #include <linux/limits.h> > +#include <linux/net.h> > #include <linux/udp.h> > #include <arpa/inet.h> > #include <locale.h> > #include <net/ethernet.h> > #include <netinet/ether.h> > +#include <linux/if_ether.h> > #include <net/if.h> > #include <poll.h> > #include <pthread.h> > -- > 2.35.2 > >
Powered by blists - more mailing lists