History

IMA: Define a new hook to measure the kexec boot command line arguments

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.

Prakhar Srivastava committed 7 years ago

Commit b0935121 parent 19453ce6 files · +84 −0Browse files

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

Unified · Split

include/linux/ima.h+2−0
@@ -26,6 +26,7 @@ extern int ima_read_file(struct file *file, enum kernel_read_file_id id); · 25 unmodified lines
26extern int ima_post_read_file(struct file *file, void *buf, loff_t size,26extern 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);
28extern void ima_post_path_mknod(struct dentry *dentry);28extern void ima_post_path_mknod(struct dentry *dentry);
29extern void ima_kexec_cmdline(const void *buf, int size);
29 30
30#ifdef CONFIG_IMA_KEXEC31#ifdef CONFIG_IMA_KEXEC
31extern void ima_add_kexec_buffer(struct kimage *image);32extern 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
96static inline void ima_kexec_cmdline(const void *buf, int size) {}
95#endif /* CONFIG_IMA */97#endif /* CONFIG_IMA */
96 98
97#ifndef CONFIG_IMA_KEXEC99#ifndef CONFIG_IMA_KEXEC

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