mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
Prohibit replacement of the PCMCIA Card Information Structure when the kernel is locked down. Suggested-by: Dominik Brodowski <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> Reviewed-by: Kees Cook <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
6ea0e815fc
commit
3f19cad3fa
3 changed files with 7 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <linux/pci.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/security.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
|
|
@ -1575,6 +1576,10 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
|
|||
struct pcmcia_socket *s;
|
||||
int error;
|
||||
|
||||
error = security_locked_down(LOCKDOWN_PCMCIA_CIS);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
s = to_socket(container_of(kobj, struct device, kobj));
|
||||
|
||||
if (off)
|
||||
|
|
|
|||
Loading…
Reference in a new issue