From patchwork Mon Jan 9 16:08:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 40957 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2241865wrt; Mon, 9 Jan 2023 08:12:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvRocFgIz4/yxbPBiJCjRyPBIuQgav8XglLkvM/MRqeoLjqbul/qziVobLl0o4LmG6Et011 X-Received: by 2002:a05:6402:5389:b0:498:50e3:7bb1 with SMTP id ew9-20020a056402538900b0049850e37bb1mr7071799edb.15.1673280771284; Mon, 09 Jan 2023 08:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673280771; cv=none; d=google.com; s=arc-20160816; b=ZujlJx1FS6Sm3Ad3wiZdgiUp2W+6M/eC32M4KIwkJzvUBdgozEjEH0ndvziYnBUjt3 2YqViZqI8tyfK+ODw1WwHby7ANmhuaO0Zu61cT/hLW0boDX7KsfFgIdrCGnkEwMh6E6y 9b++D1jYo5okXYCf+DaBa9hL325NGiPAoVKEmuTkK6gR7Dm2C9XpsVIupJELv5Ks8Nph NPVAmOUOavVMEAg4lxszw8716GAdIbUxZ8dlWK6GougzSUYqZjCEAXlASWvHlpO9NVz8 TLjFnNHejiy/rq+CnpCSsjULBcbe8dO+linHeko+lTPKv7dMVQkZHbNsECZ89mUNM7JK CGzA== 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=IWQp+dbz3tPD0BbW9vxQ/2vTC08Sy+DyjJEG4zi6onc=; b=vcjrU3j1RhpsfmPvSFgBoxeWynPZakbp9reOfi7Oajnv/tCCfkx2AwxRKUqhboubmK AydL1HiOLMTHXgHC742/FWDG6QWnu1JurOZ9TNu85j56Rq1ZtwsrSBFLlTCAJqmepXdL 2Ns3KWpFKPA+j/lhf2MT61o8yyFlU02Y2z4ntADhDRnbD6G/zRPLxjYo9mbow8TW5aKg k5nzoK+1bYmBeEqolMEOqsUv0NnnaI3lyT15HgY1sFOiAQMaZ2smsQI2qIVs44SNbids CNN+KLODpt7l2eOoDSjQszTdLdRO+gJNZjmDctkNibkD7J+TSTnqudlrovZDUgCSYWsg LKKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=bWZV7XQC; 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 r10-20020a05640251ca00b0048db0687dbasi10013176edd.262.2023.01.09.08.12.16; Mon, 09 Jan 2023 08:12:51 -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=bWZV7XQC; 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 S237298AbjAIQI2 (ORCPT + 99 others); Mon, 9 Jan 2023 11:08:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237074AbjAIQIP (ORCPT ); Mon, 9 Jan 2023 11:08:15 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353983B90C; Mon, 9 Jan 2023 08:08:12 -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=IWQp+dbz3tPD0BbW9vxQ/2vTC08Sy+DyjJEG4zi6onc=; b=bWZV7XQCDnsvNcJYDEt+yN0Gpr qAsThBNTT2qcDVAocJUuYke/IzZp9PsXtxRfNEO5cYm3ViZ3wfbe4Kjo0pXcWoeVCtjpd0r4RR3G5 7iMANrOV6Ah2wfvpD88fvkwv9mgkguihyWZW/MkY37P1N1rbm2kcBLhz2cUZTPqOuB/CKN9DFsWHj zSCok+TUcDATD4ITzDShlsIju/ouElkn8HRhzdJaOH27OGtHC6KxPxEJ8SwnKye/zT+04L3o89tpB HUL529/FVigqt+4e6L7FjA9Jx0ZkrUnLxQ2owRWz6h9E3ghQnACcw5xKvraP3Y2YlUUs6WUIYBFjU /an4UiYg==; 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 1pEuh0-002UBK-NY; Mon, 09 Jan 2023 16:08:10 +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, Ingo Molnar Subject: [PATCH v2] x86/retbleed: add "stuff" mode admin documentation Date: Mon, 9 Jan 2023 08:08:08 -0800 Message-Id: <20230109160808.30740-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?1754562057964323313?= X-GMAIL-MSGID: =?utf-8?q?1754562057964323313?= 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 Acked-by: Ingo Molnar --- v2: fix typo "if effect" -> "in effect" (thanks Ingo) 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 in 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.