All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Yonghong Song <yhs@fb.com>
Cc: bpf <bpf@vger.kernel.org>, Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH] bpf: selftests: global_funcs: check err_str before strstr
Date: Wed, 19 Aug 2020 16:36:50 +0300	[thread overview]
Message-ID: <CANoWswnePFEeyYgJ95x8MgAnffyjfESwtf6f7G8pFvBGmh8Qeg@mail.gmail.com> (raw)
In-Reply-To: <CANoWswmccdLu4mCj48iVH1_Od4zZ=BdgCHZ0CMyieYQ9WxoHPA@mail.gmail.com>

On Wed, Aug 19, 2020 at 10:05 AM Yauheni Kaliuta
<yauheni.kaliuta@redhat.com> wrote:
>
> On Wed, Aug 19, 2020 at 8:19 AM Yonghong Song <yhs@fb.com> 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


  reply	other threads:[~2020-08-19 13:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  2:34 [PATCH] bpf: selftests: global_funcs: check err_str before strstr Yauheni Kaliuta
2020-08-19  5:19 ` Yonghong Song
2020-08-19  7:05   ` Yauheni Kaliuta
2020-08-19 13:36     ` Yauheni Kaliuta [this message]
2020-08-19 14:56     ` Yonghong Song
2020-08-19 20:46       ` Yauheni Kaliuta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANoWswnePFEeyYgJ95x8MgAnffyjfESwtf6f7G8pFvBGmh8Qeg@mail.gmail.com \
    --to=yauheni.kaliuta@redhat.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.