From nobody Sat Jul 25 23:06:00 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 6F40C3B27E2; Sun, 12 Jul 2026 12:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783860259; cv=none; b=cyQATsDitAhN/wMrJnYjGGK/mAhcj7K8BonxzoNMfJYu0Jb07odFLm99lSLt5ocv/Vq0XlsO42Vmulqx/snTzaWSd35vmyqM9qaCK6+o1QY2EJrvclD1qCwZOlw0BIBUZM8UAizVXY0TuecceTi5Llcihj46X5KPrfuMN1YH45Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783860259; c=relaxed/simple; bh=ton7LSw5xlXuYoZGQ6pgeoXLWsRWkz3BCXuQgj/MzdI=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=h2xweVtjATvGRsAxT7kbnOkvDXym5EstN3ZlDg1DudnCNmiKLFiaG4JlIPL7KDvVJBN3vjN8zVMpoOQbMVmcC5kqy74T7IdxauCMjPAVBaVDgcZwOGgHH8o3xLPfrV+EuEJVyozf/MzM2vWOviClWU4jG8F/Z0TM3spDa4rLYDU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=WnxISqlT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=AR5MI0f9; arc=none smtp.client-ip=193.142.43.55 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.b="WnxISqlT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="AR5MI0f9" Date: Sun, 12 Jul 2026 12:44:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783860256; 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=MOmPdiDrW5cRwvc0h1NF5f7ekV+2qajCdBCM7JSYXAI=; b=WnxISqlTIIUmkYmTLQFt9K8PnXmlXpgzVP7GwBOLbvuzHt+Yw5qCeuRAFLLl1vON3dTV6Z OZHL0BsErm429ieIZMusfttlnYaOV39wfOAYpWSh1+AydtaGaYJw5xUsXHYmdgyP14bh9i I2VFYhIE7GawmMIg0Pb4nqM+ikfzdxaAL7ZR+jX+PrYiAHtR2VAqNn19FPqPPbm60WgmHV 9nxtQYX6oJG2+6UZVhtknQOHm7rhNFIRK+9cWI3lwpUkNpeC6EFLjcxBMtFsraImaCp7WC lvvZDq3k5UPDV9riIMIDgJg/aW3MSmidXCaRFhaqrhfXFW7A5l/avI9/tLbZKw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783860256; 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=MOmPdiDrW5cRwvc0h1NF5f7ekV+2qajCdBCM7JSYXAI=; b=AR5MI0f9UeWvjtkxptOItRXIW7X88g/JKiOecTgEGQ9CE/n7h13OTr2kEgb3NL9G20FSxb GillsV5qhlsvtIAA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/entry] powerpc: Move stack randomization after syscall_enter_from_user_mode() Cc: Thomas Gleixner , "Mukesh Kumar Chaurasiya (IBM)" , Shrikanth Hegde , Radu Rendec , Jinjie Ruan , philmd@oss.qualcomm.com, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260707190253.718191130@kernel.org> References: <20260707190253.718191130@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178386025471.1844600.2159714682088055325.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 core/entry branch of tip: Commit-ID: 89d163dd9dacb028773244dba0a2c86f3a6b74b7 Gitweb: https://git.kernel.org/tip/89d163dd9dacb028773244dba0a2c86f3= a6b74b7 Author: Thomas Gleixner AuthorDate: Tue, 07 Jul 2026 21:05:58 +02:00 Committer: Thomas Gleixner CommitterDate: Sun, 12 Jul 2026 12:38:00 +02:00 powerpc: Move stack randomization after syscall_enter_from_user_mode() add_random_kstack_offset() is invoked before syscall_enter_from_user_mode() establishes state. That's wrong because add_random_kstack_offset() calls into instrumentable code. Move it after syscall_enter_from_user_mode() to ensure that state is correctly established. Signed-off-by: Thomas Gleixner Tested-by: Mukesh Kumar Chaurasiya (IBM) Reviewed-by: Shrikanth Hegde Reviewed-by: Radu Rendec Reviewed-by: Jinjie Ruan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Mukesh Kumar Chaurasiya (IBM) Link: https://patch.msgid.link/20260707190253.718191130@kernel.org --- arch/powerpc/kernel/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/syscall.c b/arch/powerpc/kernel/syscall.c index a9da2af..ee07b2e 100644 --- a/arch/powerpc/kernel/syscall.c +++ b/arch/powerpc/kernel/syscall.c @@ -19,8 +19,8 @@ notrace long system_call_exception(struct pt_regs *regs, = unsigned long r0) long ret; syscall_fn f; =20 - add_random_kstack_offset(); r0 =3D syscall_enter_from_user_mode(regs, r0); + add_random_kstack_offset(); =20 if (unlikely(r0 >=3D NR_syscalls)) { if (unlikely(trap_is_unsupported_scv(regs))) {