From: Naveen N Rao <naveen@kernel.org>
To: Nikolay Borisov <nik.borisov@suse.com>
Cc: x86@kernel.org, mhocko@suse.com, kas@kernel.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 <kirill.shutemov@linux.intel.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] x86/devmem: Drop /dev/mem access for confidential guests
Date: Mon, 30 Nov 2026 14:52:05 +0530 [thread overview]
Message-ID: <aw09zOMPTYMRpx-S@blrnaveerao1> (raw)
In-Reply-To: <20261127154211.21360-2-nik.borisov@suse.com>
On Fri, Nov 27, 2026 at 05:42:12PM +0200, Nikolay Borisov wrote:
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 3159852fd6b3..1490e0019c71 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -901,6 +901,8 @@ config INTEL_TDX_GUEST
> depends on X86_X2APIC
> depends on EFI_STUB
> depends on PARAVIRT
> + select STRICT_DEVMEM
> + select IO_STRICT_DEVMEM
> select ARCH_HAS_CC_PLATFORM
> select X86_MEM_ENCRYPT
> select X86_MCE
> @@ -1490,6 +1492,8 @@ config AMD_MEM_ENCRYPT
> bool "AMD Secure Memory Encryption (SME) support"
> depends on X86_64 && CPU_SUP_AMD
> depends on EFI_STUB
> + select STRICT_DEVMEM
> + select IO_STRICT_DEVMEM
> select DMA_COHERENT_POOL
> select ARCH_USE_MEMREMAP_PROT
> select INSTRUCTION_DECODER
Sashiko had a comment on the previous posting about this, which I agree
with:
http://lore.kernel.org/r/sashiko-outbox-233694@kernel.org
With the selects above, it will not be possible to disable CONFIG_DEVMEM
completely if also selecting AMD_MEM_ENCRYPT/INTEL_TDX_GUEST.
In addition, I don't see the need for IO_STRICT_DEVMEM, at least in
terms of the issue being addressed and the fix below in
devmem_is_allowed(). Dan's commit message refers to confidential MMIO,
and I think that series can add the select if necessary. Note that
adding this select will force-enable IO_STRICT_DEVMEM on baremetal as
well.
So, a simple 'select STRICT_DEVMEM if DEVMEM' instead?
- Naveen
next prev parent reply other threads:[~2026-11-30 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 15:42 Nikolay Borisov
2026-11-30 9:22 ` Naveen N Rao [this message]
2026-11-30 9:37 ` 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=aw09zOMPTYMRpx-S@blrnaveerao1 \
--to=naveen@kernel.org \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=kas@kernel.org \
--cc=kees@kernel.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=nik.borisov@suse.com \
--cc=stable@vger.kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=vannapurve@google.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
all inboxes | Powered by JetHome®