On Tue, Aug 16, 2022 at 2:34 PM Hao Luo <haoluo@xxxxxxxxxx> wrote: > > On Mon, Aug 15, 2022 at 8:52 PM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote: > > > > Fix few issues found when building and running test_progs in release > > mode. > > > > First, potentially uninitialized idx variable in xskxceiver, > > force-initialize to zero to satisfy compiler. > > > > Few instances of defining uprobe trigger functions break in release mode > > unless marked as noinline, due to being static. Add noinline to make > > sure everything works. > > > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> > > --- > > I can't say for the noinline change, I trust it works. The fix for > uninitialized use looks good to me. yeah, I tested noinline with both default debug (-O0) build and release build (-O2). noinline itself was interesting, apparently GCC doesn't support __attribute__((noinline)) for static functions, but noinline is fine. I was scratching my head for a while, didn't find any good explanation and just went with `noinline`. > > Acked-by: Hao Luo <haoluo@xxxxxxxxxx> > > > > tools/testing/selftests/bpf/prog_tests/attach_probe.c | 6 +++--- > > tools/testing/selftests/bpf/prog_tests/bpf_cookie.c | 2 +- > > tools/testing/selftests/bpf/prog_tests/task_pt_regs.c | 2 +- > > tools/testing/selftests/bpf/xskxceiver.c | 2 +- > > 4 files changed, 6 insertions(+), 6 deletions(-) > > [...]