]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: (efi-lockdown) Prohibit PCMCIA CIS storage when the kernel is locked...
authorDavid Howells <dhowells@redhat.com>
Fri, 25 Nov 2016 14:37:45 +0000 (14:37 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 5 Sep 2017 12:34:06 +0000 (07:34 -0500)
Prohibit replacement of the PCMCIA Card Information Structure when the
kernel is locked down.

Signed-off-by: David Howells <dhowells@redhat.com>
(cherry picked from commit 634dc9eb8591baee1d8fbe22066c6dfbe10d988e
 git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/pcmcia/cistpl.c

index 55ef7d1fd8da139caae507d928dd9f0b6fc70373..193e4f7b73b1d4b75a66ad8ab7830497eea9cd77 100644 (file)
@@ -1578,6 +1578,11 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
        struct pcmcia_socket *s;
        int error;
 
+       if (kernel_is_locked_down()) {
+               pr_err("Direct CIS storage isn't permitted when the kernel is locked down\n");
+               return -EPERM;
+       }
+
        s = to_socket(container_of(kobj, struct device, kobj));
 
        if (off)