Re: [PATCH] init/main.c: Initialize early LSMs after arch code
From: Paul Moore <paul@paul-moore.com>
Date: 2025-03-11 15:14:20
Also in:
lkml
On Tue, Mar 11, 2025 at 9:37 AM joeyli [off-list ref] wrote:
Hi KP, On Thu, Aug 01, 2024 at 07:17:47PM +0200, KP Singh wrote:quoted
With LSMs using static calls, early_lsm_init needs to wait for setup_arch for architecture specific functionality which includes jump tables and static calls to be initialized. This only affects "early LSMs" i.e. only lockdown when CONFIG_SECURITY_LOCKDOWN_LSM_EARLY is set. Fixes: 2732ad5ecd5b ("lsm: replace indirect LSM hook calls with static calls") Signed-off-by: KP Singh <kpsingh@kernel.org>I have tested acpi table override function by CONFIG_ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD option. As this patch description, the early LSM can NOT lockdown acpi table override in early boot stage now.
It's been years since I've had to an ACPI DSDT override, but just so I'm clear, this replacement table needs to be bundled in the initrd, yes? Assuming that's the case, I think that's likely okay as anyone who cares enough about kernel integrity to run Lockdown should also be protecting the kernel/initrd with a firmware and bootloader chain that ensures only authorized images are booted. If the user doesn't put any protections in place to ensure only authorized kernels/initrds are booted, Lockdown is a bit silly anyway.
Do you have any plan to fix the early lockdown LSM? Or I missed any fix patch in kernel mailing list?
-- paul-moore.com