Skip to content
Permalink
Nikita-Yushche…
Switch branches/tags

Commits on Jan 19, 2022

  1. drivers: irqchip: add irq-type-changer

    Irq type changer is a virtual irqchip useful to support boards that
    change (e.g. invert) interrupt signal between producer and consumer.
    
    Usage example, for Kingfisher extension board for Renesas Gen-3 Soc,
    that has WiFi interrupt delivered over inverting level-shifter:
    
    / {
    	gpio1_25_inverted: inverter {
    		compatible = "linux,irq-type-changer";
    		interrupt-controller;
    		#interrupt-cells = <2>;
    		interrupt-parent = <&gpio1>;
    		interrupts = <25 IRQ_TYPE_EDGE_FALLING>;
    	};
    };
    
    &wlcore {
            interrupt-parent = <&gpio1_25_inverted>;
    	interrupts = <0 IRQ_TYPE_EDGE_RISING>;
    };
    
    Then, wlcore driver observes IRQ_TYPE_EDGE_RISING trigger type and
    configures interrupt output as such. At the same time, gpio-rcar driver
    gets interrupt configured for IRQ_TYPE_EDGE_FALLING.
    
    This version uses hierarchical irq_domain API, and works only with
    parent interrupt domains compatible with that API.
    
    Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
    nikita-yoush authored and intel-lab-lkp committed Jan 19, 2022

Commits on Jan 10, 2022

  1. Merge tag 'irqchip-5.17' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/maz/arm-platforms into irq/core
    
    Pull irqchip updates from Marc Zyngier:
    
     - Fix GICv3 redistributor table reservation with RT across kexec
    
     - Fix GICv4.1 redistributor view of the VPE table across kexec
    
     - Add support for extra interrupts on spear-shirq
    
     - Make obtaining some interrupts optional for the Renesas drivers
    
     - Various cleanups and bug fixes
    
    Link: https://lore.kernel.org/lkml/20220108130807.4109738-1-maz@kernel.org
    Thomas Gleixner committed Jan 10, 2022

Commits on Jan 8, 2022

  1. Merge branch 'linus' into irq/core, to fix conflict

    Conflicts:
    	drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
    
    Signed-off-by: Ingo Molnar <mingo@kernel.org>
    Ingo Molnar committed Jan 8, 2022

Commits on Jan 7, 2022

  1. Merge branch 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/k…

    …ernel/git/tj/cgroup
    
    Pull cgroup fixes from Tejun Heo:
     "This contains the cgroup.procs permission check fixes so that they use
      the credentials at the time of open rather than write, which also
      fixes the cgroup namespace lifetime bug"
    
    * 'for-5.16-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
      selftests: cgroup: Test open-time cgroup namespace usage for migration checks
      selftests: cgroup: Test open-time credential usage for migration checks
      selftests: cgroup: Make cg_create() use 0755 for permission instead of 0644
      cgroup: Use open-time cgroup namespace for process migration perm checks
      cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv
      cgroup: Use open-time credentials for process migraton perm checks
    torvalds committed Jan 7, 2022
  2. Merge tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block

    Pull block fix from Jens Axboe:
     "Just the md bitmap regression this time"
    
    * tag 'block-5.16-2022-01-07' of git://git.kernel.dk/linux-block:
      md/raid1: fix missing bitmap update w/o WriteMostly devices
    torvalds committed Jan 7, 2022
  3. Merge tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/lin…

    …ux/kernel/git/ras/ras
    
    Pull EDAC fix from Tony Luck:
     "Fix 10nm EDAC driver to release and unmap resources on systems without
      HBM"
    
    * tag 'edac_urgent_for_v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
      EDAC/i10nm: Release mdev/mbase when failing to detect HBM
    torvalds committed Jan 7, 2022
  4. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull kvm fixes from Paolo Bonzini:
     "Two small fixes for x86:
    
       - lockdep WARN due to missing lock nesting annotation
    
       - NULL pointer dereference when accessing debugfs"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
      KVM: x86: Check for rmaps allocation
      KVM: SEV: Mark nested locking of kvm->lock
    torvalds committed Jan 7, 2022
  5. Merge tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm…

    …/drm
    
    Pull drm fixes from Dave Airlie:
     "There is only the amdgpu runtime pm regression fix in here:
    
      amdgpu:
    
       - suspend/resume fix
    
       - fix runtime PM regression"
    
    * tag 'drm-fixes-2022-01-07' of git://anongit.freedesktop.org/drm/drm:
      drm/amdgpu: disable runpm if we are the primary adapter
      fbdev: fbmem: add a helper to determine if an aperture is used by a fw fb
      drm/amd/pm: keep the BACO feature enabled for suspend
    torvalds committed Jan 7, 2022
  6. KVM: x86: Check for rmaps allocation

    With TDP MMU being the default now, access to mmu_rmaps_stat debugfs
    file causes following oops:
    
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    PGD 0 P4D 0
    Oops: 0000 [#1] PREEMPT SMP NOPTI
    CPU: 7 PID: 3185 Comm: cat Not tainted 5.16.0-rc4+ torvalds#204
    RIP: 0010:pte_list_count+0x6/0x40
     Call Trace:
      <TASK>
      ? kvm_mmu_rmaps_stat_show+0x15e/0x320
      seq_read_iter+0x126/0x4b0
      ? aa_file_perm+0x124/0x490
      seq_read+0xf5/0x140
      full_proxy_read+0x5c/0x80
      vfs_read+0x9f/0x1a0
      ksys_read+0x67/0xe0
      __x64_sys_read+0x19/0x20
      do_syscall_64+0x3b/0xc0
      entry_SYSCALL_64_after_hwframe+0x44/0xae
     RIP: 0033:0x7fca6fc13912
    
    Return early when rmaps are not present.
    
    Reported-by: Vasant Hegde <vasant.hegde@amd.com>
    Tested-by: Vasant Hegde <vasant.hegde@amd.com>
    Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
    Reviewed-by: Peter Xu <peterx@redhat.com>
    Reviewed-by: Sean Christopherson <seanjc@google.com>
    Message-Id: <20220105040337.4234-1-nikunj@amd.com>
    Cc: stable@vger.kernel.org
    Fixes: 3bcd066 ("KVM: X86: Introduce mmu_rmaps_stat per-vm debugfs file")
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Nikunj A Dadhania authored and bonzini committed Jan 7, 2022
  7. KVM: SEV: Mark nested locking of kvm->lock

    Both source and dest vms' kvm->locks are held in sev_lock_two_vms.
    Mark one with a different subtype to avoid false positives from lockdep.
    
    Fixes: c9d61dc (KVM: SEV: accept signals in sev_lock_two_vms)
    Reported-by: Yiru Xu <xyru1999@gmail.com>
    Tested-by: Jinrong Liang <cloudliang@tencent.com>
    Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
    Message-Id: <1641364863-26331-1-git-send-email-wanpengli@tencent.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Wanpeng Li authored and bonzini committed Jan 7, 2022
  8. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…

    …t/rdma/rdma
    
    Pull rdma fixes from Jason Gunthorpe:
     "Last pull for 5.16, the reversion has been known for a while now but
      didn't get a proper fix in time. Looks like we will have several
      info-leak bugs to take care of going foward.
    
       - Revert the patch fixing the DM related crash causing a widespread
         regression for kernel ULPs. A proper fix just didn't appear this
         cycle due to the holidays
    
       - Missing NULL check on alloc in uverbs
    
       - Double free in rxe error paths
    
       - Fix a new kernel-infoleak report when forming ah_attr's without
         GRH's in ucma"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
      RDMA/core: Don't infoleak GRH fields
      RDMA/uverbs: Check for null return of kmalloc_array
      Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow"
      RDMA/rxe: Prevent double freeing rxe_map_set()
    torvalds committed Jan 7, 2022

Commits on Jan 6, 2022

  1. Merge tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/ker…

    …nel/git/rostedt/linux-trace
    
    Pull tracing fixes from Steven Rostedt:
     "Three minor tracing fixes:
    
       - Fix missing prototypes in sample module for direct functions
    
       - Fix check of valid buffer in get_trace_buf()
    
       - Fix annotations of percpu pointers"
    
    * tag 'trace-v5.16-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
      tracing: Tag trace_percpu_buffer as a percpu pointer
      tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()
      ftrace/samples: Add missing prototypes direct functions
    torvalds committed Jan 6, 2022
  2. selftests: cgroup: Test open-time cgroup namespace usage for migratio…

    …n checks
    
    When a task is writing to an fd opened by a different task, the perm check
    should use the cgroup namespace of the latter task. Add a test for it.
    
    Tested-by: Michal Koutný <mkoutny@suse.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    htejun committed Jan 6, 2022
  3. selftests: cgroup: Test open-time credential usage for migration checks

    When a task is writing to an fd opened by a different task, the perm check
    should use the credentials of the latter task. Add a test for it.
    
    Tested-by: Michal Koutný <mkoutny@suse.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    htejun committed Jan 6, 2022
  4. selftests: cgroup: Make cg_create() use 0755 for permission instead o…

    …f 0644
    
    0644 is an odd perm to create a cgroup which is a directory. Use the regular
    0755 instead. This is necessary for euid switching test case.
    
    Reviewed-by: Michal Koutný <mkoutny@suse.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    htejun committed Jan 6, 2022
  5. cgroup: Use open-time cgroup namespace for process migration perm checks

    cgroup process migration permission checks are performed at write time as
    whether a given operation is allowed or not is dependent on the content of
    the write - the PID. This currently uses current's cgroup namespace which is
    a potential security weakness as it may allow scenarios where a less
    privileged process tricks a more privileged one into writing into a fd that
    it created.
    
    This patch makes cgroup remember the cgroup namespace at the time of open
    and uses it for migration permission checks instad of current's. Note that
    this only applies to cgroup2 as cgroup1 doesn't have namespace support.
    
    This also fixes a use-after-free bug on cgroupns reported in
    
     https://lore.kernel.org/r/00000000000048c15c05d0083397@google.com
    
    Note that backporting this fix also requires the preceding patch.
    
    Reported-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
    Cc: Michal Koutný <mkoutny@suse.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Reviewed-by: Michal Koutný <mkoutny@suse.com>
    Reported-by: syzbot+50f5cf33a284ce738b62@syzkaller.appspotmail.com
    Link: https://lore.kernel.org/r/00000000000048c15c05d0083397@google.com
    Fixes: 5136f63 ("cgroup: implement "nsdelegate" mount option")
    Signed-off-by: Tejun Heo <tj@kernel.org>
    htejun committed Jan 6, 2022
  6. cgroup: Allocate cgroup_file_ctx for kernfs_open_file->priv

    of->priv is currently used by each interface file implementation to store
    private information. This patch collects the current two private data usages
    into struct cgroup_file_ctx which is allocated and freed by the common path.
    This allows generic private data which applies to multiple files, which will
    be used to in the following patch.
    
    Note that cgroup_procs iterator is now embedded as procs.iter in the new
    cgroup_file_ctx so that it doesn't need to be allocated and freed
    separately.
    
    v2: union dropped from cgroup_file_ctx and the procs iterator is embedded in
        cgroup_file_ctx as suggested by Linus.
    
    v3: Michal pointed out that cgroup1's procs pidlist uses of->priv too.
        Converted. Didn't change to embedded allocation as cgroup1 pidlists get
        stored for caching.
    
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Reviewed-by: Michal Koutný <mkoutny@suse.com>
    htejun committed Jan 6, 2022
  7. cgroup: Use open-time credentials for process migraton perm checks

    cgroup process migration permission checks are performed at write time as
    whether a given operation is allowed or not is dependent on the content of
    the write - the PID. This currently uses current's credentials which is a
    potential security weakness as it may allow scenarios where a less
    privileged process tricks a more privileged one into writing into a fd that
    it created.
    
    This patch makes both cgroup2 and cgroup1 process migration interfaces to
    use the credentials saved at the time of open (file->f_cred) instead of
    current's.
    
    Reported-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
    Fixes: 187fe84 ("cgroup: require write perm on common ancestor when moving processes on the default hierarchy")
    Reviewed-by: Michal Koutný <mkoutny@suse.com>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    htejun committed Jan 6, 2022
  8. Merge tag 'amd-drm-fixes-5.16-2021-12-31' of ssh://gitlab.freedesktop…

    ….org/agd5f/linux into drm-fixes
    
    amd-drm-fixes-5.16-2021-12-31:
    
    amdgpu:
    - Suspend/resume fix
    - Restore runtime pm behavior with efifb
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    From: Alex Deucher <alexander.deucher@amd.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211231143825.11479-1-alexander.deucher@amd.com
    airlied committed Jan 6, 2022

Commits on Jan 5, 2022

  1. tracing: Tag trace_percpu_buffer as a percpu pointer

    Tag trace_percpu_buffer as a percpu pointer to resolve warnings
    reported by sparse:
      /linux/kernel/trace/trace.c:3218:46: warning: incorrect type in initializer (different address spaces)
      /linux/kernel/trace/trace.c:3218:46:    expected void const [noderef] __percpu *__vpp_verify
      /linux/kernel/trace/trace.c:3218:46:    got struct trace_buffer_struct *
      /linux/kernel/trace/trace.c:3234:9: warning: incorrect type in initializer (different address spaces)
      /linux/kernel/trace/trace.c:3234:9:    expected void const [noderef] __percpu *__vpp_verify
      /linux/kernel/trace/trace.c:3234:9:    got int *
    
    Link: https://lkml.kernel.org/r/ebabd3f23101d89cb75671b68b6f819f5edc830b.1640255304.git.naveen.n.rao@linux.vnet.ibm.com
    
    Cc: stable@vger.kernel.org
    Reported-by: kernel test robot <lkp@intel.com>
    Fixes: 07d777f ("tracing: Add percpu buffers for trace_printk()")
    Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    rnav authored and rostedt committed Jan 5, 2022
  2. tracing: Fix check for trace_percpu_buffer validity in get_trace_buf()

    With the new osnoise tracer, we are seeing the below splat:
        Kernel attempted to read user page (c7d880000) - exploit attempt? (uid: 0)
        BUG: Unable to handle kernel data access on read at 0xc7d880000
        Faulting instruction address: 0xc0000000002ffa10
        Oops: Kernel access of bad area, sig: 11 [#1]
        LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
        ...
        NIP [c0000000002ffa10] __trace_array_vprintk.part.0+0x70/0x2f0
        LR [c0000000002ff9fc] __trace_array_vprintk.part.0+0x5c/0x2f0
        Call Trace:
        [c0000008bdd73b80] [c0000000001c49cc] put_prev_task_fair+0x3c/0x60 (unreliable)
        [c0000008bdd73be0] [c000000000301430] trace_array_printk_buf+0x70/0x90
        [c0000008bdd73c00] [c0000000003178b0] trace_sched_switch_callback+0x250/0x290
        [c0000008bdd73c90] [c000000000e70d60] __schedule+0x410/0x710
        [c0000008bdd73d40] [c000000000e710c0] schedule+0x60/0x130
        [c0000008bdd73d70] [c000000000030614] interrupt_exit_user_prepare_main+0x264/0x270
        [c0000008bdd73de0] [c000000000030a70] syscall_exit_prepare+0x150/0x180
        [c0000008bdd73e10] [c00000000000c174] system_call_vectored_common+0xf4/0x278
    
    osnoise tracer on ppc64le is triggering osnoise_taint() for negative
    duration in get_int_safe_duration() called from
    trace_sched_switch_callback()->thread_exit().
    
    The problem though is that the check for a valid trace_percpu_buffer is
    incorrect in get_trace_buf(). The check is being done after calculating
    the pointer for the current cpu, rather than on the main percpu pointer.
    Fix the check to be against trace_percpu_buffer.
    
    Link: https://lkml.kernel.org/r/a920e4272e0b0635cf20c444707cbce1b2c8973d.1640255304.git.naveen.n.rao@linux.vnet.ibm.com
    
    Cc: stable@vger.kernel.org
    Fixes: e2ace00 ("tracing: Choose static tp_printk buffer by explicit nesting count")
    Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    rnav authored and rostedt committed Jan 5, 2022
  3. ftrace/samples: Add missing prototypes direct functions

    There's another compilation fail (first here [1]) reported by kernel
    test robot for W=1 clang build:
    
      >> samples/ftrace/ftrace-direct-multi-modify.c:7:6: warning: no previous
      prototype for function 'my_direct_func1' [-Wmissing-prototypes]
         void my_direct_func1(unsigned long ip)
    
    Direct functions in ftrace direct sample modules need to have prototypes
    defined. They are already global in order to be visible for the inline
    assembly, so there's no problem.
    
    The kernel test robot reported just error for ftrace-direct-multi-modify,
    but I got same errors also for the rest of the modules touched by this patch.
    
    [1] 67d4f6e ftrace/samples: Add missing prototype for my_direct_func
    
    Link: https://lkml.kernel.org/r/20211219135317.212430-1-jolsa@kernel.org
    
    Reported-by: kernel test robot <lkp@intel.com>
    Fixes: e1067a0 ("ftrace/samples: Add module to test multi direct modify interface")
    Fixes: ae0cc3b ("ftrace/samples: Add a sample module that implements modify_ftrace_direct()")
    Fixes: 156473a ("ftrace: Add another example of register_ftrace_direct() use case")
    Fixes: b06457c ("ftrace: Add sample module that uses register_ftrace_direct()")
    Signed-off-by: Jiri Olsa <jolsa@kernel.org>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    Jiri Olsa authored and rostedt committed Jan 5, 2022
  4. Merge tag 'net-5.16-final' of git://git.kernel.org/pub/scm/linux/kern…

    …el/git/netdev/net
    
    Pull networking fixes from Jakub Kicinski"
     "Networking fixes, including fixes from bpf, and WiFi. One last pull
      request, turns out some of the recent fixes did more harm than good.
    
      Current release - regressions:
    
       - Revert "xsk: Do not sleep in poll() when need_wakeup set", made the
         problem worse
    
       - Revert "net: phy: fixed_phy: Fix NULL vs IS_ERR() checking in
         __fixed_phy_register", broke EPROBE_DEFER handling
    
       - Revert "net: usb: r8152: Add MAC pass-through support for more
         Lenovo Docks", broke setups without a Lenovo dock
    
      Current release - new code bugs:
    
       - selftests: set amt.sh executable
    
      Previous releases - regressions:
    
       - batman-adv: mcast: don't send link-local multicast to mcast routers
    
      Previous releases - always broken:
    
       - ipv4/ipv6: check attribute length for RTA_FLOW / RTA_GATEWAY
    
       - sctp: hold endpoint before calling cb in
         sctp_transport_lookup_process
    
       - mac80211: mesh: embed mesh_paths and mpp_paths into
         ieee80211_if_mesh to avoid complicated handling of sub-object
         allocation failures
    
       - seg6: fix traceroute in the presence of SRv6
    
       - tipc: fix a kernel-infoleak in __tipc_sendmsg()"
    
    * tag 'net-5.16-final' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (36 commits)
      selftests: set amt.sh executable
      Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo Docks"
      sfc: The RX page_ring is optional
      iavf: Fix limit of total number of queues to active queues of VF
      i40e: Fix incorrect netdev's real number of RX/TX queues
      i40e: Fix for displaying message regarding NVM version
      i40e: fix use-after-free in i40e_sync_filters_subtask()
      i40e: Fix to not show opcode msg on unsuccessful VF MAC change
      ieee802154: atusb: fix uninit value in atusb_set_extended_addr
      mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh
      mac80211: initialize variable have_higher_than_11mbit
      sch_qfq: prevent shift-out-of-bounds in qfq_init_qdisc
      netrom: fix copying in user data in nr_setsockopt
      udp6: Use Segment Routing Header for dest address if present
      icmp: ICMPV6: Examine invoking packet for Segment Route Headers.
      seg6: export get_srh() for ICMP handling
      Revert "net: phy: fixed_phy: Fix NULL vs IS_ERR() checking in __fixed_phy_register"
      ipv6: Do cleanup if attribute validation fails in multipath route
      ipv6: Continue processing multipath route even if gateway attribute is invalid
      net/fsl: Remove leftover definition in xgmac_mdio
      ...
    torvalds committed Jan 5, 2022
  5. RDMA/core: Don't infoleak GRH fields

    If dst->is_global field is not set, the GRH fields are not cleared
    and the following infoleak is reported.
    
    =====================================================
    BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline]
    BUG: KMSAN: kernel-infoleak in _copy_to_user+0x1c9/0x270 lib/usercopy.c:33
     instrument_copy_to_user include/linux/instrumented.h:121 [inline]
     _copy_to_user+0x1c9/0x270 lib/usercopy.c:33
     copy_to_user include/linux/uaccess.h:209 [inline]
     ucma_init_qp_attr+0x8c7/0xb10 drivers/infiniband/core/ucma.c:1242
     ucma_write+0x637/0x6c0 drivers/infiniband/core/ucma.c:1732
     vfs_write+0x8ce/0x2030 fs/read_write.c:588
     ksys_write+0x28b/0x510 fs/read_write.c:643
     __do_sys_write fs/read_write.c:655 [inline]
     __se_sys_write fs/read_write.c:652 [inline]
     __ia32_sys_write+0xdb/0x120 fs/read_write.c:652
     do_syscall_32_irqs_on arch/x86/entry/common.c:114 [inline]
     __do_fast_syscall_32+0x96/0xf0 arch/x86/entry/common.c:180
     do_fast_syscall_32+0x34/0x70 arch/x86/entry/common.c:205
     do_SYSENTER_32+0x1b/0x20 arch/x86/entry/common.c:248
     entry_SYSENTER_compat_after_hwframe+0x4d/0x5c
    
    Local variable resp created at:
     ucma_init_qp_attr+0xa4/0xb10 drivers/infiniband/core/ucma.c:1214
     ucma_write+0x637/0x6c0 drivers/infiniband/core/ucma.c:1732
    
    Bytes 40-59 of 144 are uninitialized
    Memory access of size 144 starts at ffff888167523b00
    Data copied to user address 0000000020000100
    
    CPU: 1 PID: 25910 Comm: syz-executor.1 Not tainted 5.16.0-rc5-syzkaller #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    =====================================================
    
    Fixes: 4ba6609 ("IB/core: Check for global flag when using ah_attr")
    Link: https://lore.kernel.org/r/0e9dd51f93410b7b2f4f5562f52befc878b71afa.1641298868.git.leonro@nvidia.com
    Reported-by: syzbot+6d532fa8f9463da290bc@syzkaller.appspotmail.com
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Leon Romanovsky authored and jgunthorpe committed Jan 5, 2022
  6. selftests: set amt.sh executable

    amt.sh test script will not work because it doesn't have execution
    permission. So, it adds execution permission.
    
    Reported-by: Hangbin Liu <liuhangbin@gmail.com>
    Fixes: c08e8ba ("selftests: add amt interface selftest script")
    Signed-off-by: Taehee Yoo <ap420073@gmail.com>
    Link: https://lore.kernel.org/r/20220105144436.13415-1-ap420073@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    TaeheeYoo authored and Jakub Kicinski committed Jan 5, 2022
  7. RDMA/uverbs: Check for null return of kmalloc_array

    Because of the possible failure of the allocation, data might be NULL
    pointer and will cause the dereference of the NULL pointer later.
    Therefore, it might be better to check it and return -ENOMEM.
    
    Fixes: 6884c6c ("RDMA/verbs: Store the write/write_ex uapi entry points in the uverbs_api")
    Link: https://lore.kernel.org/r/20211231093315.1917667-1-jiasheng@iscas.ac.cn
    Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
    Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    JiangJias authored and jgunthorpe committed Jan 5, 2022
  8. Revert "net: usb: r8152: Add MAC passthrough support for more Lenovo …

    …Docks"
    
    This reverts commit f77b83b.
    
    This change breaks multiple usb to ethernet dongles attached on Lenovo
    USB hub.
    
    Fixes: f77b83b ("net: usb: r8152: Add MAC passthrough support for more Lenovo Docks")
    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
    Link: https://lore.kernel.org/r/20220105155102.8557-1-aaron.ma@canonical.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Aaron Ma authored and Jakub Kicinski committed Jan 5, 2022
  9. Merge tag 'gpio-fixes-for-v5.16' of git://git.kernel.org/pub/scm/linu…

    …x/kernel/git/brgl/linux
    
    Pull gpio fixes from Bartosz Golaszewski:
     "Here are two last fixes for this release cycle from the GPIO
      subsystem:
    
       - fix irq offset calculation in gpio-aspeed-sgpio
    
       - update the MAINTAINERS entry for gpio-brcmstb"
    
    * tag 'gpio-fixes-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
      MAINTAINERS: update gpio-brcmstb maintainers
      gpio: gpio-aspeed-sgpio: Fix wrong hwirq base in irq handler
    torvalds committed Jan 5, 2022
  10. Merge tag 'ieee802154-for-net-2022-01-05' of git://git.kernel.org/pub…

    …/scm/linux/kernel/git/sschmidt/wpan
    
    Stefan Schmidt says:
    
    ====================
    pull-request: ieee802154 for net 2022-01-05
    
    Below I have a last minute fix for the atusb driver.
    
    Pavel fixes a KASAN uninit report for the driver. This version is the
    minimal impact fix to ease backporting. A bigger rework of the driver to
    avoid potential similar problems is ongoing and will come through net-next
    when ready.
    
    * tag 'ieee802154-for-net-2022-01-05' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan:
      ieee802154: atusb: fix uninit value in atusb_set_extended_addr
    ====================
    
    Link: https://lore.kernel.org/r/20220105153914.512305-1-stefan@datenfreihafen.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Jakub Kicinski committed Jan 5, 2022
  11. Revert "RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow"

    This patch is not the full fix and still causes to call traces
    during mlx5_ib_dereg_mr().
    
    This reverts commit f0ae4af.
    
    Fixes: f0ae4af ("RDMA/mlx5: Fix releasing unallocated memory in dereg MR flow")
    Link: https://lore.kernel.org/r/20211222101312.1358616-1-maorg@nvidia.com
    Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
    Acked-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    maorgottlieb authored and jgunthorpe committed Jan 5, 2022
  12. Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git…

    …/tnguy/net-queue
    
    Tony Nguyen says:
    
    ====================
    Intel Wired LAN Driver Updates 2022-01-04
    
    This series contains updates to i40e and iavf drivers.
    
    Mateusz adjusts displaying of failed VF MAC message when the failure is
    expected as well as modifying an NVM info message to not confuse the user
    for i40e.
    
    Di Zhu fixes a use-after-free issue MAC filters for i40e.
    
    Jedrzej fixes an issue with misreporting of Rx and Tx queues during
    reinitialization for i40e.
    
    Karen correct checking of channel queue configuration to occur against
    active queues for iavf.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Jan 5, 2022
  13. sfc: The RX page_ring is optional

    The RX page_ring is an optional feature that improves
    performance. When allocation fails the driver can still
    function, but possibly with a lower bandwidth.
    Guard against dereferencing a NULL page_ring.
    
    Fixes: 2768935 ("sfc: reuse pages to avoid DMA mapping/unmapping costs")
    Signed-off-by: Martin Habets <habetsm.xilinx@gmail.com>
    Reported-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
    Link: https://lore.kernel.org/r/164111288276.5798.10330502993729113868.stgit@palantir17.mph.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Martin Habets authored and Jakub Kicinski committed Jan 5, 2022

Commits on Jan 4, 2022

  1. iavf: Fix limit of total number of queues to active queues of VF

    In the absence of this validation, if the user requests to
    configure queues more than the enabled queues, it results in
    sending the requested number of queues to the kernel stack
    (due to the asynchronous nature of VF response), in which
    case the stack might pick a queue to transmit that is not
    enabled and result in Tx hang. Fix this bug by
    limiting the total number of queues allocated for VF to
    active queues of VF.
    
    Fixes: d5b33d0 ("i40evf: add ndo_setup_tc callback to i40evf")
    Signed-off-by: Ashwin Vijayavel <ashwin.vijayavel@intel.com>
    Signed-off-by: Karen Sornek <karen.sornek@intel.com>
    Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    ksornek authored and anguy11 committed Jan 4, 2022
  2. i40e: Fix incorrect netdev's real number of RX/TX queues

    There was a wrong queues representation in sysfs during
    driver's reinitialization in case of online cpus number is
    less than combined queues. It was caused by stopped
    NetworkManager, which is responsible for calling vsi_open
    function during driver's initialization.
    In specific situation (ex. 12 cpus online) there were 16 queues
    in /sys/class/net/<iface>/queues. In case of modifying queues with
    value higher, than number of online cpus, then it caused write
    errors and other errors.
    Add updating of sysfs's queues representation during driver
    initialization.
    
    Fixes: 41c445f ("i40e: main driver core")
    Signed-off-by: Lukasz Cieplicki <lukaszx.cieplicki@intel.com>
    Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    jjagielsk authored and anguy11 committed Jan 4, 2022
  3. i40e: Fix for displaying message regarding NVM version

    When loading the i40e driver, it prints a message like: 'The driver for the
    device detected a newer version of the NVM image v1.x than expected v1.y.
    Please install the most recent version of the network driver.' This is
    misleading as the driver is working as expected.
    
    Fix that by removing the second part of message and changing it from
    dev_info to dev_dbg.
    
    Fixes: 4fb29bd ("i40e: The driver now prints the API version in error message")
    Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    mpalczew96 authored and anguy11 committed Jan 4, 2022
Older