[PATCH 2/2] coredump: stop unsharing the file descriptor table

From: Christian Brauner

Date: Wed Aug 26 2026 - 12:11:05 EST


We currently unshare the file descriptor table before we write the
coredump. The only code that ever looked at the file descriptor table
was the cell spufs coredump support. It walked all file descriptors to
find the spufs contexts it would have to dump as extra elf notes.

Now that we killed spufs coredumping stop doing that and update the
comments referencing spufs as they ave become stale.

Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>
---
fs/binfmt_elf.c | 4 ++--
fs/coredump.c | 5 -----
2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 06d0df105382..db32bb40a867 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2029,7 +2029,7 @@ static int elf_core_dump(struct coredump_params *cprm)
{
size_t sz = info.size;

- /* For cell spufs and x86 xstate */
+ /* For x86 xstate */
sz += elf_coredump_extra_notes_size();

phdr4note = kmalloc_obj(*phdr4note);
@@ -2093,7 +2093,7 @@ static int elf_core_dump(struct coredump_params *cprm)
if (!write_note_info(&info, cprm))
goto end_coredump;

- /* For cell spufs and x86 xstate */
+ /* For x86 xstate */
if (elf_coredump_extra_notes_write(cprm))
goto end_coredump;

diff --git a/fs/coredump.c b/fs/coredump.c
index ac3cd74808c6..a49f2fd6be28 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -1118,11 +1118,6 @@ static void do_coredump(struct core_name *cn, struct coredump_params *cprm,
if (cn->mask & COREDUMP_REJECT)
return;

- /* get us an unshared descriptor table; almost always a no-op */
- /* The cell spufs coredump code reads the file descriptor tables */
- if (unshare_files())
- return;
-
if ((cn->mask & COREDUMP_KERNEL) && !coredump_write(cn, cprm, binfmt))
return;


--
2.53.0