lkml.org 
[lkml]   [2022]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH net-next v4] net: skb: prevent the split of kfree_skb_reason() by gcc
Hello,

On Mon, Aug 22, 2022 at 4:01 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Menglong Dong:
>
> > /*
> > * Used by functions that use '__builtin_return_address'. These function
> > * don't want to be splited or made inline, which can make
> > * the '__builtin_return_address' got unexpected address.
> > */
> > #define __fix_address noinline __noclone
>
> You need something on the function *declaration* as well, to inhibit
> sibcalls.
>

I did some research on the 'sibcalls' you mentioned above. Feel like
It's a little similar to 'inline', and makes the callee use the same stack
frame with the caller, which obviously will influence the result of
'__builtin_return_address'.

Hmm......but I'm not able to find any attribute to disable this optimization.
Do you have any ideas?

Thanks!
Menglong Dong

> Thanks,
> Florian
>

\
 
 \ /
  Last update: 2022-08-23 20:15    [W:0.295 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site