1
0
Fork 0
alistair23-linux/samples
Alexei Starovoitov 636e78b1cd samples/bpf: fix build with new clang
clang started to error on invalid asm clobber usage in x86 headers
and many bpf program samples failed to build with the message:

  CLANG-bpf  /data/users/ast/bpf-next/samples/bpf/xdp_redirect_kern.o
In file included from /data/users/ast/bpf-next/samples/bpf/xdp_redirect_kern.c:14:
In file included from ../include/linux/in.h:23:
In file included from ../include/uapi/linux/in.h:24:
In file included from ../include/linux/socket.h:8:
In file included from ../include/linux/uio.h:14:
In file included from ../include/crypto/hash.h:16:
In file included from ../include/linux/crypto.h:26:
In file included from ../include/linux/uaccess.h:5:
In file included from ../include/linux/sched.h:15:
In file included from ../include/linux/sem.h:5:
In file included from ../include/uapi/linux/sem.h:5:
In file included from ../include/linux/ipc.h:9:
In file included from ../include/linux/refcount.h:72:
../arch/x86/include/asm/refcount.h:72:36: error: asm-specifier for input or output variable conflicts with asm clobber list
                                         r->refs.counter, e, "er", i, "cx");
                                                                      ^
../arch/x86/include/asm/refcount.h:86:27: error: asm-specifier for input or output variable conflicts with asm clobber list
                                         r->refs.counter, e, "cx");
                                                             ^
2 errors generated.

Override volatile() to workaround the problem.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-04-05 16:28:36 +02:00
..
auxdisplay auxdisplay: Replace licenses with SPDX identifiers 2018-04-12 19:02:45 +02:00
binderfs samples: add binderfs sample program 2019-01-14 17:22:22 -07:00
bpf samples/bpf: fix build with new clang 2019-04-05 16:28:36 +02:00
configfs configfs: make config_item_type const 2017-10-19 16:15:15 +02:00
connector kbuild: announce removal of SUBDIRS if used 2018-12-01 22:21:56 +09:00
hidraw HID: samples/hidraw: fix typo in printed message 2018-11-21 00:31:58 +01:00
hw_breakpoint perf: Add context field to perf_event 2011-07-01 11:06:38 +02:00
kdb kdb: Add kdb kernel module sample 2010-10-29 13:14:39 -05:00
kfifo kfifo: clean up example to not use page_link 2017-07-12 16:26:01 -07:00
kobject kobject: Remove redundant license text 2017-12-07 18:36:43 +01:00
kprobes arch: remove tile port 2018-03-16 10:56:03 +01:00
livepatch Merge branch 'for-5.0/upstream-fixes' into for-linus 2019-03-05 15:55:59 +01:00
mei samples: mei: use /dev/mei0 instead of /dev/mei 2019-01-30 15:24:45 +01:00
mic/mpssd samples/mic/mpssd/mpssd.h: remove duplicate header 2019-03-07 18:32:03 -08:00
pktgen Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-11-04 09:26:51 +09:00
qmi samples: Introduce Qualcomm QMI sample client 2018-02-12 16:57:22 -08:00
rpmsg rpmsg: Allow callback to return errors 2016-09-08 22:15:25 -07:00
seccomp samples/seccomp: Fix 32-bit build 2019-01-08 07:45:01 +01:00
statx kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
timers License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trace_events Merge branch 'for-linus' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2017-11-15 10:14:11 -08:00
trace_printk tracing: Add trace_printk sample code 2016-06-20 09:54:21 -04:00
uhid kbuild: remove all dummy assignments to obj- 2017-11-18 11:46:06 +09:00
v4l media: v4l2-pci-skeleton.c: fix outdated irq code 2019-01-25 18:47:06 -02:00
vfio-mdev samples/vfio-mdev/mtty: expand minor range when registering chrdev region 2019-02-12 13:21:18 -07:00
watchdog License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig samples: add binderfs sample program 2019-01-14 17:22:22 -07:00
Makefile samples: add binderfs sample program 2019-01-14 17:22:22 -07:00