zephyr/arch
Eric Ackermann 2d3390f866 llext: Fix off-by-one in RISC-V truncation check
The RISC-V architecture-specific relocations need to check whether
each required relocation can fit into the modified instruction's
immediate. All immediates in RISC-V are encoded as two's complement.
The current truncation check has an off-by-one error for checking
the maximum negative distance, as two's complement encoding can
represent a negative value that is the maximum positive value plus
one, causing LLEXT to refuse loading valid code.
This commit adds an additional condition to the check that fixes
the aforementioned issue.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
..
arc Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
arm kernel: move current thread pointer management to core code 2025-01-10 07:49:08 +01:00
arm64 Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
common arm: mpu: Unify ARM_MPU kconfig definitions 2025-01-09 11:55:22 +01:00
mips kernel: arch: move arch_swap() declaration 2024-12-11 21:33:49 +01:00
nios2 arch: nios2: timing: Fix timing cycles rollover 2025-01-06 17:13:10 +00:00
posix kernel: move current thread pointer management to core code 2025-01-10 07:49:08 +01:00
riscv llext: Fix off-by-one in RISC-V truncation check 2025-01-10 14:47:39 +01:00
sparc Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
x86 Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
xtensa Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
archs.yml hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig arch: local ISR table declaration: Remove experimental label 2024-12-05 12:29:58 +01:00
Kconfig.v1 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.v2 hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00