Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp308963lqh; Mon, 6 May 2024 22:30:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0gdYvmQxn1lR8ffv/BxsJzXmgdUeXKgSwCx6tT9HPLe/6kGJ4Urhx9J7xl91szPilN95IYblxGIEaymbiGwmabBfna+kKCGNBFlngXw== X-Google-Smtp-Source: AGHT+IEXH/k6tefLqpMTHKg8UXsCma3a4/zA7qAImym29IIunXYmS63yZKtSBpznWuf4IhnHrEQ2 X-Received: by 2002:a17:902:d489:b0:1e4:b70d:eb72 with SMTP id c9-20020a170902d48900b001e4b70deb72mr16410744plg.35.1715059826977; Mon, 06 May 2024 22:30:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715059826; cv=pass; d=google.com; s=arc-20160816; b=bgY55ix7GTdZeHjodtTxwjAGNHMXFG9codeTh7r+MqMYMQlnzLFHB0booDQPUjnaA9 wX6eMCevw1rnlDzSQDnZcC6EOT4FPhdhtdM4HsRfH/5rWEa/A1rqYWV7Kd8kzqVnh+F9 4Dqh40LwXTR+1hlSzlUiUk0Z7BQu/mAWS2m/s9/U2NcJjBxsyDmIk7VvsJh+jTyzDJcH cTL8vuBKU9tIrS1o0mzc3T0Ixy5YAHuGz1VIW+e+NP/QqiPO7XFkV6yNFRlKRDaisI+f uj12UIqcEqtBms//QDlM2c4mWMqpmW4kKSnDwAdmYUELaTCvKCIoitNe+kPScBR6ogHU EQFA== 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=tw5Aw7oc8/ILd9Md9QePI4ZDqWkmI4UloPkcuuiZxUI=; fh=D1drUkjhd6cQ461FGcgjExl1O+jZ7EhaGJAtOyxVAPQ=; b=ZZXbMSlbqGzCcNgBiNNnqetkP5G7Vt3IStM7o6fwb2Ycbr86/tiPz3++mOItClNrQB aISIus/+P6Z+mYpmgpjg1cbaVX0Gf7c8V6R9tBo/UQgynHnbYxUXBYo191SCuyxn7DUW krMyX6N/atiV92H9f8tXVwiPALLz9S0A0ku9fLVYiX/tRN/cZY0c6Hu3HWZ5FKb3Q6Bv hlUUSKPibsSGfoRn8K7FiFAl9/L/NWI8Vp6YntkNJCnGhfZlTYJCXauIO1mrj8pd8WYC nkQHb7o+EhCbw/ZEeErUBx123bXPxi5NdO4nViuVTnBM1GuNJb+AlrPZNq49iewhS9Bk GvJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EtaSWS1+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170692-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l15-20020a170903120f00b001e60ab1cbe8si8702454plh.527.2024.05.06.22.30.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 22:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EtaSWS1+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-170692-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170692-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B1BF0B23C15 for ; Tue, 7 May 2024 05:30:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E20FA6BB5B; Tue, 7 May 2024 05:30:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EtaSWS1+" 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 16E8E1CFBC for ; Tue, 7 May 2024 05:30:14 +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=1715059815; cv=none; b=eBcPF3/dc79VNawCjbm5IvLV3wq/yry3aqKYlA7rRBf7WK1vAwXOGMDA6GENYBorDye3MyTwMKPoWBt81dazJm5+CX3i9yE0Q5039ACdau46zXS5DxaDKy9/THRiF5EjLlcJ8YHbkBLAxWKJsBuTIjggkCA7UFLXKSQzuzEoYek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715059815; c=relaxed/simple; bh=/OIeRmlA5blBquQJqBcAtSfI12fTrX9XkSqriyuCZBQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=br+ul+e9QPDZXP/oY1JyI63jV8xq3ij4kXlIUY+59d91qRnff6Z5vTWXsOuyKLoiYQX9gT0QjxB9cb9VFDjuaGYz+ooh9Jm0SJOaA5GHoy3YolSy4X3YTVvf5D4yo2yFTVuL8g1O3WWxzmVftRKZXbXgr/XKtdpzk0Z9T+CSMEo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EtaSWS1+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 007ACC2BBFC; Tue, 7 May 2024 05:30:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715059814; bh=/OIeRmlA5blBquQJqBcAtSfI12fTrX9XkSqriyuCZBQ=; h=From:To:Cc:Subject:Date:From; b=EtaSWS1+8hYdYOy90Daws4v9hCkIfg7DuEPL6o6Iu2KCMBN4xtiHqJtj1ru/6Yc6q FNnXD1dOmkB449WLf5Q286w8lT4Uz0zEvQ+kK6hWdH5OY2EIB0VDfkll2ZmV6Nnejm Zmo55V5EuOjrmsvshnoN7M2LeFtS0yb/l14MQFO6zYkJlo4pi9df82GHICirf3BK34 ptA5gQExvsHSSgoMNUqIO0MlQ5doHKuYmfiECcpM1/hMQiY6QSJ7dWPBZh5arzP3ir CxTGPyqVFsC5p1H6+7aY1Ucd+GRIlKy25VQ5tMqAwRaw5wbuQOKGrxA/XK3pl78COy dXQvztvfZgMGw== 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 v5 0/3] x86/bugs: more BHI Date: Mon, 6 May 2024 22:30:03 -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 fixes some objtool warnings and enables noreturn-related optimizations for direct-called syscall handlers. Patches 2 and 3 add 'spectre_bhi=vmexit' which is useful for mitigating BHI in cloud host environments. v5: - dropped syscall hardening patch for now - dropped "Fix CPU mitigation defaults for !x86" in favor of Sean's fix - patch 1 fixes (Paul) Josh Poimboeuf (3): 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/x86/entry/syscall_32.c | 10 ++- arch/x86/entry/syscall_64.c | 9 +- arch/x86/entry/syscall_x32.c | 7 +- arch/x86/entry/syscalls/syscall_32.tbl | 6 +- arch/x86/entry/syscalls/syscall_64.tbl | 6 +- arch/x86/kernel/cpu/bugs.c | 16 ++-- arch/x86/um/sys_call_table_32.c | 10 ++- arch/x86/um/sys_call_table_64.c | 11 ++- scripts/syscalltbl.sh | 18 +++- tools/objtool/noreturns.h | 4 + 12 files changed, 85 insertions(+), 108 deletions(-) -- 2.44.0