lkml.org 
[lkml]   [2009]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/3] x86: Pass in pt_regs pointer for syscalls that need it

    * Tejun Heo <htejun@gmail.com> wrote:

    > Brian Gerst wrote:
    > > x86-64 doesn't have the tail-call problem because it doesn't use the
    > > pt_regs on stack trick for syscall args. All the args are passed in
    > > registers.
    >
    > Yeah, I was saying that we can do about the same thing on x86_32 by
    > passing in pointer to pt_regs and defining proper syscall wrappers.
    > It will cost a bit of performance by increasing register pressure tho.

    Do you mean converting:

    ptregscall int sys_execve(struct pt_regs *regs, char __user *u_filename,
    char __user * __user *argv,
    char __user * __user *envp)

    to:

    ptregscall int sys_execve(struct pt_regs *regs)
    {
    char __user *u_filename = syscall_arg1(regs);
    char __user * __user *argv = syscall_arg2(regs);
    char __user * __user *envp = syscall_arg3(regs);

    etc.?

    Ingo


    \
     
     \ /
      Last update: 2009-02-11 17:03    [W:0.025 / U:0.500 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site