From patchwork Tue Jan 10 00:31:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 41239 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2462021wrt; Mon, 9 Jan 2023 16:32:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXudQI4p/U8VcCBG0kttC7ByuX2/W+mC04XteSyV9525j74z4om5540wkFIVqDyYPlP8oIP2 X-Received: by 2002:a05:6a20:d69a:b0:af:9538:ec5c with SMTP id it26-20020a056a20d69a00b000af9538ec5cmr102323361pzb.51.1673310776076; Mon, 09 Jan 2023 16:32:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673310776; cv=none; d=google.com; s=arc-20160816; b=pWl93qyDEWLcFkVjfCdBlw21kMx+2aNUxNlg8PAsJGj+Kwywyh5/9TEyZNqz/PlsaI MeLZO0Mxt/AhPshBc0DBVtY5yK/PLqGv4ZRN4BwWuqY0CNVkxgyYfQ0fr2t2ndmUqAO3 ydQXWvGNdF/Pzl3q9Bo1Zj5JNfxsV5ud+jX0QfOzkfp9qzNaiPIcus34gvoxpLYonVHS MPPPLZmNSH2WwRfJdhzaMIz1bXW/I4yLflgcMlz2+acG4MOnNXL6HtRGiCohlU6+d+L4 cloef4k9zIDT0oaDW/BLglNW7on2lMe4/RBjQ26vcpPVv1OwnBPzp+j9qn5YUBuQLBJj cMOA== 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=uT+CcmkAN3pOl5VJRzdjuRehxsAaSFf7gHylFoLYXTE=; b=WlEAF5FAI497zP/MHRCJw8oRGhWK0i3AAK+Tk1mDemCVt3QcSsT5p+iL0lVPSC16m/ QHkYWpiWK8V7QzmJ2fZXCMcOarwa0a5rB9cmi1XJHed+T6I4TzcSSfDUd6taea09JbKY i9UVI6LNFd4Fu67HqiCgXWuAhq+QM1UMZhdujib774oXfFO2vbkvr7trirL8EZzP0h5f dDHdw9j/BisHJhdfTbsHhIOURL46wYkxpOSlxly0VgipfaBmykZKYdzfmN0Zgqa/rBGW YpeeDu4Cfvyt/bVatvQ1Qoqc8JDog1BKqwbCELEsbzuRIzTvi3O0KtFZnqgckKQBojoB rzgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=n4cIhIuv; 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 j11-20020a654d4b000000b00478ad4955f3si10365862pgt.594.2023.01.09.16.32.43; Mon, 09 Jan 2023 16:32:56 -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=n4cIhIuv; 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 S237192AbjAJAcM (ORCPT + 99 others); Mon, 9 Jan 2023 19:32:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237634AbjAJAbH (ORCPT ); Mon, 9 Jan 2023 19:31:07 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 647BE6273; Mon, 9 Jan 2023 16:31: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=uT+CcmkAN3pOl5VJRzdjuRehxsAaSFf7gHylFoLYXTE=; b=n4cIhIuvpCSTVwvKs1WGrt9jEU 0QX8nIyYmyZkpUjCkLkVpJRTwiKSkjvyAKr9/bFV/VzpU5N5LMHaANvh/jQFIG2/zs60Gsm5xKIof 2Jpdl2PZtYXCmm1bwRkdqORKzb+mebFdHNF86YCMg6fn0J4SpH+E5xzaq3c3YefM9CY5WEXNlD/9h CeIKTFRIkOQ+vcc78FjTRFxSGgM5hdOwJ1Cpj66Ke52Fv8KgMYKpGTVGINoHA6rUfxIB2eZWoiwnn jZoqUwOLnDEe0OYmN2UQHvet5fV2PyAcDgSr8QAIsmwlqkIL6AHmYBsmFVsOmNSpRMa6m96s7ey4W jIHw8Kwg==; 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 1pF2Xe-004lGP-Ht; Tue, 10 Jan 2023 00:31:02 +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 v3] x86/retbleed: add "stuff" mode admin documentation Date: Mon, 9 Jan 2023 16:31:01 -0800 Message-Id: <20230110003101.32212-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?1754593520420295553?= 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) add Ack from Ingo; v3: change wording of IBRS alternative (thanks Dave H.) 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 a stronger mitigation but is + more costly (slower) than stuffing. unret - Force enable untrained return thunks, only effective on AMD f15h-f17h based systems.