1. Jan 29, 2024
    • Qiuxu Zhuo's avatar
      x86/lib: Revert to _ASM_EXTABLE_UA() for {get,put}_user() fixups · 8eed4e00
      Qiuxu Zhuo authored
      During memory error injection test on kernels >= v6.4, the kernel panics
      like below. However, this issue couldn't be reproduced on kernels <= v6.3.
      
        mce: [Hardware Error]: CPU 296: Machine Check Exception: f Bank 1: bd80000000100134
        mce: [Hardware Error]: RIP 10:<ffffffff821b9776> {__get_user_nocheck_4+0x6/0x20}
        mce: [Hardware Error]: TSC 411a93533ed ADDR 346a8730040 MISC 86
        mce: [Hardware Error]: PROCESSOR 0:a06d0 TIME 1706000767 SOCKET 1 APIC 211 microcode 80001490
        mce: [Hardware Error]: Run the above through 'mcelog --ascii'
        mce: [Hardware Error]: Machine check: Data load in unrecoverable area of kernel
        Kernel panic - not syncing: Fatal local machine check
      
      The MCA code can recover from an in-kernel #MC if the fixup type is
      EX_TYPE_UACCESS, explicitly indicating that the kernel is attempting to
      access userspace memory. However, if the fixup type is EX_TYPE_DEFAULT
      the only thing that is raised for an in-kernel #MC is a panic.
      
      ex_handler_uaccess() would warn if users gave a non-canonical addresses
      (with bit 63 clear) to {get, put}_user(), which was unexpected.
      
      Therefore, commit
      
        b19b74bc ("x86/mm: Rework address range check in get_user() and put_user()")
      
      replaced _ASM_EXTABLE_UA() with _ASM_EXTABLE() for {get, put}_user()
      fixups. However, the new fixup type EX_TYPE_DEFAULT results in a panic.
      
      Commit
      
        6014bc27 ("x86-64: make access_ok() independent of LAM")
      
      added the check gp_fault_address_ok() right before the WARN_ONCE() in
      ex_handler_uaccess() to not warn about non-canonical user addresses due
      to LAM.
      
      With that in place, revert back to _ASM_EXTABLE_UA() for {get,put}_user()
      exception fixups in order to be able to handle in-kernel MCEs correctly
      again.
      
        [ bp: Massage commit message. ]
      
      Fixes: b19b74bc
      
       ("x86/mm: Rework address range check in get_user() and put_user()")
      Signed-off-by: default avatarQiuxu Zhuo <qiuxu.zhuo@intel.com>
      Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
      Reviewed-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: <stable@kernel.org>
      Link: https://lore.kernel.org/r/20240129063842.61584-1-qiuxu.zhuo@intel.com
      8eed4e00
    • Linus Torvalds's avatar
      Linux 6.8-rc2 · 41bccc98
      Linus Torvalds authored
      41bccc98
    • Linus Torvalds's avatar
      Merge tag 'cxl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · 3eb5ca85
      Linus Torvalds authored
      Pull cxl fixes from Dan Williams:
       "A build regression fix, a device compatibility fix, and an original
        bug preventing creation of large (16 device) interleave sets:
      
         - Fix unit test build regression fallout from global
           "missing-prototypes" change
      
         - Fix compatibility with devices that do not support interrupts
      
         - Fix overflow when calculating the capacity of large interleave sets"
      
      * tag 'cxl-fixes-6.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
        cxl/region:Fix overflow issue in alloc_hpa()
        cxl/pci: Skip irq features if MSI/MSI-X are not supported
        tools/testing/nvdimm: Disable "missing prototypes / declarations" warnings
        tools/testing/cxl: Disable "missing prototypes / declarations" warnings
      3eb5ca85
    • Linus Torvalds's avatar
      Merge tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 4854cf9c
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fix boot issue on single core Lantiq Danube devices
      
       - fix boot issue on Loongson64 platforms
      
       - fix improper FPU setup
      
       - fix missing prototypes issues
      
      * tag 'mips-fixes_6.8_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        mips: Call lose_fpu(0) before initializing fcr31 in mips_set_personality_nan
        MIPS: loongson64: set nid for reserved memblock region
        Revert "MIPS: loongson64: set nid for reserved memblock region"
        MIPS: lantiq: register smp_ops on non-smp platforms
        MIPS: loongson64: set nid for reserved memblock region
        MIPS: reserve exception vector space ONLY ONCE
        MIPS: BCM63XX: Fix missing prototypes
        MIPS: sgi-ip32: Fix missing prototypes
        MIPS: sgi-ip30: Fix missing prototypes
        MIPS: fw arc: Fix missing prototypes
        MIPS: sgi-ip27: Fix missing prototypes
        MIPS: Alchemy: Fix missing prototypes
        MIPS: Cobalt: Fix missing prototypes
      4854cf9c
    • Linus Torvalds's avatar
      Merge tag 'locking_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 648f575d
      Linus Torvalds authored
      Pull locking fix from Borislav Petkov:
      
       - Prevent an inconsistent futex operation leading to stale state
         exposure
      
      * tag 'locking_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Prevent the reuse of stale pi_state
      648f575d
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0e4363ac
      Linus Torvalds authored
      Pull irq fix from Borislav Petkov:
      
       - Initialize the resend node of each IRQ descriptor, not only the first
         one
      
      * tag 'irq_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        genirq: Initialize resend_node hlist for all interrupt descriptors
      0e4363ac
    • Linus Torvalds's avatar
      Merge tag 'timers_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 90db544e
      Linus Torvalds authored
      Pull timer fixes from Borislav Petkov:
      
       - Preserve the number of idle calls and sleep entries across CPU
         hotplug events in order to be able to compute correct averages
      
       - Limit the duration of the clocksource watchdog checking interval as
         too long intervals lead to wrongly marking the TSC as unstable
      
      * tag 'timers_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick/sched: Preserve number of idle sleeps across CPU hotplug events
        clocksource: Skip watchdog check for large watchdog intervals
      90db544e
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9d451912
      Linus Torvalds authored
      Pull x86 fixes from Borislav Petkov:
      
       - Make sure 32-bit syscall registers are properly sign-extended
      
       - Add detection for AMD's Zen5 generation CPUs and Intel's Clearwater
         Forest CPU model number
      
       - Make a stub function export non-GPL because it is part of the
         paravirt alternatives and that can be used by non-GPL code
      
      * tag 'x86_urgent_for_v6.8_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/CPU/AMD: Add more models to X86_FEATURE_ZEN5
        x86/entry/ia32: Ensure s32 is sign extended to s64
        x86/cpu: Add model number for Intel Clearwater Forest processor
        x86/CPU/AMD: Add X86_FEATURE_ZEN5
        x86/paravirt: Make BUG_func() usable by non-GPL modules
      9d451912
    • Linus Torvalds's avatar
      Merge tag 'fixes-2024-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock · a08ebda9
      Linus Torvalds authored
      Pull memblock fix from Mike Rapoport:
       "Fix crash when reserved memory is not added to memory.
      
        When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, the initialization
        of reserved pages may cause access of NODE_DATA() with invalid nid and
        crash.
      
        Add a fall back to early_pfn_to_nid() in memmap_init_reserved_pages()
        to ensure a valid node id is always passed to init_reserved_page()"
      
      * tag 'fixes-2024-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
        memblock: fix crash when reserved memory is not added to memory
      a08ebda9
  2. Jan 28, 2024
  3. Jan 27, 2024