···18661866 code with them to make this happen.1867186718681868 In addition to building the kernel with IBT, seal all functions that18691869- are not indirect call targets, avoiding them ever becomming one.18691869+ are not indirect call targets, avoiding them ever becoming one.1870187018711871 This requires LTO like objtool runs and will slow down the build. It18721872 does significantly reduce the number of ENDBR instructions in the
···2525#include <asm/cpu.h>2626#include <asm/mmu_context.h>2727#include <asm/cpu_device_id.h>2828+#include <asm/microcode.h>28292930#ifdef CONFIG_X86_323031__visible unsigned long saved_context_ebx;···263262 x86_platform.restore_sched_clock_state();264263 mtrr_bp_restore();265264 perf_restore_debug_store();266266- msr_restore_context(ctxt);267265268266 c = &cpu_data(smp_processor_id());269267 if (cpu_has(c, X86_FEATURE_MSR_IA32_FEAT_CTL))270268 init_ia32_feat_ctl(c);269269+270270+ microcode_bsp_resume();271271+272272+ /*273273+ * This needs to happen after the microcode has been updated upon resume274274+ * because some of the MSRs are "emulated" in microcode.275275+ */276276+ msr_restore_context(ctxt);271277}272278273279/* Needed by apm.c */
···2525 * hit it), 'max' is the address space maximum (and we return2626 * -EFAULT if we hit it).2727 */2828-static inline long do_strncpy_from_user(char *dst, const char __user *src,2828+static __always_inline long do_strncpy_from_user(char *dst, const char __user *src,2929 unsigned long count, unsigned long max)3030{3131 const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;
+1-1
lib/strnlen_user.c
···2020 * if it fits in a aligned 'long'. The caller needs to check2121 * the return value against "> max".2222 */2323-static inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max)2323+static __always_inline long do_strnlen_user(const char __user *src, unsigned long count, unsigned long max)2424{2525 const struct word_at_a_time constants = WORD_AT_A_TIME_CONSTANTS;2626 unsigned long align, res = 0;