[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <201603101011.11010.arnd@arndb.de>
Date: Thu, 10 Mar 2016 10:11:10 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Daniel Borkmann <daniel@...earbox.net>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: make bpf_stackmap_copy conditionally called
On Thursday 10 March 2016, Alexei Starovoitov wrote:
> yes. this is also ok-ish fix.
> I've sent different version already:
> http://patchwork.ozlabs.org/patch/595617/
>
> I considered the option like yours but it's relying on gcc doing
> dead code elimination of 'if (false) {}' branch and though kernel
> is never compiled with -O0. I didn't want to take the risk.
> I'm fine with either approach though.
Ok, and I see yours is already applied, so that's fine.
In general, I don't like __weak symbols in the kernel as they
make it less clear what is actually getting called, and I think my
version would have been safe, we rely on building with -O2 or -Os
in a lot of places because of similar things.
Arnd
Powered by blists - more mailing lists