Commit 42bddab0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull execve fixes from Kees Cook:

 - binfmt_elf_fdpic: fix AUXV size calculation (Andrei Vagin)

 - fs/tests: exec: Remove bad test vector

* tag 'execve-v7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  fs/tests: exec: Remove bad test vector
  binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4
parents d46d5c83 c4192754
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -595,6 +595,12 @@ static int create_elf_fdpic_tables(struct linux_binprm *bprm,
#ifdef ELF_HWCAP2
	nitems++;
#endif
#ifdef ELF_HWCAP3
	nitems++;
#endif
#ifdef ELF_HWCAP4
	nitems++;
#endif

	csp = sp;
	sp -= nitems * 2 * sizeof(unsigned long);
+0 −3
Original line number Diff line number Diff line
@@ -94,9 +94,6 @@ static const struct bprm_stack_limits_result bprm_stack_limits_results[] = {
	{ { .p = ULONG_MAX, .rlim_stack.rlim_cur = 4 * (_STK_LIM / 4 * 3 + sizeof(void *)),
	    .argc = 0, .envc = 0 },
	  .expected_argmin = ULONG_MAX - (_STK_LIM / 4 * 3) + sizeof(void *) },
	{ { .p = ULONG_MAX, .rlim_stack.rlim_cur = 4 * (_STK_LIM / 4 *  + sizeof(void *)),
	    .argc = 0, .envc = 0 },
	  .expected_argmin = ULONG_MAX - (_STK_LIM / 4 * 3) + sizeof(void *) },
	{ { .p = ULONG_MAX, .rlim_stack.rlim_cur = 4 * _STK_LIM,
	    .argc = 0, .envc = 0 },
	  .expected_argmin = ULONG_MAX - (_STK_LIM / 4 * 3) + sizeof(void *) },
+1 −1
Original line number Diff line number Diff line
@@ -4,6 +4,6 @@

#include <uapi/linux/auxvec.h>

#define AT_VECTOR_SIZE_BASE 22 /* NEW_AUX_ENT entries in auxiliary table */
#define AT_VECTOR_SIZE_BASE 24 /* NEW_AUX_ENT entries in auxiliary table */
  /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */
#endif /* _LINUX_AUXVEC_H */