From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.142.43.55 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796168465; b=MXnCHkjbpJkWMp7KY6O7Mqvk07aSmohATEDg0XxR9a7vSbRG72l8TXCDs01RhqGdIOcu 6rLXVDXy/CEHg/IWBpJZ6U1lSl/KnP0tPSbMAe2gRR0GYLLj6GoQenccCJrBUFwhcf6gv 84M3CAe+Fo+PhgkwWIUm51IpevkMWWAiGYFC1UGKdHeyJA1GND5iMUZ/ewqna33iTuAf+ 15r/Te6e5KOOlS3sDMQTAWltm59eA3SZ4ZdtEc6q5GiCuusiNABYtYn8/k3XfnYutxW0a TLBRXUErjWT0zsANhDs11U3N3lW+fQrcZiGfkXcs435UzmtXPjBLvTfJLJ4CCQDspng== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796168465; h=DMARC-Filter:Date:DKIM-Signature:DKIM-Signature:From:Sender:Reply-to: To:Subject:Cc:In-Reply-To:References:MIME-Version:Message-ID:Robot-ID: Robot-Unsubscribe:Precedence:Content-Type:Content-Transfer-Encoding; bh=rfjoKy+e/oFhJEGHnH2nnCsWeg27rLvfQVnhatXMLxo=; b=lOGh02LkQQTCoFEEyOtidgVMd7vScZSjKpIgpmVf6G7lqxedUB8nrw91buoZ/tuJMbLD UxT3ztfxVAJjJmyLBrqe4Lv13BcDCDLgyKVWA7zeNHKKFxnno30rnsVGvFA8hXMc2FVPF kjh7YKZFhxE/wEpYkhLaZS1EafIwC7ratXXreNr7VplEIerBHvpshxNlSljo1QXPNoBFL XiRIDbI3Tk3IaxEX7VD/Ippb4gAfW7Y0D3fNqw2Y2y3Z9WvIUBg8SBO2C8a5wHP5Hr8QP G0sB9Ag1SvACqDc4nAFthgqtGgsH5K0r5N16N1uL63uYoDMkiRPDZ7O+6PP7CDe1RYA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=XhT4sSk6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b="1/nqMavU"; arc=none smtp.remote-ip=193.142.43.55 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E048F606A32F; Tue, 1 Dec 2026 23:41:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E048F606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=XhT4sSk6; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=1/nqMavU Date: Tue, 01 Dec 2026 23:41:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1796168462; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rfjoKy+e/oFhJEGHnH2nnCsWeg27rLvfQVnhatXMLxo=; b=XhT4sSk69kpEfQCNLhV+yublzyroXn9ucqZnH7LgTPEWvuydSe++t95+MmmizLRMNwTK4p A2wYD11NHCmmOSg7PhUILZhIoTmE5ixd9xGOvczDBr5rndSKXwgmE5A4wBESrcJlSgZSd/ F4Uae3+KOmdULL8NEwuzBw2Hw+yX/0Ni3Q7RLXNiAuMAmgOk6/gfV7zxn0XjNUWLlt/VQf C6U7iDjK1ACjHnORGiB4+AWDKlvxuOHQ0MJ6uDqD6i5lDzdjdaPBDHU/YDTI4ifmgLRUp9 GvUgOLR746kDzyYXTqc6J2bypigA4lfrJgrkD1CVaVr791ZR0tKBaIQN6ZU0XQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1796168462; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rfjoKy+e/oFhJEGHnH2nnCsWeg27rLvfQVnhatXMLxo=; b=1/nqMavU0XA1+9chJIWrr3iErMWjsMOlG98tuGraZ8AjRQkBZD1OuJTY7i7sAli5rPTMkk 2pIbCrkbp79+Z7Dw== From: "tip-bot2 for Bill Roberts" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/mm] selftest/x86: Test ARCH_SHSTK_UNLOCK Cc: Bill Roberts , Dave Hansen , Rick Edgecombe , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20261102181708.29178-2-bill.roberts@arm.com> References: <20261102181708.29178-2-bill.roberts@arm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Message-ID: <179616846100.1190409.6305092538807515696.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/mm branch of tip: Commit-ID: 76b8d9c0594c138fb9b10887a50b1834efa974f0 Gitweb: https://git.kernel.org/tip/76b8d9c0594c138fb9b10887a50b1834efa= 974f0 Author: Bill Roberts AuthorDate: Mon, 02 Nov 2026 12:17:08 -06:00 Committer: Dave Hansen CommitterDate: Tue, 01 Dec 2026 15:33:26 -08:00 selftest/x86: Test ARCH_SHSTK_UNLOCK Test that ARCH_SHSTK_UNLOCK can't be called from normal (non-ptrace) context. Signed-off-by: Bill Roberts Signed-off-by: Dave Hansen Reviewed-by: Rick Edgecombe Link: https://patch.msgid.link/20261102181708.29178-2-bill.roberts@arm.com --- tools/testing/selftests/x86/test_shadow_stack.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/testing/selftests/x86/test_shadow_stack.c b/tools/testing/= selftests/x86/test_shadow_stack.c index 3d6ca33..cbe7ca4 100644 --- a/tools/testing/selftests/x86/test_shadow_stack.c +++ b/tools/testing/selftests/x86/test_shadow_stack.c @@ -1059,6 +1059,14 @@ int main(int argc, char *argv[]) { int ret =3D 0; =20 + /* Test that ARCH_SHSTK_UNLOCK can't be called from normal (non-ptrace) con= text. */ + if (!ARCH_PRCTL(ARCH_SHSTK_UNLOCK, ARCH_SHSTK_SHSTK)) { + printf("[FAIL]\tARCH_SHSTK_UNLOCK should fail in a non-ptrace context\n"); + goto out; + } + + printf("[OK]\tCouldn't enable Shadow stack via UNLOCK\n"); + if (ARCH_PRCTL(ARCH_SHSTK_ENABLE, ARCH_SHSTK_SHSTK)) { printf("[SKIP]\tCould not enable Shadow stack\n"); return 1;