Skip to content

Commit

Permalink
powerpc32: don't adjust unmoved stack pointer in csum_partial_copy_ge…
Browse files Browse the repository at this point in the history
…neric() epilogue

A recent change to the checksum code removed usage of some extra
arguments, alongside with storage on the stack for those, and the stack
pointer no longer needed to be adjusted in the function prologue.

But a left over subtraction wasn't removed in the function epilogue,
causing the function to return with the stack pointer moved 16 bytes
away from where it should have.  This corrupted local state and lead to
weird crashes.

This simply removes the leftover instruction from the epilogue.

Fixes: 70d65cd ("ppc: propagate the calling conventions change down to csum_partial_copy_generic()")
Cc: Al Viro <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
zx2c4 authored and torvalds committed Oct 14, 2020
1 parent 6448cbf commit e6037a7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/powerpc/lib/checksum_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ _GLOBAL(csum_partial_copy_generic)
slwi r0,r0,8
adde r12,r12,r0
66: addze r3,r12
addi r1,r1,16
beqlr+ cr7
rlwinm r3,r3,8,0,31 /* odd destination address: rotate one byte */
blr
Expand Down

0 comments on commit e6037a7

Please sign in to comment.