From: Edward Cree <ecree.xilinx@gmail.com>
To: Harishankar Vishwanathan <harishankar.vishwanathan@gmail.com>,
Edward Cree <ecree@amd.com>
Cc: ast@kernel.org, harishankar.vishwanathan@rutgers.edu,
paul@isovalent.com, Matan Shachnai <m.shachnai@rutgers.edu>,
Srinivas Narayana <srinivas.narayana@rutgers.edu>,
Santosh Nagarakatte <santosh.nagarakatte@rutgers.edu>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
Jiri Olsa <jolsa@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 bpf-next] bpf: Fix latent unsoundness in and/or/xor value tracking
Date: Tue, 9 Apr 2024 18:17:05 +0100 [thread overview]
Message-ID: <9d149d61-239c-67ac-0647-b59a12264299@gmail.com> (raw)
In-Reply-To: <CAM=Ch04xd5u75UFeQwVrzP7=A5KPAw3x7_drqQHK3C-43T4T2w@mail.gmail.com>
On 04/04/2024 03:40, Harishankar Vishwanathan wrote:
> [...]
> Given the above, please advise if we should backport this patch to older
> kernels (and whether I should use the fixes tag).
I don't feel too strongly about it, and if you or Shung-Hsi still
think, on reflection, that backporting is desirable, then go ahead
and keep the Fixes: tag.
But maybe tweak the description so someone doesn't see "latent
unsoundness" and think they need to CVE and rush this patch out as
a security thing; it's more like hardening. *shrug*
>> Commit message could also make clearer that the new code considers whether
>> the *output* ubounds cross sign, rather than looking at the input bounds
>> as the previous code did. At first I was confused as to why XOR didn't
>> need special handling (since -ve xor -ve is +ve).
>
> Sounds good regarding making it clearer within the context of what the
> existing code does. However, I wanted to clarify that XOR does indeed use
> the same handling as all the other operations. Could you elaborate on what
> you mean?
Just that if you XOR two negative numbers you get a positive number,
which isn't true for AND or OR; and my confused little brain thought
that fact was relevant, which it isn't.
-e
next prev parent reply other threads:[~2024-04-09 17:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 21:20 [PATCH v2 bpf-next] bpf: Fix latent unsoundness in and/or/xor value tracking Harishankar Vishwanathan
2024-04-03 8:39 ` Daniel Borkmann
2024-04-04 3:05 ` Harishankar Vishwanathan
2024-04-03 13:25 ` Edward Cree
2024-04-04 2:40 ` Harishankar Vishwanathan
2024-04-09 13:16 ` Shung-Hsi Yu
2024-04-09 17:17 ` Edward Cree [this message]
2024-04-10 11:43 ` Shung-Hsi Yu
2024-04-13 0:05 ` Harishankar Vishwanathan
2024-04-15 4:11 ` Shung-Hsi Yu
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=9d149d61-239c-67ac-0647-b59a12264299@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=ecree@amd.com \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=harishankar.vishwanathan@gmail.com \
--cc=harishankar.vishwanathan@rutgers.edu \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.shachnai@rutgers.edu \
--cc=martin.lau@linux.dev \
--cc=paul@isovalent.com \
--cc=santosh.nagarakatte@rutgers.edu \
--cc=sdf@google.com \
--cc=song@kernel.org \
--cc=srinivas.narayana@rutgers.edu \
--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