Re: [RFC -tip] x86: introduce ENTRY(KPROBE)_X86 assembly helpersto catch unbalanced declaration

From: Ingo Molnar
Date: Sun Nov 23 2008 - 17:36:18 EST



* Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:

> [Ingo Molnar - Sun, Nov 23, 2008 at 08:31:34PM +0100]
> ...
> | >
> | > Just got an error in implementation -- we have to support nested
> | > ENTRY without problem. Will check. What a surprise :-)
> |
> | do you mean:
> |
> | ENTRY(system_call)
> | ENTRY(system_call_after_swapgs)
> | ...
> | END(system_call)
> |
> | that's more of a bug - system_call_after_swapgs is not a real entry
> | point, we just need the label of it. Perhaps something like __ENTRY()
> | for that case would be enough.
> |
> | nor is this one real:
> |
> | ENTRY(interrupt)
> | ENTRY(irq_entries_start)
> | ...
> | END(irq_entries_start)
> | END(interrupt)
> |
> | do we really need .irq_entries_start?
> |
> | I think in general we should define a flat hierarchy of entries.
> |
> | Ingo
> |
>
> Yeah, I meant these cases. I don't think we really need
> irq_entries_start (didn't find any mention of them in tree). In case
> of system_call_after_swapgs I'm not that sure, but since xen use it
> as a plain jmp (at least now) it could be converted to a plain
> label. [...]

system_call_after_swapgs is a slowpath and should be converted to a
simple:

.globl system_call_after_swapgs
system_call_after_swapgs:

symbol definition - with no particular jump target alignment tweaks.

(the above sequence should be generalized as an __ENTRY() macro - i.e.
raw global symbol definition without any alignment tweaks)

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/