Skip to content

Commit b7a801f

Browse files
committed
Merge tag 'execve-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull execve updates from Kees Cook: "Execve and binfmt updates. Eric and I have stepped up to be the active maintainers of this area, so here's our first collection. The bulk of the work was in coredump handling fixes; additional details are noted below: - Handle unusual AT_PHDR offsets (Akira Kawata) - Fix initial mapping size when PT_LOADs are not ordered (Alexey Dobriyan) - Move more code under CONFIG_COREDUMP (Alexey Dobriyan) - Fix missing mmap_lock in file_files_note (Eric W. Biederman) - Remove a.out support for alpha and m68k (Eric W. Biederman) - Include first pages of non-exec ELF libraries in coredump (Jann Horn) - Don't write past end of notes for regset gap in coredump (Rick Edgecombe) - Comment clean-ups (Tom Rix) - Force single empty string when argv is empty (Kees Cook) - Add NULL argv selftest (Kees Cook) - Properly redefine PT_GNU_* in terms of PT_LOOS (Kees Cook) - MAINTAINERS: Update execve entry with tree (Kees Cook) - Introduce initial KUnit testing for binfmt_elf (Kees Cook)" * tag 'execve-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: binfmt_elf: Don't write past end of notes for regset gap a.out: Stop building a.out/osf1 support on alpha and m68k coredump: Don't compile flat_core_dump when coredumps are disabled coredump: Use the vma snapshot in fill_files_note coredump/elf: Pass coredump_params into fill_note_info coredump: Remove the WARN_ON in dump_vma_snapshot coredump: Snapshot the vmas in do_coredump coredump: Move definition of struct coredump_params into coredump.h binfmt_elf: Introduce KUnit test ELF: Properly redefine PT_GNU_* in terms of PT_LOOS MAINTAINERS: Update execve entry with more details exec: cleanup comments fs/binfmt_elf: Refactor load_elf_binary function fs/binfmt_elf: Fix AT_PHDR for unusual ELF files binfmt: move more stuff undef CONFIG_COREDUMP selftests/exec: Test for empty string on NULL argv exec: Force single empty string when argv is empty coredump: Also dump first pages of non-executable ELF libraries ELF: fix overflow in total mapping size calculation
2 parents ad9c6ee + dd66409 commit b7a801f

16 files changed

Lines changed: 374 additions & 127 deletions

File tree

MAINTAINERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7234,13 +7234,17 @@ F: net/core/of_net.c
72347234
EXEC & BINFMT API
72357235
R: Eric Biederman <ebiederm@xmission.com>
72367236
R: Kees Cook <keescook@chromium.org>
7237+
L: linux-mm@kvack.org
7238+
S: Supported
7239+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
72377240
F: arch/alpha/kernel/binfmt_loader.c
72387241
F: arch/x86/ia32/ia32_aout.c
72397242
F: fs/*binfmt_*.c
72407243
F: fs/exec.c
72417244
F: include/linux/binfmts.h
72427245
F: include/linux/elf.h
72437246
F: include/uapi/linux/binfmts.h
7247+
F: include/uapi/linux/elf.h
72447248
F: tools/testing/selftests/exec/
72457249
N: asm/elf.h
72467250
N: binfmt

arch/alpha/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ config ALPHA
1212
select FORCE_PCI if !ALPHA_JENSEN
1313
select PCI_DOMAINS if PCI
1414
select PCI_SYSCALL if PCI
15-
select HAVE_AOUT
1615
select HAVE_ASM_MODVERSIONS
1716
select HAVE_PCSPKR_PLATFORM
1817
select HAVE_PERF_EVENTS

arch/m68k/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ config M68K
1717
select GENERIC_CPU_DEVICES
1818
select GENERIC_IOMAP
1919
select GENERIC_IRQ_SHOW
20-
select HAVE_AOUT if MMU
2120
select HAVE_ASM_MODVERSIONS
2221
select HAVE_DEBUG_BUGVERBOSE
2322
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !CPU_HAS_NO_UNALIGNED

fs/Kconfig.binfmt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ config BINFMT_ELF
2828
ld.so (check the file <file:Documentation/Changes> for location and
2929
latest version).
3030

31+
config BINFMT_ELF_KUNIT_TEST
32+
bool "Build KUnit tests for ELF binary support" if !KUNIT_ALL_TESTS
33+
depends on KUNIT=y && BINFMT_ELF=y
34+
default KUNIT_ALL_TESTS
35+
help
36+
This builds the ELF loader KUnit tests, which try to gather
37+
prior bug fixes into a regression test collection. This is really
38+
only needed for debugging. Note that with CONFIG_COMPAT=y, the
39+
compat_binfmt_elf KUnit test is also created.
40+
3141
config COMPAT_BINFMT_ELF
3242
def_bool y
3343
depends on COMPAT && BINFMT_ELF

0 commit comments

Comments
 (0)