Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3531344pxb; Mon, 16 Nov 2020 18:03:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFGMtRD/uSioRV27TL3MBbMCiOuA6cohurT4C3utJenLNStGn35oZQYi45yLFj+0bb8UkH X-Received: by 2002:a17:906:745:: with SMTP id z5mr18084348ejb.408.1605578633246; Mon, 16 Nov 2020 18:03:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605578633; cv=none; d=google.com; s=arc-20160816; b=HM3McP2e1KzbnwpaCoV34hjcBLc5pce8AZN8zFf+ZVQJ5FUa91JaKr+yjCfZEGDffn KVxv1eR6L2jYaeaWYsjv3bsmDxMnr+hrcPtD9li6byK9FQv6LAknZ7v+ewqO1Xt8Bwqi Bp3i8jivkBnNNrCfhmeKHBXHXtHWiN6KuR60Y4a7dYo7hS5vzJ546nmclbZbtoJK+SOK 9X0K3PKyhvYxNTAgpYNoKOG2yR10JFYuEMmAprOHa1X2l1Chg7dcRAiRAsUu375f5WZk IdIJltbh179iDBXyx1dfCfIxZzwEe+g+kVbC7gOHX+3x7vFmCHlC4RJ1p5xSMikrPxEh OK0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Hj0QjMh3mkvDyW31I4Bvy4PBmb3TfN6CGDSkKvglVZk=; b=FHbujTYuyHepQJcYOf/oCckPovpNBvLxMeepKLbu2qNHCzwBfYfTkuJIvSkxNEK1L1 Ek/8e2ngIrb4hK5dM1ajZa8pPTVFyfjUE2FW81Eaq7QQNuJUC/ZQPvCDx1qcNtefqTe8 W5hyT9xA811OGHHc4uesjYOES0nZFiyi5Emiu435zp4PYMl5Vdll+BHgEvXSk9gwxmDM H2ad/gWV76p9hVA89ilAoEYV0RjkNzSTj3Z+7VxWg83500tRxTRO5rmXcOUMSNmEEoBz bYvGJtWtpJ+Zi+YQydjEdGebX0+eHpk6nsU9xIsOqDb6lSGqeswDVOtoEPo/t2SLgVn7 rSuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=aYhtYf8z; 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 n22si2665125ejo.705.2020.11.16.18.03.30; Mon, 16 Nov 2020 18:03:53 -0800 (PST) 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=default header.b=aYhtYf8z; 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 S1728523AbgKPTsX (ORCPT + 99 others); Mon, 16 Nov 2020 14:48:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:45034 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726156AbgKPTsX (ORCPT ); Mon, 16 Nov 2020 14:48:23 -0500 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 8203F20853 for ; Mon, 16 Nov 2020 19:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605556102; bh=j0pYwt0AIA4fCrM4+sr8Wq32fXRZX/bi+jl+S1U9ZqA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=aYhtYf8zFcm4mvgGu2jLklF/pe39KVI8mVIzEUbtK3koX84vSqvELK+gw1Ct2KTO3 wLdWLZXRfYccuMIC/sJFxXzLg7HdaWTNDZ9hHwa2EO4RQAlmf07IApI5I+V6OAvR3+ NnurZpnRKZJXXY9HNzhxiogolkns+tX/4RdYxStM= Received: by mail-wr1-f43.google.com with SMTP id s8so20079789wrw.10 for ; Mon, 16 Nov 2020 11:48:22 -0800 (PST) X-Gm-Message-State: AOAM533O69reL/DN+3Yw038bvAcWY97KJJzIKHOT7pJCFrVJn7gZ4L1h kaFh7Dp/zqqloUsct9mIZrGog/ejxq7n+wxaOa+erA== X-Received: by 2002:adf:f0c2:: with SMTP id x2mr20927599wro.184.1605556101009; Mon, 16 Nov 2020 11:48:21 -0800 (PST) MIME-Version: 1.0 References: <20201116144757.1920077-1-alexandre.chartre@oracle.com> <20201116144757.1920077-12-alexandre.chartre@oracle.com> In-Reply-To: <20201116144757.1920077-12-alexandre.chartre@oracle.com> From: Andy Lutomirski Date: Mon, 16 Nov 2020 11:48:06 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC][PATCH v2 11/21] x86/pti: Extend PTI user mappings To: Alexandre Chartre Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , X86 ML , Dave Hansen , Andrew Lutomirski , Peter Zijlstra , LKML , Tom Lendacky , Joerg Roedel , Konrad Rzeszutek Wilk , jan.setjeeilers@oracle.com, Junaid Shahid , oweisse@google.com, Mike Rapoport , Alexander Graf , mgross@linux.intel.com, kuzuno@gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 6:49 AM Alexandre Chartre wrote: > > Extend PTI user mappings so that more kernel entry code can be executed > with the user page-table. To do so, we need to map syscall and interrupt > entry code, per cpu offsets (__per_cpu_offset, which is used some in > entry code), the stack canary, and the PTI stack (which is defined per > task). Does anything unmap the PTI stack? Mapping is easy, and unmapping could be a pretty big mess. --Andy