From: Dave Hansen <dave.hansen@intel.com>
To: YangWencheng <east.moutain.yang@gmail.com>,
dave.hansen@linux.intel.com, srutherford@google.com
Cc: Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Pankaj Gupta <pankaj.gupta@amd.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86/sev: Fix potential sign extension in amd_enc_status_change_finish()
Date: Thu, 23 Apr 2026 10:07:31 -0700 [thread overview]
Message-ID: <23dc3fc9-be61-4e28-8dc2-2c03480d4f00@intel.com> (raw)
In-Reply-To: <20260423021033.147975-1-east.moutain.yang@gmail.com>
On 4/22/26 19:10, YangWencheng wrote:
> When npages (int) is left-shifted by PAGE_SHIFT to calculate the size
> in bytes, the operation is performed on a signed integer. If npages is
> large enough, this can cause:
I kinda think the whole API around encryption is busted. The majority of
the callers have a virtual address and a bytes-based length argument and
convert it to pages.
Shouldn't we fix the API instead of hacking around it in a billion
little places?
next prev parent reply other threads:[~2026-04-23 17:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 2:10 [PATCH 1/1] x86/sev: Fix potential sign extension in amd_enc_status_change_finish() YangWencheng
2026-04-23 17:07 ` Dave Hansen [this message]
2026-04-27 2:39 ` Wencheng Yang
-- strict thread matches above, loose matches on Subject: below --
2026-04-19 10:03 YangWencheng
2026-04-19 9:37 YangWencheng
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=23dc3fc9-be61-4e28-8dc2-2c03480d4f00@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=east.moutain.yang@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=pankaj.gupta@amd.com \
--cc=peterz@infradead.org \
--cc=srutherford@google.com \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@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