From: "Russell King (Oracle)" <linux@armlinux•org.uk>
To: Puranjay Mohan <puranjay12@gmail•com>
Cc: Alexei Starovoitov <ast@kernel•org>,
linux-kernel@vger•kernel.org,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership•com>,
Song Liu <song@kernel•org>, Stanislav Fomichev <sdf@google•com>,
Yonghong Song <yonghong.song@linux•dev>,
Shubham Bansal <illusionist.neo@gmail•com>,
linux-riscv@lists•infradead.org,
Daniel Borkmann <daniel@iogearbox•net>,
Helge Deller <deller@gmx•de>,
John Fastabend <john.fastabend@gmail•com>,
Andrii Nakryiko <andrii@kernel•org>,
"Naveen N. Rao" <naveen.n.rao@linux•ibm.com>,
Xi Wang <xi.wang@gmail•com>, Albert Ou <aou@eecs•berkeley.edu>,
Luke Nelson <luke.r.nels@gmail•com>,
Nicholas Piggin <npiggin@gmail•com>,
KP Singh <kpsingh@kernel•org>,
Paul Walmsley <paul.walmsley@sifive•com>,
linux-arm-kernel@lists•infradead.org, Hao Luo <haoluo@google•com>,
linux-parisc@vger•kernel.org, linuxppc-dev@lists•ozlabs.org,
Wang YanQing <udknight@gmail•com>,
Palmer Dabbelt <palmer@dabbelt•com>, Jiri Olsa <jolsa@kernel•org>,
netdev@vger•kernel.org, bpf@vger•kernel.org ,
Martin KaFai Lau <martin.lau@linux•dev>
Subject: Re: [PATCH bpf-next 5/6] bpf, arm32: Always zero extend for LDX with B/H/W
Date: Wed, 13 Sep 2023 00:03:49 +0100 [thread overview]
Message-ID: <ZQDuVTSycDcjDkvi@shell.armlinux.org.uk> (raw)
In-Reply-To: <20230912224654.6556-6-puranjay12@gmail.com>
On Tue, Sep 12, 2023 at 10:46:53PM +0000, Puranjay Mohan wrote:
> The JITs should not depend on the verifier for zero extending the upper
> 32 bits of the destination register when loading a byte, half-word, or
> word.
>
> A following patch will make the verifier stop patching zext instructions
> after LDX.
This was introduced by:
163541e6ba34 ("arm: bpf: eliminate zero extension code-gen")
along with an additional function. So three points:
1) the commit should probably explain why it has now become undesirable
to access this verifier state, whereas it appears it was explicitly
added to permit this optimisation.
2) you state that jits should not depend on this state, but the above
commit adds more references than you're removing, so aren't there still
references to the verifier remaining after this patch? I count a total
of 10, and the patch below removes three.
3) what about the bpf_jit_needs_zext() function that was added to
support the export of this zext state?
Essentially, the logic stated in the commit message doesn't seem to be
reflected by the proposed code change.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2023-09-12 23:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 22:46 [PATCH bpf-next 0/6] bpf: verifier: stop emitting zext for LDX Puranjay Mohan
2023-09-12 22:46 ` [PATCH bpf-next 1/6] bpf, riscv32: Always zero extend for LDX with B/W/H Puranjay Mohan
2023-09-12 22:46 ` [PATCH bpf-next 2/6] bpf, x86-32: " Puranjay Mohan
2023-09-12 22:46 ` [PATCH bpf-next 3/6] bpf, parisc32: " Puranjay Mohan
2023-09-12 22:46 ` [PATCH bpf-next 4/6] bpf, powerpc32: Always zero extend for LDX Puranjay Mohan
2023-09-12 22:46 ` [PATCH bpf-next 5/6] bpf, arm32: Always zero extend for LDX with B/H/W Puranjay Mohan
2023-09-12 23:03 ` Russell King (Oracle) [this message]
2023-09-12 23:16 ` Puranjay Mohan
2023-09-13 0:10 ` Alexei Starovoitov
2023-09-12 22:46 ` [PATCH bpf-next 6/6] bpf, verifier: always mark destination of LDX as 64-bit Puranjay Mohan
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=ZQDuVTSycDcjDkvi@shell.armlinux.org.uk \
--to=linux@armlinux$(echo .)org.uk \
--cc=James.Bottomley@hansenpartnership$(echo .)com \
--cc=andrii@kernel$(echo .)org \
--cc=aou@eecs$(echo .)berkeley.edu \
--cc=ast@kernel$(echo .)org \
--cc=bpf@vger$(echo .)kernel.org \
--cc=daniel@iogearbox$(echo .)net \
--cc=deller@gmx$(echo .)de \
--cc=haoluo@google$(echo .)com \
--cc=illusionist.neo@gmail$(echo .)com \
--cc=john.fastabend@gmail$(echo .)com \
--cc=jolsa@kernel$(echo .)org \
--cc=kpsingh@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-parisc@vger$(echo .)kernel.org \
--cc=linux-riscv@lists$(echo .)infradead.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=luke.r.nels@gmail$(echo .)com \
--cc=martin.lau@linux$(echo .)dev \
--cc=naveen.n.rao@linux$(echo .)ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=npiggin@gmail$(echo .)com \
--cc=palmer@dabbelt$(echo .)com \
--cc=paul.walmsley@sifive$(echo .)com \
--cc=puranjay12@gmail$(echo .)com \
--cc=sdf@google$(echo .)com \
--cc=song@kernel$(echo .)org \
--cc=udknight@gmail$(echo .)com \
--cc=xi.wang@gmail$(echo .)com \
--cc=yonghong.song@linux$(echo .)dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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