linux-stable/arch/x86/lib
Peter Zijlstra 4b5305decc x86/extable: Extend extable functionality
In order to remove further .fixup usage, extend the extable
infrastructure to take additional information from the extable entry
sites.

Specifically add _ASM_EXTABLE_TYPE_REG() and EX_TYPE_IMM_REG that
extend the existing _ASM_EXTABLE_TYPE() by taking an additional
register argument and encoding that and an s16 immediate into the
existing s32 type field. This limits the actual types to the first
byte, 255 seem plenty.

Also add a few flags into the type word, specifically CLEAR_AX and
CLEAR_DX which clear the return and extended return register.

Notes:
 - due to the % in our register names it's hard to make it more
   generally usable as arm64 did.
 - the s16 is far larger than used in these patches, future extentions
   can easily shrink this to get more bits.
 - without the bitfield fix this will not compile, because: 0xFF > -1
   and we can't even extract the TYPE field.

[nathanchance: Build fix for clang-lto builds:
 https://lkml.kernel.org/r/20211210234953.3420108-1-nathan@kernel.org
]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lore.kernel.org/r/20211110101325.303890153@infradead.org
2021-12-11 09:09:46 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
atomic64_32.c
atomic64_386_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
atomic64_cx8_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
cache-smp.c smp: Remove smp_call_function() and on_each_cpu() return values 2019-06-23 14:26:26 +02:00
checksum_32.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
clear_page_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
cmdline.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cmpxchg8b_emu.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
cmpxchg16b_emu.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
copy_mc.c x86, libnvdimm/test: Remove COPY_MC_TEST 2020-10-26 18:08:35 +01:00
copy_mc_64.S x86/copy_mc_64: Remove .fixup usage 2021-12-11 09:09:46 +01:00
copy_page_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
copy_user_64.S x86/copy_user_64: Remove .fixup usage 2021-12-11 09:09:45 +01:00
cpu.c x86/lib/cpu: Address missing prototypes warning 2019-08-08 08:25:53 +02:00
csum-copy_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
csum-partial_64.c x86/csum: Rewrite/optimize csum_partial() 2021-12-08 11:26:09 +01:00
csum-wrappers_64.c amd64: switch csum_partial_copy_generic() to new calling conventions 2020-08-20 15:45:22 -04:00
delay.c x86/delay: Introduce TPAUSE delay 2020-05-07 16:06:20 +02:00
error-inject.c x86: Prepare inline-asm for straight-line-speculation 2021-12-08 19:23:12 +01:00
getuser.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
hweight.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
inat.c x86/insn: Add a __ignore_sync_check__ marker 2021-03-15 11:00:57 +01:00
insn-eval.c x86/extable: Extend extable functionality 2021-12-11 09:09:46 +01:00
insn.c x86/insn: Use get_unaligned() instead of memcpy() 2021-10-06 11:56:37 +02:00
iomap_copy_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
iomem.c x86: explicitly align IO accesses in memcpy_{to,from}io 2019-02-01 09:07:48 -08:00
kaslr.c x86/boot: Allow a "silent" kaslr random byte fetch 2021-10-27 11:07:58 +02:00
Makefile x86/mmx_32: Remove X86_USE_3DNOW 2021-12-11 09:09:45 +01:00
memcpy_32.c x86/mmx_32: Remove X86_USE_3DNOW 2021-12-11 09:09:45 +01:00
memcpy_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
memmove_64.S x86: Add straight-line-speculation mitigation 2021-12-09 13:32:25 +01:00
memset_64.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
misc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmx_32.c x86/mmx_32: Remove X86_USE_3DNOW 2021-12-11 09:09:45 +01:00
msr-reg-export.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
msr-reg.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
msr-smp.c x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes 2021-03-22 21:37:03 +01:00
msr.c x86/msr: Make locally used functions static 2021-04-08 11:57:40 +02:00
pc-conf-reg.c x86: Add support for 0x22/0x23 port I/O configuration space 2021-08-10 23:31:43 +02:00
putuser.S x86: Prepare asm files for straight-line-speculation 2021-12-08 12:25:37 +01:00
retpoline.S x86: Add straight-line-speculation mitigation 2021-12-09 13:32:25 +01:00
string_32.c lib/string: Move helper functions out of string.c 2021-09-25 08:20:49 -07:00
strstr_32.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usercopy.c x86/uaccess: Document copy_from_user_nmi() 2020-11-18 13:19:01 +01:00
usercopy_32.c x86/mmx_32: Remove X86_USE_3DNOW 2021-12-11 09:09:45 +01:00
usercopy_64.c * Extend the recovery from MCE in kernel space also to processes which 2020-10-12 10:14:38 -07:00
x86-opcode-map.txt x86/insn: Add Control-flow Enforcement (CET) instructions to the opcode map 2020-03-26 12:21:40 +01:00