Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp900841lqt; Fri, 19 Apr 2024 14:10:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJZhfY6DYxuWJ7yanupwGbb6Hrpt3BG9wyky5A8tgcngcKR3fj3cb15U20BBmN2YkbXGuKWY5ctn7JjsJeIlPdEhcMzJ22+zGVtZxsWg== X-Google-Smtp-Source: AGHT+IEeyseLSxp1uZKR3EzRVkAhXGpa7qlEJDmhzn9kckbwa/wGMnx50MT349z0HS/RB5IacJ9P X-Received: by 2002:a37:e106:0:b0:78e:ca15:9126 with SMTP id c6-20020a37e106000000b0078eca159126mr3222631qkm.62.1713561010688; Fri, 19 Apr 2024 14:10:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713561010; cv=pass; d=google.com; s=arc-20160816; b=XhpvztpgWuPXbLEy/fKlYzjAvilQ7+09Fs/ZiS5bjh2gfoyu71XGNvAB8kkZJimfi1 kpFSKtE6wJwY+HpK1w+gfJgzuwCiqQ4SxGbCB7BFq4JcwflL+91ORqWOLTJb9xaa4n5Z k9ep+n5/1pHlk5loqCHouxisppwXDQq9lrLSYCiO27MhBLXIke9HY3Pgec4ObPccSAjz Pxv1n7rv4BrEE5KIHNUdZq0HBkCYFZU6BhpMf40aHs2sF0B2QWwV18jk2GI21Q3tasF4 baPq6KLn8/dao3qya+Z5YX0gYMEtKFb70r3Yxn6UIkf7Sp9qnwGb1UM5HAy5dBTcAlpy 7Osg== 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=GjpmZTErf817SktLcSxmoYkjeekksY6+khGUIw4ZJr4=; fh=D1drUkjhd6cQ461FGcgjExl1O+jZ7EhaGJAtOyxVAPQ=; b=uhm+zy5PGY1tM/FVh4tdhU43hNsf5ZUp3N+rcWD+pjdRU9vP42H6z0YMc2uC6EzMtG P8anQG/k4Xd45QwrnQaNRf8VnxCNNycXbRKgL68naNsWPO9tw+3pWhqTLtMWVRFpo1Vt d0+GhXSezVwm/rBcmCqaGwFy3powvhK+ESIIk9sDF/myERnneoaER5EoT3r8vzh4UfbJ cLOb9oCK3CQPjRqZujLdhgmkM0SgP4za2nzLsYWIW7SOUNr4X96hAY04ixmKRlXaxpUD oHPTXAjIbhGOCZiVbjDeb8J7lcTndYUm18a7ZDxOYr3x4JNLtzsyjHnEa0bdZfDmAOHR ThMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pTL+ym4g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151955-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ow30-20020a05620a821e00b0078d4d99860asi4601349qkn.81.2024.04.19.14.10.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 14:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pTL+ym4g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-151955-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151955-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D76C1C21601 for ; Fri, 19 Apr 2024 21:10:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73B7313C9B1; Fri, 19 Apr 2024 21:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pTL+ym4g" 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 9D85910961 for ; Fri, 19 Apr 2024 21:09:55 +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=1713560995; cv=none; b=sBX4iKNnMszjUiCL2csfPP0mhIcn3MDeJNwxXe5QbmGwdE797r3A4CkhMOQLOlj3h4p0+JBt80DG0ctkEXhJ8otspqWmoerUgs1X/cQJJW/0U0677PsFV3GWUqAnAVrxaRAXQhPnKUQ+deVFho1rR7DmIZbJki8PrRnTAVeSkFk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713560995; c=relaxed/simple; bh=gwfkQSLY0diiDeo9O6hx3l4tKvPOvaOzuzyFQJWuSsQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OpdaJIchSGtVmjnocOwegtHl1W6Jlo/6v+GLaM6N7GgklI2Qsnk/CQaDVzR7H2gLbP76tNyDW4YU5V4MJdiLlg3TWgWmW+HOl2Z60wMZDadyf/AYPWTdRYnfV7qVeEBhJtXPoFubrFzCm0i5p9HFy07b6zO4TSWaoGu3hhYmqPk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pTL+ym4g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7299C072AA; Fri, 19 Apr 2024 21:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713560995; bh=gwfkQSLY0diiDeo9O6hx3l4tKvPOvaOzuzyFQJWuSsQ=; h=From:To:Cc:Subject:Date:From; b=pTL+ym4gh7JOpxJUOokFTjCYJRjzF4ahFZqRSl34Ai2L/4RzreBYIsZeRJULTU4hd MdVKSR7ZrBwlXEZHDbaD+wXmP6L2FwV1rYGw9whdoErwmKZGZ3Toe3GtW/DM5VC/9x 5f0B21FrfTFS/lZqO+WdtVl+qmRHM8WbFgBD8Z4k5KR3/mvOLrEs6Hp2bbb5nwUSRz y8ShPKdZofHo7RO6yyk1+efWjV3YSkzKRo/tP7Zk0B0jh+Y7Xu+Aftgm+epWptRR/5 475kYzPPhL30tB20OEI7khRakl3hdY6iH87lniVEVH/xJUa/rpB1WvgDbL+ihYN/Qv s0N+E42jS0tVg== 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 , Ingo Molnar Subject: [PATCH 0/5] x86/bugs: more BHI fixes Date: Fri, 19 Apr 2024 14:09:46 -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 Patch 1 is another iteration of reducing the scope of syscall hardening in order to improve performance on some CPUs. The feature bit has a new name, and the commit log and comments are much improved. The rest of the patches are new: - Patch 2 fixes the default mitigations for !x86 (reimplementation of Sean's fix). - Patch 3 fixes some objtool warnings found by Paul. - Patch 4 is a documentation cleanup and prep for patch 5. - Patch 5 adds a requested spectre_bhi=vmexit option. Josh Poimboeuf (5): x86/bugs: Only harden syscalls when needed cpu/speculation: Fix CPU mitigation defaults for !x86 x86/syscall: Mark exit[_group] syscall handlers __noreturn x86/bugs: Remove duplicate Spectre cmdline option descriptions x86/bugs: Add 'spectre_bhi=vmexit' cmdline option Documentation/admin-guide/hw-vuln/spectre.rst | 84 ++----------------- .../admin-guide/kernel-parameters.txt | 12 ++- arch/Kconfig | 10 +++ arch/x86/Kconfig | 15 +--- arch/x86/entry/common.c | 15 +++- arch/x86/entry/syscall_32.c | 11 +-- arch/x86/entry/syscall_64.c | 10 +-- arch/x86/entry/syscall_x32.c | 11 ++- arch/x86/entry/syscalls/syscall_64.tbl | 6 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/syscall.h | 8 +- arch/x86/kernel/cpu/bugs.c | 51 +++++++++-- arch/x86/um/sys_call_table_32.c | 1 + arch/x86/um/sys_call_table_64.c | 1 + kernel/cpu.c | 4 +- scripts/syscalltbl.sh | 6 +- tools/objtool/noreturns.h | 4 + 17 files changed, 126 insertions(+), 124 deletions(-) -- 2.44.0