Currently during soft reboot(kexec_file_load) boot command line arguments are not measured. Define hooks needed to measure kexec command line arguments during soft reboot(kexec_file_load). - A new ima hook ima_kexec_cmdline is defined to be called by the kexec code. - A new function process_buffer_measurement is defined to measure the buffer hash into the IMA measurement list. - A new func policy KEXEC_CMDLINE is defined to control the measurement.
Showing the changes to include/linux (1 of 6 files). Show all
Unified · Split
| @@ -26,6 +26,7 @@ extern int ima_read_file(struct file *file, enum kernel_read_file_id id); · 25 unmodified lines | |||
| 26 | extern int ima_post_read_file(struct file *file, void *buf, loff_t size, | 26 | extern int ima_post_read_file(struct file *file, void *buf, loff_t size, |
| 27 | enum kernel_read_file_id id); | 27 | enum kernel_read_file_id id); |
| 28 | extern void ima_post_path_mknod(struct dentry *dentry); | 28 | extern void ima_post_path_mknod(struct dentry *dentry); |
| 29 | extern void ima_kexec_cmdline(const void *buf, int size); | ||
| 29 | 30 | ||
| 30 | #ifdef CONFIG_IMA_KEXEC | 31 | #ifdef CONFIG_IMA_KEXEC |
| 31 | extern void ima_add_kexec_buffer(struct kimage *image); | 32 | extern void ima_add_kexec_buffer(struct kimage *image); |
| @@ -92,6 +93,7 @@ static inline void ima_post_path_mknod(struct dentry *dentry) · 60 unmodified lines | |||
| 92 | return; | 93 | return; |
| 93 | } | 94 | } |
| 94 | 95 | ||
| 96 | static inline void ima_kexec_cmdline(const void *buf, int size) {} | ||
| 95 | #endif /* CONFIG_IMA */ | 97 | #endif /* CONFIG_IMA */ |
| 96 | 98 | ||
| 97 | #ifndef CONFIG_IMA_KEXEC | 99 | #ifndef CONFIG_IMA_KEXEC |