Skip to content

Add kernel lockdown functionality

Matthew Garrett kexec linux-acpi linux-api linux-efi linux-integrity linux-pci linux-pm linux-security-module linux-serial lkml netdev platform-driver-x86 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v40 Latest29 patches 22 repliesIn review
  2. v3829 patches 12 repliesSuperseded
  3. v3729 patches 9 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v3629 patches7 repliesSuperseded
v3529 patches8 repliesSuperseded
v3429 patches50 repliesSuperseded
v3330 patches27 repliesSuperseded
v1 RFC2 patches1 replySuperseded

Patches in v40 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/29security: Support early LSMsinclude/asm-generic/vmlinux.lds.h include/linux/lsm_hooks.h include/linux/security.h +2 more+62 -90 replies
2/29security: Add a "locked down" LSM hookinclude/linux/lsm_hooks.h include/linux/security.h security/security.c+45 -00 replies
3/29security: Add a static lockdown policy LSMDocumentation/admin-guide/kernel-parameters.txt include/linux/security.h security/Kconfig +4 more+236 -53 replies
4/29lockdown: Enforce module signatures if the kernel is locked downinclude/linux/security.h init/Kconfig kernel/module.c +2 more+38 -72 replies
5/29lockdown: Restrict /dev/{mem,kmem,port} when the kernel is locked downdrivers/char/mem.c include/linux/security.h security/lockdown/lockdown.c+7 -20 replies
6/29kexec_load: Disable at runtime if the kernel is locked downinclude/linux/security.h kernel/kexec.c security/lockdown/lockdown.c+10 -00 replies
7/29lockdown: Copy secure_boot flag in boot params across kexec rebootarch/x86/kernel/kexec-bzimage64.c+1 -00 replies
8/29kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCEarch/arm64/Kconfig arch/s390/Kconfig arch/s390/configs/debug_defconfig +12 more+88 -341 reply
9/29kexec_file: Restrict at runtime if the kernel is locked downkernel/kexec_file.c+1 -10 replies
10/29hibernate: Disable when the kernel is locked downinclude/linux/security.h kernel/power/hibernate.c security/lockdown/lockdown.c+4 -12 replies
11/29PCI: Lock down BAR access when the kernel is locked downdrivers/pci/pci-sysfs.c drivers/pci/proc.c drivers/pci/syscall.c +2 more+33 -32 replies
12/29x86: Lock down IO port access when the kernel is locked downarch/x86/kernel/ioport.c include/linux/security.h security/lockdown/lockdown.c+7 -26 replies
13/29x86/msr: Restrict MSR access when the kernel is locked downarch/x86/kernel/msr.c include/linux/security.h security/lockdown/lockdown.c+10 -00 replies
14/29ACPI: Limit access to custom_method when the kernel is locked downdrivers/acpi/custom_method.c include/linux/security.h security/lockdown/lockdown.c+8 -01 reply
15/29acpi: Ignore acpi_rsdp kernel param when the kernel has been locked downarch/x86/boot/compressed/acpi.c arch/x86/include/asm/acpi.h arch/x86/include/asm/x86_init.h +4 more+49 -71 reply
16/29acpi: Disable ACPI table override if the kernel is locked downdrivers/acpi/tables.c+6 -01 reply
17/29lockdown: Prohibit PCMCIA CIS storage when the kernel is locked downdrivers/pcmcia/cistpl.c include/linux/security.h security/lockdown/lockdown.c+7 -00 replies
18/29lockdown: Lock down TIOCSSERIALdrivers/tty/serial/serial_core.c include/linux/security.h security/lockdown/lockdown.c+7 -00 replies
19/29lockdown: Lock down module params that specify hardware parameters (eg. ioport)include/linux/security.h kernel/params.c security/lockdown/lockdown.c+18 -51 reply
20/29x86/mmiotrace: Lock down the testmmiotrace modulearch/x86/mm/testmmiotrace.c include/linux/security.h security/lockdown/lockdown.c+7 -00 replies
21/29lockdown: Lock down /proc/kcorefs/proc/kcore.c include/linux/security.h security/lockdown/lockdown.c+7 -00 replies
22/29lockdown: Lock down tracing and perf kprobes when in confidentiality modeinclude/linux/security.h kernel/trace/trace_kprobe.c security/lockdown/lockdown.c+7 -00 replies
23/29bpf: Restrict bpf when kernel lockdown is in confidentiality modeinclude/linux/security.h kernel/trace/bpf_trace.c security/lockdown/lockdown.c+12 -01 reply
24/29lockdown: Lock down perf when in confidentiality modeinclude/linux/security.h kernel/events/core.c security/lockdown/lockdown.c+9 -00 replies
25/29kexec: Allow kexec_file() with appropriate IMA policy when locked downinclude/linux/ima.h kernel/kexec_file.c security/integrity/ima/ima.h +2 more+71 -20 replies
26/29debugfs: Restrict debugfs when the kernel is locked downfs/debugfs/file.c fs/debugfs/inode.c include/linux/security.h +1 more+62 -20 replies
27/29tracefs: Restrict tracefs when the kernel is locked downfs/tracefs/inode.c include/linux/security.h security/lockdown/lockdown.c+43 -10 replies
28/29efi: Restrict efivar_ssdt_load when the kernel is locked downdrivers/firmware/efi/efi.c+6 -00 replies
29/29lockdown: Print current->comm in restriction messagesfs/proc/kcore.c security/lockdown/lockdown.c+9 -40 replies

Reviews trailers per patch

26 of 29 patches have a Reviewed-by or Acked-by.

PatchKees CookCasey SchauflerDave YoungBjorn HelgaasThomas GleixnerSteven Rostedt (VMware)Masami HiramatsuMimi ZoharArd BiesheuvelJessica YuRafael J. WysockiPavel Machek
1/29A-b A-b
2/29A-b A-b
3/29R-b
4/29R-b
5/29R-b
6/29R-b A-b
7/29R-b
8/29
9/29
10/29R-b A-b A-b
11/29R-b A-b
12/29R-b
13/29A-b R-b
14/29R-b A-b
15/29R-b A-b
16/29R-b A-b
17/29R-b
18/29R-b
19/29R-b A-b
20/29R-b A-b
21/29R-b
22/29R-b A-b
23/29R-b
24/29R-b
25/29A-b
26/29
27/29R-b
28/29R-b A-b
29/29R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 12 reviewers.

Read the v40 thread

Cover letter [PATCH V40 00/29] Add kernel lockdown functionality

After chatting with James in person, I'm resending the full set with the fixes merged in in order to avoid any bisect issues. There should be no functional changes other than avoiding build failures with some configs, and fixing the oops in tracefs.