Re: [patch 15/21] ptrace changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Schwidefsky wrote:
> On Mon, 2008-11-03 at 11:14 -0600, David Smith wrote: 
> 
>> Is this correct, or should the 1st syscall argument be found in
>> regs->orig_gpr2 by syscall_get_arguments()/syscall_set_arguments()?
> 
> The question is when do syscall_get_arguments and syscall_set_arguments
> functions get called? If they are called on a call chain that started
> from do_syscall_trace_enter then we'd have to use orig_gpr2 instead of
> gprs[2] but if the functions are not called via do_syscall_trace_enter
> the first argument is located in grprs[2]. As far as I can see the sole
> user of syscall_get_arguments is collect_syscall which is used to get
> the registers of a blocked process. In this case the kernel call chain
> does not include do_syscall_trace_enter, therefore the first argument is
> in gprs[2], no?

But, collect_syscall() also calls syscall_get_nr():

	*callno = syscall_get_nr(target, regs);
	if (*callno != -1L && maxargs > 0)
		syscall_get_arguments(target, regs, 0, maxargs, args);

Both syscall_get_nr() *and* syscall_get_arguments() returning gprs[2]
can't be right, can it?

-- 
David Smith
dsmith@xxxxxxxxxx
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux