Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Cc: maxtram95@gmail.com, maxim@isovalent.com,
	Sherry Yang <sherry.yang@oracle.com>,
	andrii@kernel.org, ast@kernel.org, daniel@iogearbox.net,
	eddyz87@gmail.com, john.fastabend@gmail.com, sashal@kernel.org,
	stable@vger.kernel.org
Subject: Re: BPF selftest failed to build
Date: Tue, 27 Aug 2024 14:44:16 +0200	[thread overview]
Message-ID: <2024082700-manhood-overhead-9a32@gregkh> (raw)
In-Reply-To: <xycnahurpkbaym42w7lm3asy3uzqxowvxkckvbbpoqphxo2dad@c7z4ztfe4w6r>

On Fri, Aug 23, 2024 at 10:50:29AM +0800, Shung-Hsi Yu wrote:
> On Thu, Aug 22, 2024 at 06:45:14PM GMT, Sherry Yang wrote:
> > Hi All,
> > 
> > We found BPF sefltest fail to build with following error:
> > 
> > 08-09 20:39:59 DBG: |output|: progs/test_global_func10.c:24:1: error: unknown type name '__failure'
> > 08-09 20:39:59 DBG: |output|: __failure __msg("invalid indirect access to stack")
> > 08-09 20:39:59 DBG: |output|: ^
> > 08-09 20:39:59 DBG: |output|: progs/test_global_func10.c:24:17: error: expected parameter declarator
> > 08-09 20:39:59 DBG: |output|: __failure __msg("invalid indirect access to stack")
> > 08-09 20:39:59 DBG: |output|:                 ^
> > 08-09 20:39:59 DBG: |output|: progs/test_global_func10.c:24:17: error: expected ')'
> > 08-09 20:39:59 DBG: |output|: progs/test_global_func10.c:24:16: note: to match this '('
> > 08-09 20:39:59 DBG: |output|: __failure __msg("invalid indirect access to stack")
> > 08-09 20:39:59 DBG: |output|:                ^
> > 08-09 20:39:59 DBG: |output|: progs/test_global_func10.c:24:52: error: expected ';' after top level declarator
> > 08-09 20:39:59 DBG: |output|: __failure __msg("invalid indirect access to stack")
> > 08-09 20:39:59 DBG: |output|:                                                    ^
> > 08-09 20:39:59 DBG: |output|:                                                    ;
> > 08-09 20:39:59 DBG: |output|: 4 errors generated.
> > 08-09 20:39:59 DBG: |output|: make: *** [Makefile:470: /root/oltf/work/linux-bpf-qa/tools/testing/selftests/bpf/test_global_func10.o] Error 1
> > 08-09 20:39:59 DBG: |output|: make: *** Waiting for unfinished jobs....
> > 
> > It happens from the commit e30bc19a9ee8("bpf: Allow reads from uninit
> > stack"). We did a further look, '__failure' is defined in
> > tools/testing/selftests/bpf/progs/bpf_misc.h, and was 1st introduced
> > in commit 537c3f66eac1("selftests/bpf: add generic BPF program
> > tester-loader") which is not backported to linux-5.15.y.
> > 
> > So we may need to revert the patch, or fix it.
> 
> To fix it I think we just need to drop the use of __failure and __msg in
> progs/test_global_func10.c, and update the "struct test_def tests[]"
> table in prog_tests/test_global_funcs.c with the new verifier rejection
> message.
> 
> On the other hand I believe commit 537c3f66eac1("selftests/bpf: add
> generic BPF program tester-loader") should be relatively easy to
> backport, just picking that commit up and resolving simple conflict in
> Makefile should be enough. It will also save a lot of future headaches
> like this one.

Please submit a patch like this and we will be glad to pick it up.

thanks,

greg k-h

  reply	other threads:[~2024-08-27 12:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 18:43 [PATCH stable 5.10] bpf: Allow reads from uninit stack Maxim Mikityanskiy
2024-07-11 18:43 ` [PATCH stable 5.15] " Maxim Mikityanskiy
2024-08-23  1:45   ` BPF selftest failed to build Sherry Yang
2024-08-23  2:50     ` Shung-Hsi Yu
2024-08-27 12:44       ` Greg KH [this message]
2024-07-11 18:43 ` [PATCH stable 6.1] bpf: Allow reads from uninit stack Maxim Mikityanskiy
2024-07-15 12:09 ` [PATCH stable 5.10] " Greg Kroah-Hartman

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=2024082700-manhood-overhead-9a32@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=maxim@isovalent.com \
    --cc=maxtram95@gmail.com \
    --cc=sashal@kernel.org \
    --cc=sherry.yang@oracle.com \
    --cc=shung-hsi.yu@suse.com \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox