<div dir="ltr">Can you file a bug to track either explaining how to do that or implementing it?<div><br></div><div>My guess is that it doesn't work yet, will be made to work by a future change that has already been proposed but not implemented...</div><div><br></div><div>Also, I'm going to hypothesize this will introduce yet another divergence between GCC and Clang. Not sure there is anyway to avoid that at this point. (We still have the significant divergence in that GCC supports thunking in ways that LLVM doesn't, and that in turn changes several aspects of the feature design.)</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 6, 2018 at 4:21 PM David Woodhouse <<a href="mailto:dwmw2@infradead.org">dwmw2@infradead.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br></div><div class="m_-1246115972682819513-x-evo-paragraph m_-1246115972682819513-x-evo-top-signature-spacer"><br></div><div>On Wed, 2018-02-07 at 00:16 +0000, Chandler Carruth wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><blockquote type="cite"><div><div>At this point, what we really want is for identical thunks to have identical names — just like we do for builtins and other stuff, to avoid having differences between clang and GCC which just end up seeming capricious and being hard to work around. Having matching command line options would be a bonus, but isn't imperative.</div></div><br></blockquote><div><br></div><div>After talking to several others (to make sure we don't have to do this whole thing yet again) we'll change the external thunk names to match what GCC is using. Hopefully this doesn't come back to bite us. =]</div><div><br></div><div>We'll also make sure those patches get backported too so that no released versions have the old behavior.</div></div></div>
</blockquote><div><br></div></div><div><div>Thank you.</div><div><br></div><div>For reference, is there a way to turn *off* the retpoline which has been enabled on the command line? </div><div><br></div><div>For init functions which run only at startup before any attacker can be in the system, we currently mark the function __attribute__((indirect_thunk("keep"))). Is there a clang equivalent?</div><div><br></div><div>It's not particularly important; a minor optimisation we can live without if we have to. </div></div></blockquote></div>