From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from minute.unseen.parts (minute.unseen.parts [139.162.151.61]) (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 E45A42309B5 for ; Tue, 18 Feb 2025 14:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.162.151.61 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739890347; cv=none; b=Kf2bN6Cyw04ehny78hD5vphdYMmdwllDpv2Ea3V/pVIqKdLloaaoQP4tc0MLrvc84qEeY+kYz+Ia2EDPK3x6aYmSHZVRNYXGMZlZ6yw2Y4GxxWZ41W/B47SMJ6JZ0IJ0AL6wN+ZL5mDf2/p3yYWLHZwhf4jAoMu/g5m3qAeJc5Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739890347; c=relaxed/simple; bh=FZQWA/gGEwQYoEGNiZzRWrrcasP7gsY8xFL3PurhpKQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mLxWw2xiX4tpw4mbBCMnfiBuIFh+fVy0cN6oL4jO6Xftte879WZBMSovqQFfdMxEfMeUMhVlh004m9fc6vvwtvaZhbBtPKjgJvc0q+TEIQCghbIwyRsMRGZGEm4ZpmOMR8HCPBHvMuLo/Y720dVIc46M3F6L0HkcLnzIl7mKABU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unseen.parts; spf=pass smtp.mailfrom=unseen.parts; dkim=pass (2048-bit key) header.d=unseen.parts header.i=@unseen.parts header.b=boDinKh2; arc=none smtp.client-ip=139.162.151.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=unseen.parts Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unseen.parts Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=unseen.parts header.i=@unseen.parts header.b="boDinKh2" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=unseen.parts; s=sig; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ojbC6X2YhxheyrF+iAwYoEiD4RvXVnsYcc5mqDdEdCA=; b=boDinKh2ZHb1AQHuroniVwQsak D5EkLWU7m9IxNW6YBqG2X7UuOEoISAKGFCIp6NURRnIstuBxhSSbnNfjzxB4QjjUoBR1LfC2tAptb GqJdrLkmzW/OCZW7Bg5nmrPncece8eLv13bwqn2PmjOTErnt1CeyTzYjwBTYj4azgoy/IwZrbjsAg xtT+B3N/4FrCUMdJsii1vcGWjjm7bYWCGGpH/KI0obzXISEv7ghimAZzakQigb9VY5HDIgS4h9pkY HoXYMbB9ObfwOItfdpME0OEF2RLy3p0zHcXAg2n48aOjqZsgIHVS5myBjfr/8LLAVFENJ4tgUipyg RR3CqddQ==; Received: from minute.unseen.parts ([139.162.151.61]:60122 helo=minute) by minute.unseen.parts with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1tkOxS-0005Cu-1R; Tue, 18 Feb 2025 15:52:22 +0100 Date: Tue, 18 Feb 2025 15:52:20 +0100 From: Ivan Kokshaysky To: Greg KH Cc: linmag7@gmail.com, macro@orcam.me.uk, mattst88@gmail.com, stable@vger.kernel.org Subject: [PATCH][v6.6.x] alpha: replace hardcoded stack offsets with autogenerated ones Message-ID: References: <2025021844-cruelness-freedom-e051@gregkh> <2025021849-zoning-bath-bc43@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2025021849-zoning-bath-bc43@gregkh> [backported commit 77b823fa619f97d16409] This allows the assembly in entry.S to automatically keep in sync with changes in the stack layout (struct pt_regs and struct switch_stack). Cc: stable@vger.kernel.org # v6.6.x Signed-off-by: Ivan Kokshaysky --- arch/alpha/kernel/asm-offsets.c | 4 ++++ arch/alpha/kernel/entry.S | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/alpha/kernel/asm-offsets.c b/arch/alpha/kernel/asm-offsets.c index 4cfeae42c79a..e9dad60b147f 100644 --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c @@ -34,7 +34,9 @@ void foo(void) DEFINE(CRED_EGID, offsetof(struct cred, egid)); BLANK(); + DEFINE(SP_OFF, offsetof(struct pt_regs, ps)); DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); + DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack)); DEFINE(PT_PTRACED, PT_PTRACED); DEFINE(CLONE_VM, CLONE_VM); DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S index dd26062d75b3..6fb38365539d 100644 --- a/arch/alpha/kernel/entry.S +++ b/arch/alpha/kernel/entry.S @@ -15,10 +15,6 @@ .set noat .cfi_sections .debug_frame -/* Stack offsets. */ -#define SP_OFF 184 -#define SWITCH_STACK_SIZE 64 - .macro CFI_START_OSF_FRAME func .align 4 .globl \func -- 2.47.2