[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160419023334.GC24067@wfg-t540p.sh.intel.com>
Date: Tue, 19 Apr 2016 10:33:34 +0800
From: Fengguang Wu <fengguang.wu@...el.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>,
"David S . Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Alexei Starovoitov <ast@...com>,
Daniel Borkmann <daniel@...earbox.net>,
linux-kernel@...r.kernel.org, Philip Li <philip.li@...el.com>
Subject: Re: [PATCH] bpf: avoid warning for wrong pointer cast
Hi Alexei,
On Sat, Apr 16, 2016 at 05:47:42PM -0700, Alexei Starovoitov wrote:
> On Sat, Apr 16, 2016 at 10:29:33PM +0200, Arnd Bergmann wrote:
> > Two new functions in bpf contain a cast from a 'u64' to a
> > pointer. This works on 64-bit architectures but causes a warning
> > on all 32-bit architectures:
> >
> > kernel/trace/bpf_trace.c: In function 'bpf_perf_event_output_tp':
> > kernel/trace/bpf_trace.c:350:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> > u64 ctx = *(long *)r1;
> >
> > This changes the cast to first convert the u64 argument into a uintptr_t,
> > which is guaranteed to be the same size as a pointer.
> >
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> > Fixes: 9940d67c93b5 ("bpf: support bpf_get_stackid() and bpf_perf_event_output() in tracepoint programs")
>
> Thanks.
> Acked-by: Alexei Starovoitov <ast@...nel.org>
>
> I guess I started to rely on 0-day build-bot too much.
> This patch has been in my tree for 2+ weeks and then in net-next and
> I didn't receive a single email from build-bot about this warning,
> though I do receive them for my other work-in-progress stuff. Odd.
> Fengguang, any idea why build-bot sometimes silent?
Sorry I went off for some time.. Philip, would you help have a check?
Thanks,
Fengguang
Powered by blists - more mailing lists