lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinwo05bRQ8YE2-gmD0cY-8ML7vkiCkbhWOWn+=C@mail.gmail.com>
Date:	Fri, 4 Mar 2011 09:12:57 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Denys Vlasenko <vda.linux@...glemail.com>
Cc:	Tejun Heo <tj@...nel.org>, Oleg Nesterov <oleg@...hat.com>,
	Roland McGrath <roland@...hat.com>, jan.kratochvil@...hat.com,
	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [RFC] Proposal for ptrace improvements

On Fri, Mar 4, 2011 at 9:05 AM, Denys Vlasenko <vda.linux@...glemail.com> wrote:
>
> Here's a typical sequence of operations strace is doing:
>
> wait4(-1, [{WIFSTOPPED(s) && WSTOPSIG(s) == SIGTRAP}], __WALL, NULL) = 10445
> ptrace(PTRACE_GETSIGINFO, 10445, 0, {si_signo=SIGTRAP, si_code=0x5,
> si_pid=10445, si_uid=0, si_value={int=0, ptr=0}}) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*ORIG_RAX, [0x36]) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*CS, [0x23]) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*RAX, [0xffffffffffffffda]) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*RBX, [0x1]) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*RCX, [0x5401]) = 0
> ptrace(PTRACE_PEEKUSER, 10445, 8*RDX, [0xffb83f10]) = 0
> ptrace(PTRACE_SYSCALL, 10445, 0x1, SIG_0) = 0
>
> IOW: strace wastes a lot of time just transiting to the kernel and back
> with simple syscalls to get the information.
>
> What would help here is a "vectorized" waitpid operation
> which retrieves much more information in one go:
>
> waitpid_vec(int max_results, int status_vector[], siginfo_t
> si_vector[], struct pt_regs reg_vector[])

No. Start off with what we already have: make ptrace use
"PTRACE_GETREGSET" instead of PTRACE_PEEKUSER.

That should get the whole "user_regs_struct" in one single system call.

                                      Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ