mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Blum <blum@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Ahmed S. Darwish" <darwi@linutronix.de>,
	Kevin Brodsky <kevin.brodsky@arm.com>,
	Andreas Larsson <andreas@gaisler.com>,
	Yeoreum Yun <yeoreum.yun@arm.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] x86/boot: Fix off-by-one error in sme_clear_pgd()
Date: Wed, 4 Nov 2026 21:14:19 +0100	[thread overview]
Message-ID: <auuSG7Bvj4pXPRmP@kernel.org> (raw)
In-Reply-To: <20261030184642.3ec0215c9b47e3f3e0dbdbdd@linux-foundation.org>

On Fri, Oct 30, 2026 at 06:46:42PM -0700, Andrew Morton wrote:
> On Fri, 18 Sep 2026 16:27:13 +0200 Thorsten Blum <blum@kernel.org> wrote:
> 
> > The mapping helpers __sme_map_range_pmd() and __sme_map_range_pte(), and
> > therefore sme_encrypt_kernel(), use exclusive end addresses and stop
> > before vaddr reaches vaddr_end.
> > 
> > However, sme_clear_pgd() treats vaddr_end as inclusive when calculating
> > the last PGD entry to clear. If vaddr_end is PGD-aligned, the first PGD
> > entry outside the range is cleared too.
> > 
> > Use vaddr_end - 1 to calculate the last PGD entry within the range.
> 
> When fixing a bug, please always fully describe the worst-case
> userspace-visible runtime effects of that bug.
> 
> I'm guessing "none known, this is from code inspection"?

Correct, this was found by code inspection.

      reply	other threads:[~2026-11-04 20:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 14:27 Thorsten Blum
2026-10-31  1:46 ` Andrew Morton
2026-11-04 20:14   ` Thorsten Blum [this message]

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=auuSG7Bvj4pXPRmP@kernel.org \
    --to=blum@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreas@gaisler.com \
    --cc=bp@alien8.de \
    --cc=darwi@linutronix.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=ritesh.list@gmail.com \
    --cc=tglx@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    --cc=yeoreum.yun@arm.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

all inboxes | Powered by JetHome®