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 8E6A51F5438; Wed, 19 Feb 2025 08:38:48 +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=1739954328; cv=none; b=h06MeHkj1gjBKP5uCsz693ICWt6vV/cAu8kpQzuXMMDoFfWMT26I5/lfcULhMkyE0mF/wzQogMd1lVmbH+9Ye7Spibd9I4a+5h7zLBbcCuN4xOpWp8jo0un5vWIlj3gaGSI0NQtb2NEJqUl4ACX3yN0Dwy4qH/rGVvOUp2NniuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739954328; c=relaxed/simple; bh=JNy5Ucb6s2994NKrEuqs7ldEuLfQFjuId+Gy2+Mx7XU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=A1pX8YEYG7Q2LRhpV1mK+XBJlK8FA5IaduE9KY4ib+aKJZNVIPknpZ5tVjy0Bo2qjZ6wBDhUinYPY0IIPpCmIEEbJnyov2zjJoeGWKBowE73kf397cAPNBxosdDWawiHj7RNrjm7WasvrWu9EZV/RsOap9+TlxyrmxOcIJXQePY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=blxZbYXF; 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="blxZbYXF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A33AAC4CEF3; Wed, 19 Feb 2025 08:38:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739954328; bh=JNy5Ucb6s2994NKrEuqs7ldEuLfQFjuId+Gy2+Mx7XU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=blxZbYXFXZc5FKjZ4GsCudwtrKdaOo0wR2mTMYcqC7GHkKrbvlcbxBJwW0gMO476R vRplpjNk2kQret7dyIckqC8yHym9UFBYozXQJE5uNdiP12p1YHrRsYQms0CKqs+L0H iJJjO5o7o0bFu+cNgVmtHO+H4T7cQnKkQNtEo1Ro= 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.13 168/274] alpha: replace hardcoded stack offsets with autogenerated ones Date: Wed, 19 Feb 2025 09:27:02 +0100 Message-ID: <20250219082616.166376755@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082609.533585153@linuxfoundation.org> References: <20250219082609.533585153@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.13-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 | 4 ++++ arch/alpha/kernel/entry.S | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/alpha/kernel/asm-offsets.c +++ b/arch/alpha/kernel/asm-offsets.c @@ -19,9 +19,13 @@ static void __used foo(void) DEFINE(TI_STATUS, offsetof(struct thread_info, status)); BLANK(); + DEFINE(SP_OFF, offsetof(struct pt_regs, ps)); DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); BLANK(); + DEFINE(SWITCH_STACK_SIZE, sizeof(struct switch_stack)); + BLANK(); + DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache)); DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register)); } --- 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