Skip to contentSkip to conversation

linux-next: build failure after merge of the tip tree

DISCUSSION Stephen Rothwell 5 participants 10 messages Apr 7, 2015 – Apr 15, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

  if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
               ^

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

I have used the tip tree from next-20150402 for today.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#1 lore raw
Quoted 5 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

Quoted 7 lines

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

  if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
               ^

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Thanks,

Ingo

#2 lore raw
Quoted 13 lines · Ingo Molnar
Quoted 10 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

   if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Note, this is a merge conflict with the work that went via net-next tree, i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

You should be able to resolve it in linux-next by changing the test to:

  if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks,
Daniel

#3 lore raw

Hi Daniel,

Quoted 20 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 11 lines · Ingo Molnar
Quoted 8 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

   if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Quoted 7 lines

Note, this is a merge conflict with the work that went via net-next tree, i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

You should be able to resolve it in linux-next by changing the test to:

   if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#4 lore raw

[ Cc'ing Dave, fyi ]

Quoted 23 lines · Stephen Rothwell
Quoted 22 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 10 lines · Ingo Molnar
Quoted 8 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

    if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                 ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Note, this is a merge conflict with the work that went via net-next tree, i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

Quoted 6 lines
Quoted 3 lines

You should be able to resolve it in linux-next by changing the test to:

    if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Yes, indeed, depending which tree is merged first.

Thanks,
Daniel

#5 lore raw
Quoted 29 lines · Daniel Borkmann

[ Cc'ing Dave, fyi ]

Quoted 26 lines · Stephen Rothwell
Quoted 24 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 11 lines · Ingo Molnar
Quoted 9 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

    if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                 ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Note, this is a merge conflict with the work that went via net-next tree,
i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

You should be able to resolve it in linux-next by changing the test to:

    if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Yes, indeed, depending which tree is merged first.

Daniel analysis is correct, but the fix for kernel/events/core.c should be:
- if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
+ if (prog->type != BPF_PROG_TYPE_KPROBE) {
instead of 'prog->prog_type'

Thanks Stephen!

#6 lore raw
Quoted 37 lines · Alexei Starovoitov
Quoted 36 lines · Daniel Borkmann

[ Cc'ing Dave, fyi ]

Quoted 32 lines · Stephen Rothwell
Quoted 19 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 11 lines · Ingo Molnar
Quoted 9 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

    if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                 ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Quoted 8 lines

Note, this is a merge conflict with the work that went via net-next tree,
i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

You should be able to resolve it in linux-next by changing the test to:

    if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Quoted 7 lines
Quoted 1 line

Yes, indeed, depending which tree is merged first.

Daniel analysis is correct, but the fix for kernel/events/core.c should be:
- if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
+ if (prog->type != BPF_PROG_TYPE_KPROBE) {
instead of 'prog->prog_type'

Yes, absolutely, thanks!

#7 lore raw

Hi all,

Quoted 41 lines · On Tue, 07 Apr 2015 21:54:05 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 39 lines · Alexei Starovoitov
Quoted 37 lines · Daniel Borkmann

[ Cc'ing Dave, fyi ]

Quoted 26 lines · Stephen Rothwell
Quoted 24 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 11 lines · Ingo Molnar
Quoted 9 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

    if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                 ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Note, this is a merge conflict with the work that went via net-next tree,
i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

Quoted 6 lines
Quoted 3 lines

You should be able to resolve it in linux-next by changing the test to:

    if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Yes, indeed, depending which tree is merged first.

Quoted 7 lines
Quoted 5 lines

Daniel analysis is correct, but the fix for kernel/events/core.c should be:
- if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
+ if (prog->type != BPF_PROG_TYPE_KPROBE) {
instead of 'prog->prog_type'

Yes, absolutely, thanks!

So I have applied that as a merge fix patch.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
#8 lore raw

Hi all,

Quoted 51 lines · On Wed, 8 Apr 2015 15:03:27 +1000 Stephen Rothwell <[email protected]> wrote:

Hi all,

Quoted 47 lines · On Tue, 07 Apr 2015 21:54:05 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 44 lines · Alexei Starovoitov
Quoted 29 lines · Daniel Borkmann

[ Cc'ing Dave, fyi ]

Quoted 26 lines · Stephen Rothwell
Quoted 24 lines · On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
Quoted 11 lines · Ingo Molnar
Quoted 9 lines · Stephen Rothwell

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

    if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
                 ^
Quoted 6 lines
Quoted 2 lines

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

Note, this must be some (rarely triggered) aspect of the ppc64 defconfig that neither x86 randconfigs nor most other arch defconfigs expose?

Note, this is a merge conflict with the work that went via net-next tree,
i.e. 24701ecea76b ("ebpf: move read-only fields to bpf_prog and shrink bpf_prog_aux"). I believe that is why it didn't trigger on tip tree.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

You should be able to resolve it in linux-next by changing the test to:

    if (prog->prog_type != BPF_PROG_TYPE_KPROBE) {

Thanks Daniel, I will do that tomorrow. Someone will have to remember to tell Linus.

Yes, indeed, depending which tree is merged first.

Daniel analysis is correct, but the fix for kernel/events/core.c should be:
- if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
+ if (prog->type != BPF_PROG_TYPE_KPROBE) {
instead of 'prog->prog_type'

Quoted 3 lines
Quoted 1 line

Yes, absolutely, thanks!

So I have applied that as a merge fix patch.

This patch is now needed when the net-next tree is merged with Linus' tree.

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
maintainer
#9 lore raw
In reply to Stephen Rothwell
Quoted 7 lines · Stephen Rothwell

Hi all,

After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:

kernel/events/core.c: In function 'perf_event_set_bpf_prog':
kernel/events/core.c:6732:15: error: 'struct bpf_prog_aux' has no member named 'prog_type'

Quoted 7 lines
  if (prog->aux->prog_type != BPF_PROG_TYPE_KPROBE) {
               ^

Caused by commit 2541517c32be ("tracing, perf: Implement BPF programs attached to kprobes").

I have used the tip tree from next-20150402 for today.

Hmm, tip/master builds fine on ppc64 for me, but does something like the below help?

---
Subject: perf: Fix BPF filter crud

The BPF filter crud got its CONFIG deps wrong, fix it.

---
 kernel/events/core.c |   37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)
kernel/events/core.c +22 -15
index 06917d5..1d94b92 100644
@@ -6711,6 +6711,25 @@ static void perf_event_free_filter(struct perf_event *event)
 	ftrace_profile_free_filter(event);
 }
 
+#else /* EVENT_TRACING */
+
+static inline void perf_tp_register(void)
+{
+}
+
+static int perf_event_set_filter(struct perf_event *event, void __user *arg)
+{
+	return -ENOENT;
+}
+
+static void perf_event_free_filter(struct perf_event *event)
+{
+}
+
+#endif /* EVENT_TRACING */
+
+#if defined CONFIG_BPF_EVENTS && defined CONFIG_EVENT_TRACING
+
 static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd)
 {
 	struct bpf_prog *prog;
@@ -6754,20 +6773,7 @@ static void perf_event_free_bpf_prog(struct perf_event *event)
 	}
 }
 
-#else
-
-static inline void perf_tp_register(void)
-{
-}
-
-static int perf_event_set_filter(struct perf_event *event, void __user *arg)
-{
-	return -ENOENT;
-}
-
-static void perf_event_free_filter(struct perf_event *event)
-{
-}
+#else /* BPF_EVENTS && EVENT_TRACING */
 
 static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd)
 {
@@ -6777,7 +6783,8 @@ static int perf_event_set_bpf_prog(struct perf_event *event, u32 prog_fd)
 static void perf_event_free_bpf_prog(struct perf_event *event)
 {
 }
-#endif /* CONFIG_EVENT_TRACING */
+
+#endif /* BPF_EVENTS && EVENT_TRACING */
 
 #ifdef CONFIG_HAVE_HW_BREAKPOINT
 void perf_bp_event(struct perf_event *bp, void *data)