Re: [PATCH] bpf: make bpf_stackmap_copy conditionally called

2016-03-10 Thread Arnd Bergmann
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

Re: [PATCH] bpf: make bpf_stackmap_copy conditionally called

2016-03-09 Thread Alexei Starovoitov
On Thu, Mar 10, 2016 at 02:43:42AM +0100, Arnd Bergmann wrote: > Changing the bpf syscall to use the new bpf_stackmap_copy() helper for > BPF_MAP_TYPE_STACK_TRACE causes a link error when CONFIG_PERF_EVENTS > is disabled: > > kernel/built-in.o: In function `map_lookup_elem': > :(.text+0x7fca4): un

[PATCH] bpf: make bpf_stackmap_copy conditionally called

2016-03-09 Thread Arnd Bergmann
Changing the bpf syscall to use the new bpf_stackmap_copy() helper for BPF_MAP_TYPE_STACK_TRACE causes a link error when CONFIG_PERF_EVENTS is disabled: kernel/built-in.o: In function `map_lookup_elem': :(.text+0x7fca4): undefined reference to `bpf_stackmap_copy' This patch simply avoids handling