Messages in this thread | | | Date | Thu, 7 May 2009 12:55:26 -0700 | From | Andrew Morton <> | Subject | Re: [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.
| |