From: Florian Fainelli <f.fainelli@gmail.com>
To: Dan Williams <dan.j.williams@intel.com>, linux-kernel@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
peterz@infradead.org, Alan Cox <alan.cox@intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
Will Deacon <will.deacon@arm.com>,
Solomon Peachy <pizza@shaftnet.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Christian Lamparter <chunkeey@googlemail.com>,
Elena Reshetova <elena.reshetova@intel.com>,
linux-arch@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
x86@kernel.org, Ingo Molnar <mingo@redhat.com>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Zhang Rui <rui.zhang@intel.com>,
linux-media@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
Jan Kara <jack@suse.com>, Eduardo Valentin <edubezval@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
qla2xxx-upstream@qlogic.com, tglx@linutronix.de,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Arjan van de Ven <arjan@linux.intel.com>,
Kalle Valo <kvalo@codeaurora.org>,
alan@linux.intel.com,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
gregkh@linuxfoundation.org, linux-wireless@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
netdev@vger.kernel.org, torvalds@linux-foundation.org,
"David S. Miller" <davem@davemloft.net>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
dan.carpenter@oracle.com
Subject: Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution
Date: Sat, 6 Jan 2018 10:56:25 -0800 [thread overview]
Message-ID: <ca6f24c0-d6cf-e309-aa68-92f1378ee75a@gmail.com> (raw)
In-Reply-To: <151520099201.32271.4677179499894422956.stgit@dwillia2-desk3.amr.corp.intel.com>
Le 01/05/18 à 17:09, Dan Williams a écrit :
> Quoting Mark's original RFC:
>
> "Recently, Google Project Zero discovered several classes of attack
> against speculative execution. One of these, known as variant-1, allows
> explicit bounds checks to be bypassed under speculation, providing an
> arbitrary read gadget. Further details can be found on the GPZ blog [1]
> and the Documentation patch in this series."
>
> This series incorporates Mark Rutland's latest api and adds the x86
> specific implementation of nospec_barrier. The
> nospec_{array_ptr,ptr,barrier} helpers are then combined with a kernel
> wide analysis performed by Elena Reshetova to address static analysis
> reports where speculative execution on a userspace controlled value
> could bypass a bounds check. The patches address a precondition for the
> attack discussed in the Spectre paper [2].
>
> A consideration worth noting for reviewing these patches is to weigh the
> dramatic cost of being wrong about whether a given report is exploitable
> vs the overhead nospec_{array_ptr,ptr} may introduce. In other words,
> lets make the bar for applying these patches be "can you prove that the
> bounds check bypass is *not* exploitable". Consider that the Spectre
> paper reports one example of a speculation window being ~180 cycles.
>
> Note that there is also a proposal from Linus, array_access [3], that
> attempts to quash speculative execution past a bounds check without
> introducing an lfence instruction. That may be a future optimization
> possibility that is compatible with this api, but it would appear to
> need guarantees from the compiler that it is not clear the kernel can
> rely on at this point. It is also not clear that it would be a
> significant performance win vs lfence.
>
> These patches also will also be available via the 'nospec' git branch
> here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/djbw/linux nospec
Although I suppose -stable and distribution maintainers will keep a
close eye on these patches, is there a particular reason why they don't
include the relevant CVE number in their commit messages?
It sounds like Coverity was used to produce these patches? If so, is
there a plan to have smatch (hey Dan) or other open source static
analysis tool be possibly enhanced to do a similar type of work?
Thanks!
--
Florian
next prev parent reply other threads:[~2018-01-06 18:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 1:09 [PATCH 00/18] prevent bounds-check bypass via speculative execution Dan Williams
2018-01-06 1:10 ` [PATCH 08/18] carl9170: " Dan Williams
2018-01-06 10:01 ` Sergei Shtylyov
2018-01-06 14:23 ` Christian Lamparter
2018-01-06 15:06 ` Alan Cox
2018-01-06 16:38 ` Christian Lamparter
2018-01-06 16:34 ` Dan Williams
2018-01-06 1:10 ` [PATCH 09/18] p54: " Dan Williams
2018-01-06 10:01 ` Sergei Shtylyov
2018-01-06 1:10 ` [PATCH 11/18] cw1200: " Dan Williams
2018-01-06 2:22 ` [PATCH 00/18] " Eric W. Biederman
2018-01-06 6:30 ` Dan Williams
2018-01-08 10:08 ` Peter Zijlstra
2018-01-08 11:43 ` Alan Cox
2018-01-08 11:55 ` Peter Zijlstra
2018-01-08 18:33 ` Ingo Molnar
2018-01-08 16:20 ` Bart Van Assche
2018-01-06 18:56 ` Florian Fainelli [this message]
2018-01-06 18:59 ` Arjan van de Ven
2018-01-06 19:37 ` Dan Williams
2018-01-06 20:07 ` Dan Williams
2018-01-09 19:34 ` Jiri Kosina
2018-01-09 19:44 ` Dan Williams
2018-01-09 20:55 ` Josh Poimboeuf
2018-01-11 9:54 ` Jiri Kosina
2018-01-11 15:58 ` Dan Williams
2018-01-11 16:34 ` Daniel Borkmann
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=ca6f24c0-d6cf-e309-aa68-92f1378ee75a@gmail.com \
--to=f.fainelli@gmail.com \
--cc=ak@linux.intel.com \
--cc=alan.cox@intel.com \
--cc=alan@linux.intel.com \
--cc=arjan@linux.intel.com \
--cc=arnd@arndb.de \
--cc=chunkeey@googlemail.com \
--cc=corbet@lwn.net \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=edubezval@gmail.com \
--cc=elena.reshetova@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jack@suse.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=kvalo@codeaurora.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=martin.petersen@oracle.com \
--cc=mchehab@kernel.org \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pizza@shaftnet.org \
--cc=qla2xxx-upstream@qlogic.com \
--cc=rui.zhang@intel.com \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).