Re: [RESEND PATCH] x86/devmem: Drop /dev/mem access for confidential guests

From: Naveen N Rao

Date: Wed Nov 25 2026 - 11:59:44 EST


On Tue, Nov 24, 2026 at 07:57:05PM +0200, Nikolay Borisov wrote:
> On 24.11.26 г. 19:10 ч., Pedro Falcato wrote:
> > On Tue, Nov 24, 2026 at 08:36:45AM -0800, Dave Hansen wrote:
> > > On 11/24/26 08:00, Nikolay Borisov wrote:
>
> > 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?
>
> Well, you are right that if we retain just the select
> STRICT_DEVMEM/IO_STRICT_DEVMEM it might fix the immediate issue. I don't
> know why eventually Dan decided to also add this check, I guess it's an
> instance of "fail fast".

Actually no? On x86, devmem_is_allowed() allows access to the first 1 MB
area, so STRICT_DEVMEM alone isn't sufficient.


- Naveen