Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp195986lqg; Wed, 10 Apr 2024 22:42:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3vnlV6RWx22zS82S3eVLEMt9sq+YGKQV5z1cmWonF06EzABK8KEAptLRT7TWQ37xb8tOOzjWdgVGGUfNSTpwff1kb4Bjt02GhiIPCVg== X-Google-Smtp-Source: AGHT+IEKXOl22b9hGodAbX4Dv5CN+VjZb0kzCDPN85JMN79+QbXdKb/tMKshpuSEqwQb2UZlqsMN X-Received: by 2002:a05:6a00:848:b0:6ea:d004:33c9 with SMTP id q8-20020a056a00084800b006ead00433c9mr4246600pfk.30.1712814123785; Wed, 10 Apr 2024 22:42:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712814123; cv=pass; d=google.com; s=arc-20160816; b=yIIbFVv1qxlJGEPI3v3YlXR0sVezO8zVE+9wYp44I7x0E2l13xyair94TZMGd3GJ39 jtx36sN2tygKWPXsmO7jyZqYUtR8VOXEIz0ZDgl4GrsWJ1T0P/yNkUk8FF5URnC8vD8A 2qju1XXqjvZeVTZyxCu6qN237T9wK4VYa4QWO3BP3Us7gZv09BqFRa2F0q5RQJ+WKO+N 5ftvFyXlLqMPxLH+ya7RTs+AjLzvBQg11+G/t6tiYkoh2mdW85nI6tPHyTU8dypP7Sn3 lk1wA0MSH5bfr6/kTViVV0msZXYouv2gp10/PTn1g70aqDcxhEytSFjKRut1uFalcbHS oV2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Ylb4bLzySvtgzBBAiGwhAcjQ8w5nP/T18tXryWAuyJI=; fh=7OJFrLnOA6s1ycE/HULnfMliS+3S6sqMIgc3sc3R36M=; b=lVfyGf0yKVGmSBJlpdOB+EIF+cHraAB0MM9ONGjVNjSZIlQiW/dZXBYQTE3A8Cdvel cTnMEbZcNy3T6fer3DsCh1tHkP6i26PimakVDpKIwwx/efEFpFlFHD5dyftYjUA1FLLH WO/BhjRalFMNi0Z929LT+iVaxhya9pi67Gw7JkvVfhBlGQ3snOvD6YNJ+0d3B7iXsEh2 0iN1gRN6+z8a3dEYuA7SdBY6AaTlMf+G5S2p025B/MVjmDsq+swriB7E1z0eFIHNiBrY Ew5F9cnnpc0lUPGgOqtLtoXCHpYCVN8Xzlvp4Mx1pWWOWXAWNK0clG2pHzb0MdKNuu29 7PPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJJR4NwN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q20-20020a63e214000000b005d72fd9d73asi631083pgh.602.2024.04.10.22.42.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 22:42:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nJJR4NwN; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139794-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139794-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6DF8F286A0D for ; Thu, 11 Apr 2024 05:42:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 382A413C9CD; Thu, 11 Apr 2024 05:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nJJR4NwN" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F9B0E57F for ; Thu, 11 Apr 2024 05:41:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712814117; cv=none; b=VuosBFjPwvuOwF3qIrZC1PtycTcnrGow24r4lHIDpiFDEOn9pPilRPfGASL/iiC4foZmjkMnv711LDg5iy1A7wEnXg4NLd6cVT0Ixkv79CTKLe7RPlKfiNDAnpS2dcJwqgcrkpgrl8NUeIBMfnQ5zS720990vlwbxRt99p7o3Tw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712814117; c=relaxed/simple; bh=UxjF62Kauzg32l2Xaebivdamax7t6IDMUPCds7LpphY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cO+lODqXwxYmVKuxH3xx1sZOVwc+KcVxt2dYdMWNkY2JGDmu5jyDP8vAwIxvMVF4V4t+GnHHRgEez2M2msTru3V61a2/iIEzG5KIFbeieXSjPGUQWG15enP6vPRP/oDN30G0Ka9UHivtGIbpEd5cm5BqUkY9HiITWLGm1HLWUBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nJJR4NwN; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49C9BC433C7; Thu, 11 Apr 2024 05:41:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712814116; bh=UxjF62Kauzg32l2Xaebivdamax7t6IDMUPCds7LpphY=; h=From:To:Cc:Subject:Date:From; b=nJJR4NwNsSvhHf/p1YsY5oeQDmaEZGDBUJBWYueA/uxwtr4ar/PhrgaPmg8g6q4sl 5chDOH0UQyOsuAmXoQ5WkXI+mXSdYwnOWv50+FufB/nCcLMLrnT1uXUF+2qnMTGiz2 zS3Vxp+ZPaPmz403I61WUxkwd1ytUJEELo86CpceHONjPkuS8EBEXQHwqJEfVb0h91 pIbS3T/Y+IOdHOF10XAiAsP3h07jGjoZUR6y+mAuNMKaapWvq+aNpuM2bStTeXfDBP w15CHu5/MqmofYTAL0B6z8NDEbvh4hH7vvDdNJKZwe6nbRlQr66PRS8mxNWrRRdViT ImAgIR6UUDlIg== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Daniel Sneddon , Pawan Gupta , Thomas Gleixner , Alexandre Chartre , Konrad Rzeszutek Wilk , Peter Zijlstra , Greg Kroah-Hartman , Sean Christopherson , Andrew Cooper , Dave Hansen , Nikolay Borisov , KP Singh , Waiman Long , Borislav Petkov Subject: [PATCH 0/7] x86/bugs: BHI fixes / improvements Date: Wed, 10 Apr 2024 22:40:44 -0700 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit An assortment of BHI fixes. Josh Poimboeuf (7): x86/bugs: BHI documentation fixes x86/bugs: Cache the value of MSR_IA32_ARCH_CAPABILITIES x86/bugs: Fix BHI handling of RRSBA x86/bugs: Clarify that syscall hardening isn't a BHI mitigation x86/bugs: Only harden syscalls when needed x86/bugs: Remove CONFIG_BHI_MITIGATION_AUTO and spectre_bhi=auto x86/bugs: Replace CONFIG_SPECTRE_BHI_{ON,OFF} with CONFIG_MITIGATION_SPECTRE_BHI Documentation/admin-guide/hw-vuln/spectre.rst | 22 ++--- .../admin-guide/kernel-parameters.txt | 12 +-- arch/x86/Kconfig | 22 +---- arch/x86/entry/common.c | 30 +++++- arch/x86/entry/syscall_32.c | 11 +-- arch/x86/entry/syscall_64.c | 8 +- arch/x86/entry/syscall_x32.c | 7 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/syscall.h | 8 +- arch/x86/kernel/cpu/bugs.c | 98 +++++++++++-------- 10 files changed, 119 insertions(+), 100 deletions(-) -- 2.44.0