Messages in this thread | | | Date | Sun, 23 Nov 2008 16:51:34 +0300 | From | Cyrill Gorcunov <> | Subject | Re: [PATCH] x86: KPROBE_ENTRY should be paired wth KPROBE_END |
| |
[Ingo Molnar - Sun, Nov 23, 2008 at 02:27:52PM +0100] | | * Alexander van Heukelum <heukelum@mailshack.com> wrote: | | > Impact: moves some code out of .kprobes.text | > | > KPROBE_ENTRY switches code generation to .kprobes.text, and KPROBE_END | > uses .popsection to get back to the previous section (.text, normally). | > Also replace ENDPROC by END, for consistency. | > | > Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm> | | applied to tip/x86/irq, thanks Alexander! | | > One more small change for today. The xen-related functions | > xen_do_hypervisor_callback and xen_failsafe_callback are put | > in the .kprobes.text even in the current kernel: ignore_sysret | > is enclosed in KPROBE_ENTRY / ENDPROC, instead of KPROBE_ENTRY / | > KPROBE_END, but I guess the situation is harmless. | | yeah. It narrows no-kprobes protection for that code, but it should | indeed be fine (and that's the intention as well). | | Note that this is a reoccuring bug type, and rather long-lived. Can | you think of any way to get automated nesting protection of both the | .cfi_startproc/endproc macros and kprobes start/end? A poor man's | solution would be to grep the number of start and end methods and | enforce that they are equal. | | Ingo |
I think we could play with preprocessor and check if ENTRY/END matches. Looking now.
- Cyrill -
| |