Re: [PATCH 1/5] ptrace: remove incorrect unlikelys

From: Ingo Molnar
Date: Wed Mar 25 2009 - 03:22:26 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> Impact: clean up
>
> Accounding to the annotated branch profiler, the unlikelys used by
> ptrace is incorrect every time.
>
> correct incorrect % Function File Line
> ------- --------- - -------- ---- ----
>
> 0 24176 100 syscall_trace_leave ptrace.c 1444
> 0 21478 100 syscall_trace_enter ptrace.c 1424
>
> Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
> ---
> arch/x86/kernel/ptrace.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
> index 06ca07f..74a16db 100644
> --- a/arch/x86/kernel/ptrace.c
> +++ b/arch/x86/kernel/ptrace.c
> @@ -1421,7 +1421,7 @@ asmregparm long syscall_trace_enter(struct pt_regs *regs)
> tracehook_report_syscall_entry(regs))
> ret = -1L;
>
> - if (unlikely(current->audit_context)) {
> + if (current->audit_context) {

i suspect you got this result because you are running Fedora with
auditd enabled and running, right? Does SuSE and Ubuntu run with
auditing enabled as well? If yes then removing this annotation would
be right - otherwise the auditing-enabled case is considered the
less likely variant. (despite it being 100% wrong for your
particular configuration)

Ingo
--
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/