Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Nov 11, 2022
    • Feng Tang's avatar
      mm/slub: extend redzone check to extra allocated kmalloc space than requested · 946fa0db
      Feng Tang authored
      
      kmalloc will round up the request size to a fixed size (mostly power
      of 2), so there could be a extra space than what is requested, whose
      size is the actual buffer size minus original request size.
      
      To better detect out of bound access or abuse of this space, add
      redzone sanity check for it.
      
      In current kernel, some kmalloc user already knows the existence of
      the space and utilizes it after calling 'ksize()' to know the real
      size of the allocated buffer. So we skip the sanity check for objects
      which have been called with ksize(), as treating them as legitimate
      users. Kees Cook is working on sanitizing all these user cases,
      by using kmalloc_size_roundup() to avoid ambiguous usages. And after
      this is done, this special handling for ksize() can be removed.
      
      In some cases, the free pointer could be saved inside the latter
      part of object data area, which may overlap the redzone part(for
      small sizes of kmalloc objects). As suggested by Hyeonggon Yoo,
      force the free pointer to be in meta data area when kmalloc redzone
      debug is enabled, to make all kmalloc objects covered by redzone
      check.
      
      Suggested-by: default avatarVlastimil Babka <vbabka@suse.cz>
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Acked-by: default avatarHyeonggon Yoo <42.hyeyoo@gmail.com>
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      946fa0db
  2. Nov 10, 2022
  3. Nov 07, 2022
  4. Nov 06, 2022
    • Kees Cook's avatar
      mm/slab_common: Restore passing "caller" for tracing · 32868715
      Kees Cook authored
      The "caller" argument was accidentally being ignored in a few places
      that were recently refactored. Restore these "caller" arguments, instead
      of _RET_IP_.
      
      Fixes: 11e9734b
      
       ("mm/slab_common: unify NUMA and UMA version of tracepoints")
      Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Christoph Lameter <cl@linux.com>
      Cc: Pekka Enberg <penberg@kernel.org>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Roman Gushchin <roman.gushchin@linux.dev>
      Cc: linux-mm@kvack.org
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarHyeonggon Yoo <42.hyeyoo@gmail.com>
      Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
      32868715
  5. Nov 04, 2022
  6. Nov 03, 2022
  7. Oct 23, 2022
  8. Oct 22, 2022
  9. Oct 21, 2022
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 4da34b7d
      Linus Torvalds authored
      Pull thermal control fix from Rafael Wysocki:
       "This fixes the control CPU selection in the intel_powerclamp thermal
        driver"
      
      * tag 'thermal-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel_powerclamp: Use first online CPU as control_cpu
      4da34b7d
    • Linus Torvalds's avatar
      Merge tag 'pm-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 20df0961
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix some issues and clean up code in ARM cpufreq drivers.
      
        Specifics:
      
         - Fix module loading in the Tegra124 cpufreq driver (Jon Hunter)
      
         - Fix memory leak and update to read-only region in the qcom cpufreq
           driver (Fabien Parent)
      
         - Miscellaneous minor cleanups to cpufreq drivers (Fabien Parent,
           Yang Yingliang)"
      
      * tag 'pm-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: sun50i: Switch to use dev_err_probe() helper
        cpufreq: qcom-nvmem: Switch to use dev_err_probe() helper
        cpufreq: imx6q: Switch to use dev_err_probe() helper
        cpufreq: dt: Switch to use dev_err_probe() helper
        cpufreq: qcom: remove unused parameter in function definition
        cpufreq: qcom: fix writes in read-only memory region
        cpufreq: qcom: fix memory leak in error path
        cpufreq: tegra194: Fix module loading
      20df0961
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9d6e681d
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix issues introduced during this merge window (ACPI/PCI, device
        enumeration and documentation) and some other ones found recently.
      
        Specifics:
      
         - Add missing device reference counting to acpi_get_pci_dev() after
           changing it recently (Rafael Wysocki)
      
         - Fix resource list walk in acpi_dma_get_range() (Robin Murphy)
      
         - Add IRQ override quirk for LENOVO IdeaPad and extend the IRQ
           override warning message (Jiri Slaby)
      
         - Fix integer overflow in ghes_estatus_pool_init() (Ashish Kalra)
      
         - Fix multiple error records handling in one of the ACPI extlog
           driver code paths (Tony Luck)
      
         - Prune DSDT override documentation from index after dropping it
           (Bagas Sanjaya)"
      
      * tag 'acpi-6.1-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: scan: Fix DMA range assignment
        ACPI: PCI: Fix device reference counting in acpi_get_pci_dev()
        ACPI: resource: note more about IRQ override
        ACPI: resource: do IRQ override on LENOVO IdeaPad
        ACPI: extlog: Handle multiple records
        ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init()
        Documentation: ACPI: Prune DSDT override documentation from index
      9d6e681d
    • Linus Torvalds's avatar
      Merge tag 'efi-fixes-for-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · ec4cf5db
      Linus Torvalds authored
      Pull EFI fixes from Ard Biesheuvel:
      
       - fixes for the EFI variable store refactor that landed in v6.0
      
       - fixes for issues that were introduced during the merge window
      
       - back out some changes related to EFI zboot signing - we'll add a
         better solution for this during the next cycle
      
      * tag 'efi-fixes-for-v6.1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi: runtime: Don't assume virtual mappings are missing if VA == PA == 0
        efi: libstub: Fix incorrect payload size in zboot header
        efi: libstub: Give efi_main() asmlinkage qualification
        efi: efivars: Fix variable writes without query_variable_store()
        efi: ssdt: Don't free memory if ACPI table was loaded successfully
        efi: libstub: Remove zboot signing from build options
      ec4cf5db
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · e97eace6
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
       "Intel VT-d fixes:
      
         - Fix a lockdep splat issue in intel_iommu_init()
      
         - Allow NVS regions to pass RMRR check
      
         - Domain cleanup in error path"
      
      * tag 'iommu-fixes-v6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Clean up si_domain in the init_dmars() error path
        iommu/vt-d: Allow NVS regions in arch_rmrr_sanity_check()
        iommu/vt-d: Use rcu_lock in get_resv_regions
        iommu: Add gfp parameter to iommu_alloc_resv_region
      e97eace6
    • Linus Torvalds's avatar
      Merge tag 'for-linus-2022102101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 334fe5d3
      Linus Torvalds authored
      Pull HID fixes from Benjamin Tissoires:
      
       - a 12 year old bug fix for the Apple Magic Trackpad v1 (José Expósito)
      
       - a fix for a potential crash on removal of the Playstation controllers
         (Roderick Colenbrander)
      
       - a few new device IDs and device-specific quirks, most notably support
         of the new Playstation DualSense Edge controller
      
      * tag 'for-linus-2022102101' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: lenovo: Make array tp10ubkbd_led static const
        HID: saitek: add madcatz variant of MMO7 mouse device ID
        HID: playstation: support updated DualSense rumble mode.
        HID: playstation: add initial DualSense Edge controller support
        HID: playstation: stop DualSense output work on remove.
        HID: magicmouse: Do not set BTN_MOUSE on double report
      334fe5d3
    • Linus Torvalds's avatar
      Merge tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · bd8e9634
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
      
       - memory leak fixes
      
       - fixes for directory leases, including an important one which fixes a
         problem noticed by git functional tests
      
       - fixes relating to missing free_xid calls (helpful for
         tracing/debugging of entry/exit into cifs.ko)
      
       - a multichannel fix
      
       - a small cleanup fix (use of list_move instead of list_del/list_add)
      
      * tag '6.1-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: update internal module number
        cifs: fix memory leaks in session setup
        cifs: drop the lease for cached directories on rmdir or rename
        smb3: interface count displayed incorrectly
        cifs: Fix memory leak when build ntlmssp negotiate blob failed
        cifs: set rc to -ENOENT if we can not get a dentry for the cached dir
        cifs: use LIST_HEAD() and list_move() to simplify code
        cifs: Fix xid leak in cifs_get_file_info_unix()
        cifs: Fix xid leak in cifs_ses_add_channel()
        cifs: Fix xid leak in cifs_flock()
        cifs: Fix xid leak in cifs_copy_file_range()
        cifs: Fix xid leak in cifs_create()
      bd8e9634
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · 022c028f
      Linus Torvalds authored
      Pull nfsd fixes from Chuck Lever:
       "Fixes for patches merged in v6.1"
      
      * tag 'nfsd-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        nfsd: ensure we always call fh_verify_error tracepoint
        NFSD: unregister shrinker when nfsd_init_net() fails
      022c028f
    • Chang S. Bae's avatar
      x86/fpu: Fix copy_xstate_to_uabi() to copy init states correctly · 471f0aa7
      Chang S. Bae authored
      When an extended state component is not present in fpstate, but in init
      state, the function copies from init_fpstate via copy_feature().
      
      But, dynamic states are not present in init_fpstate because of all-zeros
      init states. Then retrieving them from init_fpstate will explode like this:
      
       BUG: kernel NULL pointer dereference, address: 0000000000000000
       ...
       RIP: 0010:memcpy_erms+0x6/0x10
        ? __copy_xstate_to_uabi_buf+0x381/0x870
        fpu_copy_guest_fpstate_to_uabi+0x28/0x80
        kvm_arch_vcpu_ioctl+0x14c/0x1460 [kvm]
        ? __this_cpu_preempt_check+0x13/0x20
        ? vmx_vcpu_put+0x2e/0x260 [kvm_intel]
        kvm_vcpu_ioctl+0xea/0x6b0 [kvm]
        ? kvm_vcpu_ioctl+0xea/0x6b0 [kvm]
        ? __fget_light+0xd4/0x130
        __x64_sys_ioctl+0xe3/0x910
        ? debug_smp_processor_id+0x17/0x20
        ? fpregs_assert_state_consistent+0x27/0x50
        do_syscall_64+0x3f/0x90
        entry_SYSCALL_64_after_hwframe+0x63/0xcd
      
      Adjust the 'mask' to zero out the userspace buffer for the features that
      are not available both from fpstate and from init_fpstate.
      
      The dynamic features depend on the compacted XSAVE format. Ensure it is
      enabled before reading XCOMP_BV in init_fpstate.
      
      Fixes: 2308ee57
      
       ("x86/fpu/amx: Enable the AMX feature in 64-bit mode")
      Reported-by: default avatarYuan Yao <yuan.yao@intel.com>
      Suggested-by: default avatarDave Hansen <dave.hansen@intel.com>
      Signed-off-by: default avatarChang S. Bae <chang.seok.bae@intel.com>
      Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
      Tested-by: default avatarYuan Yao <yuan.yao@intel.com>
      Link: https://lore.kernel.org/lkml/BYAPR11MB3717EDEF2351C958F2C86EED95259@BYAPR11MB3717.namprd11.prod.outlook.com/
      Link: https://lkml.kernel.org/r/20221021185844.13472-1-chang.seok.bae@intel.com
      471f0aa7