Skip to content

Commit

Permalink
binfmt_flat: Drop vestiges of coredump support
Browse files Browse the repository at this point in the history
There is the briefest start of coredump support in binfmt_flat. It
is actually a pain to maintain as binfmt_flat is not built on most
architectures so it is easy to overlook.

Since the support does not do anything remove it.

Signed-off-by: "Eric W. Biederman" <[email protected]>
Reviewed-by: Niklas Cassel <[email protected]>
Acked-by: Greg Ungerer <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
ebiederm authored and kees committed Apr 20, 2022
1 parent 6045ab5 commit 8d00526
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions fs/binfmt_flat.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <linux/flat.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/coredump.h>

#include <asm/byteorder.h>
#include <asm/unaligned.h>
Expand Down Expand Up @@ -98,33 +97,12 @@ static int load_flat_shared_library(int id, struct lib_info *p);
#endif

static int load_flat_binary(struct linux_binprm *);
#ifdef CONFIG_COREDUMP
static int flat_core_dump(struct coredump_params *cprm);
#endif

static struct linux_binfmt flat_format = {
.module = THIS_MODULE,
.load_binary = load_flat_binary,
#ifdef CONFIG_COREDUMP
.core_dump = flat_core_dump,
.min_coredump = PAGE_SIZE
#endif
};

/****************************************************************************/
/*
* Routine writes a core dump image in the current directory.
* Currently only a stub-function.
*/

#ifdef CONFIG_COREDUMP
static int flat_core_dump(struct coredump_params *cprm)
{
pr_warn("Process %s:%d received signr %d and should have core dumped\n",
current->comm, current->pid, cprm->siginfo->si_signo);
return 1;
}
#endif

/****************************************************************************/
/*
Expand Down

0 comments on commit 8d00526

Please sign in to comment.