Messages in this thread | | | Date | Thu, 18 Aug 2022 11:58:38 -0500 | From | Segher Boessenkool <> | Subject | Re: [PATCH net-next v4] net: skb: prevent the split of kfree_skb_reason() by gcc |
| |
Hi!
On Fri, Aug 19, 2022 at 12:31:44AM +0800, Menglong Dong wrote: > On Wed, Aug 17, 2022 at 11:54 PM Nick Desaulniers > <ndesaulniers@google.com> wrote: > > Perhaps noipa might also work here? > > In my testing, both 'noclone' and 'noipa' both work! As for the > '-fdisable-ipa-fnsplit', it seems it's not supported by gcc, and I > failed to find any documentation of it.
noipa is noinline+noclone+no_icf plus assorted not separately enablable things. There is no reason you would want to disable all inter-procedural optimisations here, so you don't need noipa.
You need both noinline and no_icf if you want all calls to this to be actual function calls, and using this specific function name. If you don't have noinline some calls may go missing (which may be fine for how you use it). If you don't have no_icf the compiler may replace the call with a call to another function, if that does the same thing semantically. You may want to prevent that as well, depending on exactly what you have this for.
Segher
| |