Commit 90e1121f authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Wentao Guan
Browse files

alpha: replace hardcoded stack offsets with autogenerated ones

stable inclusion
from stable-v6.6.79
commit fd0d07cb8b4792668487201956044ea045e72fef
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBXANC

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fd0d07cb8b4792668487201956044ea045e72fef



--------------------------------

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: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
Tested-by: default avatarMatt Turner <mattst88@gmail.com>
Reviewed-by: default avatarMaciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: default avatarIvan Kokshaysky <ink@unseen.parts>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fd0d07cb8b4792668487201956044ea045e72fef)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent 2b9b256f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);
+0 −4
Original line number Diff line number Diff line
@@ -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