Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754848AbeAMLd4 (ORCPT + 1 other); Sat, 13 Jan 2018 06:33:56 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47030 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754784AbeAMLdz (ORCPT ); Sat, 13 Jan 2018 06:33:55 -0500 Subject: Re: [PATCH 00/18] prevent bounds-check bypass via speculative execution To: Dan Williams Cc: linux-kernel@vger.kernel.org, Elena Reshetova References: <151520099201.32271.4677179499894422956.stgit@dwillia2-desk3.amr.corp.intel.com> From: QingFeng Hao Date: Sat, 13 Jan 2018 19:33:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <151520099201.32271.4677179499894422956.stgit@dwillia2-desk3.amr.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18011311-0036-0000-0000-000002AB6318 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008369; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000245; SDB=6.00974378; UDB=6.00493762; IPR=6.00754309; BA=6.00005775; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019017; XFM=3.00000015; UTC=2018-01-13 11:33:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18011311-0037-0000-0000-000042F98374 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-01-13_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1801130164 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 在 2018/1/6 9:09, Dan Williams 写道: > 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 @Elena, can I know how did you do this analysis? I mean manually or with tool. Thanks! > 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. [snip] > > -- Regards QingFeng Hao