summaryrefslogtreecommitdiff
path: root/fs/binfmt_flat.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2022-03-09 13:44:46 -0800
committerKees Cook <keescook@chromium.org>2022-03-09 13:44:46 -0800
commit2722ae9c9419e5727d868c7d1efed28e765fcbbc (patch)
treecb4438b61bd2f4b45238ab8fb11acf5f890676a0 /fs/binfmt_flat.c
parent9e1a3ce0a952450a1163cc93ab1df6d4fa8c8155 (diff)
parentf833116ad2c3eabf9c739946170e07825cca67ed (diff)
Merge branch 'coredump-vma-snapshot-fix-for-v5.18' of https://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace into for-next/execve
- Fix missing mmap_lock in file_files_note (Eric W. Biederman)
Diffstat (limited to 'fs/binfmt_flat.c')
-rw-r--r--fs/binfmt_flat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index 5f0bf24bb3b85..6268981500112 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -37,6 +37,7 @@
#include <linux/flat.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
+#include <linux/coredump.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
@@ -97,7 +98,9 @@ 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,
@@ -114,12 +117,14 @@ static struct linux_binfmt flat_format = {
* 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
/****************************************************************************/
/*