Received: by 10.223.176.46 with SMTP id f43csp2718887wra; Thu, 25 Jan 2018 14:10:37 -0800 (PST) X-Google-Smtp-Source: AH8x224CYworXFFyL7xVU/YqbrFUkuXe9uqtmM/M2V/zrXzguE/PXZHzaVWOzpthswocj9Z0KXeN X-Received: by 10.99.96.81 with SMTP id u78mr14310920pgb.427.1516918237795; Thu, 25 Jan 2018 14:10:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516918237; cv=none; d=google.com; s=arc-20160816; b=H/tB7ZgtfGaVk+HRx3lh95hsYLiSPltqHeS5ruAWWMPgOIQPNHaLk6gds26OpO5AXN BSBK6UZVPyee6WbkY5ZOpE0BnZLas8SVJC0K22QG3bW/7e+90nfqO8OHHhd/bEpz2IU8 l9RSVvaX0ZDJtAmLWXTFi7LQlxGFY0ILGujRt48KPuP89D8reMc7o1MXMW9vO1RrNZU6 EWZyjecRi/TpeL+ralQG9hweIYdFAfn60EA+0sTzYNzpEVhUNRDJl+2PNNStONrX/Qg0 syfi2XI64nTYQTS9AB70UNA4KVT19eDycfGto8affDN+T9L+prkVVH7ig5JAjUIcQZJm egYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature:arc-authentication-results; bh=/i8lsAbNpAWWST7L9oJnqcPNw7uGPAdhZtw1oWpgppo=; b=oAEIK8vLA9uBrhT7rAbn47lGXOTBMS4Y0JcJvsI+xxgUfN3iQOheexisrQq6xI4PUC Ocqd0ru1CBnLntWzcyaJ3JtzUcpRIyDD8ObrB07xogZfW69iud/RtcFrjX6q33K2PuPe JCEFGJE8IMedpqbv+oyrpm+hRz+bJ7n1J/jkRy3W+3hEHvK9gv5LgnMN5ROtbY6Xyx9u P9yVM0Y/WpRaX9p5V7gcIqdltL2oHkOZ4rIIDzv0MONZhsqRWcrDzn0nFkHeyO2zsjeU iZJs+sZEHaqGeFw17P+u2cJZIMGN45R09eGJROlI4hpS7vE5fQFBjrB1/Yglay1aRrvd +Ezw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rLIVz4Xd; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 18si2047973pgh.822.2018.01.25.14.10.15; Thu, 25 Jan 2018 14:10:37 -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=@gmail.com header.s=20161025 header.b=rLIVz4Xd; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751457AbeAYWJp (ORCPT + 99 others); Thu, 25 Jan 2018 17:09:45 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34564 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbeAYWJo (ORCPT ); Thu, 25 Jan 2018 17:09:44 -0500 Received: by mail-pg0-f67.google.com with SMTP id r19so5960558pgn.1 for ; Thu, 25 Jan 2018 14:09:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/i8lsAbNpAWWST7L9oJnqcPNw7uGPAdhZtw1oWpgppo=; b=rLIVz4Xd9CKspOrPQGDGQgpeWSaSgqDk6l5mNZ959eY7MjMNwe8gV9pQBZlV/JeXw+ RGhXUgj3DBUucRk31XdMO0UOMWdiVQjc6CnuHAbg4Iac3rFfrbspgddCYN82onq6T2bQ 5rU8uxFwJ/C/s3J9kL6P+1Kccnwfk48MPdie9STFJm6i1HzTX9+MKCXL1Ied8z9LXg7M Np7LfgcmqkhaarsxBoOX3r1Fc4hsfVk6AKnU64g+7U7RdePEaFo+2acXiv25iJ2TLEqj H4SmBDkollTIaisJ/1at6uTcINnVdAyIH/rttkLLZcc3NCiffBt3twQElFCmCW1t8Dm4 Gh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/i8lsAbNpAWWST7L9oJnqcPNw7uGPAdhZtw1oWpgppo=; b=tuTs8S6L+nLeiI1myttsOEmEIV7g8bfHteAe1+9MZf1p+673ahE+Hm0ijd9y3l0fI7 8Ica8z7v86yCywvmwoIQm7txMdkqymen8ef7gX1YSOchueytzviQHSqoZdoHkRnvz32g DBpPHwjbVUCnCD7gBeEk+XlFU7i60ZDcEx2TIc2vbiECKI1vzRkMrU+uN2UShdPpBQAj j98AMW7MeaNJihHkaIxD1jF89RzRk7uw2M4+rCXZjqYF/pftGwnA8F0vHzlaTwBFwBHz /26Qm8KOxtL7b4vUAnt7zz2DssH9MMWV0KsYeOyvKyqMgfXwGQqCwcw58Cc1j6No5Mpl BYuQ== X-Gm-Message-State: AKwxytfQ45zX3/MlD4j5tSj817kGrvNHvzr9QLlbWnGRQKGpbBOxGdDs /7x/kZfmrOOsOc8VCR5c0Ow= X-Received: by 2002:a17:902:b414:: with SMTP id x20-v6mr10715948plr.87.1516918183566; Thu, 25 Jan 2018 14:09:43 -0800 (PST) Received: from [10.2.101.129] ([208.91.2.2]) by smtp.gmail.com with ESMTPSA id 77sm13796874pfc.187.2018.01.25.14.09.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jan 2018 14:09:42 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [RFC PATCH 00/16] PTI support for x86-32 From: Nadav Amit In-Reply-To: <20180124185800.GA11515@shrek.podlesie.net> Date: Thu, 25 Jan 2018 14:09:40 -0800 Cc: Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , the arch/x86 maintainers , LKML , "open list:MEMORY MANAGEMENT" , Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Peter Zijlstra , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli Content-Transfer-Encoding: 7bit Message-Id: <67E8EB67-EB60-441E-BDFB-521F3D431400@gmail.com> References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <20180124185800.GA11515@shrek.podlesie.net> To: Krzysztof Mazur X-Mailer: Apple Mail (2.3273) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Krzysztof Mazur wrote: > On Tue, Jan 16, 2018 at 05:36:43PM +0100, Joerg Roedel wrote: >> From: Joerg Roedel >> >> Hi, >> >> here is my current WIP code to enable PTI on x86-32. It is >> still in a pretty early state, but it successfully boots my >> KVM guest with PAE and with legacy paging. The existing PTI >> code for x86-64 already prepares a lot of the stuff needed >> for 32 bit too, thanks for that to all the people involved >> in its development :) > > Hi, > > I've waited for this patches for a long time, until I've tried to > exploit meltdown on some old 32-bit CPUs and failed. Pentium M > seems to speculatively execute the second load with eax > always equal to 0: > > movzx (%[addr]), %%eax > shl $12, %%eax > movzx (%[target], %%eax), %%eax > > And on Pentium 4-based Xeon the second load seems to be never executed, > even without shift (shifts are slow on some or all Pentium 4's). Maybe > not all P6 and Netbursts CPUs are affected, but I'm not sure. Maybe the > kernel, at least on 32-bit, should try to exploit meltdown to test if > the CPU is really affected. The PoC apparently does not work with 3GB of memory or more on 32-bit. Does you setup has more? Can you try the attack while setting max_addr=1G ? Thanks, Nadav