lkml.org 
[lkml]   [2018]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 01/24] Add the ability to lock down access to the running kernel image
From
Date
On 04/11/2018 09:24 AM, David Howells wrote:
> ---
>
> arch/x86/kernel/setup.c | 2 +
> include/linux/kernel.h | 32 +++++++++++++++++++++++
> security/Kconfig | 23 ++++++++++++++++-
> security/Makefile | 3 ++
> security/lock_down.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 124 insertions(+), 1 deletion(-)
> create mode 100644 security/lock_down.c

> diff --git a/security/Kconfig b/security/Kconfig
> index c4302067a3ad..a68e5bdebad5 100644
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -231,6 +231,28 @@ config STATIC_USERMODEHELPER_PATH
> If you wish for all usermode helper programs to be disabled,
> specify an empty string here (i.e. "").
>
> +config LOCK_DOWN_KERNEL
> + bool "Allow the kernel to be 'locked down'"
> + help
> + Allow the kernel to be locked down. Locking down the kernel turns
> + off various features that might otherwise allow access to the kernel

s/turns off/disables/

> + image (eg. setting MSR registers).

e.g.

> +
> + Note, however, that locking down your kernel will prevent some

the kernel
a kernel

> + drivers from functioning because allowing manual configuration of
> + hardware parameters is forbidden, lest a device be used to access the
> + kernel by DMA. This mostly applies to ISA devices.

Is DMA from non-ISA devices OK, or did I miss seeing that patch?

> + The kernel lockdown can be triggered by adding lockdown=1 to the
> + kernel command line.


> diff --git a/security/lock_down.c b/security/lock_down.c
> new file mode 100644
> index 000000000000..f35ffdd096ad
> --- /dev/null
> +++ b/security/lock_down.c
> @@ -0,0 +1,65 @@
> +/* Lock down the kernel
> + *
> + * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
> + * Written by David Howells (dhowells@redhat.com)
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public Licence
> + * as published by the Free Software Foundation; either version
> + * 2 of the Licence, or (at your option) any later version.

fsf.org spells that Licence word as License. :)

> + */


--
~Randy

\
 
 \ /
  Last update: 2018-04-11 19:38    [W:0.299 / U:21.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site