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.
--
Cheers,
Stephen Rothwell [email protected]
* Stephen Rothwell <[email protected]> wrote:
> 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").
Note, this must be some (rarely triggered) aspect of the ppc64
defconfig that neither x86 randconfigs nor most other arch defconfigs
expose?
Thanks,
Ingo
On Tue, Apr 07, 2015 at 05:18:58PM +1000, Stephen Rothwell wrote:
> 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.
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.
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
---
kernel/events/core.c | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 06917d5..1d94b92 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -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)
On 04/07/2015 10:48 AM, Ingo Molnar wrote:
>
> * Stephen Rothwell <[email protected]> wrote:
>
>> 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").
>
> 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
Hi Daniel,
On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
>
> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
> >
> > * Stephen Rothwell <[email protected]> wrote:
> >
> >> 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").
> >
> > 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, I will do that tomorrow. Someone will have to remember
to tell Linus.
--
Cheers,
Stephen Rothwell [email protected]
[ Cc'ing Dave, fyi ]
On 04/07/2015 11:05 AM, Stephen Rothwell wrote:
> On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann <[email protected]> wrote:
>> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
>>> * Stephen Rothwell <[email protected]> wrote:
>>>
>>>> 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").
>>>
>>> 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, I will do that tomorrow. Someone will have to remember
> to tell Linus.
Yes, indeed, depending which tree is merged first.
Thanks,
Daniel
On 4/7/15 4:13 AM, Daniel Borkmann wrote:
> [ Cc'ing Dave, fyi ]
>
> On 04/07/2015 11:05 AM, Stephen Rothwell wrote:
>> On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann
>> <[email protected]> wrote:
>>> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
>>>> * Stephen Rothwell <[email protected]> wrote:
>>>>
>>>>> 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").
>>>>
>>>> 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, 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!
On 04/07/2015 06:18 PM, Alexei Starovoitov wrote:
> On 4/7/15 4:13 AM, Daniel Borkmann wrote:
>> [ Cc'ing Dave, fyi ]
>>
>> On 04/07/2015 11:05 AM, Stephen Rothwell wrote:
>>> On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann
>>> <[email protected]> wrote:
>>>> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
>>>>> * Stephen Rothwell <[email protected]> wrote:
>>>>>
>>>>>> 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").
>>>>>
>>>>> 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, 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'
Yes, absolutely, thanks!
Hi all,
On Tue, 07 Apr 2015 21:54:05 +0200 Daniel Borkmann <[email protected]> wrote:
>
> On 04/07/2015 06:18 PM, Alexei Starovoitov wrote:
> > On 4/7/15 4:13 AM, Daniel Borkmann wrote:
> >> [ Cc'ing Dave, fyi ]
> >>
> >> On 04/07/2015 11:05 AM, Stephen Rothwell wrote:
> >>> On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann
> >>> <[email protected]> wrote:
> >>>> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
> >>>>> * Stephen Rothwell <[email protected]> wrote:
> >>>>>
> >>>>>> 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").
> >>>>>
> >>>>> 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, 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'
>
> Yes, absolutely, thanks!
So I have applied that as a merge fix patch.
--
Cheers,
Stephen Rothwell [email protected]
Hi Russell,
On Mon, 30 Mar 2015 16:08:38 +0100 Russell King - ARM Linux <[email protected]> wrote:
>
> On Mon, Mar 30, 2015 at 09:57:48AM -0500, Nathan Lynch wrote:
> > On 03/30/2015 03:08 AM, Stephen Rothwell wrote:
> > > Hi Russell,
> > >
> > > On Mon, 30 Mar 2015 08:15:37 +0100 Russell King - ARM Linux <[email protected]> wrote:
> > >>
> > >> I'll drop the VDSO stuff from the ARM tree; I can't see a way to keep
> > >> it in my tree and keep my tree buildable without dragging in the tip
> > >> tree.
> > >
> > > Does it affect your tree on its own? If not, then it can be fixed when
> > > merged as I have done, or if you look at the tip tree, all you really
> > > need to merge is tip timers/core branch (which I am sure the tip guys
> > > can tell you if it is stable enough) which is about 28 commits ...
> > >
> > >> The ARM VDSO stuff will just have to wait for 4.2 instead.
> > >
> > > If that works for you.
> >
> > FWIW, Stephen's merge fix is correct and I have run my vdso tests
> > without problems on OMAP5 with next-20150330.
>
> Hopefully, I can pull the tip stuff but if not, I'll try to remember
> to include Stephen's patch with my pull request, but I can't make any
> guarantees - Stephen's email will very quickly get buried in my mailbox,
> and I'll most likely forget about it too... I'm notoriously bad with
> email...
This patch is now needed when the arm tree is merged with Linus' tree
(the tip tree part has been merged).
--
Cheers,
Stephen Rothwell [email protected]
Hi all,
On Wed, 8 Apr 2015 15:03:27 +1000 Stephen Rothwell <[email protected]> wrote:
>
> Hi all,
>
> On Tue, 07 Apr 2015 21:54:05 +0200 Daniel Borkmann <[email protected]> wrote:
> >
> > On 04/07/2015 06:18 PM, Alexei Starovoitov wrote:
> > > On 4/7/15 4:13 AM, Daniel Borkmann wrote:
> > >> [ Cc'ing Dave, fyi ]
> > >>
> > >> On 04/07/2015 11:05 AM, Stephen Rothwell wrote:
> > >>> On Tue, 07 Apr 2015 10:56:13 +0200 Daniel Borkmann
> > >>> <[email protected]> wrote:
> > >>>> On 04/07/2015 10:48 AM, Ingo Molnar wrote:
> > >>>>> * Stephen Rothwell <[email protected]> wrote:
> > >>>>>
> > >>>>>> 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").
> > >>>>>
> > >>>>> 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, 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'
> >
> > 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.
--
Cheers,
Stephen Rothwell [email protected]