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]
Date:	Wed, 8 Apr 2009 04:26:08 -0300
From:	Sergio Luis <eeeesti@...il.com>
To:	Roland McGrath <roland@...hat.com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ptrace: checkpatch fixes

On Wed, Apr 8, 2009 at 3:21 AM, Roland McGrath <roland@...hat.com> wrote:
> This fixes all the checkpatch --file complaints about kernel/ptrace.c
> and also removes an unused #include.  I've verified that there are no
> changes to the compiled code on x86_64.

silly question, but... how do you verify that? is there any tool under
scripts/ that do that comparison?

thanks,
sergio

>
> Signed-off-by: Roland McGrath <roland@...hat.com>
> ---
>  kernel/ptrace.c |   25 +++++++++++++------------
>  1 files changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/kernel/ptrace.c b/kernel/ptrace.c
> index aaad0ec..dbe79ef 100644
> --- a/kernel/ptrace.c
> +++ b/kernel/ptrace.c
> @@ -21,9 +21,7 @@
>  #include <linux/audit.h>
>  #include <linux/pid_namespace.h>
>  #include <linux/syscalls.h>
> -
> -#include <asm/pgtable.h>
> -#include <asm/uaccess.h>
> +#include <linux/uaccess.h>
>
>
>  /*
> @@ -48,7 +46,7 @@ void __ptrace_link(struct task_struct *child, struct task_struct *new_parent)
>        list_add(&child->ptrace_entry, &new_parent->ptraced);
>        child->parent = new_parent;
>  }
> -
> +
>  /*
>  * Turn a tracing stop into a normal stop now, since with no tracer there
>  * would be no way to wake it up with SIGCONT or SIGKILL.  If there was a
> @@ -173,7 +171,7 @@ bool ptrace_may_access(struct task_struct *task, unsigned int mode)
>        task_lock(task);
>        err = __ptrace_may_access(task, mode);
>        task_unlock(task);
> -       return (!err ? true : false);
> +       return !err;
>  }
>
>  int ptrace_attach(struct task_struct *task)
> @@ -338,7 +336,8 @@ void exit_ptrace(struct task_struct *tracer)
>        }
>  }
>
> -int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst, int len)
> +int ptrace_readdata(struct task_struct *tsk, unsigned long src,
> +                   char __user *dst, int len)
>  {
>        int copied = 0;
>
> @@ -358,12 +357,13 @@ int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __user *dst
>                copied += retval;
>                src += retval;
>                dst += retval;
> -               len -= retval;
> +               len -= retval;
>        }
>        return copied;
>  }
>
> -int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len)
> +int ptrace_writedata(struct task_struct *tsk, char __user *src,
> +                    unsigned long dst, int len)
>  {
>        int copied = 0;
>
> @@ -383,7 +383,7 @@ int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long ds
>                copied += retval;
>                src += retval;
>                dst += retval;
> -               len -= retval;
> +               len -= retval;
>        }
>        return copied;
>  }
> @@ -496,9 +496,9 @@ static int ptrace_resume(struct task_struct *child, long request, long data)
>                if (unlikely(!arch_has_single_step()))
>                        return -EIO;
>                user_enable_single_step(child);
> -       }
> -       else
> +       } else {
>                user_disable_single_step(child);
> +       }
>
>        child->exit_code = data;
>        wake_up_process(child);
> @@ -527,7 +527,8 @@ int ptrace_request(struct task_struct *child, long request,
>                ret = ptrace_setoptions(child, data);
>                break;
>        case PTRACE_GETEVENTMSG:
> -               ret = put_user(child->ptrace_message, (unsigned long __user *) data);
> +               ret = put_user(child->ptrace_message,
> +                              (unsigned long __user *) data);
>                break;
>
>        case PTRACE_GETSIGINFO:
> --
> 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/
>
--
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