summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorWentao Guan <guanwentao@uniontech.com>2026-04-13 17:54:59 +0800
committerCatalin Marinas <catalin.marinas@arm.com>2026-04-27 12:16:26 +0100
commit4023b7424ecd5d38cc75b650d6c1bf630ef8cb40 (patch)
tree68cc31f47f7f02b37337869301664561b2c9251f /scripts
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
arm64/scs: Fix potential sign extension issue of advance_loc4
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 It maybe not a real problem, but could be a issue in future. Fixes: d499e9627d70 ("arm64/scs: Fix handling of advance_loc4") Signed-off-by: Wentao Guan <guanwentao@uniontech.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions