linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [RFC][PATCHSET] coredump unification for regset and non-regset architectures
Date: Sun, 30 Oct 2022 00:16:47 +0100	[thread overview]
Message-ID: <Y120X8dWqe15FPPG@ZenIV> (raw)

	Resurrecting an old work - elf coredumps mess reduction.
Back in 2008 some of the architectures have switched to use of
regsets for elf coredumps.  Unfortunately, back then the helpers
used by other architectures used to be shared with a.out coredump
support, which made their calling conventions, etc. hard to
modify.  As the result, Roland went for duplicating quite a bit
of coredump-generating logics, with ifdef selecting the right
variant.

	Since then the copies had drifted apart - changes made
to one of them and applicable to both had not been propagated,
etc.  Many (but not all) architectures have switched to regset
variant.  And a.out coredump support had been removed, which
made it easier to modify the primitives on non-regset architectures.

	Series below attempts to make use of that; it had been
started about 4 years ago, but got stalled several times.

	Review and testing would be very appreciated.  Individual
patches - in followups.  Alternatively, it can be found in
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.gitd #work.elfcore.

Al Viro (10):
      kill signal_pt_regs()
      kill coredump_params->regs
      kill extern of vsyscall32_sysctl
      [elf][regset] clean fill_note_info() a bit
      [elf][regset] simplify thread list handling in fill_note_info()
      elf_core_copy_task_regs(): task_pt_regs is defined everywhere
      [elf][non-regset] uninline elf_core_copy_task_fpregs() (and lose pt_regs argument)
      [elf][non-regset] use elf_core_copy_task_regs() for dumper as well
      [elf] unify regset and non-regset cases
      [elf] get rid of get_note_info_size()

 arch/alpha/include/asm/elf.h     |   6 -
 arch/alpha/include/asm/ptrace.h  |   1 -
 arch/alpha/kernel/process.c      |   8 +-
 arch/csky/kernel/process.c       |   3 +-
 arch/m68k/kernel/process.c       |   3 +-
 arch/microblaze/kernel/process.c |   2 +-
 arch/um/kernel/process.c         |   2 +-
 arch/x86/include/asm/elf.h       |   1 -
 arch/x86/um/asm/elf.h            |   4 -
 fs/binfmt_elf.c                  | 271 ++++++++-------------------------------
 fs/coredump.c                    |   1 -
 include/linux/coredump.h         |   1 -
 include/linux/elfcore.h          |  13 +-
 include/linux/ptrace.h           |   9 --
 kernel/signal.c                  |   2 +-
 15 files changed, 61 insertions(+), 266 deletions(-)

             reply	other threads:[~2022-10-29 23:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-29 23:16 Al Viro [this message]
2022-10-29 23:18 ` [PATCH 01/10] kill signal_pt_regs() Al Viro
2022-10-29 23:18   ` [PATCH 02/10] kill coredump_params->regs Al Viro
2022-10-29 23:18   ` [PATCH 03/10] kill extern of vsyscall32_sysctl Al Viro
2022-10-29 23:18   ` [PATCH 04/10] [elf][regset] clean fill_note_info() a bit Al Viro
2022-10-29 23:18   ` [PATCH 05/10] [elf][regset] simplify thread list handling in fill_note_info() Al Viro
2022-10-29 23:18   ` [PATCH 06/10] elf_core_copy_task_regs(): task_pt_regs is defined everywhere Al Viro
2022-10-29 23:18   ` [PATCH 07/10] [elf][non-regset] uninline elf_core_copy_task_fpregs() (and lose pt_regs argument) Al Viro
2022-11-08  9:41     ` Geert Uytterhoeven
2022-10-29 23:18   ` [PATCH 08/10] [elf][non-regset] use elf_core_copy_task_regs() for dumper as well Al Viro
2022-10-29 23:18   ` [PATCH 09/10] [elf] unify regset and non-regset cases Al Viro
2022-10-29 23:18   ` [PATCH 10/10] [elf] get rid of get_note_info_size() Al Viro

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=Y120X8dWqe15FPPG@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).