]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros
authorThomas Hellstrom <thellstrom@vmware.com>
Wed, 23 May 2018 14:11:24 +0000 (16:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:17 +0000 (07:50 +0200)
commit50af403619f08f533b0118dda5693507f824aafb
treeb3c15c9a9d713c785135662b8b591618de435899
parent3246d2e53c62447f7b1a5249a6d3a74424fd7873
drm/vmwgfx: Fix 32-bit VMW_PORT_HB_[IN|OUT] macros

commit 938ae7259c908ad031da35d551da297640bb640c upstream.

Depending on whether the kernel is compiled with frame-pointer or not,
the temporary memory location used for the bp parameter in these macros
is referenced relative to the stack pointer or the frame pointer.
Hence we can never reference that parameter when we've modified either
the stack pointer or the frame pointer, because then the compiler would
generate an incorrect stack reference.

Fix this by pushing the temporary memory parameter on a known location on
the stack before modifying the stack- and frame pointers.

Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/vmwgfx/vmwgfx_msg.h