Skip to content
  1. Mar 25, 2023
  2. Mar 24, 2023
  3. Mar 23, 2023
  4. Mar 18, 2023
  5. Mar 17, 2023
    • Linus Torvalds's avatar
      Merge tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 38e04b3e
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Seven cifs/smb3 client fixes, all also for stable:
      
         - four DFS fixes
      
         - multichannel reconnect fix
      
         - fix smb1 stats for cancel command
      
         - fix for set file size error path"
      
      * tag '6.3-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: use DFS root session instead of tcon ses
        cifs: return DFS root session id in DebugData
        cifs: fix use-after-free bug in refresh_cache_worker()
        cifs: set DFS root session in cifs_get_smb_ses()
        cifs: generate signkey for the channel that's reconnecting
        cifs: Fix smb2_set_path_size()
        cifs: Move the in_send statistic to __smb_send_rqst()
      38e04b3e
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0ddc84d2
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "ARM64:
      
         - Address a rather annoying bug w.r.t. guest timer offsetting. The
           synchronization of timer offsets between vCPUs was broken, leading
           to inconsistent timer reads within the VM.
      
        x86:
      
         - New tests for the slow path of the EVTCHNOP_send Xen hypercall
      
         - Add missing nVMX consistency checks for CR0 and CR4
      
         - Fix bug that broke AMD GATag on 512 vCPU machines
      
        Selftests:
      
         - Skip hugetlb tests if huge pages are not available
      
         - Sync KVM exit reasons"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: selftests: Sync KVM exit reasons in selftests
        KVM: selftests: Add macro to generate KVM exit reason strings
        KVM: selftests: Print expected and actual exit reason in KVM exit reason assert
        KVM: selftests: Make vCPU exit reason test assertion common
        KVM: selftests: Add EVTCHNOP_send slow path test to xen_shinfo_test
        KVM: selftests: Use enum for test numbers in xen_shinfo_test
        KVM: selftests: Add helpers to make Xen-style VMCALL/VMMCALL hypercalls
        KVM: selftests: Move the guts of kvm_hypercall() to a separate macro
        KVM: SVM: WARN if GATag generation drops VM or vCPU ID information
        KVM: SVM: Modify AVIC GATag to support max number of 512 vCPUs
        KVM: SVM: Fix a benign off-by-one bug in AVIC physical table mask
        selftests: KVM: skip hugetlb tests if huge pages are not available
        KVM: VMX: Use tabs instead of spaces for indentation
        KVM: VMX: Fix indentation coding style issue
        KVM: nVMX: remove unnecessary #ifdef
        KVM: nVMX: add missing consistency checks for CR0 and CR4
        KVM: arm64: timers: Convert per-vcpu virtual offset to a global value
      0ddc84d2
  6. Mar 16, 2023
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-fixes-6.3-rc3' of... · 9c1bec9c
      Linus Torvalds authored
      Merge tag 'linux-kselftest-fixes-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fixes from Shuah Khan:
       "A fix to amd-pstate test Makefile and a fix to LLVM build for x86 in
        kselftest common lib.mk"
      
      * tag 'linux-kselftest-fixes-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: fix LLVM build for i386 and x86_64
        selftests: amd-pstate: fix TEST_FILES
      9c1bec9c
  7. Mar 15, 2023
    • Paulo Alcantara's avatar
      cifs: use DFS root session instead of tcon ses · 6284e46b
      Paulo Alcantara authored
      
      
      Use DFS root session whenever possible to get new DFS referrals
      otherwise we might end up with an IPC tcon (tcon->ses->tcon_ipc) that
      doesn't respond to them.  It should be safe accessing
      @ses->dfs_root_ses directly in cifs_inval_name_dfs_link_error() as it
      has same lifetime as of @tcon.
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      6284e46b
    • Paulo Alcantara's avatar
      cifs: return DFS root session id in DebugData · f446a630
      Paulo Alcantara authored
      
      
      Return the DFS root session id in /proc/fs/cifs/DebugData to make it
      easier to track which IPC tcon was used to get new DFS referrals for a
      specific connection, and aids in debugging.
      
      A simple output of it would be
      
        Sessions:
        1) Address: 192.168.1.13 Uses: 1 Capability: 0x300067   Session Status: 1
        Security type: RawNTLMSSP  SessionId: 0xd80000000009
        User: 0 Cred User: 0
        DFS root session id: 0x128006c000035
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      f446a630
    • Linus Torvalds's avatar
      sched_getaffinity: don't assume 'cpumask_size()' is fully initialized · 6015b1ac
      Linus Torvalds authored
      
      
      The getaffinity() system call uses 'cpumask_size()' to decide how big
      the CPU mask is - so far so good.  It is indeed the allocation size of a
      cpumask.
      
      But the code also assumes that the whole allocation is initialized
      without actually doing so itself.  That's wrong, because we might have
      fixed-size allocations (making copying and clearing more efficient), but
      not all of it is then necessarily used if 'nr_cpu_ids' is smaller.
      
      Having checked other users of 'cpumask_size()', they all seem to be ok,
      either using it purely for the allocation size, or explicitly zeroing
      the cpumask before using the size in bytes to copy it.
      
      See for example the ublk_ctrl_get_queue_affinity() function that uses
      the proper 'zalloc_cpumask_var()' to make sure that the whole mask is
      cleared, whether the storage is on the stack or if it was an external
      allocation.
      
      Fix this by just zeroing the allocation before using it.  Do the same
      for the compat version of sched_getaffinity(), which had the same logic.
      
      Also, for consistency, make sched_getaffinity() use 'cpumask_bits()' to
      access the bits.  For a cpumask_var_t, it ends up being a pointer to the
      same data either way, but it's just a good idea to treat it like you
      would a 'cpumask_t'.  The compat case already did that.
      
      Reported-by: default avatarRyan Roberts <ryan.roberts@arm.com>
      Link: https://lore.kernel.org/lkml/7d026744-6bd6-6827-0471-b5e8eae0be3f@arm.com/
      Cc: Yury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6015b1ac
    • Paulo Alcantara's avatar
      cifs: fix use-after-free bug in refresh_cache_worker() · 396935de
      Paulo Alcantara authored
      
      
      The UAF bug occurred because we were putting DFS root sessions in
      cifs_umount() while DFS cache refresher was being executed.
      
      Make DFS root sessions have same lifetime as DFS tcons so we can avoid
      the use-after-free bug is DFS cache refresher and other places that
      require IPCs to get new DFS referrals on.  Also, get rid of mount
      group handling in DFS cache as we no longer need it.
      
      This fixes below use-after-free bug catched by KASAN
      
      [ 379.946955] BUG: KASAN: use-after-free in __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.947642] Read of size 8 at addr ffff888018f57030 by task kworker/u4:3/56
      [ 379.948096]
      [ 379.948208] CPU: 0 PID: 56 Comm: kworker/u4:3 Not tainted 6.2.0-rc7-lku #23
      [ 379.948661] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
      rel-1.16.0-0-gd239552-rebuilt.opensuse.org 04/01/2014
      [ 379.949368] Workqueue: cifs-dfscache refresh_cache_worker [cifs]
      [ 379.949942] Call Trace:
      [ 379.950113] <TASK>
      [ 379.950260] dump_stack_lvl+0x50/0x67
      [ 379.950510] print_report+0x16a/0x48e
      [ 379.950759] ? __virt_addr_valid+0xd8/0x160
      [ 379.951040] ? __phys_addr+0x41/0x80
      [ 379.951285] kasan_report+0xdb/0x110
      [ 379.951533] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.952056] ? __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.952585] __refresh_tcon.isra.0+0x10b/0xc10 [cifs]
      [ 379.953096] ? __pfx___refresh_tcon.isra.0+0x10/0x10 [cifs]
      [ 379.953637] ? __pfx___mutex_lock+0x10/0x10
      [ 379.953915] ? lock_release+0xb6/0x720
      [ 379.954167] ? __pfx_lock_acquire+0x10/0x10
      [ 379.954443] ? refresh_cache_worker+0x34e/0x6d0 [cifs]
      [ 379.954960] ? __pfx_wb_workfn+0x10/0x10
      [ 379.955239] refresh_cache_worker+0x4ad/0x6d0 [cifs]
      [ 379.955755] ? __pfx_refresh_cache_worker+0x10/0x10 [cifs]
      [ 379.956323] ? __pfx_lock_acquired+0x10/0x10
      [ 379.956615] ? read_word_at_a_time+0xe/0x20
      [ 379.956898] ? lockdep_hardirqs_on_prepare+0x12/0x220
      [ 379.957235] process_one_work+0x535/0x990
      [ 379.957509] ? __pfx_process_one_work+0x10/0x10
      [ 379.957812] ? lock_acquired+0xb7/0x5f0
      [ 379.958069] ? __list_add_valid+0x37/0xd0
      [ 379.958341] ? __list_add_valid+0x37/0xd0
      [ 379.958611] worker_thread+0x8e/0x630
      [ 379.958861] ? __pfx_worker_thread+0x10/0x10
      [ 379.959148] kthread+0x17d/0x1b0
      [ 379.959369] ? __pfx_kthread+0x10/0x10
      [ 379.959630] ret_from_fork+0x2c/0x50
      [ 379.959879] </TASK>
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      396935de
    • Paulo Alcantara's avatar
      cifs: set DFS root session in cifs_get_smb_ses() · b56bce50
      Paulo Alcantara authored
      
      
      Set the DFS root session pointer earlier when creating a new SMB
      session to prevent racing with smb2_reconnect(), cifs_reconnect_tcon()
      and DFS cache refresher.
      
      Signed-off-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org # 6.2
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      b56bce50
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2023-03-14-16-51' of... · 26e2878b
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull misc fixes from Andrew Morton:
       "Eleven hotfixes.
      
        Four of these are cc:stable and the remainder address post-6.2 issues
        or aren't considered suitable for backporting.
      
        Seven of these fixes are for MM"
      
      * tag 'mm-hotfixes-stable-2023-03-14-16-51' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
        mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
        mm/damon/paddr: fix folio_size() call after folio_put() in damon_pa_young()
        ocfs2: fix data corruption after failed write
        migrate_pages: try migrate in batch asynchronously firstly
        migrate_pages: move split folios processing out of migrate_pages_batch()
        migrate_pages: fix deadlock in batched migration
        .mailmap: add Alexandre Ghiti personal email address
        mailmap: correct Dikshita Agarwal's Qualcomm email address
        mailmap: updates for Jarkko Sakkinen
        mm/userfaultfd: propagate uffd-wp bit when PTE-mapping the huge zeropage
        mm: teach mincore_hugetlb about pte markers
      26e2878b
    • Linus Torvalds's avatar
      Merge tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace · 29db00c2
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
      
       - Do not allow histogram values to have modifies. They can cause a NULL
         pointer dereference if they do.
      
       - Warn if hist_field_name() is passed a NULL. Prevent the NULL pointer
         dereference mentioned above.
      
       - Fix invalid address look up race in lookup_rec()
      
       - Define ftrace_stub_graph conditionally to prevent linker errors
      
       - Always check if RCU is watching at all tracepoint locations
      
      * tag 'trace-v6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
        tracing: Make tracepoint lockdep check actually test something
        ftrace,kcfi: Define ftrace_stub_graph conditionally
        ftrace: Fix invalid address access in lookup_rec() when index is 0
        tracing: Check field value in hist_field_name()
        tracing: Do not let histogram values have some modifiers
      29db00c2
    • Linus Torvalds's avatar
      Merge tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux · ed38ff16
      Linus Torvalds authored
      Pull zstd fixes from Nick Terrell:
       "A small number of fixes for zstd-v1.5.2.
      
        I'm not pulling in zstd-v1.5.4 from upstream this release because it
        didn't have any time to bake in linux-next, but I'm aiming for the
        next update in v6.4"
      
      * tag 'zstd-linus-v6.3-rc3' of https://github.com/terrelln/linux:
        zstd: Fix definition of assert()
        lib: zstd: Backport fix for in-place decompression
        lib: zstd: Fix -Wstringop-overflow warning
      ed38ff16
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux · c0856b7c
      Linus Torvalds authored
      Pull clk fixes from Stephen Boyd:
       "A collection of clk driver fixes, and a couple OF clk patches to fix
        regressions seen in the last few weeks. The fwnode patch broke the
        build for one driver that isn't always compiled, so I waited over the
        weekend to be certain no more build issues came up.
      
         - Mark the firmware node (fwnode) that matches the compatible in
           CLK_OF_DECLARE() as initialized to fix a regression on u8500 SoCs
           after fw_devlink stopped checking parent nodes in
           of_link_to_phandle()
      
         - Remove a couple MODULE_LICENSE macros in non-modules
      
         - Update the maintainers file for Microchip clk drivers
      
         - Use 'select' instead of 'depend on' for the REGMAP config to fix
           Kconfig issues
      
         - Use div_u64() for portable 64-bit division in K210 clk driver"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: Avoid invalid function names in CLK_OF_DECLARE()
        clk: k210: remove an implicit 64-bit division
        MAINTAINERS: add missing clock driver coverage for Microchip FPGAs
        clk: HI655X: select REGMAP instead of depending on it
        kbuild, clk: remove MODULE_LICENSE in non-modules
        kbuild, clk: bcm2835: remove MODULE_LICENSE in non-modules
        clk: Mark a fwnode as initialized when using CLK_OF_DECLARE() macro
      c0856b7c
    • Shyam Prasad N's avatar
      cifs: generate signkey for the channel that's reconnecting · 05ce0448
      Shyam Prasad N authored
      
      
      Before my changes to how multichannel reconnects work, the
      primary channel was always used to do a non-binding session
      setup. With my changes, that is not the case anymore.
      Missed this place where channel at index 0 was forcibly
      updated with the signing key.
      
      Signed-off-by: default avatarShyam Prasad N <sprasad@microsoft.com>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      05ce0448
    • Volker Lendecke's avatar
      cifs: Fix smb2_set_path_size() · 211baef0
      Volker Lendecke authored
      
      
      If cifs_get_writable_path() finds a writable file, smb2_compound_op()
      must use that file's FID and not the COMPOUND_FID.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarVolker Lendecke <vl@samba.org>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@manguebit.com>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      211baef0
    • Steven Rostedt (Google)'s avatar
      tracing: Make tracepoint lockdep check actually test something · c2679254
      Steven Rostedt (Google) authored
      
      
      A while ago where the trace events had the following:
      
         rcu_read_lock_sched_notrace();
         rcu_dereference_sched(...);
         rcu_read_unlock_sched_notrace();
      
      If the tracepoint is enabled, it could trigger RCU issues if called in
      the wrong place. And this warning was only triggered if lockdep was
      enabled. If the tracepoint was never enabled with lockdep, the bug would
      not be caught. To handle this, the above sequence was done when lockdep
      was enabled regardless if the tracepoint was enabled or not (although the
      always enabled code really didn't do anything, it would still trigger a
      warning).
      
      But a lot has changed since that lockdep code was added. One is, that
      sequence no longer triggers any warning. Another is, the tracepoint when
      enabled doesn't even do that sequence anymore.
      
      The main check we care about today is whether RCU is "watching" or not.
      So if lockdep is enabled, always check if rcu_is_watching() which will
      trigger a warning if it is not (tracepoints require RCU to be watching).
      
      Note, that old sequence did add a bit of overhead when lockdep was enabled,
      and with the latest kernel updates, would cause the system to slow down
      enough to trigger kernel "stalled" warnings.
      
      Link: http://lore.kernel.org/lkml/20140806181801.GA4605@redhat.com
      Link: http://lore.kernel.org/lkml/20140807175204.C257CAC5@viggo.jf.intel.com
      Link: https://lore.kernel.org/lkml/20230307184645.521db5c9@gandalf.local.home/
      Link: https://lore.kernel.org/linux-trace-kernel/20230310172856.77406446@gandalf.local.home
      
      Cc: stable@vger.kernel.org
      Cc: Masami Hiramatsu <mhiramat@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Paul E. McKenney" <paulmck@kernel.org>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Joel Fernandes <joel@joelfernandes.org>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarPaul E. McKenney <paulmck@kernel.org>
      Fixes: e6753f23
      
       ("tracepoint: Make rcuidle tracepoint callers use SRCU")
      Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
      c2679254
    • Linus Torvalds's avatar
      Merge tag 'docs-6.3-fixes' of git://git.lwn.net/linux · 4979bf86
      Linus Torvalds authored
      Pull documentation fixes from Jonathan Corbet:
       "A handful of fixes and minor documentation updates"
      
      * tag 'docs-6.3-fixes' of git://git.lwn.net/linux:
        docs: vfio: fix header path
        docs: process: typo fix
        docs/mm: hugetlbfs_reserv: fix a reference to a file that doesn't exist
        docs/mm: Physical Memory: fix a reference to a file that doesn't exist
        docs: rebasing-and-merging: Drop wrong statement about git
        docs: programming-language: add Rust programming language section
        docs: programming-language: remove mention of the Intel compiler
        docs: Correct missing "d_" prefix for dentry_operations member d_weak_revalidate
        sched/doc: supplement CPU capacity with RISC-V
      4979bf86
    • Jiri Pirko's avatar
      docs: vfio: fix header path · d7ba3657
      Jiri Pirko authored
      
      
      The text points to a different header file, fix by changing
      the path to "uapi".
      
      Signed-off-by: default avatarJiri Pirko <jiri@nvidia.com>
      Reviewed-by: default avatarYi Liu <yi.l.liu@intel.com>
      Link: https://lore.kernel.org/r/20230310095857.985814-1-jiri@resnulli.us
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      d7ba3657
    • Xujun Leng's avatar
      docs: process: typo fix · 42da2c00
      Xujun Leng authored
      
      
      In the second paragraph of section "Respond to review comments", there is
      a spelling mistake: "aganst" should be "against".
      
      Signed-off-by: default avatarXujun Leng <lengxujun2007@126.com>
      Link: https://lore.kernel.org/r/20230312071423.3042-1-lengxujun2007@126.com
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      42da2c00
  8. Mar 14, 2023