mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eduard Zingerman <eddyz87@gmail.com>
To: Daniel Xu <dxu@dxuuu.xyz>, Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, shuah@kernel.org,
	andrii@kernel.org, steffen.klassert@secunet.com,
	antony.antony@secunet.com, alexei.starovoitov@gmail.com,
	yonghong.song@linux.dev, mykolal@fb.com, martin.lau@linux.dev,
	song@kernel.org, john.fastabend@gmail.com, kpsingh@kernel.org,
	sdf@google.com, haoluo@google.com, jolsa@kernel.org,
	linux-kernel@vger.kernel.org, bpf@vger.kernel.org,
	linux-kselftest@vger.kernel.org, devel@linux-ipsec.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH ipsec-next v3 5/9] libbpf: selftests: Add verifier tests for CO-RE bitfield writes
Date: Sat, 02 Dec 2023 02:20:15 +0200	[thread overview]
Message-ID: <d2fe8b0593a1009305e90d98a8bff984c1314748.camel@gmail.com> (raw)
In-Reply-To: <ka2irjz53qjkax545o67mvouyytzqw3dvorqixe2q72crgzjpi@he2uiobuelvd>

On Fri, 2023-12-01 at 17:10 -0700, Daniel Xu wrote:
[...]
> > > +SEC("tc")
> > > +__description("single CO-RE bitfield roundtrip")
> > > +__btf_path("btf__core_reloc_bitfields.bpf.o")
> > > +__success __failure_unpriv
> > 
> > do we want __failure_unpriv at all? Is this failure related to
> > *bitfield* logic at all?
> 
> Oh, I pre-emptively added it. From the docs, I thought __failure_unpriv
> meant "don't try to load this as an unprivileged used cuz it'll fail".
> And since I used the tc hook, I figured it'd fail.

Actually it means:
"try to load as unprivileged user and expect failure,
 report error on successful load".

In general, the meaning of "___xxx" and "___xxx_unpriv" annotations
is identical, except first instructs to run the test in privileged mode,
while second instructs to run test in unprivileged mode:
- if only annotations w/o "*_unpriv" suffix are present the test would
  be executed as privileged;
- if only annotations with "*_unpriv" suffix are present the test would
  be executed as unprivileged;
- if both kinds of annotations are present the test would be executed
  in both modes.

[...]

  reply	other threads:[~2023-12-02  0:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01 20:23 [PATCH ipsec-next v3 0/9] Add bpf_xdp_get_xfrm_state() kfunc Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 1/9] bpf: xfrm: " Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 2/9] bpf: xfrm: Add bpf_xdp_xfrm_state_release() kfunc Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 3/9] libbpf: Add BPF_CORE_WRITE_BITFIELD() macro Daniel Xu
2023-12-01 20:51   ` [devel-ipsec] " Daniel Xu
2023-12-01 21:22     ` Eduard Zingerman
2023-12-01 23:49   ` Andrii Nakryiko
2023-12-02  0:13     ` Daniel Xu
2023-12-02  0:40       ` Andrii Nakryiko
2023-12-01 20:23 ` [PATCH ipsec-next v3 4/9] bpf: selftests: test_loader: Support __btf_path() annotation Daniel Xu
2023-12-01 23:50   ` Andrii Nakryiko
2023-12-01 20:23 ` [PATCH ipsec-next v3 5/9] libbpf: selftests: Add verifier tests for CO-RE bitfield writes Daniel Xu
2023-12-01 23:52   ` Andrii Nakryiko
2023-12-02  0:10     ` Daniel Xu
2023-12-02  0:20       ` Eduard Zingerman [this message]
2023-12-01 20:23 ` [PATCH ipsec-next v3 6/9] bpf: selftests: test_tunnel: Setup fresh topology for each subtest Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 7/9] bpf: selftests: test_tunnel: Use vmlinux.h declarations Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 8/9] bpf: selftests: Move xfrm tunnel test to test_progs Daniel Xu
2023-12-01 20:23 ` [PATCH ipsec-next v3 9/9] bpf: xfrm: Add selftest for bpf_xdp_get_xfrm_state() Daniel Xu
2023-12-02  0:10 ` [PATCH ipsec-next v3 0/9] Add bpf_xdp_get_xfrm_state() kfunc Alexei Starovoitov
2023-12-02  0:16   ` Daniel Xu
2023-12-04  8:25     ` Steffen Klassert

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=d2fe8b0593a1009305e90d98a8bff984c1314748.camel@gmail.com \
    --to=eddyz87@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andrii@kernel.org \
    --cc=antony.antony@secunet.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=devel@linux-ipsec.org \
    --cc=dxu@dxuuu.xyz \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mykolal@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=steffen.klassert@secunet.com \
    --cc=yonghong.song@linux.dev \
    /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

all inboxes | Powered by JetHome®