lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] ptrace, security: rename ptrace_may_access => ptrace_access_check
On Thu, 7 May 2009 11:49:47 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> The ptrace_may_access() methods are named confusingly - some
> variants return a bool, while the security subsystem methods have a
> retval convention.
>
> Rename it to ptrace_access_check, to reduce the confusion factor. A
> followup patch eliminates the bool usage.

s/may_access/access_check/ is a poor change. The new name conveys less
information than the old one.

It's quite clear what the return value from "may_access" means. It's
less clear what the return value from a function called "access_check"
means.

Switching to something like ptrace_task_accessible() or
ptrace_may_access_task() would be better.

This happens quite often. The string "check" in the name of a
predicate function is a red flag.


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