[llvm-dev] RFC: New function attribute "patchable-prologue"="<kind>"

Dean Michael Berris via llvm-dev llvm-dev at lists.llvm.org
Thu Apr 14 21:35:10 PDT 2016


On Fri, Apr 15, 2016 at 6:58 AM Eric Christopher <echristo at gmail.com> wrote:

> On Thu, Apr 14, 2016 at 1:56 PM Reid Kleckner <rnk at google.com> wrote:
>
>> I think most function redirection patching schemes are going to be
>> mutually incompatible, so I'm not sure it makes sense to make this
>> attribute a comma-separated list.
>>
>>
> Isn't this what I said? :)
>

While some schemes may be incompatible, I suspect composing some of them
together makes some sense. For example:

patchable-function=hotpatch-short-prologue,hotpatch-short-epilogue

We can catch some incompatibilities in the implementation if there are
serious problems with mixing them.


>
>
>> I think Eric's and Dean's use case may be better addressed by a separate
>> attribute. My recollection is that they want to add nop slides to the
>> prologue and epilogue that can be hotpatched to enable and disable
>> instrumentation at runtime.
>>
>
> I'm not sure about this, it'd be nice not to have a bajillion more
> attributes.
>
>
I for one would like less attributes. It seems this is potentially
something we can use for a broader purpose so I'd like to explore that
possibility early (rather than doing it later).

Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160415/c26bbcc6/attachment.html>


More information about the llvm-dev mailing list