Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp358992rdb; Thu, 2 Nov 2023 06:02:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE1ujt+ExPk6r8b7/9y+m9agsho8ochu0PyDzgLxjP+rgA7UaezDGuYwcbEg0gn3NjN+l/p X-Received: by 2002:a17:902:da82:b0:1cc:7077:c87c with SMTP id j2-20020a170902da8200b001cc7077c87cmr8485691plx.14.1698930136446; Thu, 02 Nov 2023 06:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698930136; cv=none; d=google.com; s=arc-20160816; b=UT9lMkFHICb9Adi7mXvK2rwFhuYMCEunoKvs4gqByDtgpHi3iL19VR5rhAPGMJ9fRa 5smZY4RSc0Nziish9oYhtzT99i02G+lSBnWdg/ENmed/Sow/am9/bbGJ09RSgxEGU3y1 chT6a31s1+LHxPt62b7Im3y8NuKD9oxVfcCO1nb7KkAU1ABLOggplaBeSkteO+739WIK ffk6r/10PprARcTAplSw32bBwP6aKDF0HixbK0zWAeI8FZ4en+1yvZd2Ilo+ZvTwu/vl rEpCB/TF55/gr0NQ1eCKWqRWLiwQBH5BUcfpoq19ElDZ4hPTEm6nRgImNH1crTK35pX8 WYUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=nwOAu+lvDKzMgzPr8m1BY5NSLiFclCMWdwSry0oMoMQ=; fh=3oqmXZz3zAtU6dvnqgFUfLvaDqubDXen/oWOzajCuT8=; b=yqpCGDluwnvnljzuEihn9MO9/KcOULYpp4yPV+rzGsxsFr/aA1WQyLjH5EpwzmkHQe zUEajyh7fNwjnKSzOhjotJKm02DEGx7qwTeDaevjjeHmpW5kJnE5e7aOYRK3YpX1AOS+ VOk15NBwTfQdLvtrk0QvBHjceQeWZwpUylSuABUjmV1CMk/Z/CDdmjdUx8j1aGckvSg5 h10gZdrUovDRG7YsHzHvdMHakGCT7JBWxClQClps61gRqEbJmR23god2HeZyyFvvQD3R uJjS7P/uMHcHXLwUpnvpZA9CIym+YIDY/yFh1g31Ft3JfzCi5zN7W1che1oeMH7Mw6by yL+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=d5vhxMYv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q8-20020a17090311c800b001c746b986e2si5163088plh.346.2023.11.02.06.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 06:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=d5vhxMYv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 59973821A150; Thu, 2 Nov 2023 06:02:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344822AbjKBNCO (ORCPT + 99 others); Thu, 2 Nov 2023 09:02:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229770AbjKBNCN (ORCPT ); Thu, 2 Nov 2023 09:02:13 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF792FB; Thu, 2 Nov 2023 06:02:07 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6AE201F8C8; Thu, 2 Nov 2023 13:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1698930126; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=nwOAu+lvDKzMgzPr8m1BY5NSLiFclCMWdwSry0oMoMQ=; b=d5vhxMYvPTW6u7j/olDef3dOle+DhmrULu1M0lAstoMmV+ZsdiD8j4j03gEpbMhPRPv6Lo 6/Uz6kqZfJDWB7+T82ab+9ARKGgx5Fqrq+6v8QwMH8aOdqRn2LSQcrBcMiu4NMcPKZ23Gh n0llD+JxFPkggRxYt4S3/u0EAj7v6QM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 02AE813584; Thu, 2 Nov 2023 13:02:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id CZivOc2dQ2XQWgAAMHmgww (envelope-from ); Thu, 02 Nov 2023 13:02:05 +0000 From: Nikolay Borisov To: corbet@lwn.net Cc: tglx@linutronix.de, bp@alien8.de, x86@kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Nikolay Borisov Subject: [PATCH] docs: Remove reference to syscall trampoline in PTI Date: Thu, 2 Nov 2023 15:02:04 +0200 Message-Id: <20231102130204.41043-1-nik.borisov@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 06:02:15 -0700 (PDT) Commit bf904d2762ee ("x86/pti/64: Remove the SYSCALL64 entry trampoline") removed the syscall trampoline and instead opted to enable using the default syscall64 entry point by mapping the percpu TSS. Unfortunately the PTI documentation wasn't updated when the respective changes were made, so let's bring the doc up to speed. Signed-off-by: Nikolay Borisov --- Documentation/arch/x86/pti.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Documentation/arch/x86/pti.rst b/Documentation/arch/x86/pti.rst index 4b858a9bad8d..e08d35177bc0 100644 --- a/Documentation/arch/x86/pti.rst +++ b/Documentation/arch/x86/pti.rst @@ -81,11 +81,9 @@ Protection against side-channel attacks is important. But, and exit (it can be skipped when the kernel is interrupted, though.) Moves to CR3 are on the order of a hundred cycles, and are required at every entry and exit. - b. A "trampoline" must be used for SYSCALL entry. This - trampoline depends on a smaller set of resources than the - non-PTI SYSCALL entry code, so requires mapping fewer - things into the userspace page tables. The downside is - that stacks must be switched at entry time. + b. Percpu TSS is mapped into the user page tables to allow SYSCALL64 path + to work under PTI. This doesn't have a direct runtime cost but it can + be argued it opens certain timing attack scenarios. c. Global pages are disabled for all kernel structures not mapped into both kernel and userspace page tables. This feature of the MMU allows different processes to share TLB @@ -167,7 +165,7 @@ that are worth noting here. * Failures of the selftests/x86 code. Usually a bug in one of the more obscure corners of entry_64.S * Crashes in early boot, especially around CPU bringup. Bugs - in the trampoline code or mappings cause these. + in the mappings cause these. * Crashes at the first interrupt. Caused by bugs in entry_64.S, like screwing up a page table switch. Also caused by incorrectly mapping the IRQ handler entry code. -- 2.34.1