Re: [PATCH] bpf: selftests: global_funcs: check err_str before strstr

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

 



On Wed, Aug 19, 2020 at 10:05 AM Yauheni Kaliuta
<yauheni.kaliuta@xxxxxxxxxx> wrote:
>
> On Wed, Aug 19, 2020 at 8:19 AM Yonghong Song <yhs@xxxxxx> wrote:
> >
> >
> >
> > On 8/18/20 7:34 PM, Yauheni Kaliuta wrote:
> > > The error path in libbpf.c:load_program() has calls to pr_warn()
> > > which ends up for global_funcs tests to
> > > test_global_funcs.c:libbpf_debug_print().
> > >
> > > For the tests with no struct test_def::err_str initialized with a
> > > string, it causes call of strstr() with NULL as the second argument
> > > and it segfaults.
> > >
> > > Fix it by calling strstr() only for non-NULL err_str.
> > >
> > > The patch does not fix the test itself.
> >
> > So this happens in older kernel, right? Could you clarify more
> > in which kernel and what environment? It probably no need to
> > fix the issue for really old kernel but some clarification
> > will be good.
>
> I'll test it with the very recent kernel on that architecture soon,
> for sure. But it's not related to the patch.

./test_progs -t global_func still fails for me on s390 with
18445bf405cb331117bc98427b1ba6f12418ad17




[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