aboutsummaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-10-12 14:21:56 -0400
committerDavid S. Miller <davem@davemloft.net>2019-10-12 14:21:56 -0400
commit8caf8a91f34d55e8e3b1355ee8d658cb472146e2 (patch)
tree3d3d88878d6c966c854e857dbd8cec701cd3a347 /samples
parentf0308fb0708078d6c1d8a4d533941a7a191af634 (diff)
parent106c35dda32f8b63f88cad7433f1b8bb0056958a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says: ==================== pull-request: bpf 2019-10-12 The following pull-request contains BPF updates for your *net* tree. The main changes are: 1) a bunch of small fixes. Nothing critical. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/asm_goto_workaround.h13
-rw-r--r--samples/bpf/task_fd_query_user.c1
2 files changed, 13 insertions, 1 deletions
diff --git a/samples/bpf/asm_goto_workaround.h b/samples/bpf/asm_goto_workaround.h
index 7409722727ca..7048bb3594d6 100644
--- a/samples/bpf/asm_goto_workaround.h
+++ b/samples/bpf/asm_goto_workaround.h
@@ -3,7 +3,8 @@
3#ifndef __ASM_GOTO_WORKAROUND_H 3#ifndef __ASM_GOTO_WORKAROUND_H
4#define __ASM_GOTO_WORKAROUND_H 4#define __ASM_GOTO_WORKAROUND_H
5 5
6/* this will bring in asm_volatile_goto macro definition 6/*
7 * This will bring in asm_volatile_goto and asm_inline macro definitions
7 * if enabled by compiler and config options. 8 * if enabled by compiler and config options.
8 */ 9 */
9#include <linux/types.h> 10#include <linux/types.h>
@@ -13,5 +14,15 @@
13#define asm_volatile_goto(x...) asm volatile("invalid use of asm_volatile_goto") 14#define asm_volatile_goto(x...) asm volatile("invalid use of asm_volatile_goto")
14#endif 15#endif
15 16
17/*
18 * asm_inline is defined as asm __inline in "include/linux/compiler_types.h"
19 * if supported by the kernel's CC (i.e CONFIG_CC_HAS_ASM_INLINE) which is not
20 * supported by CLANG.
21 */
22#ifdef asm_inline
23#undef asm_inline
24#define asm_inline asm
25#endif
26
16#define volatile(x...) volatile("") 27#define volatile(x...) volatile("")
17#endif 28#endif
diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_user.c
index e39938058223..4c31b305e6ef 100644
--- a/samples/bpf/task_fd_query_user.c
+++ b/samples/bpf/task_fd_query_user.c
@@ -13,6 +13,7 @@
13#include <sys/resource.h> 13#include <sys/resource.h>
14#include <sys/types.h> 14#include <sys/types.h>
15#include <sys/stat.h> 15#include <sys/stat.h>
16#include <linux/perf_event.h>
16 17
17#include "libbpf.h" 18#include "libbpf.h"
18#include "bpf_load.h" 19#include "bpf_load.h"