From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Nikolay Borisov <nik.borisov@suse.com>
Cc: Pedro Falcato <pfalcato@suse.de>,
Dave Hansen <dave.hansen@intel.com>,
x86@kernel.org, mhocko@suse.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@intel.com>,
Kees Cook <kees@kernel.org>, Ingo Molnar <mingo@kernel.org>,
Vishal Annapurve <vannapurve@google.com>,
Kirill Shutemov <kas@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Michael Ellerman <mpe@ellerman.id.au>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Naveen N Rao (AMD)" <naveen@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Lorenzo Stoakes <ljs@kernel.org>,
Vlastimil Babka <vbabka@kernel.org>,
David Hildenbrand <david@kernel.org>
Subject: Re: [RESEND PATCH] x86/devmem: Drop /dev/mem access for confidential guests
Date: Wed, 25 Nov 2026 06:06:26 +0100 [thread overview]
Message-ID: <2026112533-juncture-skyline-91d5@gregkh> (raw)
In-Reply-To: <15d9c032-a8cd-4469-9272-0964e8d9ac9d@suse.com>
On Tue, Nov 24, 2026 at 07:53:53PM +0200, Nikolay Borisov wrote:
>
>
> On 24.11.26 г. 19:35 ч., Greg Kroah-Hartman wrote:
> > On Tue, Nov 24, 2026 at 05:10:21PM +0000, Pedro Falcato wrote:
> > > Holy cow the CC list is stale.
> > > Fixing some up.
> > >
> > > On Tue, Nov 24, 2026 at 08:36:45AM -0800, Dave Hansen wrote:
> > > > On 11/24/26 08:00, Nikolay Borisov wrote:
> > > > > Resending this with the hope of either getting it accepted or
> > > > > arriving at a consensus what exactly is missing so that I can take
> > > > > it from there and eventually get something merged. As previously
> > > > > mentioned this results in real problems for confidential guests both
> > > > > on TDX as well as SEV-SNP.>
> > > > > arch/x86/Kconfig | 4 ++++
> > > > > mm/char-mem.c | 10 ++++++++++
> > > > > 2 files changed, 14 insertions(+)
> > > >
> > > > I'm still OK with doing this.
> > > >
> > > > But I didn't want to sneak an mm/ change in via the tip tree. Any mm
> > > > acks or naks on this?
> > >
> > > For what it's worth, I don't love this fix. Yes, it fixes issues in /dev/mem,
> > > but it:
> > > 1) skips any other potential problem spots (I don't know which)
> > > 2) open-codes random CC checks in mm, which is kind-of regrettable
> > >
> > > OTOH, it's unclear to me why that CC check is needed. If configs select
> > > STRICT_DEVMEM and IO_STRICT_DEVMEM, shouldn't it Just Do The Right thing?
> > > in iomem_is_exclusive, etc. If not, could the CC awareness sit there
> > > instead?
> >
> > Yeah, why is anyone letting a CC system access /dev/mem at all? That's
> > ripe for abuse lots of different ways, so I really don't like this
> > change either.
>
> You are missing the point, this pertains to /dev/mem in the guest. There are
> a bunch of libraries (libhd for example) which reads the first meg of
> memory. This causes the CC guest to shutdown in both AMD-SEVSNP and TDX
> world.
Then don't allow those libraries to work in cc guests :)
Again, why would you want anyone to access /dev/mem/ at all in those
types of situations?
greg k-h
next prev parent reply other threads:[~2026-11-25 5:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 16:00 [RESEND PATCH] x86/devmem: Drop /dev/mem access for confidential guests Nikolay Borisov
2026-11-24 16:29 ` Arnd Bergmann
2026-11-24 16:36 ` Dave Hansen
2026-11-24 17:10 ` Pedro Falcato
2026-11-24 17:35 ` Greg Kroah-Hartman
2026-11-24 17:53 ` Nikolay Borisov
2026-11-25 5:06 ` Greg Kroah-Hartman [this message]
2026-11-24 17:57 ` Nikolay Borisov
2026-11-25 16:51 ` Naveen N Rao
2026-11-26 7:17 ` Nikolay Borisov
2026-11-27 8:45 ` Naveen N Rao
2026-11-25 16:01 ` sashiko-bot
2026-11-26 8:28 ` Nikolay Borisov
2026-11-27 9:47 ` Naveen N Rao
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=2026112533-juncture-skyline-91d5@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=kas@kernel.org \
--cc=kees@kernel.org \
--cc=liam@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=nik.borisov@suse.com \
--cc=pfalcato@suse.de \
--cc=suzuki.poulose@arm.com \
--cc=vannapurve@google.com \
--cc=vbabka@kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.