]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - security/lock_down.c
1 /* Lock down the kernel
3 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
12 #include <linux/security.h>
13 #include <linux/export.h>
15 static __read_mostly
bool kernel_locked_down
;
18 * Put the kernel into lock-down mode.
20 void lock_kernel_down(void)
22 kernel_locked_down
= true;
26 * Take the kernel out of lockdown mode.
28 void lift_kernel_lockdown(void)
30 kernel_locked_down
= false;
34 * kernel_is_locked_down - Find out if the kernel is locked down
36 bool kernel_is_locked_down(void)
38 return kernel_locked_down
;
40 EXPORT_SYMBOL(kernel_is_locked_down
);