mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
EVM and other LSMs need the ability to query the secure boot status of the system, without directly calling the IMA arch_ima_get_secureboot function. Refactor the secure boot status check into a general function named arch_get_secureboot. Reported-and-suggested-by: Mimi Zohar <zohar@linux.ibm.com> Suggested-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Coiby Xu <coxu@redhat.com> Acked-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
17 lines
336 B
C
17 lines
336 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Copyright (C) 2026 Red Hat, Inc. All Rights Reserved.
|
|
*
|
|
* Author: Coiby Xu <coxu@redhat.com>
|
|
*/
|
|
#include <linux/secure_boot.h>
|
|
|
|
/*
|
|
* Default weak implementation.
|
|
* Architectures that support secure boot must override this.
|
|
*/
|
|
__weak bool arch_get_secureboot(void)
|
|
{
|
|
return false;
|
|
}
|