Re: [tip:x86/mm] x86, mm, kprobes: fault.c, simplifynotify_page_fault()

From: Ingo Molnar
Date: Sun Feb 22 2009 - 04:31:39 EST



* Masami Hiramatsu <mhiramat@xxxxxxxxxx> wrote:

> Ingo Molnar wrote:
> > Author: Ingo Molnar <mingo@xxxxxxx>
> > AuthorDate: Fri, 20 Feb 2009 22:42:57 +0100
> > Commit: Ingo Molnar <mingo@xxxxxxx>
> > CommitDate: Sat, 21 Feb 2009 00:09:42 +0100
> >
> > x86, mm, kprobes: fault.c, simplify notify_page_fault()
> >
> > Impact: cleanup
> >
> > Remove an #ifdef from notify_page_fault(). The function still
> > compiles to nothing in the !CONFIG_KPROBES case.
> >
> > Introduce kprobes_built_in() and kprobe_fault_handler() helpers
> > to allow this - they returns 0 if !CONFIG_KPROBES.
> >
> > No code changed:
> >
> > text data bss dec hex filename
> > 4618 32 24 4674 1242 fault.o.before
> > 4618 32 24 4674 1242 fault.o.after
>
> It seems good for me. Thank you for cleanup!
>
> Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>

another very small thing, while we are discussing kprobes:

I always found that the __kprobes annotation is very confusingly
euphemistic: what those annotations really mean is not
'kprobes', but 'no kprobes'.

So how about renaming __kprobes to __nokprobes, similar to how
we have the notrace attribute?

We have about 350 __kprobes annotations in the kernel, so
renaming it now would not be practical - but any objections
against me sending Linus a rename patch somewhere late in the
next merge window that just does this rename?

[ likewise, i'll rename notrace to __notrace to make it visually
less intrusive to the return value type. There's a lot less
such annotations in the kernel. ]

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/