Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'x86-urgent-2024-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

- Fix a NOP-patching bug that resulted in valid but suboptimal
NOP sequences in certain cases

- Fix build warnings related to fall-through control flow

* tag 'x86-urgent-2024-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/alternatives: Use the correct length when optimizing NOPs
x86/boot: Address clang -Wimplicit-fallthrough in vsprintf()
x86/boot: Add a fallthrough annotation

+5 -1
+1
arch/x86/boot/Makefile
··· 56 56 KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__ 57 57 KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) 58 58 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 59 + KBUILD_CFLAGS += $(CONFIG_CC_IMPLICIT_FALLTHROUGH) 59 60 60 61 $(obj)/bzImage: asflags-y := $(SVGA_MODE) 61 62
+3
arch/x86/boot/printf.c
··· 246 246 247 247 case 'x': 248 248 flags |= SMALL; 249 + fallthrough; 249 250 case 'X': 250 251 base = 16; 251 252 break; ··· 254 253 case 'd': 255 254 case 'i': 256 255 flags |= SIGN; 256 + break; 257 + 257 258 case 'u': 258 259 break; 259 260
+1 -1
arch/x86/kernel/alternative.c
··· 372 372 void apply_relocation(u8 *buf, const u8 * const instr, size_t instrlen, u8 *repl, size_t repl_len) 373 373 { 374 374 __apply_relocation(buf, instr, instrlen, repl, repl_len); 375 - optimize_nops(instr, buf, repl_len); 375 + optimize_nops(instr, buf, instrlen); 376 376 } 377 377 378 378 /* Low-level backend functions usable from alternative code replacements. */