Skip to content

Commit

Permalink
revert "fs/binfmt_elf: fix PT_LOAD p_align values for loaders"
Browse files Browse the repository at this point in the history
Commit 925346c ("fs/binfmt_elf: fix PT_LOAD p_align values for
loaders") was an attempt to fix regressions due to 9630f0d
("fs/binfmt_elf: use PT_LOAD p_align values for static PIE").

But regressionss continue to be reported:

  https://lore.kernel.org/lkml/[email protected]/
  https://bugzilla.kernel.org/show_bug.cgi?id=215720
  https://lkml.kernel.org/r/[email protected]

This patch reverts the fix, so the original can also be reverted.

Fixes: 925346c ("fs/binfmt_elf: fix PT_LOAD p_align values for loaders")
Cc: H.J. Lu <[email protected]>
Cc: Chris Kennelly <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Song Liu <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Sandeep Patil <[email protected]>
Cc: Fangrui Song <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Kirill A. Shutemov <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Thorsten Leemhuis <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Apr 15, 2022
1 parent 5a31741 commit 354e923
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
* without MAP_FIXED nor MAP_FIXED_NOREPLACE).
*/
alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum);
if (interpreter || alignment > ELF_MIN_ALIGN) {
if (alignment > ELF_MIN_ALIGN) {
load_bias = ELF_ET_DYN_BASE;
if (current->flags & PF_RANDOMIZE)
load_bias += arch_mmap_rnd();
Expand Down

0 comments on commit 354e923

Please sign in to comment.