2021-08-24 06:03:09

by Song Liu

[permalink] [raw]
Subject: [PATCH bpf-next 0/3] bpf: introduce bpf_get_branch_trace

Branch stack can be very useful in understanding software events. For
example, when a long function, e.g. sys_perf_event_open, returns an errno,
it is not obvious why the function failed. Branch stack could provide very
helpful information in this type of scenarios.

This set adds support to read branch stack with a new BPF helper
bpf_get_branch_trace(). Currently, this is only supported in Intel systems.
It is also possible to support the same feaure for PowerPC.

The hardware that records the branch stace is not stopped automatically on
software events. Therefore, it is necessary to stop it in software soon.
Otherwise, the hardware buffers/registers will be flushed. One of the key
design consideration in this set is to minimize the number of branch record
entries between the event triggers and the hardware recorder is stopped.
Based on this goal, current design is different from the discussions in
original RFC [1]:
1) Static call is used when supported, to save function pointer
dereference;
2) intel_pmu_lbr_disable_all is used instead of perf_pmu_disable(),
because the latter uses about 10 entries before stopping LBR.

With current code, on Intel CPU, LBR is stopped after 6 branch entries
after fexit triggers:

ID: 0 from intel_pmu_lbr_disable_all.part.10+37 to intel_pmu_lbr_disable_all.part.10+72
ID: 1 from intel_pmu_lbr_disable_all.part.10+33 to intel_pmu_lbr_disable_all.part.10+37
ID: 2 from intel_pmu_snapshot_branch_stack+46 to intel_pmu_lbr_disable_all.part.10+0
ID: 3 from __bpf_prog_enter+38 to intel_pmu_snapshot_branch_stack+0
ID: 4 from __bpf_prog_enter+8 to __bpf_prog_enter+38
ID: 5 from __brk_limit+477020214 to __bpf_prog_enter+0
ID: 6 from bpf_fexit_loop_test1+22 to __brk_limit+477020195
ID: 7 from bpf_fexit_loop_test1+20 to bpf_fexit_loop_test1+13
ID: 8 from bpf_fexit_loop_test1+20 to bpf_fexit_loop_test1+13
...

[1] https://lore.kernel.org/bpf/[email protected]/

Song Liu (3):
perf: enable branch record for software events
bpf: introduce helper bpf_get_branch_trace
selftests/bpf: add test for bpf_get_branch_trace

arch/x86/events/intel/core.c | 5 +-
arch/x86/events/intel/lbr.c | 12 ++
arch/x86/events/perf_event.h | 2 +
include/linux/filter.h | 3 +-
include/linux/perf_event.h | 33 ++++++
include/uapi/linux/bpf.h | 16 +++
kernel/bpf/trampoline.c | 15 +++
kernel/bpf/verifier.c | 7 ++
kernel/events/core.c | 28 +++++
kernel/trace/bpf_trace.c | 30 +++++
net/bpf/test_run.c | 15 ++-
tools/include/uapi/linux/bpf.h | 16 +++
.../bpf/prog_tests/get_branch_trace.c | 106 ++++++++++++++++++
.../selftests/bpf/progs/get_branch_trace.c | 41 +++++++
tools/testing/selftests/bpf/trace_helpers.c | 30 +++++
tools/testing/selftests/bpf/trace_helpers.h | 5 +
16 files changed, 361 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/get_branch_trace.c
create mode 100644 tools/testing/selftests/bpf/progs/get_branch_trace.c

--
2.30.2


2021-08-24 06:03:25

by Song Liu

[permalink] [raw]
Subject: [PATCH bpf-next 2/3] bpf: introduce helper bpf_get_branch_trace

Introduce bpf_get_branch_trace(), which allows tracing pogram to get
branch trace from hardware (e.g. Intel LBR). To use the feature, the
user need to create perf_event with proper branch_record filtering
on each cpu, and then calls bpf_get_branch_trace in the bpf function.
On Intel CPUs, VLBR event (raw event 0x1b00) can be use for this.

Signed-off-by: Song Liu <[email protected]>
---
include/linux/filter.h | 3 ++-
include/uapi/linux/bpf.h | 16 ++++++++++++++++
kernel/bpf/trampoline.c | 15 +++++++++++++++
kernel/bpf/verifier.c | 7 +++++++
kernel/trace/bpf_trace.c | 30 ++++++++++++++++++++++++++++++
tools/include/uapi/linux/bpf.h | 16 ++++++++++++++++
6 files changed, 86 insertions(+), 1 deletion(-)

diff --git a/include/linux/filter.h b/include/linux/filter.h
index 7d248941ecea3..8c30712f56ab2 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -575,7 +575,8 @@ struct bpf_prog {
has_callchain_buf:1, /* callchain buffer allocated? */
enforce_expected_attach_type:1, /* Enforce expected_attach_type checking at attach time */
call_get_stack:1, /* Do we call bpf_get_stack() or bpf_get_stackid() */
- call_get_func_ip:1; /* Do we call get_func_ip() */
+ call_get_func_ip:1, /* Do we call get_func_ip() */
+ call_get_branch:1; /* Do we call get_branch_trace() */
enum bpf_prog_type type; /* Type of BPF program */
enum bpf_attach_type expected_attach_type; /* For some prog types */
u32 len; /* Number of filter blocks */
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 191f0b286ee39..4b1ddb76603a5 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -4871,6 +4871,21 @@ union bpf_attr {
* Return
* Value specified by user at BPF link creation/attachment time
* or 0, if it was not specified.
+ *
+ * long bpf_get_branch_trace(void *entries, u32 size)
+ * Description
+ * Get branch trace from hardware engines like Intel LBR. The
+ * branch trace is taken soon after the trigger point of the
+ * BPF program, so it may contain some entries after the
+ * trigger point. The user need to filter these entries
+ * accordingly.
+ *
+ * The data is stored as struct perf_branch_entry into output
+ * buffer *entries*. *size* is the size of *entries* in bytes.
+ *
+ * Return
+ * > 0, number of valid output entries.
+ * **-EOPNOTSUP**, the hardware/kernel does not support this function
*/
#define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \
@@ -5048,6 +5063,7 @@ union bpf_attr {
FN(timer_cancel), \
FN(get_func_ip), \
FN(get_attach_cookie), \
+ FN(get_branch_trace), \
/* */

/* integer value in 'imm' field of BPF_CALL instruction selects which helper
diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c
index fe1e857324e66..c36d3d7366cc9 100644
--- a/kernel/bpf/trampoline.c
+++ b/kernel/bpf/trampoline.c
@@ -10,6 +10,7 @@
#include <linux/rcupdate_trace.h>
#include <linux/rcupdate_wait.h>
#include <linux/module.h>
+#include <linux/static_call.h>

/* dummy _ops. The verifier will operate on target program's ops. */
const struct bpf_verifier_ops bpf_extension_verifier_ops = {
@@ -564,6 +565,20 @@ static void notrace inc_misses_counter(struct bpf_prog *prog)
u64 notrace __bpf_prog_enter(struct bpf_prog *prog)
__acquires(RCU)
{
+ /* Calling migrate_disable costs two entries in the LBR. To save
+ * some entries, we call perf_snapshot_branch_stack before
+ * migrate_disable to save some entries. This is OK because we
+ * care about the branch trace before entering the BPF program.
+ * If migrate happens exactly here, there isn't much we can do to
+ * preserve the data.
+ */
+ if (prog->call_get_branch) {
+#ifdef CONFIG_HAVE_STATIC_CALL
+ static_call(perf_snapshot_branch_stack)();
+#else
+ perf_snapshot_branch_stack();
+#endif
+ }
rcu_read_lock();
migrate_disable();
if (unlikely(__this_cpu_inc_return(*(prog->active)) != 1)) {
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index f5a0077c99811..292d2b471892a 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -6446,6 +6446,13 @@ static int check_helper_call(struct bpf_verifier_env *env, struct bpf_insn *insn
env->prog->call_get_func_ip = true;
}

+ if (func_id == BPF_FUNC_get_branch_trace) {
+ if (env->prog->aux->sleepable) {
+ verbose(env, "sleepable progs cannot call get_branch_trace\n");
+ return -ENOTSUPP;
+ }
+ env->prog->call_get_branch = true;
+ }
if (changes_data)
clear_all_pkt_pointers(env);
return 0;
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index cbc73c08c4a4e..fe0a653190a5f 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -1002,6 +1002,19 @@ static const struct bpf_func_proto bpf_get_attach_cookie_proto_pe = {
.arg1_type = ARG_PTR_TO_CTX,
};

+BPF_CALL_2(bpf_get_branch_trace, void *, buf, u32, size)
+{
+ return perf_read_branch_snapshot(buf, size);
+}
+
+static const struct bpf_func_proto bpf_get_branch_trace_proto = {
+ .func = bpf_get_branch_trace,
+ .gpl_only = true,
+ .ret_type = RET_INTEGER,
+ .arg1_type = ARG_PTR_TO_UNINIT_MEM,
+ .arg2_type = ARG_CONST_SIZE_OR_ZERO,
+};
+
static const struct bpf_func_proto *
bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
{
@@ -1115,6 +1128,8 @@ bpf_tracing_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
return &bpf_snprintf_proto;
case BPF_FUNC_get_func_ip:
return &bpf_get_func_ip_proto_tracing;
+ case BPF_FUNC_get_branch_trace:
+ return &bpf_get_branch_trace_proto;
default:
return bpf_base_func_proto(func_id);
}
@@ -1849,6 +1864,21 @@ void bpf_put_raw_tracepoint(struct bpf_raw_event_map *btp)
static __always_inline
void __bpf_trace_run(struct bpf_prog *prog, u64 *args)
{
+ /* Calling migrate_disable costs two entries in the LBR. To save
+ * some entries, we call perf_snapshot_branch_stack before
+ * migrate_disable to save some entries. This is OK because we
+ * care about the branch trace before entering the BPF program.
+ * If migrate happens exactly here, there isn't much we can do to
+ * preserve the data.
+ */
+ if (prog->call_get_branch) {
+#ifdef CONFIG_HAVE_STATIC_CALL
+ static_call(perf_snapshot_branch_stack)();
+#else
+ perf_snapshot_branch_stack();
+#endif
+ }
+
cant_sleep();
rcu_read_lock();
(void) bpf_prog_run(prog, args);
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 191f0b286ee39..4b1ddb76603a5 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -4871,6 +4871,21 @@ union bpf_attr {
* Return
* Value specified by user at BPF link creation/attachment time
* or 0, if it was not specified.
+ *
+ * long bpf_get_branch_trace(void *entries, u32 size)
+ * Description
+ * Get branch trace from hardware engines like Intel LBR. The
+ * branch trace is taken soon after the trigger point of the
+ * BPF program, so it may contain some entries after the
+ * trigger point. The user need to filter these entries
+ * accordingly.
+ *
+ * The data is stored as struct perf_branch_entry into output
+ * buffer *entries*. *size* is the size of *entries* in bytes.
+ *
+ * Return
+ * > 0, number of valid output entries.
+ * **-EOPNOTSUP**, the hardware/kernel does not support this function
*/
#define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \
@@ -5048,6 +5063,7 @@ union bpf_attr {
FN(timer_cancel), \
FN(get_func_ip), \
FN(get_attach_cookie), \
+ FN(get_branch_trace), \
/* */

/* integer value in 'imm' field of BPF_CALL instruction selects which helper
--
2.30.2

2021-08-24 06:04:44

by Song Liu

[permalink] [raw]
Subject: [PATCH bpf-next 3/3] selftests/bpf: add test for bpf_get_branch_trace

This test uses bpf_get_branch_trace from a fexit program. The test uses
a target kernel function (bpf_fexit_loop_test1) and compares the record
against kallsyms. If there isn't enough record matching kallsyms, the
test fails.

Signed-off-by: Song Liu <[email protected]>
---
net/bpf/test_run.c | 15 ++-
.../bpf/prog_tests/get_branch_trace.c | 106 ++++++++++++++++++
.../selftests/bpf/progs/get_branch_trace.c | 41 +++++++
tools/testing/selftests/bpf/trace_helpers.c | 30 +++++
tools/testing/selftests/bpf/trace_helpers.h | 5 +
5 files changed, 196 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/bpf/prog_tests/get_branch_trace.c
create mode 100644 tools/testing/selftests/bpf/progs/get_branch_trace.c

diff --git a/net/bpf/test_run.c b/net/bpf/test_run.c
index 2eb0e55ef54d2..6cc179a532c9c 100644
--- a/net/bpf/test_run.c
+++ b/net/bpf/test_run.c
@@ -231,6 +231,18 @@ struct sock * noinline bpf_kfunc_call_test3(struct sock *sk)
return sk;
}

+noinline int bpf_fexit_loop_test1(int n)
+{
+ int i, sum = 0;
+
+ /* the primary goal of this test is to test LBR. Create a lot of
+ * branches in the function, so we can catch it easily.
+ */
+ for (i = 0; i < n; i++)
+ sum += i;
+ return sum;
+}
+
__diag_pop();

ALLOW_ERROR_INJECTION(bpf_modify_return_test, ERRNO);
@@ -293,7 +305,8 @@ int bpf_prog_test_run_tracing(struct bpf_prog *prog,
bpf_fentry_test5(11, (void *)12, 13, 14, 15) != 65 ||
bpf_fentry_test6(16, (void *)17, 18, 19, (void *)20, 21) != 111 ||
bpf_fentry_test7((struct bpf_fentry_test_t *)0) != 0 ||
- bpf_fentry_test8(&arg) != 0)
+ bpf_fentry_test8(&arg) != 0 ||
+ bpf_fexit_loop_test1(101) != 5050)
goto out;
break;
case BPF_MODIFY_RETURN:
diff --git a/tools/testing/selftests/bpf/prog_tests/get_branch_trace.c b/tools/testing/selftests/bpf/prog_tests/get_branch_trace.c
new file mode 100644
index 0000000000000..67693322e0974
--- /dev/null
+++ b/tools/testing/selftests/bpf/prog_tests/get_branch_trace.c
@@ -0,0 +1,106 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (c) 2021 Facebook */
+#include <test_progs.h>
+#include "get_branch_trace.skel.h"
+
+static int *pfd_array;
+static int cpu_cnt;
+
+static int create_perf_events(void)
+{
+ struct perf_event_attr attr = {0};
+ int cpu;
+
+ /* create perf event */
+ attr.size = sizeof(attr);
+ attr.type = PERF_TYPE_RAW;
+ attr.config = 0x1b00;
+ attr.sample_type = PERF_SAMPLE_BRANCH_STACK;
+ attr.branch_sample_type = PERF_SAMPLE_BRANCH_KERNEL |
+ PERF_SAMPLE_BRANCH_USER | PERF_SAMPLE_BRANCH_ANY;
+
+ cpu_cnt = libbpf_num_possible_cpus();
+ pfd_array = malloc(sizeof(int) * cpu_cnt);
+ if (!pfd_array) {
+ cpu_cnt = 0;
+ return 1;
+ }
+
+ for (cpu = 0; cpu < libbpf_num_possible_cpus(); cpu++) {
+ pfd_array[cpu] = syscall(__NR_perf_event_open, &attr,
+ -1, cpu, -1, PERF_FLAG_FD_CLOEXEC);
+ if (pfd_array[cpu] < 0)
+ break;
+ }
+
+ return cpu == 0;
+}
+
+static void close_perf_events(void)
+{
+ int cpu = 0;
+ int fd;
+
+ while (cpu++ < cpu_cnt) {
+ fd = pfd_array[cpu];
+ if (fd < 0)
+ break;
+ close(fd);
+ }
+ free(pfd_array);
+}
+
+void test_get_branch_trace(void)
+{
+ struct get_branch_trace *skel;
+ int err, prog_fd;
+ __u32 retval;
+
+ if (create_perf_events()) {
+ test__skip(); /* system doesn't support LBR */
+ goto cleanup;
+ }
+
+ skel = get_branch_trace__open_and_load();
+ if (!ASSERT_OK_PTR(skel, "get_branch_trace__open_and_load"))
+ goto cleanup;
+
+ err = kallsyms_find("bpf_fexit_loop_test1", &skel->bss->address_low);
+ if (!ASSERT_OK(err, "kallsyms_find"))
+ goto cleanup;
+
+ err = kallsyms_find_next("bpf_fexit_loop_test1", &skel->bss->address_high);
+ if (!ASSERT_OK(err, "kallsyms_find_next"))
+ goto cleanup;
+
+ err = get_branch_trace__attach(skel);
+ if (!ASSERT_OK(err, "get_branch_trace__attach"))
+ goto cleanup;
+
+ prog_fd = bpf_program__fd(skel->progs.test1);
+ err = bpf_prog_test_run(prog_fd, 1, NULL, 0,
+ NULL, 0, &retval, NULL);
+
+ if (!ASSERT_OK(err, "bpf_prog_test_run"))
+ goto cleanup;
+
+ if (skel->bss->total_entries < 16) {
+ /* too few entries for the hit/waste test */
+ test__skip();
+ goto cleanup;
+ }
+
+ ASSERT_GT(skel->bss->test1_hits, 5, "find_test1_in_lbr");
+
+ /* Given we stop LBR in software, we will waste a few entries.
+ * But we should try to waste as few as possibleentries. We are at
+ * about 7 on x86_64 systems.
+ * Add a check for < 10 so that we get heads-up when something
+ * changes and wastes too many entries.
+ */
+ ASSERT_LT(skel->bss->wasted_entries, 10, "check_wasted_entries");
+
+cleanup:
+ get_branch_trace__destroy(skel);
+ close_perf_events();
+}
diff --git a/tools/testing/selftests/bpf/progs/get_branch_trace.c b/tools/testing/selftests/bpf/progs/get_branch_trace.c
new file mode 100644
index 0000000000000..02ff41951b377
--- /dev/null
+++ b/tools/testing/selftests/bpf/progs/get_branch_trace.c
@@ -0,0 +1,41 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (c) 2021 Facebook */
+#include "vmlinux.h"
+#include <bpf/bpf_helpers.h>
+#include <bpf/bpf_tracing.h>
+
+char _license[] SEC("license") = "GPL";
+
+__u64 test1_hits = 0;
+__u64 address_low = 0;
+__u64 address_high = 0;
+int wasted_entries = 0;
+long total_entries = 0;
+
+#define MAX_LBR_ENTRIES 32
+
+struct perf_branch_entry entries[MAX_LBR_ENTRIES] = {};
+
+
+static inline bool in_range(__u64 val)
+{
+ return (val >= address_low) && (val < address_high);
+}
+
+SEC("fexit/bpf_fexit_loop_test1")
+int BPF_PROG(test1, int n, int ret)
+{
+ long i;
+
+ total_entries = bpf_get_branch_trace(entries, sizeof(entries));
+
+ for (i = 0; i < MAX_LBR_ENTRIES; i++) {
+ if (i >= total_entries)
+ break;
+ if (in_range(entries[i].from) && in_range(entries[i].to))
+ test1_hits++;
+ else if (!test1_hits)
+ wasted_entries++;
+ }
+ return 0;
+}
diff --git a/tools/testing/selftests/bpf/trace_helpers.c b/tools/testing/selftests/bpf/trace_helpers.c
index e7a19b04d4eaf..2926a3b626821 100644
--- a/tools/testing/selftests/bpf/trace_helpers.c
+++ b/tools/testing/selftests/bpf/trace_helpers.c
@@ -117,6 +117,36 @@ int kallsyms_find(const char *sym, unsigned long long *addr)
return err;
}

+/* find the address of the next symbol, this can be used to determine the
+ * end of a function
+ */
+int kallsyms_find_next(const char *sym, unsigned long long *addr)
+{
+ char type, name[500];
+ unsigned long long value;
+ bool found = false;
+ int err = 0;
+ FILE *f;
+
+ f = fopen("/proc/kallsyms", "r");
+ if (!f)
+ return -EINVAL;
+
+ while (fscanf(f, "%llx %c %499s%*[^\n]\n", &value, &type, name) > 0) {
+ if (found) {
+ *addr = value;
+ goto out;
+ }
+ if (strcmp(name, sym) == 0)
+ found = true;
+ }
+ err = -ENOENT;
+
+out:
+ fclose(f);
+ return err;
+}
+
void read_trace_pipe(void)
{
int trace_fd;
diff --git a/tools/testing/selftests/bpf/trace_helpers.h b/tools/testing/selftests/bpf/trace_helpers.h
index d907b445524d5..bc8ed86105d94 100644
--- a/tools/testing/selftests/bpf/trace_helpers.h
+++ b/tools/testing/selftests/bpf/trace_helpers.h
@@ -16,6 +16,11 @@ long ksym_get_addr(const char *name);
/* open kallsyms and find addresses on the fly, faster than load + search. */
int kallsyms_find(const char *sym, unsigned long long *addr);

+/* find the address of the next symbol, this can be used to determine the
+ * end of a function
+ */
+int kallsyms_find_next(const char *sym, unsigned long long *addr);
+
void read_trace_pipe(void);

ssize_t get_uprobe_offset(const void *addr, ssize_t base);
--
2.30.2

2021-08-25 01:15:48

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH bpf-next 2/3] bpf: introduce helper bpf_get_branch_trace

Hi Song,

I love your patch! Yet something to improve:

[auto build test ERROR on bpf-next/master]

url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-introduce-bpf_get_branch_trace/20210824-140315
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: riscv-randconfig-r025-20210825 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/e32271f38de34ebc8cc48176d9f1f0972182414e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Song-Liu/bpf-introduce-bpf_get_branch_trace/20210824-140315
git checkout e32271f38de34ebc8cc48176d9f1f0972182414e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=riscv SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

riscv64-linux-ld: kernel/bpf/trampoline.o: in function `__bpf_prog_enter':
>> trampoline.c:(.text+0x83c): undefined reference to `perf_snapshot_branch_stack'
>> riscv64-linux-ld: trampoline.c:(.text+0x840): undefined reference to `perf_snapshot_branch_stack'

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]


Attachments:
(No filename) (1.60 kB)
.config.gz (35.00 kB)
Download all attachments

2021-08-31 01:14:37

by kernel test robot

[permalink] [raw]
Subject: [selftests/bpf] 8dff2c1958: BUG:using_smp_processor_id()in_preemptible



Greeting,

FYI, we noticed the following commit (built with gcc-9):

commit: 8dff2c1958c234e90dff289a2034217b293985e4 ("[PATCH bpf-next 3/3] selftests/bpf: add test for bpf_get_branch_trace")
url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-introduce-bpf_get_branch_trace/20210824-140315
base: https://git.kernel.org/cgit/linux/kernel/git/bpf/bpf-next.git master

in testcase: kernel-selftests
version: kernel-selftests-x86_64-ebaa603b-1_20210825
with following parameters:

group: bpf
ucode: 0xde

test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt


on test machine: 4 threads 1 sockets Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz with 32G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):



If you fix the issue, kindly add following tag
Reported-by: kernel test robot <[email protected]>


kern :err : [ 136.592584] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.593280] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1868)
kern :warn : [ 136.593811] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.594609] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.595501] Call Trace:
kern :warn : [ 136.595776] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.596136] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.596565] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1868)
kern :warn : [ 136.597024] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.597434] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.597968] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.598331] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.598832] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.599172] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.599575] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.599962] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.600293] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.600711] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.601122] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.601481] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.601880] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.602239] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.602639] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.603034] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.603403] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.603740] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.604111] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.604560] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.605018] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.605455] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.605903] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.606268] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.607706] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.608350] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.609058] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.609656] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.610260] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.610920] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.611581] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.612259] caller is intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:780)
kern :warn : [ 136.612817] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.613653] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.614642] Call Trace:
kern :warn : [ 136.614904] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.615293] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.615759] intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:780)
kern :warn : [ 136.616221] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1871)
kern :warn : [ 136.616705] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.617068] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.617528] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.617923] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.618367] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.618692] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.619054] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.619418] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.619819] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.620237] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.620581] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.620976] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.621354] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.621695] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.622150] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.622491] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.622849] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.623262] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.623605] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.624072] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.624531] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.624930] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.625417] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.625835] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.627326] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.628018] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.628623] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.629262] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.629847] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.630469] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.631171] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.631873] caller is intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:782 arch/x86/events/intel/lbr.c:778)
kern :warn : [ 136.632412] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.633255] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.634100] Call Trace:
kern :warn : [ 136.634348] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.634741] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.635190] intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:782 arch/x86/events/intel/lbr.c:778)
kern :warn : [ 136.635611] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1871)
kern :warn : [ 136.636065] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.636466] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.636981] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.637347] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.637863] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.638206] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.638582] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.638944] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.639273] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.639656] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.640054] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.640412] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.640810] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.641169] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.641568] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.641963] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.642343] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.642718] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.643075] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.643575] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.644033] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.644437] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.644884] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.645231] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.646685] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.647304] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.647966] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.648588] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.649246] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.649869] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.650512] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.651226] caller is intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:1003)
kern :warn : [ 136.651691] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.652530] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.653440] Call Trace:
kern :warn : [ 136.653762] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.654133] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.654603] intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:1003)
kern :warn : [ 136.654966] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1873)
kern :warn : [ 136.655408] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.655754] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.656180] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.656562] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.656992] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.657332] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.657695] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.658040] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.658422] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.658856] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.659272] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.659613] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.660049] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.660406] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.660805] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.661220] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.661560] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.661919] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.662298] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.662746] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.663205] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.663605] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.664051] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.664383] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.665964] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.666650] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.667271] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.667893] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.668517] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.669104] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.669728] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.670431] caller is intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:1011)
kern :warn : [ 136.670867] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.671765] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.672649] Call Trace:
kern :warn : [ 136.672912] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.673301] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.673765] intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:1011)
kern :warn : [ 136.674149] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1873)
kern :warn : [ 136.674604] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.674968] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.675448] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.675865] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.676331] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.676672] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.677067] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.677413] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.677799] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.678234] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.678597] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.678991] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.679388] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.679747] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.680146] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.680505] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.680863] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.681240] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.681582] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.682043] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.682503] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.682903] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.683388] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.683771] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.685257] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.685878] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.686512] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.687152] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.687739] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.688399] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.689060] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.689760] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1872)
kern :warn : [ 136.690329] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.691130] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.691976] Call Trace:
kern :warn : [ 136.692257] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.692645] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.693130] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1872)
kern :warn : [ 136.693629] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.694029] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.694472] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.694889] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.695319] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.695693] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.696090] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.696436] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.696782] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.697181] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.697543] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.697937] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.698368] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.698762] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.699161] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.699556] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.699914] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.700291] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.700667] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.701133] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.701629] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.702029] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.702478] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.702824] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.704386] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.705038] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.705625] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.706267] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.706836] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.707496] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.708104] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.708822] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1875)
kern :warn : [ 136.709398] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.710237] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.711142] Call Trace:
kern :warn : [ 136.711429] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.711838] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.712273] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1875)
kern :warn : [ 136.712764] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.713127] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.713572] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.713953] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.714418] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.714794] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.715214] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.715539] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.715887] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.716307] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.716651] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.717008] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.717407] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.717766] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.718179] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.718549] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.718906] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.719264] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.719623] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.720089] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.720585] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.721058] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.721489] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.721854] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.723348] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.724036] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.724625] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.725212] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.725798] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.726457] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.727118] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.727822] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:772)
kern :warn : [ 136.728317] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.729158] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.730037] Call Trace:
kern :warn : [ 136.730301] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.730671] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.731121] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:772)
kern :warn : [ 136.731586] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.731987] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.732467] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.732884] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.733335] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.733656] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.734076] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.734401] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.734750] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.735204] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.735549] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.735906] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.736306] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.736665] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.737077] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.737416] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.737847] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.738204] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.738581] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.739031] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.739490] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.739921] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.740400] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.740784] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.742236] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.742870] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.743514] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.744099] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.744723] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.745328] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.746006] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.746743] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:774 arch/x86/events/intel/lbr.c:770)
kern :warn : [ 136.747218] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.748040] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.749026] Call Trace:
kern :warn : [ 136.749274] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.749627] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.750131] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:774 arch/x86/events/intel/lbr.c:770)
kern :warn : [ 136.750538] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.750938] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.751416] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.751797] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.752281] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.752604] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.752966] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.753311] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.753658] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.754091] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.754453] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.754846] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.755245] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.755589] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.756007] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.756349] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.756795] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.757153] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.757511] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.758011] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.758471] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.758871] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.759319] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.759666] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.761174] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.761776] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.762436] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.763021] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.763680] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.764266] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :err : [ 136.764875] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
kern :warn : [ 136.765626] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:190 arch/x86/events/intel/lbr.c:775 arch/x86/events/intel/lbr.c:770)
kern :warn : [ 136.766173] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
kern :warn : [ 136.767068] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
kern :warn : [ 136.767986] Call Trace:
kern :warn : [ 136.768248] dump_stack_lvl (lib/dump_stack.c:106)
kern :warn : [ 136.768620] check_preemption_disabled (lib/smp_processor_id.c:49)
kern :warn : [ 136.769141] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:190 arch/x86/events/intel/lbr.c:775 arch/x86/events/intel/lbr.c:770)
kern :warn : [ 136.769570] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
kern :warn : [ 136.769933] bpf_trampoline_6442562768_0+0x3b/0x1000
kern :warn : [ 136.770407] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
kern :warn : [ 136.770790] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
kern :warn : [ 136.771237] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
kern :warn : [ 136.771594] ? __sys_bpf (kernel/bpf/syscall.c:4629)
kern :warn : [ 136.771957] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
kern :warn : [ 136.772322] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
kern :warn : [ 136.772688] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.773087] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.773463] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.773803] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.774202] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.774563] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.774961] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.775320] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.775678] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.776035] ? do_syscall_64 (arch/x86/entry/common.c:87)
kern :warn : [ 136.776424] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.776962] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
kern :warn : [ 136.777458] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
kern :warn : [ 136.777858] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
kern :warn : [ 136.778327] RIP: 0033:0x7f0fcbd69f59
kern :warn : [ 136.778655] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
All code
========
0: 00 c3 add %al,%bl
2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
9: 00 00 00
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: 48 89 f8 mov %rdi,%rax
14: 48 89 f7 mov %rsi,%rdi
17: 48 89 d6 mov %rdx,%rsi
1a: 48 89 ca mov %rcx,%rdx
1d: 4d 89 c2 mov %r8,%r10
20: 4d 89 c8 mov %r9,%r8
23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
28: 0f 05 syscall
2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W

Code starting with the faulting instruction
===========================================
0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
6: 73 01 jae 0x9
8: c3 retq
9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
10: f7 d8 neg %eax
12: 64 89 01 mov %eax,%fs:(%rcx)
15: 48 rex.W
kern :warn : [ 136.780125] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
kern :warn : [ 136.780727] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
kern :warn : [ 136.781313] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
kern :warn : [ 136.781899] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
kern :warn : [ 136.782535] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
kern :warn : [ 136.783177] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
kern :info : [ 138.164543] perf: interrupt took too long (3153 > 3143), lowering kernel.perf_event_max_sample_rate to 63000
kern :info : [ 138.165345] perf: interrupt took too long (3153 > 3143), lowering kernel.perf_event_max_sample_rate to 63000
kern :info : [ 138.166457] perf: interrupt took too long (3945 > 3941), lowering kernel.perf_event_max_sample_rate to 50000
kern :info : [ 138.168213] perf: interrupt took too long (4932 > 4931), lowering kernel.perf_event_max_sample_rate to 40000
user :notice: [ 139.355105] # run_tests_skb_less:FAIL:ipv6-frag nhoff=0/14 thoff=0/62 addr_proto=0x0/0x86dd is_frag=0/1 is_first_frag=0/1 is_encap=0/0 ip_proto=0x0/0x6 n_proto=0x0/0xdd86 flow_label=0x0/0x0 sport=0/80 dport=0/8080

user :notice: [ 139.359537] # run_tests_skb_less:FAIL:ipv6-frag bpf_map_delete_elem -2

user :notice: [ 139.362850] # test_skb_less_link_create:PASS:bpf_link__destroy 0 nsec

user :notice: [ 139.364974] # #46 flow_dissector:FAIL

user :notice: [ 139.367223] # #47 flow_dissector_load_bytes:OK

user :notice: [ 139.370893] # #48/1 flow_dissector_reattach/flow dissector prog attach, prog attach (init_net):OK

user :notice: [ 139.375234] # #48/2 flow_dissector_reattach/flow dissector link create, link create (init_net):OK

user :notice: [ 139.379842] # #48/3 flow_dissector_reattach/flow dissector prog attach, link create (init_net):OK

user :notice: [ 139.382497] # #48/4 flow_dissector_reattach/flow dissector link create, prog attach (init_net):OK

user :notice: [ 139.385061] # #48/5 flow_dissector_reattach/flow dissector link create, prog detach (init_net):OK

user :notice: [ 139.387717] # #48/6 flow_dissector_reattach/flow dissector prog attach, detach, query (init_net):OK

user :notice: [ 139.390353] # #48/7 flow_dissector_reattach/flow dissector link create, close, query (init_net):OK

user :notice: [ 139.392961] # #48/8 flow_dissector_reattach/flow dissector link update no old prog (init_net):OK

user :notice: [ 139.395690] # #48/9 flow_dissector_reattach/flow dissector link update with replace old prog (init_net):OK

user :notice: [ 139.398424] # #48/10 flow_dissector_reattach/flow dissector link update with same prog (init_net):OK

user :notice: [ 139.401090] # #48/11 flow_dissector_reattach/flow dissector link update invalid opts (init_net):OK

user :notice: [ 139.403722] # #48/12 flow_dissector_reattach/flow dissector link update invalid prog (init_net):OK

user :notice: [ 139.406231] # #48/13 flow_dissector_reattach/flow dissector link update netns gone (init_net):OK

user :notice: [ 139.408610] # #48/14 flow_dissector_reattach/flow dissector link get info (init_net):OK

user :notice: [ 139.411035] # #48/15 flow_dissector_reattach/flow dissector prog attach, prog attach:OK

user :notice: [ 139.413359] # #48/16 flow_dissector_reattach/flow dissector link create, link create:OK

user :notice: [ 139.415751] # #48/17 flow_dissector_reattach/flow dissector prog attach, link create:OK

user :notice: [ 139.417999] # #48/18 flow_dissector_reattach/flow dissector link create, prog attach:OK

user :notice: [ 139.420432] # #48/19 flow_dissector_reattach/flow dissector link create, prog detach:OK

user :notice: [ 139.422821] # #48/20 flow_dissector_reattach/flow dissector prog attach, detach, query:OK

user :notice: [ 139.425174] # #48/21 flow_dissector_reattach/flow dissector link create, close, query:OK

user :notice: [ 139.427447] # #48/22 flow_dissector_reattach/flow dissector link update no old prog:OK

user :notice: [ 139.430055] # #48/23 flow_dissector_reattach/flow dissector link update with replace old prog:OK

user :notice: [ 139.432549] # #48/24 flow_dissector_reattach/flow dissector link update with same prog:OK

user :notice: [ 139.434965] # #48/25 flow_dissector_reattach/flow dissector link update invalid opts:OK

user :notice: [ 139.437261] # #48/26 flow_dissector_reattach/flow dissector link update invalid prog:OK

user :notice: [ 139.439471] # #48/27 flow_dissector_reattach/flow dissector link update netns gone:OK

user :notice: [ 139.441628] # #48/28 flow_dissector_reattach/flow dissector link get info:OK

user :notice: [ 139.443097] # #48 flow_dissector_reattach:OK

user :notice: [ 139.444238] # #49/1 for_each/hash_map:OK

user :notice: [ 139.445375] # #49/2 for_each/array_map:OK

user :notice: [ 139.446309] # #49 for_each:OK

user :notice: [ 139.448091] # test_get_branch_trace:PASS:get_branch_trace__open_and_load 0 nsec

user :notice: [ 139.449839] # test_get_branch_trace:PASS:kallsyms_find 0 nsec



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
bin/lkp run generated-yaml-file



---
0DAY/LKP+ Test Infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation

Thanks,
Oliver Sang


Attachments:
(No filename) (53.59 kB)
config-5.14.0-rc5-01207-g8dff2c1958c2 (179.33 kB)
job-script (7.12 kB)
kmsg.xz (129.02 kB)
kernel-selftests (656.87 kB)
job.yaml (5.95 kB)
reproduce (119.00 B)
Download all attachments

2021-08-31 04:48:36

by Song Liu

[permalink] [raw]
Subject: Re: [selftests/bpf] 8dff2c1958: BUG:using_smp_processor_id()in_preemptible



> On Aug 30, 2021, at 6:30 PM, kernel test robot <[email protected]> wrote:
>
>
>
> Greeting,
>
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: 8dff2c1958c234e90dff289a2034217b293985e4 ("[PATCH bpf-next 3/3] selftests/bpf: add test for bpf_get_branch_trace")
> url: https://github.com/0day-ci/linux/commits/Song-Liu/bpf-introduce-bpf_get_branch_trace/20210824-140315
> base: https://git.kernel.org/cgit/linux/kernel/git/bpf/bpf-next.git master
>
> in testcase: kernel-selftests
> version: kernel-selftests-x86_64-ebaa603b-1_20210825
> with following parameters:
>
> group: bpf
> ucode: 0xde
>
> test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
> test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
>
>
> on test machine: 4 threads 1 sockets Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz with 32G memory
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
>
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <[email protected]>
>
>
> kern :err : [ 136.592584] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262

hmm... I guess we need to move the call to after migrate_disable().


> kern :warn : [ 136.593280] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1868)
> kern :warn : [ 136.593811] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.594609] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.595501] Call Trace:
> kern :warn : [ 136.595776] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.596136] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.596565] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1868)
> kern :warn : [ 136.597024] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.597434] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.597968] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.598331] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.598832] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.599172] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.599575] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.599962] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.600293] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.600711] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.601122] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.601481] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.601880] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.602239] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.602639] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.603034] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.603403] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.603740] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.604111] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.604560] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.605018] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.605455] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.605903] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.606268] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.607706] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.608350] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.609058] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.609656] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.610260] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.610920] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.611581] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.612259] caller is intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:780)
> kern :warn : [ 136.612817] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.613653] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.614642] Call Trace:
> kern :warn : [ 136.614904] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.615293] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.615759] intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:780)
> kern :warn : [ 136.616221] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1871)
> kern :warn : [ 136.616705] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.617068] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.617528] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.617923] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.618367] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.618692] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.619054] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.619418] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.619819] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.620237] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.620581] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.620976] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.621354] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.621695] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.622150] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.622491] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.622849] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.623262] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.623605] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.624072] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.624531] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.624930] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.625417] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.625835] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.627326] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.628018] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.628623] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.629262] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.629847] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.630469] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.631171] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.631873] caller is intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:782 arch/x86/events/intel/lbr.c:778)
> kern :warn : [ 136.632412] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.633255] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.634100] Call Trace:
> kern :warn : [ 136.634348] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.634741] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.635190] intel_pmu_lbr_disable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:782 arch/x86/events/intel/lbr.c:778)
> kern :warn : [ 136.635611] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1871)
> kern :warn : [ 136.636065] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.636466] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.636981] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.637347] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.637863] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.638206] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.638582] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.638944] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.639273] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.639656] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.640054] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.640412] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.640810] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.641169] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.641568] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.641963] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.642343] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.642718] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.643075] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.643575] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.644033] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.644437] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.644884] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.645231] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.646685] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.647304] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.647966] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.648588] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.649246] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.649869] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.650512] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.651226] caller is intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:1003)
> kern :warn : [ 136.651691] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.652530] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.653440] Call Trace:
> kern :warn : [ 136.653762] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.654133] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.654603] intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:1003)
> kern :warn : [ 136.654966] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1873)
> kern :warn : [ 136.655408] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.655754] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.656180] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.656562] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.656992] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.657332] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.657695] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.658040] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.658422] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.658856] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.659272] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.659613] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.660049] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.660406] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.660805] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.661220] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.661560] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.661919] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.662298] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.662746] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.663205] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.663605] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.664051] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.664383] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.665964] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.666650] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.667271] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.667893] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.668517] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.669104] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.669728] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.670431] caller is intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:1011)
> kern :warn : [ 136.670867] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.671765] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.672649] Call Trace:
> kern :warn : [ 136.672912] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.673301] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.673765] intel_pmu_lbr_read (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:1011)
> kern :warn : [ 136.674149] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1873)
> kern :warn : [ 136.674604] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.674968] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.675448] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.675865] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.676331] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.676672] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.677067] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.677413] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.677799] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.678234] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.678597] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.678991] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.679388] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.679747] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.680146] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.680505] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.680863] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.681240] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.681582] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.682043] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.682503] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.682903] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.683388] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.683771] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.685257] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.685878] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.686512] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.687152] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.687739] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.688399] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.689060] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.689760] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1872)
> kern :warn : [ 136.690329] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.691130] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.691976] Call Trace:
> kern :warn : [ 136.692257] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.692645] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.693130] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1872)
> kern :warn : [ 136.693629] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.694029] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.694472] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.694889] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.695319] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.695693] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.696090] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.696436] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.696782] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.697181] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.697543] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.697937] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.698368] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.698762] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.699161] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.699556] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.699914] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.700291] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.700667] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.701133] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.701629] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.702029] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.702478] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.702824] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.704386] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.705038] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.705625] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.706267] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.706836] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.707496] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.708104] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.708822] caller is intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1875)
> kern :warn : [ 136.709398] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.710237] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.711142] Call Trace:
> kern :warn : [ 136.711429] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.711838] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.712273] intel_pmu_snapshot_branch_stack (arch/x86/events/intel/lbr.c:1875)
> kern :warn : [ 136.712764] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.713127] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.713572] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.713953] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.714418] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.714794] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.715214] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.715539] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.715887] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.716307] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.716651] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.717008] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.717407] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.717766] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.718179] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.718549] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.718906] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.719264] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.719623] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.720089] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.720585] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.721058] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.721489] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.721854] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.723348] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.724036] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.724625] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.725212] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.725798] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.726457] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.727118] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.727822] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:772)
> kern :warn : [ 136.728317] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.729158] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.730037] Call Trace:
> kern :warn : [ 136.730301] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.730671] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.731121] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:772)
> kern :warn : [ 136.731586] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.731987] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.732467] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.732884] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.733335] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.733656] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.734076] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.734401] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.734750] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.735204] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.735549] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.735906] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.736306] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.736665] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.737077] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.737416] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.737847] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.738204] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.738581] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.739031] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.739490] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.739921] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.740400] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.740784] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.742236] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.742870] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.743514] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.744099] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.744723] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.745328] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.746006] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.746743] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:774 arch/x86/events/intel/lbr.c:770)
> kern :warn : [ 136.747218] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.748040] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.749026] Call Trace:
> kern :warn : [ 136.749274] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.749627] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.750131] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:764 arch/x86/events/intel/lbr.c:774 arch/x86/events/intel/lbr.c:770)
> kern :warn : [ 136.750538] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.750938] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.751416] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.751797] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.752281] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.752604] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.752966] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.753311] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.753658] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.754091] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.754453] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.754846] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.755245] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.755589] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.756007] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.756349] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.756795] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.757153] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.757511] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.758011] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.758471] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.758871] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.759319] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.759666] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.761174] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.761776] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.762436] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.763021] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.763680] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.764266] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :err : [ 136.764875] BUG: using smp_processor_id() in preemptible [00000000] code: test_progs/5262
> kern :warn : [ 136.765626] caller is intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:190 arch/x86/events/intel/lbr.c:775 arch/x86/events/intel/lbr.c:770)
> kern :warn : [ 136.766173] CPU: 1 PID: 5262 Comm: test_progs Tainted: G W OE 5.14.0-rc5-01207-g8dff2c1958c2 #1
> kern :warn : [ 136.767068] Hardware name: Intel Corporation NUC7i7BNH/NUC7i7BNB, BIOS BNKBL357.86A.0067.2018.0814.1500 08/14/2018
> kern :warn : [ 136.767986] Call Trace:
> kern :warn : [ 136.768248] dump_stack_lvl (lib/dump_stack.c:106)
> kern :warn : [ 136.768620] check_preemption_disabled (lib/smp_processor_id.c:49)
> kern :warn : [ 136.769141] intel_pmu_lbr_enable_all (arch/x86/events/intel/lbr.c:190 arch/x86/events/intel/lbr.c:775 arch/x86/events/intel/lbr.c:770)
> kern :warn : [ 136.769570] __bpf_prog_enter (kernel/bpf/trampoline.c:577)
> kern :warn : [ 136.769933] bpf_trampoline_6442562768_0+0x3b/0x1000
> kern :warn : [ 136.770407] bpf_fexit_loop_test1 (net/bpf/test_run.c:236)
> kern :warn : [ 136.770790] bpf_prog_test_run_tracing (net/bpf/test_run.c:308)
> kern :warn : [ 136.771237] __sys_bpf (kernel/bpf/syscall.c:3307 kernel/bpf/syscall.c:4605)
> kern :warn : [ 136.771594] ? __sys_bpf (kernel/bpf/syscall.c:4629)
> kern :warn : [ 136.771957] __x64_sys_bpf (kernel/bpf/syscall.c:4689)
> kern :warn : [ 136.772322] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
> kern :warn : [ 136.772688] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.773087] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.773463] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.773803] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.774202] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.774563] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.774961] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.775320] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.775678] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.776035] ? do_syscall_64 (arch/x86/entry/common.c:87)
> kern :warn : [ 136.776424] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.776962] ? asm_sysvec_apic_timer_interrupt (arch/x86/include/asm/idtentry.h:638)
> kern :warn : [ 136.777458] ? lockdep_hardirqs_on (kernel/locking/lockdep.c:4344)
> kern :warn : [ 136.777858] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:113)
> kern :warn : [ 136.778327] RIP: 0033:0x7f0fcbd69f59
> kern :warn : [ 136.778655] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 07 6f 0c 00 f7 d8 64 89 01 48
> All code
> ========
> 0: 00 c3 add %al,%bl
> 2: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
> 9: 00 00 00
> c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
> 11: 48 89 f8 mov %rdi,%rax
> 14: 48 89 f7 mov %rsi,%rdi
> 17: 48 89 d6 mov %rdx,%rsi
> 1a: 48 89 ca mov %rcx,%rdx
> 1d: 4d 89 c2 mov %r8,%r10
> 20: 4d 89 c8 mov %r9,%r8
> 23: 4c 8b 4c 24 08 mov 0x8(%rsp),%r9
> 28: 0f 05 syscall
> 2a:* 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
> 30: 73 01 jae 0x33
> 32: c3 retq
> 33: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f41
> 3a: f7 d8 neg %eax
> 3c: 64 89 01 mov %eax,%fs:(%rcx)
> 3f: 48 rex.W
>
> Code starting with the faulting instruction
> ===========================================
> 0: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax
> 6: 73 01 jae 0x9
> 8: c3 retq
> 9: 48 8b 0d 07 6f 0c 00 mov 0xc6f07(%rip),%rcx # 0xc6f17
> 10: f7 d8 neg %eax
> 12: 64 89 01 mov %eax,%fs:(%rcx)
> 15: 48 rex.W
> kern :warn : [ 136.780125] RSP: 002b:00007ffd572256a8 EFLAGS: 00000202 ORIG_RAX: 0000000000000141
> kern :warn : [ 136.780727] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0fcbd69f59
> kern :warn : [ 136.781313] RDX: 0000000000000080 RSI: 00007ffd57225700 RDI: 000000000000000a
> kern :warn : [ 136.781899] RBP: 00007ffd572256c0 R08: 0000000000000000 R09: 00007ffd57225700
> kern :warn : [ 136.782535] R10: 0000000000000000 R11: 0000000000000202 R12: 0000562a6e61ddb0
> kern :warn : [ 136.783177] R13: 00007ffd57225a20 R14: 0000000000000000 R15: 0000000000000000
> kern :info : [ 138.164543] perf: interrupt took too long (3153 > 3143), lowering kernel.perf_event_max_sample_rate to 63000
> kern :info : [ 138.165345] perf: interrupt took too long (3153 > 3143), lowering kernel.perf_event_max_sample_rate to 63000
> kern :info : [ 138.166457] perf: interrupt took too long (3945 > 3941), lowering kernel.perf_event_max_sample_rate to 50000
> kern :info : [ 138.168213] perf: interrupt took too long (4932 > 4931), lowering kernel.perf_event_max_sample_rate to 40000
> user :notice: [ 139.355105] # run_tests_skb_less:FAIL:ipv6-frag nhoff=0/14 thoff=0/62 addr_proto=0x0/0x86dd is_frag=0/1 is_first_frag=0/1 is_encap=0/0 ip_proto=0x0/0x6 n_proto=0x0/0xdd86 flow_label=0x0/0x0 sport=0/80 dport=0/8080
>
> user :notice: [ 139.359537] # run_tests_skb_less:FAIL:ipv6-frag bpf_map_delete_elem -2
>
> user :notice: [ 139.362850] # test_skb_less_link_create:PASS:bpf_link__destroy 0 nsec
>
> user :notice: [ 139.364974] # #46 flow_dissector:FAIL
>
> user :notice: [ 139.367223] # #47 flow_dissector_load_bytes:OK
>
> user :notice: [ 139.370893] # #48/1 flow_dissector_reattach/flow dissector prog attach, prog attach (init_net):OK
>
> user :notice: [ 139.375234] # #48/2 flow_dissector_reattach/flow dissector link create, link create (init_net):OK
>
> user :notice: [ 139.379842] # #48/3 flow_dissector_reattach/flow dissector prog attach, link create (init_net):OK
>
> user :notice: [ 139.382497] # #48/4 flow_dissector_reattach/flow dissector link create, prog attach (init_net):OK
>
> user :notice: [ 139.385061] # #48/5 flow_dissector_reattach/flow dissector link create, prog detach (init_net):OK
>
> user :notice: [ 139.387717] # #48/6 flow_dissector_reattach/flow dissector prog attach, detach, query (init_net):OK
>
> user :notice: [ 139.390353] # #48/7 flow_dissector_reattach/flow dissector link create, close, query (init_net):OK
>
> user :notice: [ 139.392961] # #48/8 flow_dissector_reattach/flow dissector link update no old prog (init_net):OK
>
> user :notice: [ 139.395690] # #48/9 flow_dissector_reattach/flow dissector link update with replace old prog (init_net):OK
>
> user :notice: [ 139.398424] # #48/10 flow_dissector_reattach/flow dissector link update with same prog (init_net):OK
>
> user :notice: [ 139.401090] # #48/11 flow_dissector_reattach/flow dissector link update invalid opts (init_net):OK
>
> user :notice: [ 139.403722] # #48/12 flow_dissector_reattach/flow dissector link update invalid prog (init_net):OK
>
> user :notice: [ 139.406231] # #48/13 flow_dissector_reattach/flow dissector link update netns gone (init_net):OK
>
> user :notice: [ 139.408610] # #48/14 flow_dissector_reattach/flow dissector link get info (init_net):OK
>
> user :notice: [ 139.411035] # #48/15 flow_dissector_reattach/flow dissector prog attach, prog attach:OK
>
> user :notice: [ 139.413359] # #48/16 flow_dissector_reattach/flow dissector link create, link create:OK
>
> user :notice: [ 139.415751] # #48/17 flow_dissector_reattach/flow dissector prog attach, link create:OK
>
> user :notice: [ 139.417999] # #48/18 flow_dissector_reattach/flow dissector link create, prog attach:OK
>
> user :notice: [ 139.420432] # #48/19 flow_dissector_reattach/flow dissector link create, prog detach:OK
>
> user :notice: [ 139.422821] # #48/20 flow_dissector_reattach/flow dissector prog attach, detach, query:OK
>
> user :notice: [ 139.425174] # #48/21 flow_dissector_reattach/flow dissector link create, close, query:OK
>
> user :notice: [ 139.427447] # #48/22 flow_dissector_reattach/flow dissector link update no old prog:OK
>
> user :notice: [ 139.430055] # #48/23 flow_dissector_reattach/flow dissector link update with replace old prog:OK
>
> user :notice: [ 139.432549] # #48/24 flow_dissector_reattach/flow dissector link update with same prog:OK
>
> user :notice: [ 139.434965] # #48/25 flow_dissector_reattach/flow dissector link update invalid opts:OK
>
> user :notice: [ 139.437261] # #48/26 flow_dissector_reattach/flow dissector link update invalid prog:OK
>
> user :notice: [ 139.439471] # #48/27 flow_dissector_reattach/flow dissector link update netns gone:OK
>
> user :notice: [ 139.441628] # #48/28 flow_dissector_reattach/flow dissector link get info:OK
>
> user :notice: [ 139.443097] # #48 flow_dissector_reattach:OK
>
> user :notice: [ 139.444238] # #49/1 for_each/hash_map:OK
>
> user :notice: [ 139.445375] # #49/2 for_each/array_map:OK
>
> user :notice: [ 139.446309] # #49 for_each:OK
>
> user :notice: [ 139.448091] # test_get_branch_trace:PASS:get_branch_trace__open_and_load 0 nsec
>
> user :notice: [ 139.449839] # test_get_branch_trace:PASS:kallsyms_find 0 nsec
>
>
>
> To reproduce:
>
> git clone https://github.com/intel/lkp-tests.git
> cd lkp-tests
> bin/lkp install job.yaml # job file is attached in this email
> bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
> bin/lkp run generated-yaml-file
>
>
>
> ---
> 0DAY/LKP+ Test Infrastructure Open Source Technology Center
> https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation
>
> Thanks,
> Oliver Sang
>
> <config-5.14.0-rc5-01207-g8dff2c1958c2><job-script.txt><kmsg.xz><kernel-selftests.txt><job.yaml><reproduce.txt>