Re: [PATCH] drm/vmwgfx: Silence RBP clobber warnings

From: Josh Poimboeuf
Date: Fri Jun 02 2023 - 11:32:47 EST


On Fri, Jun 02, 2023 at 05:16:39PM +0200, Peter Zijlstra wrote:
> On Fri, Jun 02, 2023 at 07:56:34AM -0700, Josh Poimboeuf wrote:
> > VMware hypercalls take the RBP register as input. This breaks basic
> > frame pointer convention, as RBP should never be clobbered.
> >
> > So frame pointer unwinding is broken for the instructions surrounding
> > the hypercall with the clobbered RBP. There's nothing that can be done
> > about that. Just tell objtool to ignore it.
> >
>
> That's a pretty horrific ABI, one that violates the oldest x86 calling
> convention in existence.
>
> VMware folks, shame!!

Agreed :-(

BTW, please ignore the patch, I'll be sending a v2.

I realized (with Peter's prodding on IRC) that reliable ORC unwinding
would be broken if the function has a frame pointer. Which can
happen if the function needs an aligned stack.

--
Josh