All of lore.kernel.org
 help / color / mirror / Atom feed
* objtool warning: "duplicate frame pointer save"
@ 2016-05-25 17:14 ` Linus Torvalds
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2016-05-25 17:14 UTC (permalink / raw)
  To: Josh Poimboeuf, Ingo Molnar; +Cc: Linux Kernel Mailing List, DRI

Josh,
 my current git version (with gcc 5.3.1) makes objtool warn about
"duplicate frame pointer save" in drivers/gpu/drm/vmwgfx/vmwgfx_msg.c
for both vmw_send_msg() and vmw_host_get_guestinfo().

The reason is that VMW_PORT_HB_OUT() uses a magic instruction sequence
(a "rep outsb") to communicate with the hypervisor (it's a virtual GPU
driver for vmware), and %rbp is part of the communication. So the
inline asm does a save-and-restore of the frame pointer around the
instruction sequence.

I actually find the objtool warning to be quite reasonable, so it's
not exactly a false positive, since in this case it actually does
point out that the frame pointer won't be reliable over that
instruction sequence.

But in this particular case it just ends up being the wrong thing -
the code is what it is, and %rbp just can't have the frame information
due to annoying magic calling conventions.

Is there some way to override objtool for this situation? I hate
seeing warnings that I need to ignore, it has just too often caused me
to mistakenly ignore warnings I *should* have reacted to.

I guess a STACK_FRAME_NON_STANDARD will shut objtool up (or just
disabling it entirely for the whole file), but I was wondering about
something more targeted that could be marked in the inline asm itself
(rather than have to mark the functions that use it)

               Linus

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-06-08 14:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-25 17:14 objtool warning: "duplicate frame pointer save" Linus Torvalds
2016-05-25 17:14 ` Linus Torvalds
2016-05-25 17:56 ` Josh Poimboeuf
2016-05-25 23:51   ` Linus Torvalds
2016-05-25 23:51     ` Linus Torvalds
2016-05-26 18:43     ` [PATCH] drm/vmwgfx: fix "duplicate frame pointer save" warning Josh Poimboeuf
2016-05-26 18:58       ` Linus Torvalds
2016-05-26 18:58         ` Linus Torvalds
2016-06-08 14:27       ` [tip:core/urgent] objtool, drm/vmwgfx: Fix " tip-bot for Josh Poimboeuf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.