]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/extable: switch to using FIELD_GET_SIGNED()
authorYury Norov <ynorov@nvidia.com>
Mon, 27 Apr 2026 21:41:19 +0000 (17:41 -0400)
committerYury Norov <ynorov@nvidia.com>
Wed, 20 May 2026 15:18:27 +0000 (11:18 -0400)
commitd3d4233c7cf4fb399bd10a7d0ecb08e448783b75
tree3f148e1fa7fa99f66e252a5e304b1c6dc9058886
parent2c3f0541b99c60ac079228627ea325317e7d8b2a
x86/extable: switch to using FIELD_GET_SIGNED()

The EX_DATA register is laid out such that EX_DATA_IMM occupied MSB.
It's done to make sure that FIELD_GET() will sign-extend the IMM
field during extraction.

To enforce that, all EX_DATA masks are made signed integers. This
works, but relies on the particular implementation of FIELD_GET(),
i.e. masking then shifting, not vice versa; and the particular
placement of the fields in the register.

Switch to using the dedicated FIELD_GET_SIGNED(), and relax those
limitations.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
arch/x86/include/asm/extable_fixup_types.h
arch/x86/mm/extable.c