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

From: Christian Borntraeger
Date: Wed Mar 25 2009 - 09:32:18 EST


Am Wednesday 25 March 2009 08:21:29 schrieb Ingo Molnar:
> > @@ -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)

Auditd can be enabled/disabled via kernel command line, no? In that case
there should be no unlikely and no likely. We should not optimize for a specific
value at compile time if the value can be changed at runtime.

This patch makes a lot of sense to me.



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