]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: memset: clean up unwind annotations
authorArd Biesheuvel <ardb@kernel.org>
Mon, 4 Oct 2021 09:34:05 +0000 (11:34 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 3 Dec 2021 14:11:32 +0000 (15:11 +0100)
commit2616f87a2d1c561bcb626b7c15fcd71b3874861a
treef509cec1510a5dc3ee1f8b07920f6b6f5d475e08
parent2b732cefcdff5a7c44cffa19f6a3b9c66f04f745
ARM: memset: clean up unwind annotations

The memset implementation carves up the code in different sections, each
covered with their own unwind info. In this case, it is done in a way
similar to how the compiler might do it, to disambiguate between parts
where the return address is in LR and the SP is unmodified, and parts
where a stack frame is live, and the unwinder needs to know the size of
the stack frame and the location of the return address within it.

Only the placement of the unwind directives is slightly odd: the stack
pushes are placed in the wrong sections, which may confuse the unwinder
when attempting to unwind with PC pointing at the stack push in
question.

So let's fix this up, by reordering the directives and instructions as
appropriate.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Keith Packard <keithpac@amazon.com>
Tested-by: Marc Zyngier <maz@kernel.org>
Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> # ARMv7M
arch/arm/lib/memset.S