History

kexec, KEYS: Make use of platform keyring for signature verify

This patch allows the kexec_file_load syscall to verify the PE signed kernel image signature based on the preboot keys stored in the .platform keyring, as fall back, if the signature verification failed due to not finding the public key in the secondary or builtin keyrings. This commit adds a VERIFY_USE_PLATFORM_KEYRING similar to previous VERIFY_USE_SECONDARY_KEYRING indicating that verify_pkcs7_signature should verify the signature using platform keyring. Also, decrease the error message log level when verification failed with -ENOKEY, so that if called tried multiple time with different keyring it won't generate extra noises.

Kairui Song committed 7 years ago

Commit 278311e1 parent 219a3e83 files · +24 −4Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/verification.h+1−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
17 * should be used.17 * should be used.
18 */18 */
19#define VERIFY_USE_SECONDARY_KEYRING ((struct key *)1UL)19#define VERIFY_USE_SECONDARY_KEYRING ((struct key *)1UL)
20#define VERIFY_USE_PLATFORM_KEYRING ((struct key *)2UL)
20 21
21/*22/*
22 * The use to which an asymmetric key is being put.23 * The use to which an asymmetric key is being put.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t