lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] security: rename ptrace_may_access => ptrace_access_check

* Oleg Nesterov <oleg@redhat.com> wrote:

> On 05/07, Ingo Molnar wrote:
> >
> > * Ingo Molnar <mingo@elte.hu> wrote:
> > Subject: security: rename ptrace_may_access => ptrace_access_check
> > From: Ingo Molnar <mingo@elte.hu>
> >
> > The ->ptrace_may_access() methods are named confusingly - the real
> > ptrace_may_access() returns a bool, while these security checks have
> > a retval convention.
> >
> > Rename it to ptrace_access_check, to reduce the confusion factor.
>
> Great. Now we can rename (and fix the callers of) ptrace.c:ptrace_may_access()
> accordingly.
>
> But,
>
> > -static inline int security_ptrace_may_access(struct task_struct *child,
> > +static inline int security_ptrace_access_check(struct task_struct *child,
> > unsigned int mode)
>
> You seem to forgot to update the callers of this helper.

Did i mention that it's completely untested :) Yeah, i'd suggest to
push this naming down the whole ptrace_may_access landscape, and
eliminate the bool. In two separate patches: first the rename, then
the bool-elimination (which is more dangerous).

Ingo


\
 
 \ /
  Last update: 2009-05-07 11:39    [W:0.062 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site