Re: [PATCH bpf-next 4/4] selftests/bpf: few fixes for selftests/bpf built in release mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)
> >

[...]



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux