From: Magnus Lindholm <linmag7@gmail.com>
To: richard.henderson@linaro.org, mattst88@gmail.com,
linux-kernel@vger.kernel.org, linux-alpha@vger.kernel.org
Cc: linmag7@gmail.com
Subject: [PATCH 09/14] alpha: remove obsolete core dump register hooks
Date: Tue, 3 Nov 2026 22:35:15 +0100 [thread overview]
Message-ID: <20261103214120.1099893-10-linmag7@gmail.com> (raw)
In-Reply-To: <20261103214120.1099893-1-linmag7@gmail.com>
Alpha uses CORE_DUMP_USE_REGSET, so remove the unused per-task ELF
register-copy hooks. Write saved FP registers directly with membuf_write()
instead of copying them through a temporary array. Register layouts and
regset writes are unchanged.
Signed-off-by: Magnus Lindholm <linmag7@gmail.com>
---
arch/alpha/include/asm/elf.h | 7 -------
arch/alpha/kernel/process.c | 14 --------------
arch/alpha/kernel/ptrace.c | 17 +++--------------
3 files changed, 3 insertions(+), 35 deletions(-)
diff --git a/arch/alpha/include/asm/elf.h b/arch/alpha/include/asm/elf.h
index b15946621d573f630e253b4046fb3ac6e8bbb66b..7a64d4c3e3574aafcec2d23a843f3cdfc6fca780 100644
--- a/arch/alpha/include/asm/elf.h
+++ b/arch/alpha/include/asm/elf.h
@@ -109,18 +109,11 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
struct pt_regs;
struct thread_info;
-struct task_struct;
extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt,
struct thread_info *ti);
#define ELF_CORE_COPY_REGS(DEST, REGS) \
dump_elf_thread(DEST, REGS, current_thread_info());
-/* Similar, but for a thread other than current. */
-
-extern int dump_elf_task(elf_greg_t *dest, struct task_struct *task);
-#define ELF_CORE_COPY_TASK_REGS(TASK, DEST) \
- dump_elf_task(*(DEST), TASK)
-
/* This yields a mask that user programs can use to figure out what
instruction set this CPU supports. This is trivial on Alpha,
but not so on other machines. */
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index c7e6e7b593af10305414ea30f5b944b9d21dd2e2..6246929cf4d7583e5b98e24a6aa7b1f2021431f7 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -344,20 +344,6 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
}
EXPORT_SYMBOL(dump_elf_thread);
-int
-dump_elf_task(elf_greg_t *dest, struct task_struct *task)
-{
- dump_elf_thread(dest, task_pt_regs(task), task_thread_info(task));
- return 1;
-}
-EXPORT_SYMBOL(dump_elf_task);
-
-int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
-{
- memcpy(fpu, task_thread_info(t)->fp, 32 * 8);
- return 1;
-}
-
/*
* Return saved PC of a blocked thread. This assumes the frame
* pointer is the 6th saved long on the kernel stack and that the
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 08e2401cb7e005795a04e169f0c53cf9ed35adb5..4f857d5cbb1410961a78e4ef36cce4561a7ea7af 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -506,16 +506,7 @@ long arch_ptrace(struct task_struct *child, long request,
return ret;
}
-/*
- * Minimal regset support for Alpha.
- *
- * Alpha-specific notes:
- * - Do NOT use ELF_CORE_COPY_REGS(): it uses current_thread_info(),
- * which is wrong for non-current tasks.
- * - dump_elf_task() returns 1 unconditionally in this tree, while
- * regset_get should return 0 on success. So call dump_elf_thread()
- * directly and return membuf_write()'s result.
- */
+/* Ptrace and ELF core dumps share the same Alpha register layouts. */
static int alpha_regset_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
@@ -588,10 +579,8 @@ static int alpha_fpregset_get(struct task_struct *target,
const struct user_regset *regset,
struct membuf to)
{
- elf_fpregset_t fpregs;
-
- alpha_elf_fpregs_get(target, fpregs);
- return membuf_write(&to, fpregs, sizeof(fpregs));
+ return membuf_write(&to, task_thread_info(target)->fp,
+ sizeof(elf_fpregset_t));
}
enum alpha_regset {
--
2.43.0
next prev parent reply other threads:[~2026-11-03 21:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:35 [PATCH 00/14] alpha: fix entry bugs and consolidate generic helpers Magnus Lindholm
2026-11-03 21:35 ` [PATCH 01/14] alpha: fix saved registers in page-fault oops dumps Magnus Lindholm
2026-11-03 21:35 ` [PATCH 02/14] alpha: report syscall errors correctly to audit Magnus Lindholm
2026-11-03 21:35 ` [PATCH 03/14] alpha: preserve rolled-back registers for SIGSYS Magnus Lindholm
2026-11-03 21:35 ` [PATCH 04/14] alpha: fix syscall restart eligibility Magnus Lindholm
2026-11-03 21:35 ` [PATCH 05/14] alpha: distinguish skipped syscalls from invalid numbers Magnus Lindholm
2026-11-03 21:35 ` [PATCH 06/14] alpha: dispatch system calls from C Magnus Lindholm
2026-11-03 21:35 ` [PATCH 07/14] alpha: use generic entry helpers for interrupts and exceptions Magnus Lindholm
2026-11-03 21:35 ` [PATCH 08/14] alpha: use generic syscall exit for new tasks Magnus Lindholm
2026-11-03 21:35 ` Magnus Lindholm [this message]
2026-11-03 21:35 ` [PATCH 10/14] alpha: use generic syscall audit classification Magnus Lindholm
2026-11-03 21:35 ` [PATCH 11/14] alpha: use generic ptrace memory writes Magnus Lindholm
2026-11-03 21:35 ` [PATCH 12/14] alpha: use memparse for memory size options Magnus Lindholm
2026-11-03 21:35 ` [PATCH 13/14] alpha: use generic getrusage for OSF resource accounting Magnus Lindholm
2026-11-03 21:35 ` [PATCH 14/14] alpha: use generic CPU device registration Magnus Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261103214120.1099893-10-linmag7@gmail.com \
--to=linmag7@gmail.com \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mattst88@gmail.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®