All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
@ 2016-07-18 22:50 akpm
  2016-07-19  0:33 ` Alexei Starovoitov
  2016-07-20  2:28 ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: akpm @ 2016-07-18 22:50 UTC (permalink / raw)
  To: davem, netdev, akpm, ast, daniel

From: Andrew Morton <akpm@linux-foundation.org>
Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug

kernel/trace/bpf_trace.c: In function 'bpf_event_output':
kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')

Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/trace/bpf_trace.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff -puN kernel/trace/bpf_trace.c~kernel-trace-bpf_tracec-work-around-gcc-444-anon-union-initialization-bug kernel/trace/bpf_trace.c
--- a/kernel/trace/bpf_trace.c~kernel-trace-bpf_tracec-work-around-gcc-444-anon-union-initialization-bug
+++ a/kernel/trace/bpf_trace.c
@@ -309,7 +309,9 @@ u64 bpf_event_output(struct bpf_map *map
 	};
 	struct perf_raw_record raw = {
 		.frag = {
-			.next	= ctx_size ? &frag : NULL,
+			{
+				.next	= ctx_size ? &frag : NULL,
+			},
 			.size	= meta_size,
 			.data	= meta,
 		},
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-18 22:50 [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug akpm
@ 2016-07-19  0:33 ` Alexei Starovoitov
  2016-07-19  0:38   ` Fengguang Wu
  2016-07-20  2:28 ` David Miller
  1 sibling, 1 reply; 7+ messages in thread
From: Alexei Starovoitov @ 2016-07-19  0:33 UTC (permalink / raw)
  To: akpm; +Cc: davem, netdev, ast, daniel, Fengguang Wu

On Mon, Jul 18, 2016 at 03:50:58PM -0700, akpm@linux-foundation.org wrote:
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
> 
> kernel/trace/bpf_trace.c: In function 'bpf_event_output':
> kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
> kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
> kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')
> 
> Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Acked-by: Alexei Starovoitov <ast@kernel.org>

Fengguang can you add gcc-4.4 to buildbot. Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-19  0:33 ` Alexei Starovoitov
@ 2016-07-19  0:38   ` Fengguang Wu
  2016-07-19  2:38     ` Alexei Starovoitov
  0 siblings, 1 reply; 7+ messages in thread
From: Fengguang Wu @ 2016-07-19  0:38 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: akpm, davem, netdev, ast, daniel

Hi Alexei,

On Mon, Jul 18, 2016 at 05:33:07PM -0700, Alexei Starovoitov wrote:
>On Mon, Jul 18, 2016 at 03:50:58PM -0700, akpm@linux-foundation.org wrote:
>> From: Andrew Morton <akpm@linux-foundation.org>
>> Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
>>
>> kernel/trace/bpf_trace.c: In function 'bpf_event_output':
>> kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
>> kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
>> kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')
>>
>> Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
>> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>> Cc: Alexei Starovoitov <ast@kernel.org>
>> Cc: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
>Acked-by: Alexei Starovoitov <ast@kernel.org>
>
>Fengguang can you add gcc-4.4 to buildbot. Thanks!

Sure. Currently we only test gcc-6. It'd be easy to test more versions
concurrently, like

gcc-4.4
gcc-4.6
gcc-4.8
gcc-4.9
gcc-5
gcc-6

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-19  0:38   ` Fengguang Wu
@ 2016-07-19  2:38     ` Alexei Starovoitov
  2016-07-19  3:07       ` Fengguang Wu
  0 siblings, 1 reply; 7+ messages in thread
From: Alexei Starovoitov @ 2016-07-19  2:38 UTC (permalink / raw)
  To: Fengguang Wu; +Cc: akpm, davem, netdev, ast, daniel

On Tue, Jul 19, 2016 at 08:38:02AM +0800, Fengguang Wu wrote:
> Hi Alexei,
> 
> On Mon, Jul 18, 2016 at 05:33:07PM -0700, Alexei Starovoitov wrote:
> >On Mon, Jul 18, 2016 at 03:50:58PM -0700, akpm@linux-foundation.org wrote:
> >>From: Andrew Morton <akpm@linux-foundation.org>
> >>Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
> >>
> >>kernel/trace/bpf_trace.c: In function 'bpf_event_output':
> >>kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
> >>kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
> >>kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')
> >>
> >>Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
> >>Acked-by: Daniel Borkmann <daniel@iogearbox.net>
> >>Cc: Alexei Starovoitov <ast@kernel.org>
> >>Cc: David S. Miller <davem@davemloft.net>
> >>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> >
> >Acked-by: Alexei Starovoitov <ast@kernel.org>
> >
> >Fengguang can you add gcc-4.4 to buildbot. Thanks!
> 
> Sure. Currently we only test gcc-6. It'd be easy to test more versions
> concurrently, like
> 
> gcc-4.4
> gcc-4.6
> gcc-4.8
> gcc-4.9
> gcc-5
> gcc-6

thanks! If you need to reduce the test matrix I don't see a concern
of dropping 4.6 and 4.8.
4.4 is good for old stuff, 4.9 is the most stable and 5/6 are good
for new warnings.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-19  2:38     ` Alexei Starovoitov
@ 2016-07-19  3:07       ` Fengguang Wu
  2016-07-19  8:19         ` Daniel Borkmann
  0 siblings, 1 reply; 7+ messages in thread
From: Fengguang Wu @ 2016-07-19  3:07 UTC (permalink / raw)
  To: Alexei Starovoitov; +Cc: akpm, davem, netdev, ast, daniel

On Mon, Jul 18, 2016 at 07:38:27PM -0700, Alexei Starovoitov wrote:
>On Tue, Jul 19, 2016 at 08:38:02AM +0800, Fengguang Wu wrote:
>> Hi Alexei,
>>
>> On Mon, Jul 18, 2016 at 05:33:07PM -0700, Alexei Starovoitov wrote:
>> >On Mon, Jul 18, 2016 at 03:50:58PM -0700, akpm@linux-foundation.org wrote:
>> >>From: Andrew Morton <akpm@linux-foundation.org>
>> >>Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
>> >>
>> >>kernel/trace/bpf_trace.c: In function 'bpf_event_output':
>> >>kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
>> >>kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
>> >>kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')
>> >>
>> >>Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
>> >>Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>> >>Cc: Alexei Starovoitov <ast@kernel.org>
>> >>Cc: David S. Miller <davem@davemloft.net>
>> >>Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>> >
>> >Acked-by: Alexei Starovoitov <ast@kernel.org>
>> >
>> >Fengguang can you add gcc-4.4 to buildbot. Thanks!
>>
>> Sure. Currently we only test gcc-6. It'd be easy to test more versions
>> concurrently, like
>>
>> gcc-4.4
>> gcc-4.6
>> gcc-4.8
>> gcc-4.9
>> gcc-5
>> gcc-6
>
>thanks! If you need to reduce the test matrix I don't see a concern
>of dropping 4.6 and 4.8.
>4.4 is good for old stuff, 4.9 is the most stable and 5/6 are good
>for new warnings.

Not a burden at all. I've enabled them all. :)

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-19  3:07       ` Fengguang Wu
@ 2016-07-19  8:19         ` Daniel Borkmann
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2016-07-19  8:19 UTC (permalink / raw)
  To: Fengguang Wu, Alexei Starovoitov; +Cc: akpm, davem, netdev, ast

On 07/19/2016 05:07 AM, Fengguang Wu wrote:
> On Mon, Jul 18, 2016 at 07:38:27PM -0700, Alexei Starovoitov wrote:
>> On Tue, Jul 19, 2016 at 08:38:02AM +0800, Fengguang Wu wrote:
>>> On Mon, Jul 18, 2016 at 05:33:07PM -0700, Alexei Starovoitov wrote:
[...]
>>> >Fengguang can you add gcc-4.4 to buildbot. Thanks!
>>>
>>> Sure. Currently we only test gcc-6. It'd be easy to test more versions
>>> concurrently, like
>>>
>>> gcc-4.4
>>> gcc-4.6
>>> gcc-4.8
>>> gcc-4.9
>>> gcc-5
>>> gcc-6
>>
>> thanks! If you need to reduce the test matrix I don't see a concern
>> of dropping 4.6 and 4.8.
>> 4.4 is good for old stuff, 4.9 is the most stable and 5/6 are good
>> for new warnings.
>
> Not a burden at all. I've enabled them all. :)

Nice, thanks a lot Fengguang!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
  2016-07-18 22:50 [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug akpm
  2016-07-19  0:33 ` Alexei Starovoitov
@ 2016-07-20  2:28 ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2016-07-20  2:28 UTC (permalink / raw)
  To: akpm; +Cc: netdev, ast, daniel

From: akpm@linux-foundation.org
Date: Mon, 18 Jul 2016 15:50:58 -0700

> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug
> 
> kernel/trace/bpf_trace.c: In function 'bpf_event_output':
> kernel/trace/bpf_trace.c:312: error: unknown field 'next' specified in initializer
> kernel/trace/bpf_trace.c:312: warning: missing braces around initializer
> kernel/trace/bpf_trace.c:312: warning: (near initialization for 'raw.frag.<anonymous>')
> 
> Fixes: 555c8a8623a3a87 ("bpf: avoid stack copy and use skb ctx for event output")
> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

Applied.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-20  2:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 22:50 [patch 1/1] kernel/trace/bpf_trace.c: work around gcc-4.4.4 anon union initialization bug akpm
2016-07-19  0:33 ` Alexei Starovoitov
2016-07-19  0:38   ` Fengguang Wu
2016-07-19  2:38     ` Alexei Starovoitov
2016-07-19  3:07       ` Fengguang Wu
2016-07-19  8:19         ` Daniel Borkmann
2016-07-20  2:28 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.