[PATCH RFC] arm64/scs: Fix potential sign extension issue of advance_loc4

Catalin Marinas catalin.marinas at arm.com
Mon Apr 27 06:39:25 PDT 2026


On Mon, 13 Apr 2026 17:54:59 +0800, Wentao Guan wrote:
> The expression (*opcode++ << 24) and exp * code_alignment_factor
> may overflow signed int and becomes negative.
> 
> Fix this by casting each byte to u64 before shifting. Also fix
> the misaligned break statement while we are here.
> 
> Example of the result can be seen here:
> Link: https://godbolt.org/z/zhY8d3595
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64/scs: Fix potential sign extension issue of advance_loc4
      https://git.kernel.org/arm64/c/4023b7424ecd



More information about the linux-arm-kernel mailing list