From: David Woodhouse <dwmw2@infradead.org>
To: Andi Kleen <andi@firstfloor.org>, tglx@linutronix.de
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org, arjan.van.de.ven@intel.com,
peterz@infradead.org, Andi Kleen <ak@linux.intel.com>,
jeyu@kernel.org
Subject: Re: [PATCH] retpoline/module: Taint kernel for missing retpoline in module
Date: Fri, 12 Jan 2018 19:01:42 +0000 [thread overview]
Message-ID: <1515783702.22302.488.camel@infradead.org> (raw)
In-Reply-To: <20180112175507.31750-1-andi@firstfloor.org>
[-- Attachment #1: Type: text/plain, Size: 1594 bytes --]
On Fri, 2018-01-12 at 09:55 -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> There's a risk that a kernel that has full retpoline mitigations
> becomes vulnerable when a module gets loaded that hasn't been
> compiled with the right compiler or the right option.
>
> We cannot fix it, but should at least warn the user when that
> happens.
>
> Add a flag to each module if it has been compiled with RETPOLINE
>
> When the a module hasn't been compiled with a retpoline
> aware compiler, print a warning and set a taint flag.
>
> For modules it is checked at compile time, however it cannot
> check assembler or other non compiled objects used in the module link.
>
> Due to lack of better letter it uses taint option 'Z'
>
> We only set the taint flag for incorrectly compiled modules
> now, not for the main kernel, which already has other
> report mechanisms.
>
> Also make sure to report vulnerable for spectre if such a module
> has been loaded.
Thanks for reviving this; it got dropped partly because it has
conflicts between the tip/x86/pti tree and Linus' 4.15-rc.
The other reason for dropping it was because I think we probably want
to revisit this whole thing once we have all the mitigations in place.
It doesn't make a lot of sense to have a taint flag for a *partial*
retpoline, but not in the case that we have *no* mitigation in place.
So maybe we should drop the taint part, and just make the kernel report
that it is (partially) vulnerable to Spectre V2, just as in the
CONFIG_RETPOLINE && !RETPOLINE case?
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5213 bytes --]
next prev parent reply other threads:[~2018-01-12 19:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 17:55 Andi Kleen
2018-01-12 19:01 ` David Woodhouse [this message]
2018-01-12 19:17 ` Andi Kleen
2018-01-13 14:12 ` Greg KH
2018-01-13 14:38 ` Van De Ven, Arjan
2018-01-13 15:37 ` Greg KH
2018-01-13 14:53 ` Andi Kleen
2018-01-13 15:36 ` Greg KH
2018-01-13 18:20 ` Andi Kleen
2018-01-16 20:08 ` Andi Kleen
2018-01-15 12:47 ` David Laight
2018-01-15 12:53 ` Van De Ven, Arjan
2018-01-15 13:01 ` David Woodhouse
2018-01-15 14:08 ` David Laight
2018-01-15 16:48 ` Andi Kleen
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=1515783702.22302.488.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=arjan.van.de.ven@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jeyu@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome