Re: [PATCH] x86: KPROBE_ENTRY should be paired wth KPROBE_END

From: Alexander van Heukelum
Date: Mon Nov 24 2008 - 05:29:39 EST


On Mon, Nov 24, 2008 at 09:17:29AM +0000, Jan Beulich wrote:
> >>> Alexander van Heukelum <heukelum@xxxxxxxxxxxxx> 23.11.08 10:15 >>>
> >@@ -1282,7 +1282,7 @@ gs_change:
> > CFI_ADJUST_CFA_OFFSET -8
> > ret
> > CFI_ENDPROC
> >-ENDPROC(native_load_gs_index)
> >+END(native_load_gs_index)
> >
> > .section __ex_table,"a"
> > .align 8
>
> I disagree to this and similar changes in this patch: Why do we need to
> get rid of the ENDPROC() here? It's a procedure that's being ended, and
> using ENDPROC() is the only (existing) way to mark something as a
> procedure in assembly code.

Hallo Jan Beulich,

You are right. ENDPROC(name) adds ".type name, @function;" as compared
to END(name). So I agree that using ENDPROC is in fact better.

> And btw., while described so in the patch comment, this change has nothing
> to do with the subject of the patch.

Right. I thought of END and ENDPROC as equivalent, so I added the change
to this patch as a small cleanup only. But if we want this .type
annotation, what about KPROBE_END? should it include one there too?

I'm getting a feeling we would be better off removing KPROBE_ENTRY and
KPROBE_END if favour of explicitly changing sections in the .S files?
And using the ENDPROC annotation for all procedures?

Greetings,
Alexander

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