Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp3218970pxy; Mon, 3 May 2021 18:53:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3w/4se64wCUm1dt9Rqf9d1uGasnZldWwXKtrjKnort1SgYf7klj4SDqM3HXFuNfFrokF9 X-Received: by 2002:a17:906:7842:: with SMTP id p2mr1886890ejm.487.1620093196223; Mon, 03 May 2021 18:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620093196; cv=none; d=google.com; s=arc-20160816; b=iOcixRnCy2qsCEkBafrSndceJpgZM4tv17TUc1dvstqPgKivdg26WlyyIhjF4ACDFy dD43k6392tvXYYcivUGRDZeKyk08ONsBkfuExnq/HxyNMSc0BjV7IPAWjo9oFQXZt4pZ Y6MfgXcVc1XX6PxGE3XBPxOjPqP8X9HvhfLyQEJHOB8yqRd2pPb6ZLwAk1+OzW+i2KF/ B7m9OJ2XA9fLbG2VNFOB+hq2sgrT0NjhkBHTkKFPETRoQ+L5RZdOp0k5IXsrCtvrezUs XECTolgyzr2MySEUpe1CNFAUb22FTklHde7yr97A6MXTDDpEgRrLko50VMtTz1hVFcTH H+Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Jk7JnqTNw8/M4GJaE0wDHkC3aGhQ1/Z3BZq74mkKkVU=; b=YLRjZsZ8yhV38n+orUCh382mJ185nFGJ2xtBbmr/3hGSnFQ67IfuTdCF2sGtgkFt7r wR/lvSZDDMEzByBJpy5U/g0++pCKVC4hmSmyXK5WYHU8+Y+6VUqpTblFVni6ey4k/5pi d+0co1W170UglfudsMlOX4vuypot7xrSQJnbwRU1cIhbmutI92eoLvbed+Y+ReDJcWLb wMpCbNSs5qDcAmGkPRu2tfT0KiTE6AI9WjJeYSAf/QniI0G3EOGiBWFknu1RFSousW+2 c4tZGUU33FbKAbSscVrOih7JcW6vxqOEq1RFoPPuAmoOOnvQOSPKJ+9K7vPHloaf5hlH RkkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YyFRW08W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oq27si1297348ejb.383.2021.05.03.18.52.52; Mon, 03 May 2021 18:53:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YyFRW08W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229665AbhEDBc2 (ORCPT + 99 others); Mon, 3 May 2021 21:32:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:57170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbhEDBc1 (ORCPT ); Mon, 3 May 2021 21:32:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ADF6A6101B for ; Tue, 4 May 2021 01:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620091893; bh=K8vSP43hXBPaf8WuOBWx0dY70MfoRQlMOLSA9/M19w8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=YyFRW08W1KqlNYAH6sqVmJAIqAoh+BJkY8VNjd7EpbikOoLJuP/vsOduyJeFPOzq5 f3xVZsTQnfU3b26Ra9mzOXeTQ8rgy+m38YvJZ00bVl7Ptk166+Lg+9Mkpvj0LP9Qmt gzluIwDVn8lKnYM8GqoT5N4VSGBSJ9qtQhFcRvvwJCC86PpFNXXmpFGAKIPk8NLzAy k69sjFUqvXlIHsnc6OZg/fcW7jH/5Jv9/3gbrM+LUDgcSZFWAe4E30K+5I/GZyth6C O9dgIhg0eDgorRDmqLcwiacDH3egYfC21Vf0w9aTX6jWkg+EGMjnySzw3aNXjXt1Bj E6MCE4idgf9dg== Received: by mail-ej1-f47.google.com with SMTP id m12so10695591eja.2 for ; Mon, 03 May 2021 18:31:33 -0700 (PDT) X-Gm-Message-State: AOAM533Ib/N3YDgNeD+VC7pVXbuHZW5/D4aEOXai28zb2i07xIrb9XmE vM86PiOXQbZpqFm3RTbx4V09Uu+a4L8aeHEO2iG7DA== X-Received: by 2002:a17:906:4f91:: with SMTP id o17mr19184065eju.503.1620091892166; Mon, 03 May 2021 18:31:32 -0700 (PDT) MIME-Version: 1.0 References: <20210503233010.x5lzpw4dq3gueg47@treble> In-Reply-To: <20210503233010.x5lzpw4dq3gueg47@treble> From: Andy Lutomirski Date: Mon, 3 May 2021 18:31:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: =?UTF-8?Q?Re=3A_Do_we_need_to_do_anything_about_=22dead_=C2=B5ops=3F=22?= To: Josh Poimboeuf Cc: Andy Lutomirski , X86 ML , LKML , David Kaplan , Andrew Cooper , David Woodhouse , Kees Cook , Jann Horn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 3, 2021 at 4:30 PM Josh Poimboeuf wrote: > > On Sat, May 01, 2021 at 09:26:33AM -0700, Andy Lutomirski wrote: > > Hi all- > > > > The "I See Dead =C2=B5ops" paper that is all over the Internet right no= w is > > interesting, and I think we should discuss the extent to which we > > should do anything about it. I think there are two separate issues: > > > > First, should we (try to) flush the =C2=B5op cache across privilege > > boundaries? I suspect we could find ways to do this, but I don't > > really see the point. A sufficiently capable attacker (i.e. one who > > can execute their own code in the dangerous speculative window or one > > who can find a capable enough string of gadgets) can put secrets into > > the TLB, various cache levels, etc. The =C2=B5op cache is a nice piece= of > > analysis, but I don't think it's qualitatively different from anything > > else that we don't flush. Am I wrong? > > Wouldn't this type of gadget (half-v1 gadget + value-dependent-branch) > would be much more likely to occur than a traditional Spectre v1 > (half-v1 gadget + value-addressed-load)? I don't fully believe this. It's certainly the case that: if (mispredicted as false) return; secret =3D some_secret(); if (secret =3D=3D 42) do_something(); will leak the fact that the secret is 42 into the =C2=B5op cache, but it will also leak it into the icache and lots of other things. I see nothing new here. That being said, it's probably still worth investigating the gadgets. > > Also, in section V.A., they identified 37 gadgets. Has anybody looked > at those yet? Not I.