1. 09 Feb, 2023 1 commit
  2. 07 Feb, 2023 3 commits
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 0983f6bf
      Linus Torvalds authored
      Pull devicetree fixes from Rob Herring:
      
       - Fix handling of multiple OF framebuffer devices
      
       - Fix booting on Socionext Synquacer with bad 'dma-ranges' entries
      
       - Add DT binding .yamllint to .gitignore
      
      * tag 'devicetree-fixes-for-6.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: interrupt-controller: arm,gic-v3: Fix typo in description of msi-controller property
        dt-bindings: Fix .gitignore
        of/address: Return an error when no valid dma-ranges are found
        of: Make OF framebuffer device names unique
      0983f6bf
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 513c1a3d
      Linus Torvalds authored
      Pull tracing fix from Steven Rostedt:
       "Fix regression in poll() and select()
      
        With the fix that made poll() and select() block if read would block
        caused a slight regression in rasdaemon, as it needed that kind of
        behavior. Add a way to make that behavior come back by writing zero
        into the 'buffer_percentage', which means to never block on read"
      
      * tag 'trace-v6.2-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Fix poll() and select() do not work on per_cpu trace_pipe and trace_pipe_raw
      513c1a3d
    • ZhaoLong Wang's avatar
      cifs: Fix use-after-free in rdata->read_into_pages() · aa5465ae
      ZhaoLong Wang authored
      When the network status is unstable, use-after-free may occur when
      read data from the server.
      
        BUG: KASAN: use-after-free in readpages_fill_pages+0x14c/0x7e0
      
        Call Trace:
         <TASK>
         dump_stack_lvl+0x38/0x4c
         print_report+0x16f/0x4a6
         kasan_report+0xb7/0x130
         readpages_fill_pages+0x14c/0x7e0
         cifs_readv_receive+0x46d/0xa40
         cifs_demultiplex_thread+0x121c/0x1490
         kthread+0x16b/0x1a0
         ret_from_fork+0x2c/0x50
         </TASK>
      
        Allocated by task 2535:
         kasan_save_stack+0x22/0x50
         kasan_set_track+0x25/0x30
         __kasan_kmalloc+0x82/0x90
         cifs_readdata_direct_alloc+0x2c/0x110
         cifs_readdata_alloc+0x2d/0x60
         cifs_readahead+0x393/0xfe0
         read_pages+0x12f/0x470
         page_cache_ra_unbounded+0x1b1/0x240
         filemap_get_pages+0x1c8/0x9a0
         filemap_read+0x1c0/0x540
         cifs_strict_readv+0x21b/0x240
         vfs_read+0x395/0x4b0
         ksys_read+0xb8/0x150
         do_syscall_64+0x3f/0x90
         entry_SYSCALL_64_after_hwframe+0x72/0xdc
      
        Freed by task 79:
         kasan_save_stack+0x22/0x50
         kasan_set_track+0x25/0x30
         kasan_save_free_info+0x2e/0x50
         __kasan_slab_free+0x10e/0x1a0
         __kmem_cache_free+0x7a/0x1a0
         cifs_readdata_release+0x49/0x60
         process_one_work+0x46c/0x760
         worker_thread+0x2a4/0x6f0
         kthread+0x16b/0x1a0
         ret_from_fork+0x2c/0x50
      
        Last potentially related work creation:
         kasan_save_stack+0x22/0x50
         __kasan_record_aux_stack+0x95/0xb0
         insert_work+0x2b/0x130
         __queue_work+0x1fe/0x660
         queue_work_on+0x4b/0x60
         smb2_readv_callback+0x396/0x800
         cifs_abort_connection+0x474/0x6a0
         cifs_reconnect+0x5cb/0xa50
         cifs_readv_from_socket.cold+0x22/0x6c
         cifs_read_page_from_socket+0xc1/0x100
         readpages_fill_pages.cold+0x2f/0x46
         cifs_readv_receive+0x46d/0xa40
         cifs_demultiplex_thread+0x121c/0x1490
         kthread+0x16b/0x1a0
         ret_from_fork+0x2c/0x50
      
      The following function calls will cause UAF of the rdata pointer.
      
      readpages_fill_pages
       cifs_read_page_from_socket
        cifs_readv_from_socket
         cifs_reconnect
          __cifs_reconnect
           cifs_abort_connection
            mid->callback() --> smb2_readv_callback
             queue_work(&rdata->work)  # if the worker completes first,
                                       # the rdata is freed
                cifs_readv_complete
                  kref_put
                    cifs_readdata_release
                      kfree(rdata)
       return rdata->...               # UAF in readpages_fill_pages()
      
      Similarly, this problem also occurs in the uncache_fill_pages().
      
      Fix this by adjusts the order of condition judgment in the return
      statement.
      Signed-off-by: default avatarZhaoLong Wang <wangzhaolong1@huawei.com>
      Cc: stable@vger.kernel.org
      Acked-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      aa5465ae
  3. 06 Feb, 2023 5 commits
    • Linus Torvalds's avatar
      Merge tag 'cgroup-for-6.2-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup · 05ecb680
      Linus Torvalds authored
      Pull cgroup fixes from Tejun Heo:
       "During the v6.2 cycle, there were a series of changes to task cpu
        affinity handling which fixed cpuset inadvertently clobbering
        user-configured affinity masks. Unfortunately, they broke the affinity
        handling on hybrid heterogeneous CPUs which have cores that can
        execute both 64 and 32bit along with cores that can only execute 32bit
        code.
      
        This contains two fix patches for the above issue. While reverting the
        changes that caused the regression is definitely an option, the
        origial patches do improve how cpuset behave signficantly in some
        cases and the fixes seem fairly safe, so I think it'd be better to try
        to fix them first"
      
      * tag 'cgroup-for-6.2-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
        cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task
        cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks
      05ecb680
    • Linus Torvalds's avatar
      Merge tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · 66fcf74e
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - explicitly initialize zlib work memory to fix a KCSAN warning
      
       - limit number of send clones by maximum memory allocated
      
       - limit device size extent in case it device shrink races with chunk
         allocation
      
       - raid56 fixes:
           - fix copy&paste error in RAID6 stripe recovery
           - make error bitmap update atomic
      
      * tag 'for-6.2-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: raid56: make error_bitmap update atomic
        btrfs: send: limit number of clones and allocated memory size
        btrfs: zlib: zero-initialize zlib workspace
        btrfs: limit device extents to the device size
        btrfs: raid56: fix stripes if vertical errors are found
      66fcf74e
    • Will Deacon's avatar
      cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task · 7a2127e6
      Will Deacon authored
      set_cpus_allowed_ptr() will fail with -EINVAL if the requested
      affinity mask is not a subset of the task_cpu_possible_mask() for the
      task being updated. Consequently, on a heterogeneous system with cpusets
      spanning the different CPU types, updates to the cgroup hierarchy can
      silently fail to update task affinities when the effective affinity
      mask for the cpuset is expanded.
      
      For example, consider an arm64 system with 4 CPUs, where CPUs 2-3 are
      the only cores capable of executing 32-bit tasks. Attaching a 32-bit
      task to a cpuset containing CPUs 0-2 will correctly affine the task to
      CPU 2. Extending the cpuset to CPUs 0-3, however, will fail to extend
      the affinity mask of the 32-bit task because update_tasks_cpumask() will
      pass the full 0-3 mask to set_cpus_allowed_ptr().
      
      Extend update_tasks_cpumask() to take a temporary 'cpumask' paramater
      and use it to mask the 'effective_cpus' mask with the possible mask for
      each task being updated.
      
      Fixes: 431c69fa ("cpuset: Honour task_cpu_possible_mask() in guarantee_online_cpus()")
      Signed-off-by: default avatarWill Deacon <will@kernel.org>
      Acked-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      7a2127e6
    • Waiman Long's avatar
      cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks · 3fb906e7
      Waiman Long authored
      Since commit 8f9ea86f ("sched: Always preserve the user
      requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling
      __sched_setaffinity() unconditionally. This helps to expose a bug in
      the current cpuset hotplug code where the cpumasks of the tasks in
      the top cpuset are not updated at all when some CPUs become online or
      offline. It is likely caused by the fact that some of the tasks in the
      top cpuset, like percpu kthreads, cannot have their cpu affinity changed.
      
      One way to reproduce this as suggested by Peter is:
       - boot machine
       - offline all CPUs except one
       - taskset -p ffffffff $$
       - online all CPUs
      
      Fix this by allowing cpuset_cpus_allowed() to return a wider mask that
      includes offline CPUs for those tasks that are in the top cpuset. For
      tasks not in the top cpuset, the old rule applies and only online CPUs
      will be returned in the mask since hotplug events will update their
      cpumasks accordingly.
      
      Fixes: 8f9ea86f ("sched: Always preserve the user requested cpumask")
      Reported-by: default avatarWill Deacon <will@kernel.org>
      Originally-from: Peter Zijlstra (Intel) <peterz@infradead.org>
      Tested-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      3fb906e7
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · d2d11f34
      Linus Torvalds authored
      Pull ELF fix from Al Viro:
       "One of the many equivalent build warning fixes for !CONFIG_ELF_CORE
        configs. Geert's is the earliest one I've been able to find"
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        coredump: Move dump_emit_page() to kill unused warning
      d2d11f34
  4. 05 Feb, 2023 8 commits
    • Linus Torvalds's avatar
      Linux 6.2-rc7 · 4ec5183e
      Linus Torvalds authored
      4ec5183e
    • Linus Torvalds's avatar
      Merge tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · c608f6b5
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes that resolve some reported problems.
        These include:
      
         - gadget driver fixes
      
         - dwc3 driver fix
      
         - typec driver fix
      
         - MAINTAINERS file update.
      
        All of these have been in linux-next with no reported problems"
      
      * tag 'usb-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: typec: ucsi: Don't attempt to resume the ports before they exist
        usb: gadget: udc: do not clear gadget driver.bus
        usb: gadget: f_uac2: Fix incorrect increment of bNumEndpoints
        usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait
        usb: dwc3: qcom: enable vbus override when in OTG dr-mode
        MAINTAINERS: Add myself as UVC Gadget Maintainer
      c608f6b5
    • Linus Torvalds's avatar
      Merge tag 'tty-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · dc0ce181
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       "Here are some small serial and vt fixes. These include:
      
         - 8250 driver fixes relating to dma issues
      
         - stm32 serial driver fix for threaded irqs
      
         - vc_screen bugfix for reported problems.
      
        All have been in linux-next for a while with no reported problems"
      
      * tag 'tty-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF
        serial: 8250_dma: Fix DMA Rx rearm race
        serial: 8250_dma: Fix DMA Rx completion race
        serial: stm32: Merge hard IRQ and threaded IRQ handling into single IRQ handler
      dc0ce181
    • Linus Torvalds's avatar
      Merge tag 'char-misc-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · d3feaff4
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are a number of small char/misc/whatever driver fixes. They
        include:
      
         - IIO driver fixes for some reported problems
      
         - nvmem driver fixes
      
         - fpga driver fixes
      
         - debugfs memory leak fix in the hv_balloon and irqdomain code
           (irqdomain change was acked by the maintainer)
      
        All have been in linux-next with no reported problems"
      
      * tag 'char-misc-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (33 commits)
        kernel/irq/irqdomain.c: fix memory leak with using debugfs_lookup()
        HV: hv_balloon: fix memory leak with using debugfs_lookup()
        nvmem: qcom-spmi-sdam: fix module autoloading
        nvmem: core: fix return value
        nvmem: core: fix cell removal on error
        nvmem: core: fix device node refcounting
        nvmem: core: fix registration vs use race
        nvmem: core: fix cleanup after dev_set_name()
        nvmem: core: remove nvmem_config wp_gpio
        nvmem: core: initialise nvmem->id early
        nvmem: sunxi_sid: Always use 32-bit MMIO reads
        nvmem: brcm_nvram: Add check for kzalloc
        iio: imu: fxos8700: fix MAGN sensor scale and unit
        iio: imu: fxos8700: remove definition FXOS8700_CTRL_ODR_MIN
        iio: imu: fxos8700: fix failed initialization ODR mode assignment
        iio: imu: fxos8700: fix incorrect ODR mode readback
        iio: light: cm32181: Fix PM support on system with 2 I2C resources
        iio: hid: fix the retval in gyro_3d_capture_sample
        iio: hid: fix the retval in accel_3d_capture_sample
        iio: imu: st_lsm6dsx: fix build when CONFIG_IIO_TRIGGERED_BUFFER=m
        ...
      d3feaff4
    • Linus Torvalds's avatar
      Merge tag 'fbdev-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev · 870c3a9a
      Linus Torvalds authored
      Pull fbdev fixes from Helge Deller:
      
       - fix fbcon to prevent fonts bigger than 32x32 pixels to avoid
         overflows reported by syzbot
      
       - switch omapfb to use kstrtobool()
      
       - switch some fbdev drivers to use the backlight helpers
      
      * tag 'fbdev-for-6.2-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
        fbcon: Check font dimension limits
        fbdev: omapfb: Use kstrtobool() instead of strtobool()
        fbdev: fbmon: fix function name in kernel-doc
        fbdev: atmel_lcdfb: Rework backlight status updates
        fbdev: riva: Use backlight helper
        fbdev: omapfb: panel-dsi-cm: Use backlight helper
        fbdev: nvidia: Use backlight helper
        fbdev: mx3fb: Use backlight helper
        fbdev: radeon: Use backlight helper
        fbdev: atyfb: Use backlight helper
        fbdev: aty128fb: Use backlight helper
      870c3a9a
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9e482602
      Linus Torvalds authored
      Pull x86 fix from Borislav Petkov:
      
       - Prevent the compiler from reordering accesses to debug regs which
         could cause a #VC exception in SEV-ES guests at the wrong place in
         the NMI handling path
      
      * tag 'x86_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/debug: Fix stack recursion caused by wrongly ordered DR7 accesses
      9e482602
    • Linus Torvalds's avatar
      Merge tag 'perf_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de506eec
      Linus Torvalds authored
      Pull perf fix from Borislav Petkov:
      
       - Lock the proper critical section when dealing with perf event context
      
      * tag 'perf_urgent_for_v6.2_rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf: Fix perf_event_pmu_context serialization
      de506eec
    • Linus Torvalds's avatar
      Merge tag 'powerpc-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 837c07cf
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "It's a bit of a big batch for rc6, but just because I didn't send any
        fixes the last week or two while I was on vacation, next week should
        be quieter:
      
         - Fix a few objtool warnings since we recently enabled objtool.
      
         - Fix a deadlock with the hash MMU vs perf record.
      
         - Fix perf profiling of asynchronous interrupt handlers.
      
         - Revert the IMC PMU nest_init_lock to being a mutex.
      
         - Two commits fixing problems with the kexec_file FDT size
           estimation.
      
         - Two commits fixing problems with strict RWX vs kernels running at
           non-zero.
      
         - Reconnect tlb_flush() to hash__tlb_flush()
      
        Thanks to Kajol Jain, Nicholas Piggin, Sachin Sant Sathvika Vasireddy,
        and Sourabh Jain"
      
      * tag 'powerpc-6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Reconnect tlb_flush() to hash__tlb_flush()
        powerpc/kexec_file: Count hot-pluggable memory in FDT estimate
        powerpc/64s/radix: Fix RWX mapping with relocated kernel
        powerpc/64s/radix: Fix crash with unaligned relocated kernel
        powerpc/kexec_file: Fix division by zero in extra size estimation
        powerpc/imc-pmu: Revert nest_init_lock to being a mutex
        powerpc/64: Fix perf profiling asynchronous interrupt handlers
        powerpc/64s: Fix local irq disable when PMIs are disabled
        powerpc/kvm: Fix unannotated intra-function call warning
        powerpc/85xx: Fix unannotated intra-function call warning
      837c07cf
  5. 04 Feb, 2023 7 commits
  6. 03 Feb, 2023 13 commits
  7. 02 Feb, 2023 3 commits