File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
tools/testing/selftests/exec Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -320,7 +320,7 @@ static int load_elf_fdpic_binary(struct linux_binprm *bprm)
320
320
else
321
321
executable_stack = EXSTACK_DEFAULT ;
322
322
323
- if (stack_size == 0 ) {
323
+ if (stack_size == 0 && interp_params . flags & ELF_FDPIC_FLAG_PRESENT ) {
324
324
stack_size = interp_params .stack_size ;
325
325
if (interp_params .flags & ELF_FDPIC_FLAG_EXEC_STACK )
326
326
executable_stack = EXSTACK_ENABLE_X ;
Original file line number Diff line number Diff line change @@ -1719,7 +1719,6 @@ static int prepare_binprm(struct linux_binprm *bprm)
1719
1719
*/
1720
1720
int remove_arg_zero (struct linux_binprm * bprm )
1721
1721
{
1722
- int ret = 0 ;
1723
1722
unsigned long offset ;
1724
1723
char * kaddr ;
1725
1724
struct page * page ;
@@ -1730,10 +1729,8 @@ int remove_arg_zero(struct linux_binprm *bprm)
1730
1729
do {
1731
1730
offset = bprm -> p & ~PAGE_MASK ;
1732
1731
page = get_arg_page (bprm , bprm -> p , 0 );
1733
- if (!page ) {
1734
- ret = - EFAULT ;
1735
- goto out ;
1736
- }
1732
+ if (!page )
1733
+ return - EFAULT ;
1737
1734
kaddr = kmap_local_page (page );
1738
1735
1739
1736
for (; offset < PAGE_SIZE && kaddr [offset ];
@@ -1746,10 +1743,8 @@ int remove_arg_zero(struct linux_binprm *bprm)
1746
1743
1747
1744
bprm -> p ++ ;
1748
1745
bprm -> argc -- ;
1749
- ret = 0 ;
1750
1746
1751
- out :
1752
- return ret ;
1747
+ return 0 ;
1753
1748
}
1754
1749
EXPORT_SYMBOL (remove_arg_zero );
1755
1750
Original file line number Diff line number Diff line change @@ -393,7 +393,7 @@ static int run_tests(void)
393
393
static void prerequisites (void )
394
394
{
395
395
int fd ;
396
- const char * script = "#!/bin/sh \nexit $*\n" ;
396
+ const char * script = "#!/bin/bash \nexit $*\n" ;
397
397
398
398
/* Create ephemeral copies of files */
399
399
exe_cp ("execveat" , "execveat.ephemeral" );
You can’t perform that action at this time.
0 commit comments