From: Paolo Abeni <pabeni@redhat.com>
To: crecklin@redhat.com, Kees Cook <keescook@chromium.org>
Cc: LKML <linux-kernel@vger.kernel.org>, linux-mm@vger.kernel.org
Subject: Re: [PATCH] add param that allows bootline control of hardened usercopy
Date: Tue, 26 Jun 2018 11:48:31 +0200 [thread overview]
Message-ID: <a48538cf40c1645669326c92d9600fc98a13a260.camel@redhat.com> (raw)
In-Reply-To: <64bf81fa-0363-4b46-d8da-94285b592caa@redhat.com>
Hi,
On Mon, 25 Jun 2018 11:21:38 -0700 Kees Cook <keescook@chromium.org> wrote:
> On Mon, Jun 25, 2018 at 8:08 AM, Chris von Recklinghausen
> <crecklin@redhat.com> wrote:
> > Enabling HARDENED_USER_COPY causes measurable regressions in the
> > networking performances, up to 8% under UDP flood.
>
> Which function is "hot"? i.e. which copy*user() is taking up the time?
> Do you have a workload that at can be used to reproduce the problem?
I'm running an a small packet UDP flood using pktgen vs. an host b2b
connected. On the receiver side the UDP packets are processed by a
simple user space process that just read and drop them:
https://github.com/netoptimizer/network-testing/blob/master/src/udp_sink.c
Not very useful from a functional PoV, it helps mostly pin-pointing
bottle-neck in the networking stack.
When running a kernel with CONFIG_HARDENED_USERCOPY=y, I see a 5-8%
regression in the receive tput, compared to the same kernel without
such option.
With CONFIG_HARDENED_USERCOPY=y, perf shows ~6% of CPU time spent
cumulatively in __check_object_size (~4%) and __virt_addr_valid (~2%).
Cheers,
Paolo
next prev parent reply other threads:[~2018-06-26 9:48 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
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 [this message]
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=a48538cf40c1645669326c92d9600fc98a13a260.camel@redhat.com \
--to=pabeni@redhat.com \
--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®