Re: [PATCH RFC v10 22/22] mm: Add basic tests for kpkeys_hardened_pgtables

From: Kevin Brodsky

Date: Tue Nov 10 2026 - 04:02:59 EST


On 09/11/2026 20:28, Mark Brown wrote:
> On Mon, Nov 09, 2026 at 03:58:47PM +0000, Kevin Brodsky wrote:
>
>> ---
>> mm/Makefile | 1 +
>> mm/tests/kpkeys_hardened_pgtables_kunit.c | 200 ++++++++++++++++++++++++++++++
>> security/Kconfig.hardening | 12 ++
>> 3 files changed, 213 insertions(+)
>> +config KPKEYS_HARDENED_PGTABLES_KUNIT_TEST
>> + bool "KUnit tests for kpkeys_hardened_pgtables" if !KUNIT_ALL_TESTS
>> + depends on KPKEYS_HARDENED_PGTABLES
>> + depends on KUNIT=y
>> + default KUNIT_ALL_TESTS
> I'd also expect to see this added to one of the KUnit config fragments
> somewhere so it gets run as standard, though that's a little awkward
> given that KPKEYS_HARDENED_PGTABLES isn't universally available.

Do you mean adding the dependency KPKEYS_HARDENED_PGTABLES=y to
tools/testing/kunit/configs/all_tests.config? Indeed that would only be
meaningful on arm64 (for now). That said it wouldn't hurt other
architectures, so happy to add it there if you think that's worth it.

- Kevin