From: Alexander Kleinsorge <aleks@physik.tu-berlin.de>
To: linux-kernel@vger.kernel.org
Subject: proposal for meltdown-workaround with low overhead
Date: Thu, 4 Jan 2018 20:45:36 +0100 [thread overview]
Message-ID: <9f274ca7-732d-810a-4e51-83309b96d14b@physik.tu-berlin.de> (raw)
Hi all,
This is my first post here and I hope it is fine. I will subscribe
tomorrow to this list, so please take me in CC for answers now.
As Meltdown-Issue depends on allowing to cause many exceptions (usually
: accessing an invalid address), we could restrict this misusage easy.
My rough proposal that should give an idea and some of them in
combination should fix the problem.
Of course root and a special new group could be excluded from these
restrictions. But especially for JIT-Engine, we should be strict here
inside exception handling code.
The normal performance should not be affected, only exception handling
(kernel OS part, not user part) a little.
If an attack is detected (via counter threshold), prevent start new
processes by this user (including forks), or stop/suspend this (or all
existing?) process(es) of this user.
1. Limit the number of this exception kind by a per user counter, as I
don't see a use case for normal operation to cause high frequent memory
probes. (e.g. 1/sec and/or 100 since boot, or similar - configurable
parameters perhaps) And if someone needs this, he needs to get the right
for it (e.g. via new memory_exception_group).
2. Limit the fork count (similar to step 1). Especially JIT-users should
not need (e.g.) >10 forks per sec (again configurable).
3. Perhaps memory transaction (variant) can also be handled somehow via
a sufficieant delay after such exception (e.g. pausing all processes of
same user for some sleep-ms).
Depending on details, this slows down the attack sigificantly and can
even completely prevent it (by hard counter limits for guests or
unpriviliged users).
Let's fight is from the other side.
kind regards,
Alexander
next reply other threads:[~2018-01-04 19:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 19:45 Alexander Kleinsorge [this message]
2018-01-04 23:09 ` Tony Luck
2018-01-04 23:24 ` Alan Cox
2018-01-05 10:24 ` Alexander Kleinsorge
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=9f274ca7-732d-810a-4e51-83309b96d14b@physik.tu-berlin.de \
--to=aleks@physik.tu-berlin.de \
--cc=linux-kernel@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®