]> www.infradead.org Git - users/willy/xarray.git/commitdiff
Merge tag 'execve-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2024 09:53:31 +0000 (11:53 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 18 Sep 2024 09:53:31 +0000 (11:53 +0200)
Pull execve updates from Kees Cook:

 - binfmt_elf: Dump smaller VMAs first in ELF cores (Brian Mak)

 - binfmt_elf: mseal address zero (Jeff Xu)

 - binfmt_elf, coredump: Log the reason of the failed core dumps (Roman
   Kisel)

* tag 'execve-v6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  binfmt_elf: mseal address zero
  binfmt_elf: Dump smaller VMAs first in ELF cores
  binfmt_elf, coredump: Log the reason of the failed core dumps
  coredump: Standartize and fix logging

1  2 
fs/binfmt_elf.c
include/linux/mm.h
kernel/signal.c
mm/mseal.c

diff --cc fs/binfmt_elf.c
index 01bcbe7fdebd3a31bbe4df465641032ddde0d6b3,c3aa700aeb3c9a819a3be6c0c9950b4ccd920f94..34d0d1e43f362860105b56b059b0affe95f78769
@@@ -2092,20 -2107,28 +2107,28 @@@ static int elf_core_dump(struct coredum
                        phdr.p_flags |= PF_X;
                phdr.p_align = ELF_EXEC_PAGESIZE;
  
-               if (!dump_emit(cprm, &phdr, sizeof(phdr)))
+               if (!dump_emit(cprm, &phdr, sizeof(phdr))) {
+                       coredump_report_failure("Error emitting program headers");
                        goto end_coredump;
+               }
        }
  
-       if (!elf_core_write_extra_phdrs(cprm, offset))
+       if (!elf_core_write_extra_phdrs(cprm, offset)) {
+               coredump_report_failure("Error writing out extra program headers");
                goto end_coredump;
+       }
  
        /* write out the notes section */
-       if (!write_note_info(&info, cprm))
+       if (!write_note_info(&info, cprm)) {
+               coredump_report_failure("Error writing out notes");
                goto end_coredump;
+       }
  
 -      /* For cell spufs */
 +      /* For cell spufs and x86 xstate */
-       if (elf_coredump_extra_notes_write(cprm))
+       if (elf_coredump_extra_notes_write(cprm)) {
+               coredump_report_failure("Error writing out extra notes");
                goto end_coredump;
+       }
  
        /* Align to page */
        dump_skip_to(cprm, dataoff);
Simple merge
diff --cc kernel/signal.c
Simple merge
diff --cc mm/mseal.c
Simple merge