Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6642139imu; Mon, 21 Jan 2019 12:44:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN6RJ8TWpVHR9s4ipif/QUdr/l8eBWZebYmykC7GwySvURie0B7pT+Pm742KQ2k2m2OUpDK4 X-Received: by 2002:a17:902:a5ca:: with SMTP id t10mr31380461plq.139.1548103489305; Mon, 21 Jan 2019 12:44:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548103489; cv=none; d=google.com; s=arc-20160816; b=NP8fIVoEoHvyqdWxCTzQiQoy1vrzPEgufI3An7aaau5M5YpR+c5YGpaP3INsqNMTOS AeWLwe15vhW7MBfcRxHY71HE/RzfBEyLVis1Znyg4TONHprX/dm9faBYKWsfvxwIvSso Z5ZlRRzP/+EXAJ+VXns1nQ71THqCJUehWg+6upLb5VRrz8eJsSyR5xXS8QPQw09fg2l/ hFimgjOMUYxV89Sz9o1hRSawHxdyEqLw6L44jbsztywtMev4ySrUgs0au4UtkSZDICww ktOaHvmdJrqotkXiLq/HE/UDl88hYMZaDZ8jhGXR5JTS2ip7fdap2EULe2NFJ7Ums/Na O6IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dJYcVP/usOckgmCLmB4Oqgx37htYBs2I+48ZUfpqbBo=; b=XbRRr2XX0ZHMqfEyHiqdXhX1vQNe2I3h7HDryTCWkVjpHJV4P3xPfXLqCQQXR9zes4 7UCDTHE+KoHVmSLkpEZxN+IUgl2zb9Mlg0XgxcIeqWblwxf9GoVYNXQtxIAsV5y32eaR KYXN5Vd6WDIbsOpkDf0sHDepvuDibG7kcIHpSOyZkAPSktgO2flncf+wVDyIjKjrOcvG RwOL0JbWTyAfAet4ccqO1Cn9uJU+TiIl+i/6TddERyt7HbOsnUBsHoXgtNBqJQsP2gu3 7LjuERkLIFFFK8lFxEj3WUkllq+sBmOzdLE98HVCrz2G4osyA878a1rKfc+y5y/LyksV 4EGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hbZxAtRm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si12828839pgk.101.2019.01.21.12.44.33; Mon, 21 Jan 2019 12:44:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=hbZxAtRm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727066AbfAUUmb (ORCPT + 99 others); Mon, 21 Jan 2019 15:42:31 -0500 Received: from mail-vk1-f196.google.com ([209.85.221.196]:33268 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726152AbfAUUmb (ORCPT ); Mon, 21 Jan 2019 15:42:31 -0500 Received: by mail-vk1-f196.google.com with SMTP id d201so4881338vka.0 for ; Mon, 21 Jan 2019 12:42:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dJYcVP/usOckgmCLmB4Oqgx37htYBs2I+48ZUfpqbBo=; b=hbZxAtRmwPiZ1YigJp5NqAYqsSrjLJwot+V0NasW03d7S7VIAcwAbx6eoja2OIQuSk 7fxkjVxVX4VsTjJcMgXoW/zC5kUTAkVt41kgpg/oPG6SD5wZFJTjxUssLUBD2XTKxR/b N8Z31szkDhDiaqEQAI8He116VaHJ6x+1HNCvQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dJYcVP/usOckgmCLmB4Oqgx37htYBs2I+48ZUfpqbBo=; b=BG4cRH1laFtLpZsvceS87K0gBVchS6MPzaf04YX0nXOtr/a4wDNgMyQsMMmO2VRkos lB8qUv7eKVotlzGi9Y5GiU69ZvbZh+x1hVGOvUkaYJjrE7xsQrJZ5KpkZxBPC96zTyFo A3FcGeDBeTWL2KMtYS8esAWuirzLvDAivcyDiI0No+KI9XFjgI2W/I9SXgtC0AuULnyQ ReT2t/n+yOSwc4G2ULvMaiyTqW5T380GswmacN9Q4S6zp2PIna6xCc6hSSbgkcVhViEw E5F0BLdBxgdW7uauX+et0bOSv/5t03wljGddZpgHIx0g6Az3IUrdupeG+fAoEgZH4p0x uIAg== X-Gm-Message-State: AJcUukcLa1K78f2Awuq896Pl8Q7iQ6/sbP7jNRBDQCLXM2I+yKZPYWns BjbQfsZhB00Xr2cKgm9IFy40rIsUOm4= X-Received: by 2002:a1f:b406:: with SMTP id d6mr11504281vkf.63.1548103348829; Mon, 21 Jan 2019 12:42:28 -0800 (PST) Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com. [209.85.222.43]) by smtp.gmail.com with ESMTPSA id w65sm27421289vsc.16.2019.01.21.12.42.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jan 2019 12:42:27 -0800 (PST) Received: by mail-ua1-f43.google.com with SMTP id d19so7325205uaq.11 for ; Mon, 21 Jan 2019 12:42:26 -0800 (PST) X-Received: by 2002:ab0:470d:: with SMTP id h13mr12693596uac.122.1548103346355; Mon, 21 Jan 2019 12:42:26 -0800 (PST) MIME-Version: 1.0 References: <1548076208-6442-1-git-send-email-jsteckli@amazon.de> <20190121183618.GP6118@tassilo.jf.intel.com> <20190121191541.GB4026@kroah.com> In-Reply-To: <20190121191541.GB4026@kroah.com> From: Kees Cook Date: Tue, 22 Jan 2019 09:42:13 +1300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC] x86/speculation: add L1 Terminal Fault / Foreshadow demo To: Greg KH Cc: Andi Kleen , Julian Stecklina , LKML , David Woodhouse , Liran Alon , Paolo Bonzini , Thomas Gleixner , Linus Torvalds , X86 ML , Kernel Hardening Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 22, 2019 at 8:15 AM Greg KH wrote: > > On Mon, Jan 21, 2019 at 10:36:18AM -0800, Andi Kleen wrote: > > > + /* Check the start address: needs to be page-aligned.. */ > > > +- if (start & ~PAGE_MASK) > > > ++ if (start & ~PAGE_MASK) { > > > ++ > > > ++ /* > > > ++ * XXX Hack > > > ++ * > > > ++ * We re-use this error case to show case a cache load gadget: > > > ++ * There is a mispredicted branch, which leads to prefetching > > > ++ * the cache with attacker controlled data. > > > ++ */ > > > ++ asm volatile ( > > > > Obviously that can never be added to a standard kernel. > > No, that's why it is a patch, right? People want to test things, it's > nice to have a way to easily do this. What about adding something like it to drivers/misc/lkdtm/ instead? It's not a "production" module, but it regularly get built for selftest builds. -- Kees Cook