Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b1054282 authored by Tkhai Kirill's avatar Tkhai Kirill Committed by David S. Miller
Browse files

sparc32: Fixed unaligned memory copying in function __csum_partial_copy_sparc_generic



When we are in the label cc_dword_align, registers %o0 and %o1 have the same last 2 bits,
but it's not guaranteed one of them is zero. So we can get unaligned memory access
in label ccte. Example of parameters which lead to this:
%o0=0x7ff183e9, %o1=0x8e709e7d, %g1=3

With the parameters I had a memory corruption, when the additional 5 bytes were rewritten.
This patch corrects the error.

One comment to the patch. We don't care about the third bit in %o1, because cc_end_cruft
stores word or less.

Signed-off-by: default avatarTkhai Kirill <tkhai@yandex.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f486b3dc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment