Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp45732imm; Wed, 5 Sep 2018 14:41:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbBJQiiws2o8qs68GMAss+derH5nm9bhecW1dMGZANaxXIs+lBlstH8ZN2WWYUHJCeaLjTd X-Received: by 2002:a62:411a:: with SMTP id o26-v6mr43148711pfa.111.1536183685379; Wed, 05 Sep 2018 14:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536183685; cv=none; d=google.com; s=arc-20160816; b=z/UZqUKw/aDXeOui8tYG+lVNTFPR8hkv5zGTje91bke3YNxSBAD2YghEQBddru6q37 lHV9UwOKLit7sCw2QV6THNBR9bGz5fRB+xNpT/VaSpi//WuymbXECBxbGFV1DjBTtp0g 2RIVM9VuI8cAokzjqqxX6SxLJ9LI6l+OFHnCrifgw44yhbQ9rFDS5r0KRb9zh0J6U+fk JqGdUlly6yGozEnxMU0CVIRBWKHet8qNj6Me5lEfw5Pmqx7QN0iTdR0r1WSmfM5tA+E+ yFugmssSWVkS92GvuXknzVlocV4SmIQeTrcrIiunBACAkU+42AagDN0ycMDn/39v8mvK yPAg== 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 :references:in-reply-to:mime-version:dkim-signature; bh=/jltbEKudyElNrv0Y1atm335mwM8pas2wLEJCKma/LA=; b=rdOsnuKLTdhnxpR678yKl5YClxxAcmXA5ys5nDnomd+miS1AozrqvQtbneG/iYChiS ZqxXLJInSyCdyho0436cpIWDuQKj2SgtwUqGRqVw4JE56CYMi2jVLItvTb1x0TkyIx1p 1zpsgjXdG+k2EzkpDqQYXZm/ou2wWV52Gd235l5LHBeFlKdv8sCQMcXK4k1jNd/tpJcb jKbbbMylS4i463VSMYfyWZPQTElCn4HQ7fVkpl4V+R9ZJDe+ehatXNlk5+HyXiUjAvI7 k+e9BI7Doj40JtOY8urN1mndZIp3/WuPCVLll40ov6IuajcrqrpKv3HBzxIK07ZI3t8I 5zAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f133jEgY; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a27-v6si3223086pfh.164.2018.09.05.14.41.09; Wed, 05 Sep 2018 14:41:25 -0700 (PDT) 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=@kernel.org header.s=default header.b=f133jEgY; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727686AbeIFCLt (ORCPT + 99 others); Wed, 5 Sep 2018 22:11:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:40518 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727069AbeIFCLt (ORCPT ); Wed, 5 Sep 2018 22:11:49 -0400 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2839E2073D for ; Wed, 5 Sep 2018 21:39:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1536183584; bh=Ab4/gmEdH4YjHMYoQeiftEgjOMTNg8MESm+y1gCDVCA=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=f133jEgYJPiCpKK17TDExMqs8V6XdM9+GWamb+UJxms52qQMonU/o9VR5SRnnlZQZ 9PfaMRQnTqZA7aJn9oZvW33Aki6YIw+7l/dQDgbVdKYN9FXshlHmmaTKvCd65aptc6 ctotiAN+e7P8uZX9/5oJyEBg8y9WBlVdjUo20orM= Received: by mail-wr1-f50.google.com with SMTP id j26-v6so9188022wre.2 for ; Wed, 05 Sep 2018 14:39:44 -0700 (PDT) X-Gm-Message-State: APzg51DV7uAbntIsnE/82yqWX/iBFXz8K3qD5izyGlIb7rdfEISiW1H9 Itz2xV/Riqt7TYZnF0pmM7SgedR4hbQO22M1Ggf2zQ== X-Received: by 2002:adf:c98d:: with SMTP id f13-v6mr28401083wrh.148.1536183582725; Wed, 05 Sep 2018 14:39:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:7810:0:0:0:0:0 with HTTP; Wed, 5 Sep 2018 14:39:22 -0700 (PDT) In-Reply-To: <6529a46e-ae83-5ff2-0152-1d5783f271c3@intel.com> References: <20180807172920.8766-1-sean.j.christopherson@intel.com> <20180904195030.GA6269@linux.intel.com> <8a62de3e-defa-6681-c853-cd5140c5f0b5@intel.com> <6529a46e-ae83-5ff2-0152-1d5783f271c3@intel.com> From: Andy Lutomirski Date: Wed, 5 Sep 2018 14:39:22 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/pkeys: Explicitly treat PK #PF on kernel address as a bad area To: Dave Hansen Cc: Andy Lutomirski , Sean Christopherson , LKML , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Jann Horn 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 Wed, Sep 5, 2018 at 2:35 PM, Dave Hansen wrote: > On 09/04/2018 02:27 PM, Andy Lutomirski wrote: >> Also, I doubt it matters right here, but !X86_PF_USER isn't quite the >> same thing as "originating from kernel code" -- it can also be user >> code that does a CPL0 access due to exception delivery or access to a >> descriptor table. Which you saw plenty of times while debugging >> PTI... :) I doubt any of those should be spurious, though. > > Yeah, you're talking about "implicit supervisor access". Right? Yes.