On Mon, Aug 7, 2017 at 3:48 PM, Michael Matz <m...@suse.de> wrote: > Hi, > > On Mon, 7 Aug 2017, H.J. Lu wrote: > >> >> [hjl@gnu-tools-1 pr81736]$ >> >> >> >> Does it mean clang is broken? >> > >> > In my book, yes. >> >> Does GCC do this for all targets or just x86? > > No idea. If so I'd say those other targets are broken as well (as long as > the concept of frame pointer makes sense on them, their ABI defines one > but leaves it optional and something like an unwinder could make use of > it). > >> I am looking for a run-time test which breaks unwinder. > > I don't have one handy. Idea: make two threads, one endlessly looping in > the "frame-less" function, the other causing a signal to the first thread, > and the signal handler checking that unwinding up to caller of > frame_less() is possible via %[er]bp chaining.
OTOH, even if the function doesn't make its own frame, the %[er]bp is still untouched and points to the calling function frame. So, I think that even in that case unwinding should be unharmed. Frame setupsthat HJ presented are really unneeded, so there is a clear benefit. How about we keep the patch for a while and see if something indeed breaks? Linux live patching looks quite fragile in this area. Uros.