lkml.org 
[lkml]   [2019]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH 17/27] Prohibit PCMCIA CIS storage when the kernel is locked down
    From
    From: David Howells <dhowells@redhat.com>

    Prohibit replacement of the PCMCIA Card Information Structure when the
    kernel is locked down.

    Suggested-by: Dominik Brodowski <linux@dominikbrodowski.net>
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: linux-pcmcia@lists.infradead.org
    Signed-off-by: Matthew Garrett <matthewgarrett@google.com>
    ---
    drivers/pcmcia/cistpl.c | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
    index ac0672b8dfca..8adf092d0e18 100644
    --- a/drivers/pcmcia/cistpl.c
    +++ b/drivers/pcmcia/cistpl.c
    @@ -1578,6 +1578,9 @@ static ssize_t pccard_store_cis(struct file *filp, struct kobject *kobj,
    struct pcmcia_socket *s;
    int error;

    + if (kernel_is_locked_down("Direct PCMCIA CIS storage"))
    + return -EPERM;
    +
    s = to_socket(container_of(kobj, struct device, kobj));

    if (off)
    --
    2.21.0.392.gf8f6787159e-goog
    \
     
     \ /
      Last update: 2019-03-25 23:11    [W:4.096 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site