ia64: do not bail out in get_syscall_args if umove fails with EPERM
If the kernel contains commit 84d77d3f06e7e8dea057d10e8ec77ad71f721be3, both PTRACE_PEEKDATA and process_vm_readv become unavailable when the process dumpable flag is cleared, on ia64 this results to all syscall arguments being unavailable. Recognize this situation and do not treat it as get_syscall_args error because the latter leaves the tracee in a ptrace stop. This condition used to be triggered by prctl-dumpable test that caused strace to hang indefinitely. * linux/ia64/get_syscall_args.c (get_syscall_args): Do not bail out if umove fails. * tests/prctl-dumpable.c [__ia64__]: Skip the test.
This commit is contained in:
parent
5fcdae5359
commit
c7e8fc0e63
@ -15,8 +15,12 @@ get_syscall_args(struct tcb *tcp)
|
||||
for (i = 0; i < tcp->s_ent->nargs; ++i) {
|
||||
if (umove(tcp,
|
||||
(unsigned long) ia64_rse_skip_regs(out0, i),
|
||||
&tcp->u_arg[i]) < 0)
|
||||
return -1;
|
||||
&tcp->u_arg[i]) < 0) {
|
||||
if (errno == EPERM)
|
||||
tcp->u_arg[i] = 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* truncate away IVE sign-extension */
|
||||
|
@ -32,7 +32,8 @@
|
||||
#include <asm/unistd.h>
|
||||
#include <linux/prctl.h>
|
||||
|
||||
#if defined __NR_prctl && defined PR_GET_DUMPABLE && defined PR_SET_DUMPABLE
|
||||
#if defined __NR_prctl && defined PR_GET_DUMPABLE && defined PR_SET_DUMPABLE \
|
||||
&& !defined __ia64__
|
||||
|
||||
# include <stdio.h>
|
||||
# include <unistd.h>
|
||||
@ -101,6 +102,7 @@ main(void)
|
||||
|
||||
#else
|
||||
|
||||
SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_DUMPABLE && PR_SET_DUMPABLE")
|
||||
SKIP_MAIN_UNDEFINED("__NR_prctl && PR_GET_DUMPABLE && PR_SET_DUMPABLE"
|
||||
" && !__ia64__")
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user