Re: [patch 1/2] ptrace, security: rename ptrace_may_access =>ptrace_access_check
From: Andrew Morton
Date: Thu May 07 2009 - 16:00:46 EST
On Thu, 7 May 2009 11:49:47 +0200
Ingo Molnar <mingo@xxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/