lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 1 Sep 2020 22:45:29 -0700 From: Alexei Starovoitov <alexei.starovoitov@...il.com> To: Andrii Nakryiko <andriin@...com> Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, ast@...com, daniel@...earbox.net, andrii.nakryiko@...il.com, kernel-team@...com Subject: Re: [PATCH v2 bpf-next 12/14] selftests/bpf: convert pyperf, strobemeta, and l4lb_noinline to __noinline On Mon, Aug 31, 2020 at 06:50:01PM -0700, Andrii Nakryiko wrote: > diff --git a/tools/testing/selftests/bpf/progs/pyperf.h b/tools/testing/selftests/bpf/progs/pyperf.h > index cc615b82b56e..13998aee887f 100644 > --- a/tools/testing/selftests/bpf/progs/pyperf.h > +++ b/tools/testing/selftests/bpf/progs/pyperf.h > @@ -67,7 +67,7 @@ typedef struct { > void* co_name; // PyCodeObject.co_name > } FrameData; > > -static __always_inline void *get_thread_state(void *tls_base, PidData *pidData) > +static __noinline void *get_thread_state(void *tls_base, PidData *pidData) > { > void* thread_state; > int key; > @@ -154,12 +154,10 @@ struct { > __uint(value_size, sizeof(long long) * 127); > } stackmap SEC(".maps"); > > -#ifdef GLOBAL_FUNC > -__attribute__((noinline)) > -#else > -static __always_inline > +#ifndef GLOBAL_FUNC > +static > #endif > -int __on_event(struct bpf_raw_tracepoint_args *ctx) > +__noinline int __on_event(struct bpf_raw_tracepoint_args *ctx) > { > uint64_t pid_tgid = bpf_get_current_pid_tgid(); > pid_t pid = (pid_t)(pid_tgid >> 32); > diff --git a/tools/testing/selftests/bpf/progs/strobemeta.h b/tools/testing/selftests/bpf/progs/strobemeta.h > index ad61b722a9de..d307c67ce52e 100644 > --- a/tools/testing/selftests/bpf/progs/strobemeta.h > +++ b/tools/testing/selftests/bpf/progs/strobemeta.h > @@ -266,8 +266,7 @@ struct tls_index { > uint64_t offset; > }; > > -static __always_inline void *calc_location(struct strobe_value_loc *loc, > - void *tls_base) > +static __noinline void *calc_location(struct strobe_value_loc *loc, void *tls_base) hmm. this reduces the existing test coverage. Unless I'm misreading it. Could you keep existing strobemta tests and add new one? With new ifdefs. Like this GLOBAL_FUNC.
Powered by blists - more mailing lists