Re: [RFC PATCH] /dev/mem: Disable /dev/mem under TDX guest
From: Kirill A. Shutemov
Date: Tue Mar 18 2025 - 09:28:30 EST
On Tue, Mar 18, 2025 at 02:53:34PM +0200, Nikolay Borisov wrote:
> > I think we need to think wider. What about applying a subset of LOCKDOWN_*
> > in all coco guests by default. Many of them are relevant for the guest security.
>
> How do you envision this to work, by introducing another
> CONFIG_LOCK_DOWN_KERNEL_FORCE_COCO or some such ? Will it be opt-in or
> mandatory?
I think cc_platform_has(CC_ATTR_xxx) should enabled some subset of
LOCKDOWN_*. No need in new config options.
> Should we decide to follow the lockdown route this means the owner of the
> coco guest will have the ability to disable it and a misbehaving userspace
> process will still be able to induce an EPT violation.
Sure. It can shoot itself in the foot.
--
Kiryl Shutsemau / Kirill A. Shutemov