From: Randy Dunlap <rdunlap@infradead.org>
To: Chris von Recklinghausen <crecklin@redhat.com>,
keescook@chromium.org, linux-kernel@vger.kernel.org,
linux-mm@vger.kernel.org
Subject: Re: [PATCH] add param that allows bootline control of hardened usercopy
Date: Mon, 25 Jun 2018 09:09:11 -0700 [thread overview]
Message-ID: <5fe64898-d4df-1edd-37f0-5abbce6b2462@infradead.org> (raw)
In-Reply-To: <1529939300-27461-1-git-send-email-crecklin@redhat.com>
On 06/25/2018 08:08 AM, Chris von Recklinghausen wrote:
> Enabling HARDENED_USER_COPY causes measurable regressions in the
> networking performances, up to 8% under UDP flood.
>
> A generic distro may want to enable HARDENED_USER_COPY in their default
> kernel config, but at the same time, such distro may want to be able to
> avoid the performance penalties in with the default configuration and
> enable the stricter check on a per-boot basis.
>
> This change adds a config variable and a boot parameter to conditionally
> enable HARDENED_USER_COPY at boot time, and switch HUC to off if
> HUC_DEFAULT_OFF is set.
>
> Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
> ---
> .../admin-guide/kernel-parameters.rst | 2 ++
> .../admin-guide/kernel-parameters.txt | 3 ++
> include/linux/thread_info.h | 7 +++++
> mm/usercopy.c | 28 +++++++++++++++++++
> security/Kconfig | 10 +++++++
> 5 files changed, 50 insertions(+)
>
Hi,
> diff --git a/security/Kconfig b/security/Kconfig
> index c4302067a3ad..a6173897b85c 100644
> --- a/security/Kconfig
> +++ b/security/Kconfig
> @@ -189,6 +189,16 @@ config HARDENED_USERCOPY_PAGESPAN
> been removed. This config is intended to be used only while
> trying to find such users.
>
> +config HUC_DEFAULT_OFF
> + bool "allow CONFIG_HARDENED_USERCOPY to be configured but disabled"
> + depends on HARDENED_USERCOPY
> + help
> + When CONFIG_HARDENED_USERCOPY is enabled, disable its
> + functionality unless it is enabled via at boot time
it is enabled at boot time
> + via the "enable_hardened_usercopy" boot parameter. This allows
> + the functionality of hardened usercopy to be present but not
> + impact performance unless it is needed.
> +
> config FORTIFY_SOURCE
> bool "Harden common str/mem functions against buffer overflows"
> depends on ARCH_HAS_FORTIFY_SOURCE
>
--
~Randy
next prev parent reply other threads:[~2018-06-25 16:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 15:08 Chris von Recklinghausen
2018-06-25 15:22 ` Christoph von Recklinghausen
2018-06-25 19:44 ` Laura Abbott
2018-06-25 22:29 ` Christoph von Recklinghausen
2018-06-25 22:35 ` Kees Cook
2018-06-25 23:17 ` Christoph von Recklinghausen
2018-06-25 16:09 ` Randy Dunlap [this message]
2018-06-25 18:05 ` kbuild test robot
2018-06-25 18:21 ` Kees Cook
[not found] ` <64bf81fa-0363-4b46-d8da-94285b592caa@redhat.com>
2018-06-26 9:48 ` Paolo Abeni
2018-06-26 16:54 ` Kees Cook
2018-06-26 17:14 ` Paolo Abeni
2018-06-25 18:53 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5fe64898-d4df-1edd-37f0-5abbce6b2462@infradead.org \
--to=rdunlap@infradead.org \
--cc=crecklin@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®