From mboxrd@z Thu Jan 1 00:00:00 1970 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 AEE771DF737; Wed, 19 Feb 2025 09:32:26 +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=1739957546; cv=none; b=rGLG8vxIul/TkID47djndfrxRAczFB8iOV77eharZJ3FgBPwn8NztVa4PIFdUb0kARpmb5p4Y2Al970lO2hpo9QN9tCgL2Yn4UopPjn7J1S3o9JpKk+RyyYDgMPdXmdA7i/ksQZ3JtxBOWSvfLgLBfI/r2nZPV/KWMu5voBI19w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739957546; c=relaxed/simple; bh=p8CW5QHYW9XNEvhh1Hd0THqN6GDRFDQc6vDUd3UqqMc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V7ddh8YtzzkwL5ouSyDvFOdxYl6S1qBVKtznmirzyBUW//p8i8+Q6hzqRCg+ZEhK20SbWHH802YY9+WHHKxnKR7EenBCLO2j4wWj1OnbTyuB0GKfZqwFZV5sFn0xZjR3EcnvqBp91K4AIlupnf0heMMTcDc8yiGfUQ5uDakja2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wTkt0KMO; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wTkt0KMO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37F09C4CED1; Wed, 19 Feb 2025 09:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739957546; bh=p8CW5QHYW9XNEvhh1Hd0THqN6GDRFDQc6vDUd3UqqMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wTkt0KMObJM3Wz8+VpwslrEC4I1zRrX3vgLuiOflJDb5cvcZdaLvMsZoaoemMGe9d LSxMIC5sD02AySIyi6ldb2b63A3ganXrdRd9wMrVlylIBTfKdGUzUhpM4o0sxOdkKH RqNiGfzGPl2DpxO4twtlhv3mvzlh0ZDcxO4Tavh4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Maciej W. Rozycki" , Matt Turner , Ivan Kokshaysky Subject: [PATCH 6.1 564/578] alpha: replace hardcoded stack offsets with autogenerated ones Date: Wed, 19 Feb 2025 09:29:28 +0100 Message-ID: <20250219082715.147708352@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082652.891560343@linuxfoundation.org> References: <20250219082652.891560343@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ivan Kokshaysky commit 77b823fa619f97d16409ca37ad4f7936e28c5f83 upstream. 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 Tested-by: Maciej W. Rozycki Tested-by: Matt Turner Reviewed-by: Maciej W. Rozycki Signed-off-by: Ivan Kokshaysky Signed-off-by: Matt Turner Signed-off-by: Greg Kroah-Hartman --- arch/alpha/kernel/asm-offsets.c | 2 ++ arch/alpha/kernel/entry.S | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c @@ -32,7 +32,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); --- 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 320 - .macro CFI_START_OSF_FRAME func .align 4 .globl \func