From: Martin KaFai Lau <martin.lau@linux.dev>
To: Magnus Karlsson <magnus.karlsson@gmail.com>,
Kal Conley <kal.conley@dectris.com>
Cc: "Björn Töpel" <bjorn@kernel.org>,
"Magnus Karlsson" <magnus.karlsson@intel.com>,
"Maciej Fijalkowski" <maciej.fijalkowski@intel.com>,
"Jonathan Lemon" <jonathan.lemon@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Daniel Borkmann" <daniel@iogearbox.net>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
"Maxim Mikityanskiy" <maximmi@mellanox.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH bpf] xsk: Fix unaligned descriptor validation
Date: Wed, 5 Apr 2023 12:38:48 -0700 [thread overview]
Message-ID: <c0596a62-0873-5638-920b-235c55ff33a2@linux.dev> (raw)
In-Reply-To: <CAJ8uoz1BKJ1_jq6Sum-OkZQTR_ftmr5Enj+Cmn4Qsi15_jOpbQ@mail.gmail.com>
On 4/3/23 11:25 PM, Magnus Karlsson wrote:
> On Mon, 3 Apr 2023 at 16:38, Kal Conley <kal.conley@dectris.com> wrote:
>>
>> Make sure unaligned descriptors that straddle the end of the UMEM are
>> considered invalid. Currently, descriptor validation is broken for
>> zero-copy mode which only checks descriptors at page granularity.
>> Descriptors that cross the end of the UMEM but not a page boundary may
>> be therefore incorrectly considered valid. The check needs to happen
>> before the page boundary and contiguity checks in
>> xp_desc_crosses_non_contig_pg. Do this check in
>> xp_unaligned_validate_desc instead like xp_check_unaligned already does.
>
> Thanks for catching this Kal.
>
> Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Is this case covered by an existing test?
next prev parent reply other threads:[~2023-04-05 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 14:36 [PATCH bpf] xsk: Fix unaligned descriptor validation Kal Conley
2023-04-04 6:25 ` Magnus Karlsson
2023-04-05 19:38 ` Martin KaFai Lau [this message]
2023-04-05 19:48 ` Kal Cutter Conley
2023-04-05 20:11 ` Martin KaFai Lau
2023-04-06 0:12 ` Kal Cutter Conley
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=c0596a62-0873-5638-920b-235c55ff33a2@linux.dev \
--to=martin.lau@linux.dev \
--cc=ast@kernel.org \
--cc=bjorn@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=jonathan.lemon@gmail.com \
--cc=kal.conley@dectris.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=maximmi@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox