From patchwork Sun Jan 8 21:37:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 40584 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1861628wrt; Sun, 8 Jan 2023 13:44:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvL1NxwGia97owI50YU6pQx8O0mJ1QT3+9mrGn0s11x7aaDEKClGFK8NuUzk7wv32Ld33js X-Received: by 2002:a05:6402:1f89:b0:47b:16c7:492c with SMTP id c9-20020a0564021f8900b0047b16c7492cmr61235129edc.25.1673214274969; Sun, 08 Jan 2023 13:44:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673214274; cv=none; d=google.com; s=arc-20160816; b=c74BkRiIPmZr4dNAFGkG2s79CvwBoB+E9ygqEqnWEbYclgLsZfyFx+GjOLW6FUuFla XUIgryWJisenQ74d6JPuw4IZIHKxsQ0HAsgic1ol69cybwRNLHWd4vuexcMNuhu7gFv8 5KTVnmRyJyUGeVSGEr2kxLsmOzGoyx3KJAuMr9/V614FcBZcSZHt+cQjfM70Gc+pEFei qOy0eDbNAzP7QU5O7Djc20/A2K/zfwfGutYe2djDWi/NmB96FtlDEzJzIx4OpCdLCnHl bjrJWccCJhexrCzSF7zA4ZsgaTrqi+I/2H3rlJfRX1Eu+Os1pv7sPt29mEqgtAMaFgJW SdWQ== 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=4qsZ9wzkXLk6pUGuDgw5aL2USVk+ASQRr7XqPZCah3I=; b=xN3jCMoi3Z/VM9DSuQULhfmXKpV5UMgeJ0YFnpKCSMrLYV1A71Ak+EQwbJpcG2vRt2 f0BnN0W0geKGcdp+6b4Vnm2h6i/BAv8uo7Kr/prj4uNE6iS2XfKn2fA9kasVejBkxRNx s2Uy3Z8n9FfYLXHao3ifI5xpDIPoshLv9dhwXMP3Umz7+5GXlklKgYdEmYj/Ca0Bu0FK kyGLXXxkds7rIUX3BBE6zgclV/3TfAjIs6Oq/NRoaBmtxbGSh5vdyJZy7IC5dtQ6XI1H RwgaPpNlN4Uq0faOpStGFvTcuf0a12oc/jwkJijnZm9e42JNkzcxdoEkhSM4pn8h/7AA pxWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=cECacXzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a056402271000b004841a568226si8879411edd.476.2023.01.08.13.44.09; Sun, 08 Jan 2023 13:44:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=cECacXzc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236194AbjAHVh1 (ORCPT + 99 others); Sun, 8 Jan 2023 16:37:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234052AbjAHVhE (ORCPT ); Sun, 8 Jan 2023 16:37:04 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D9C52DF8; Sun, 8 Jan 2023 13:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=4qsZ9wzkXLk6pUGuDgw5aL2USVk+ASQRr7XqPZCah3I=; b=cECacXzcfkL0IOyePstbJOuK4o FQR1KdzUbs8QOklVKv6hOVpHyr/9M8BcMZ2/I63/DZi7fdmntq05El/JP+zfmnU9oRSK3cFQZ5Lxj A1h335pEFAG4uqVjvEVkFXgzQNv3feiS5Nlrn444ZF2LZ/uUaSOkhA//vWjfynHHFlMhNN9J5J+Gs kut5BevRJFD47HjBmrDt9krrMcI91VwupLnKkIsEa6pj+BnV7PHpz/H4IKCSTdjaybLma9TMOecYJ h5Hv86X2PaoJpYdfMY2GhM5ZYLKiAYi1tP1/9Cx2jPl+8V246wqb7P1J21savgg8MFD/6PIAdMSLg 6rKSbqHQ==; Received: from [2601:1c2:d80:3110::a2e7] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEdLh-00Fu8o-6I; Sun, 08 Jan 2023 21:37:01 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Thomas Gleixner , Borislav Petkov , Ingo Molnar , Dave Hansen , x86@kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH] x86/retbleed: add "stuff" mode admin documentation Date: Sun, 8 Jan 2023 13:37:00 -0800 Message-Id: <20230108213700.5703-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754492331232755793?= X-GMAIL-MSGID: =?utf-8?q?1754492331232755793?= Add admin documentation for "retbleed=stuff", based on commit description and source code. Fixes: d82a0345cf21 ("x86/retbleed: Add call depth tracking mitigation") Signed-off-by: Randy Dunlap Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Ingo Molnar Cc: Dave Hansen Cc: x86@kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org --- Documentation/admin-guide/kernel-parameters.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff -- a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5364,6 +5364,14 @@ when STIBP is not available. This is the alternative for systems which do not have STIBP. + stuff - Enables "stuffing" mode mitigation, + which uses return thunking and call depth + tracking. Only if effect if + CONFIG_CALL_DEPTH_TRACKING is set and + Spectre V2 mitigation mode is + "retpoline". + IBRS is fully secure mitigation but is + more costly (slower) than stuffing. unret - Force enable untrained return thunks, only effective on AMD f15h-f17h based systems.