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

Christian Borntraeger
2009-03-25T13:32:18Z

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.