1. 13 Aug, 2022 1 commit
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 3d076fec
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "New drivers:
         - Microchip PolarFire
         - Nuvoton NCT3018Y
         - TI K3 RTC
      
        Subsystem:
         - Replace flush_scheduled_work() with flush_work()
         - Remove deprecated ida_simple_get()/ida_simple_remove() calls
      
        Drivers:
         - use simple i2c probe where possible
         - sun6i: add R329 support
         - zynqmp: add calibration support
         - vr41xx: remove unused driver"
      
      * tag 'rtc-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (31 commits)
        rtc: spear: set range max
        rtc: rtc-cmos: Do not check ACPI_FADT_LOW_POWER_S0
        rtc: zynqmp: initialize fract_tick
        rtc: Add NCT3018Y real time clock driver
        dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock
        dt-bindings: rtc: nxp,pcf85063: Convert to DT schema
        dt-bindings: rtc: microcrystal,rv3032: Add missing type to 'trickle-voltage-millivolt'
        rtc: rx8025: fix 12/24 hour mode detection on RX-8035
        rtc: cros-ec: Only warn once in .remove() about notifier_chain problems
        rtc: vr41xx: remove driver
        rtc: mpfs: remove 'pending' variable from mpfs_rtc_wakeup_irq_handler()
        rtc: rv8803: fix missing unlock on error in rv8803_set_time()
        rtc: zynqmp: Add calibration set and get support
        rtc: zynqmp: Updated calibration value
        dt-bindings: rtc: zynqmp: Add clock information
        rtc: sun6i: add support for R329 RTC
        rtc: Directly use ida_alloc()/free()
        rtc: Introduce ti-k3-rtc
        dt-bindings: rtc: Add TI K3 RTC description
        dt-bindings: rtc: qcom-pm8xxx-rtc: Update the maintainers section
        ...
      3d076fec
  2. 12 Aug, 2022 23 commits
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 4a935059
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Includes a few usual updates for HD- and USB-audio and a trivial
        cleanup patch"
      
      * tag 'sound-fix-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda: Fix crash due to jack poll in suspend
        ALSA: hda/cirrus - support for iMac 12,1 model
        ALSA: usb-audio: make read-only array marker static const
        ALSA: hda/realtek: Add a quirk for HP OMEN 15 (8786) mute LED
        ALSA: usb-audio: More comprehensive mixer map for ASUS ROG Zenith II
        ALSA: scarlett2: Add Focusrite Clarett+ 8Pre support
        ALSA: hda/conexant: Add quirk for LENOVO 20149 Notebook model
        ALSA: ice1712: remove redundant assignment to new
        ALSA: hda/realtek: Add quirk for another Asus K42JZ model
      4a935059
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 7a53e17a
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - A huge patchset supporting vq resize using the new vq reset
         capability
      
       - Features, fixes, and cleanups all over the place
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (88 commits)
        vdpa/mlx5: Fix possible uninitialized return value
        vdpa_sim_blk: add support for discard and write-zeroes
        vdpa_sim_blk: add support for VIRTIO_BLK_T_FLUSH
        vdpa_sim_blk: make vdpasim_blk_check_range usable by other requests
        vdpa_sim_blk: check if sector is 0 for commands other than read or write
        vdpa_sim: Implement suspend vdpa op
        vhost-vdpa: uAPI to suspend the device
        vhost-vdpa: introduce SUSPEND backend feature bit
        vdpa: Add suspend operation
        virtio-blk: Avoid use-after-free on suspend/resume
        virtio_vdpa: support the arg sizes of find_vqs()
        vhost-vdpa: Call ida_simple_remove() when failed
        vDPA: fix 'cast to restricted le16' warnings in vdpa.c
        vDPA: !FEATURES_OK should not block querying device config space
        vDPA/ifcvf: support userspace to query features and MQ of a management device
        vDPA/ifcvf: get_config_size should return a value no greater than dev implementation
        vhost scsi: Allow user to control num virtqueues
        vhost-scsi: Fix max number of virtqueues
        vdpa/mlx5: Support different address spaces for control and data
        vdpa/mlx5: Implement susupend virtqueue callback
        ...
      7a53e17a
    • Linus Torvalds's avatar
      Merge tag 'loongarch-5.20' of... · 999324f5
      Linus Torvalds authored
      Merge tag 'loongarch-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
      
      Pull LoongArch updates from Huacai Chen:
      
       - Optimise getcpu() with vDSO
      
       - PCI enablement on top of pci & irqchip changes
      
       - Stack unwinder and stack trace support
      
       - Some bug fixes and build error fixes
      
       - Update the default config file
      
      * tag 'loongarch-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
        docs/zh_CN/LoongArch: Add I14 description
        docs/LoongArch: Add I14 description
        LoongArch: Update Loongson-3 default config file
        LoongArch: Add USER_STACKTRACE support
        LoongArch: Add STACKTRACE support
        LoongArch: Add prologue unwinder support
        LoongArch: Add guess unwinder support
        LoongArch: Add vDSO syscall __vdso_getcpu()
        LoongArch: Add PCI controller support
        LoongArch: Parse MADT to get multi-processor information
        LoongArch: Jump to the link address before enable PG
        LoongArch: Requires __force attributes for any casts
        LoongArch: Fix unsigned comparison with less than zero
        LoongArch: Adjust arch/loongarch/Kconfig
        LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
      999324f5
    • Linus Torvalds's avatar
      Merge tag 'for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · f7cdaeea
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "No core patches, only driver updates:
      
         - pwr-mlxbf: new reset driver for Mellanox BlueField
      
         - at91-reset: SAMA7G5 support
      
         - ab8500: continue refurbishing
      
         - misc minor fixes"
      
      * tag 'for-v6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (29 commits)
        power: supply: olpc_battery: Hold the reference returned by of_find_compatible_node
        power: supply: ab8500: add missing destroy_workqueue in ab8500_charger_bind
        power: supply: ab8500: Remove flush_scheduled_work() call.
        power: supply: ab8500_fg: drop duplicated 'is' in comment
        power: supply: ab8500: Drop external charger leftovers
        power: supply: ab8500: Add MAINTAINERS entry
        dt-bindings: power: reset: qcom,pshold: convert to dtschema
        power: supply: Fix typo in power_supply_check_supplies
        power: reset: pwr-mlxbf: change rst_pwr_hid and low_pwr_hid from global to local variables
        power: reset: pwr-mlxbf: add missing include
        power: reset: at91-reset: add support for SAMA7G5
        power: reset: at91-reset: add reset_controller_dev support
        power: reset: at91-reset: add at91_reset_data
        power: reset: at91-reset: document structures and enums
        dt-bindings: reset: add sama7g5 definitions
        dt-bindings: reset: atmel,at91sam9260-reset: add sama7g5 bindings
        dt-bindings: reset: convert Atmel/Microchip reset controller to YAML
        power: reset: pwr-mlxbf: add BlueField SoC power control driver
        power: supply: ab8500: Exit maintenance if too low voltage
        power: supply: ab8500: Respect charge_restart_voltage_uv
        ...
      f7cdaeea
    • Linus Torvalds's avatar
      Merge tag 'vfio-v6.0-rc1pt2' of https://github.com/awilliam/linux-vfio · d16b418f
      Linus Torvalds authored
      Pull another VFIO update from Alex Williamson:
      
       - Rename vfio source file to more easily allow additional source
         files in the upcoming development cycles (Jason Gunthorpe)
      
      * tag 'vfio-v6.0-rc1pt2' of https://github.com/awilliam/linux-vfio:
        vfio: Move vfio.c to vfio_main.c
      d16b418f
    • Yury Norov's avatar
      lib: remove lib/nodemask.c · f75f5d58
      Yury Norov authored
      Commit 36d4b36b ("lib/nodemask: inline next_node_in() and
      node_random()") removed the lib/nodemask.c file, but the remove didn't
      happen when the patch was applied.
      Reported-by: default avatar"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
      Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f75f5d58
    • Tiezhu Yang's avatar
      docs/zh_CN/LoongArch: Add I14 description · 71535592
      Tiezhu Yang authored
      I14 is also a kind of immediate operand in instruction, like I8/I12/I16/
      I21/I26, add it in the Chinese documentation.
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      71535592
    • Tiezhu Yang's avatar
      docs/LoongArch: Add I14 description · 6e068820
      Tiezhu Yang authored
      I14 is also a kind of immediate operand in instruction, like I8/I12/I16/
      I21/I26, add it in the English documentation.
      Signed-off-by: default avatarTiezhu Yang <yangtiezhu@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      6e068820
    • Huacai Chen's avatar
      LoongArch: Update Loongson-3 default config file · 27b161a4
      Huacai Chen authored
      1, Add NVME related options;
      2, Add compressed firmware support;
      3, Add virtio drivers in order to run in qemu.
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      27b161a4
    • Qing Zhang's avatar
      LoongArch: Add USER_STACKTRACE support · 4d7bf939
      Qing Zhang authored
      To get the best stacktrace output, you can compile your userspace
      programs with frame pointers (at least glibc + the app you are tracing).
      
      1, export "CC = gcc -fno-omit-frame-pointer";
      2, compile your programs with "CC";
      3, use uprobe to get stacktrace output.
      
      ...
           echo 'p:malloc /usr/lib64/libc.so.6:0x0a4704 size=%r4:u64' > uprobe_events
           echo 'p:free /usr/lib64/libc.so.6:0x0a4d50 ptr=%r4:x64' >> uprobe_events
           echo 'comm == "demo"' > ./events/uprobes/malloc/filter
           echo 'comm == "demo"' > ./events/uprobes/free/filter
           echo 1 > ./options/userstacktrace
           echo 1 > ./options/sym-userobj
      ...
      Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      4d7bf939
    • Qing Zhang's avatar
      LoongArch: Add STACKTRACE support · 93a4fa62
      Qing Zhang authored
      1. Use common arch_stack_walk() infrastructure to avoid duplicated code
         and avoid taking care of the stack storage and filtering.
      2. Add sched_ra (means sched return address) and sched_cfa (means sched
         call frame address) to thread_info, and store them in switch_to().
      3. Add __get_wchan() implementation.
      
      Now we can print the process stack and wait channel by cat /proc/*/stack
      and /proc/*/wchan.
      Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      93a4fa62
    • Qing Zhang's avatar
      LoongArch: Add prologue unwinder support · 49aef111
      Qing Zhang authored
      It unwind the stack frame based on prologue code analyze.
      CONFIG_KALLSYMS is needed, at least the address and length
      of each function.
      
      Three stages when we do unwind,
        1) unwind_start(), the prapare of unwinding, fill unwind_state.
        2) unwind_done(), judge whether the unwind process is finished or not.
        3) unwind_next_frame(), unwind the next frame.
      
      Dividing unwinder helps to add new unwinders in the future, e.g.:
      unwinder_frame, unwinder_orc, .etc.
      Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      49aef111
    • Qing Zhang's avatar
      LoongArch: Add guess unwinder support · 49232773
      Qing Zhang authored
      Name "guess unwinder" comes from x86, it scans the stack and reports
      every kernel text address it finds.
      
      Unwinders can be used by dump_stack() and other stacktrace functions.
      
      Three stages when we do unwind,
        1) unwind_start(), the prapare of unwinding, fill unwind_state.
        2) unwind_done(), judge whether the unwind process is finished or not.
        3) unwind_next_frame(), unwind the next frame.
      
      Add get_stack_info() to get stack info. At present we have irq stack and
      task stack. The next_sp is the key info between two types of stacks.
      
      Dividing unwinder helps to add new unwinders in the future.
      Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      49232773
    • Huacai Chen's avatar
      LoongArch: Add vDSO syscall __vdso_getcpu() · dce6098b
      Huacai Chen authored
      We test 20 million times of getcpu(), the real syscall version take 25
      seconds, while the vsyscall version take only 2.4 seconds.
      Signed-off-by: default avatarRui Wang <wangrui@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      dce6098b
    • Huacai Chen's avatar
      LoongArch: Add PCI controller support · 57fc7323
      Huacai Chen authored
      Loongson64 based systems are PC-like systems which use PCI/PCIe as its
      I/O bus, This patch adds the PCI host controller support for LoongArch.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarJianmin Lv <lvjianmin@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      57fc7323
    • Huacai Chen's avatar
      LoongArch: Parse MADT to get multi-processor information · e9e7ff16
      Huacai Chen authored
      Parse MADT to get multi-processor information, in order to fix the boot
      problem and cpu-hotplug problem for SMP platform.
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      e9e7ff16
    • Huacai Chen's avatar
      LoongArch: Jump to the link address before enable PG · ab2579d7
      Huacai Chen authored
      The kernel entry points of both boot CPU (i.e., kernel_entry) and non-
      boot CPUs (i.e., smpboot_entry) may be physical address from BootLoader
      (in DA mode or identity-mapping PG mode). So we should jump to the link
      address before PG enabled (because DA is disabled at the same time) and
      just after DMW configured.
      
      Specifically: With some older firmwares, non-boot CPUs started with PG
      enabled, but this need firmware cooperation in the form of a temporary
      page table, which is deemed unnecessary. OTOH, latest firmware versions
      configure the non-boot CPUs to start in DA mode, so kernel-side changes
      are needed.
      Reviewed-by: default avatarWANG Xuerui <git@xen0n.name>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      ab2579d7
    • Qing Zhang's avatar
      LoongArch: Requires __force attributes for any casts · 5e8be07c
      Qing Zhang authored
      This fix a warning when "make C=2":
      arch/loongarch/kernel/ptrace.c: note: in included file (through include/linux/uaccess.h, include/linux/sched/task.h, include/linux/sched/signal.h, include/linux/ptrace.h, include/linux/audit.h):
      ./arch/loongarch/include/asm/uaccess.h:232:32: warning: incorrect type in argument 2 (different address spaces)
      ./arch/loongarch/include/asm/uaccess.h:232:32:    expected void const *from
      ./arch/loongarch/include/asm/uaccess.h:232:32:    got void const [noderef] __user *from
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarQing Zhang <zhangqing@loongson.cn>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      5e8be07c
    • Yang Li's avatar
      LoongArch: Fix unsigned comparison with less than zero · aafcac81
      Yang Li authored
      The return value from the call to get_timer_irq() is int, which can be
      a negative error code. However, the return value is being assigned to an
      unsigned int variable 'irq', so making 'irq' an int.
      
      Eliminate the following coccicheck warning:
      ./arch/loongarch/kernel/time.c:146:5-8: WARNING: Unsigned expression compared with zero: irq < 0
      Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
      Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      aafcac81
    • Huacai Chen's avatar
      LoongArch: Adjust arch/loongarch/Kconfig · f30d1f49
      Huacai Chen authored
      1, ACPI, EFI and SMP are mandatories for LoongArch, select them
      unconditionally to avoid various build errors for 'make randconfig'.
      2, Move the MMU_GATHER_MERGE_VMAS selection to the correct place.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      f30d1f49
    • Huacai Chen's avatar
      LoongArch: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK · 28e112af
      Huacai Chen authored
      When CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS is selected,
      cpu_max_bits_warn() generates a runtime warning similar as below while
      we show /proc/cpuinfo. Fix this by using nr_cpu_ids (the runtime limit)
      instead of NR_CPUS to iterate CPUs.
      
      [    3.052463] ------------[ cut here ]------------
      [    3.059679] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:108 show_cpuinfo+0x5e8/0x5f0
      [    3.070072] Modules linked in: efivarfs autofs4
      [    3.076257] CPU: 0 PID: 1 Comm: systemd Not tainted 5.19-rc5+ #1052
      [    3.084034] Hardware name: Loongson Loongson-3A5000-7A1000-1w-V0.1-CRB/Loongson-LS3A5000-7A1000-1w-EVB-V1.21, BIOS Loongson-UDK2018-V2.0.04082-beta7 04/27
      [    3.099465] Stack : 9000000100157b08 9000000000f18530 9000000000cf846c 9000000100154000
      [    3.109127]         9000000100157a50 0000000000000000 9000000100157a58 9000000000ef7430
      [    3.118774]         90000001001578e8 0000000000000040 0000000000000020 ffffffffffffffff
      [    3.128412]         0000000000aaaaaa 1ab25f00eec96a37 900000010021de80 900000000101c890
      [    3.138056]         0000000000000000 0000000000000000 0000000000000000 0000000000aaaaaa
      [    3.147711]         ffff8000339dc220 0000000000000001 0000000006ab4000 0000000000000000
      [    3.157364]         900000000101c998 0000000000000004 9000000000ef7430 0000000000000000
      [    3.167012]         0000000000000009 000000000000006c 0000000000000000 0000000000000000
      [    3.176641]         9000000000d3de08 9000000001639390 90000000002086d8 00007ffff0080286
      [    3.186260]         00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c
      [    3.195868]         ...
      [    3.199917] Call Trace:
      [    3.203941] [<90000000002086d8>] show_stack+0x38/0x14c
      [    3.210666] [<9000000000cf846c>] dump_stack_lvl+0x60/0x88
      [    3.217625] [<900000000023d268>] __warn+0xd0/0x100
      [    3.223958] [<9000000000cf3c90>] warn_slowpath_fmt+0x7c/0xcc
      [    3.231150] [<9000000000210220>] show_cpuinfo+0x5e8/0x5f0
      [    3.238080] [<90000000004f578c>] seq_read_iter+0x354/0x4b4
      [    3.245098] [<90000000004c2e90>] new_sync_read+0x17c/0x1c4
      [    3.252114] [<90000000004c5174>] vfs_read+0x138/0x1d0
      [    3.258694] [<90000000004c55f8>] ksys_read+0x70/0x100
      [    3.265265] [<9000000000cfde9c>] do_syscall+0x7c/0x94
      [    3.271820] [<9000000000202fe4>] handle_syscall+0xc4/0x160
      [    3.281824] ---[ end trace 8b484262b4b8c24c ]---
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
      28e112af
    • Linus Torvalds's avatar
      Merge tag 'for-6.0/dm-fixes' of... · c3adefb5
      Linus Torvalds authored
      Merge tag 'for-6.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - A few fixes for the DM verity and bufio changes in this merge window
      
       - A smatch warning fix for DM writecache locking in writecache_map
      
      * tag 'for-6.0/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm bufio: fix some cases where the code sleeps with spinlock held
        dm writecache: fix smatch warning about invalid return from writecache_map
        dm verity: fix verity_parse_opt_args parsing
        dm verity: fix DM_VERITY_OPTS_MAX value yet again
        dm bufio: simplify DM_BUFIO_CLIENT_NO_SLEEP locking
      c3adefb5
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2022-08-12-1' of git://anongit.freedesktop.org/drm/drm · 7ce2aa6d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Not much to squeeze into rc1, just two small fixes, one for core gem
       and one for shmem-helpers:
      
        gem:
         - Annotate WW context in error paths
      
        shmem-helper:
         - Add missing vunmap in error paths"
      
      * tag 'drm-next-2022-08-12-1' of git://anongit.freedesktop.org/drm/drm:
        drm/gem: Properly annotate WW context on drm_gem_lock_reservations() error
        drm/shmem-helper: Add missing vunmap on error
      7ce2aa6d
  3. 11 Aug, 2022 16 commits
    • Linus Torvalds's avatar
      Merge tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7ebfc85e
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Including fixes from bluetooth, bpf, can and netfilter.
      
        A little larger than usual but it's all fixes, no late features. It's
        large partially because of timing, and partially because of follow ups
        to stuff that got merged a week or so before the merge window and
        wasn't as widely tested. Maybe the Bluetooth fixes are a little
        alarming so we'll address that, but the rest seems okay and not scary.
      
        Notably we're including a fix for the netfilter Kconfig [1], your WiFi
        warning [2] and a bluetooth fix which should unblock syzbot [3].
      
        Current release - regressions:
      
         - Bluetooth:
            - don't try to cancel uninitialized works [3]
            - L2CAP: fix use-after-free caused by l2cap_chan_put
      
         - tls: rx: fix device offload after recent rework
      
         - devlink: fix UAF on failed reload and leftover locks in mlxsw
      
        Current release - new code bugs:
      
         - netfilter:
            - flowtable: fix incorrect Kconfig dependencies [1]
            - nf_tables: fix crash when nf_trace is enabled
      
         - bpf:
            - use proper target btf when exporting attach_btf_obj_id
            - arm64: fixes for bpf trampoline support
      
         - Bluetooth:
            - ISO: unlock on error path in iso_sock_setsockopt()
            - ISO: fix info leak in iso_sock_getsockopt()
            - ISO: fix iso_sock_getsockopt for BT_DEFER_SETUP
            - ISO: fix memory corruption on iso_pinfo.base
            - ISO: fix not using the correct QoS
            - hci_conn: fix updating ISO QoS PHY
      
         - phy: dp83867: fix get nvmem cell fail
      
        Previous releases - regressions:
      
         - wifi: cfg80211: fix validating BSS pointers in
           __cfg80211_connect_result [2]
      
         - atm: bring back zatm uAPI after ATM had been removed
      
         - properly fix old bug making bonding ARP monitor mode not being able
           to work with software devices with lockless Tx
      
         - tap: fix null-deref on skb->dev in dev_parse_header_protocol
      
         - revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP" it helps some
           devices and breaks others
      
         - netfilter:
            - nf_tables: many fixes rejecting cross-object linking which may
              lead to UAFs
            - nf_tables: fix null deref due to zeroed list head
            - nf_tables: validate variable length element extension
      
         - bgmac: fix a BUG triggered by wrong bytes_compl
      
         - bcmgenet: indicate MAC is in charge of PHY PM
      
        Previous releases - always broken:
      
         - bpf:
            - fix bad pointer deref in bpf_sys_bpf() injected via test infra
            - disallow non-builtin bpf programs calling the prog_run command
            - don't reinit map value in prealloc_lru_pop
            - fix UAFs during the read of map iterator fd
            - fix invalidity check for values in sk local storage map
            - reject sleepable program for non-resched map iterator
      
         - mptcp:
            - move subflow cleanup in mptcp_destroy_common()
            - do not queue data on closed subflows
      
         - virtio_net: fix memory leak inside XDP_TX with mergeable
      
         - vsock: fix memory leak when multiple threads try to connect()
      
         - rework sk_user_data sharing to prevent psock leaks
      
         - geneve: fix TOS inheriting for ipv4
      
         - tunnels & drivers: do not use RT_TOS for IPv6 flowlabel
      
         - phy: c45 baset1: do not skip aneg configuration if clock role is
           not specified
      
         - rose: avoid overflow when /proc displays timer information
      
         - x25: fix call timeouts in blocking connects
      
         - can: mcp251x: fix race condition on receive interrupt
      
         - can: j1939:
            - replace user-reachable WARN_ON_ONCE() with netdev_warn_once()
            - fix memory leak of skbs in j1939_session_destroy()
      
        Misc:
      
         - docs: bpf: clarify that many things are not uAPI
      
         - seg6: initialize induction variable to first valid array index (to
           silence clang vs objtool warning)
      
         - can: ems_usb: fix clang 14's -Wunaligned-access warning"
      
      * tag 'net-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (117 commits)
        net: atm: bring back zatm uAPI
        dpaa2-eth: trace the allocated address instead of page struct
        net: add missing kdoc for struct genl_multicast_group::flags
        nfp: fix use-after-free in area_cache_get()
        MAINTAINERS: use my korg address for mt7601u
        mlxsw: minimal: Fix deadlock in ports creation
        bonding: fix reference count leak in balance-alb mode
        net: usb: qmi_wwan: Add support for Cinterion MV32
        bpf: Shut up kern_sys_bpf warning.
        net/tls: Use RCU API to access tls_ctx->netdev
        tls: rx: device: don't try to copy too much on detach
        tls: rx: device: bound the frag walk
        net_sched: cls_route: remove from list when handle is 0
        selftests: forwarding: Fix failing tests with old libnet
        net: refactor bpf_sk_reuseport_detach()
        net: fix refcount bug in sk_psock_get (2)
        selftests/bpf: Ensure sleepable program is rejected by hash map iter
        selftests/bpf: Add write tests for sk local storage map iterator
        selftests/bpf: Add tests for reading a dangling map iter fd
        bpf: Only allow sleepable program for resched-able iterator
        ...
      7ebfc85e
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e091ba5c
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These fix up direct references to the fwnode field in struct device
        and extend ACPI device properties support.
      
        Specifics:
      
         - Replace direct references to the fwnode field in struct device with
           dev_fwnode() and device_match_fwnode() (Andy Shevchenko)
      
         - Make the ACPI code handling device properties support properties
           with buffer values (Sakari Ailus)"
      
      * tag 'acpi-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: property: Fix error handling in acpi_init_properties()
        ACPI: VIOT: Do not dereference fwnode in struct device
        ACPI: property: Read buffer properties as integers
        ACPI: property: Add support for parsing buffer property UUID
        ACPI: property: Unify integer value reading functions
        ACPI: property: Switch node property referencing from ifs to a switch
        ACPI: property: Move property ref argument parsing into a new function
        ACPI: property: Use acpi_object_type consistently in property ref parsing
        ACPI: property: Tie data nodes to acpi handles
        ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool
      e091ba5c
    • Linus Torvalds's avatar
      Merge tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 8745889a
      Linus Torvalds authored
      Pull more iomap updates from Darrick Wong:
       "In the past 10 days or so I've not heard any ZOMG STOP style
        complaints about removing ->writepage support from gfs2 or zonefs, so
        here's the pull request removing them (and the underlying fs iomap
        support) from the kernel:
      
         - Remove iomap_writepage and all callers, since the mm apparently
           never called the zonefs or gfs2 writepage functions"
      
      * tag 'iomap-6.0-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: remove iomap_writepage
        zonefs: remove ->writepage
        gfs2: remove ->writepage
        gfs2: stop using generic_writepages in gfs2_ail1_start_one
      8745889a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-fixes-2022-08-10' of... · 36fa1cb5
      Dave Airlie authored
      Merge tag 'drm-misc-next-fixes-2022-08-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
      
      Short summary of fixes pull:
      
       * gem: Annotate WW context in error paths
       * shmem-helper: Add missing vunmap in error paths
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/YvOLPpufsvOJHiNY@linux-uq9g
      36fa1cb5
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.20-rc1' of https://github.com/ceph/ceph-client · 786da5da
      Linus Torvalds authored
      Pull ceph updates from Ilya Dryomov:
       "We have a good pile of various fixes and cleanups from Xiubo, Jeff,
        Luis and others, almost exclusively in the filesystem.
      
        Several patches touch files outside of our normal purview to set the
        stage for bringing in Jeff's long awaited ceph+fscrypt series in the
        near future. All of them have appropriate acks and sat in linux-next
        for a while"
      
      * tag 'ceph-for-5.20-rc1' of https://github.com/ceph/ceph-client: (27 commits)
        libceph: clean up ceph_osdc_start_request prototype
        libceph: fix ceph_pagelist_reserve() comment typo
        ceph: remove useless check for the folio
        ceph: don't truncate file in atomic_open
        ceph: make f_bsize always equal to f_frsize
        ceph: flush the dirty caps immediatelly when quota is approaching
        libceph: print fsid and epoch with osd id
        libceph: check pointer before assigned to "c->rules[]"
        ceph: don't get the inline data for new creating files
        ceph: update the auth cap when the async create req is forwarded
        ceph: make change_auth_cap_ses a global symbol
        ceph: fix incorrect old_size length in ceph_mds_request_args
        ceph: switch back to testing for NULL folio->private in ceph_dirty_folio
        ceph: call netfs_subreq_terminated with was_async == false
        ceph: convert to generic_file_llseek
        ceph: fix the incorrect comment for the ceph_mds_caps struct
        ceph: don't leak snap_rwsem in handle_cap_grant
        ceph: prevent a client from exceeding the MDS maximum xattr size
        ceph: choose auth MDS for getxattr with the Xs caps
        ceph: add session already open notify support
        ...
      786da5da
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · e18a9042
      Linus Torvalds authored
      Pull more kvm updates from Paolo Bonzini:
      
       - Xen timer fixes
      
       - Documentation formatting fixes
      
       - Make rseq selftest compatible with glibc-2.35
      
       - Fix handling of illegal LEA reg, reg
      
       - Cleanup creation of debugfs entries
      
       - Fix steal time cache handling bug
      
       - Fixes for MMIO caching
      
       - Optimize computation of number of LBRs
      
       - Fix uninitialized field in guest_maxphyaddr < host_maxphyaddr path
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (26 commits)
        KVM: x86/MMU: properly format KVM_CAP_VM_DISABLE_NX_HUGE_PAGES capability table
        Documentation: KVM: extend KVM_CAP_VM_DISABLE_NX_HUGE_PAGES heading underline
        KVM: VMX: Adjust number of LBR records for PERF_CAPABILITIES at refresh
        KVM: VMX: Use proper type-safe functions for vCPU => LBRs helpers
        KVM: x86: Refresh PMU after writes to MSR_IA32_PERF_CAPABILITIES
        KVM: selftests: Test all possible "invalid" PERF_CAPABILITIES.LBR_FMT vals
        KVM: selftests: Use getcpu() instead of sched_getcpu() in rseq_test
        KVM: selftests: Make rseq compatible with glibc-2.35
        KVM: Actually create debugfs in kvm_create_vm()
        KVM: Pass the name of the VM fd to kvm_create_vm_debugfs()
        KVM: Get an fd before creating the VM
        KVM: Shove vcpu stats_id init into kvm_vcpu_init()
        KVM: Shove vm stats_id init into kvm_create_vm()
        KVM: x86/mmu: Add sanity check that MMIO SPTE mask doesn't overlap gen
        KVM: x86/mmu: rename trace function name for asynchronous page fault
        KVM: x86/xen: Stop Xen timer before changing IRQ
        KVM: x86/xen: Initialize Xen timer only once
        KVM: SVM: Disable SEV-ES support if MMIO caching is disable
        KVM: x86/mmu: Fully re-evaluate MMIO caching when SPTE masks change
        KVM: x86: Tag kvm_mmu_x86_module_init() with __init
        ...
      e18a9042
    • Jakub Kicinski's avatar
      net: atm: bring back zatm uAPI · c2e75634
      Jakub Kicinski authored
      Jiri reports that linux-atm does not build without this header.
      Bring it back. It's completely dead code but we can't break
      the build for user space :(
      Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Fixes: 052e1f01 ("net: atm: remove support for ZeitNet ZN122x ATM devices")
      Link: https://lore.kernel.org/all/8576aef3-37e4-8bae-bab5-08f82a78efd3@kernel.org/
      Link: https://lore.kernel.org/r/20220810164547.484378-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c2e75634
    • Chen Lin's avatar
      dpaa2-eth: trace the allocated address instead of page struct · e34f4934
      Chen Lin authored
      We should trace the allocated address instead of page struct.
      
      Fixes: 27c87486 ("dpaa2-eth: Use a single page per Rx buffer")
      Signed-off-by: default avatarChen Lin <chen.lin5@zte.com.cn>
      Reviewed-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Link: https://lore.kernel.org/r/20220811151651.3327-1-chen45464546@163.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e34f4934
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-properties' · da2679f2
      Rafael J. Wysocki authored
      Merge changes adding support for device properties with buffer values
      to the ACPI device properties handling code.
      
      * acpi-properties:
        ACPI: property: Fix error handling in acpi_init_properties()
        ACPI: property: Read buffer properties as integers
        ACPI: property: Add support for parsing buffer property UUID
        ACPI: property: Unify integer value reading functions
        ACPI: property: Switch node property referencing from ifs to a switch
        ACPI: property: Move property ref argument parsing into a new function
        ACPI: property: Use acpi_object_type consistently in property ref parsing
        ACPI: property: Tie data nodes to acpi handles
        ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool
      da2679f2
    • Jakub Kicinski's avatar
      net: add missing kdoc for struct genl_multicast_group::flags · 5c221f0a
      Jakub Kicinski authored
      Multicast group flags were added in commit 4d54cc32 ("mptcp: avoid
      lock_fast usage in accept path"), but it missed adding the kdoc.
      
      Mention which flags go into that field, and do the same for
      op structs.
      
      Link: https://lore.kernel.org/r/20220809232012.403730-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      5c221f0a
    • Linus Torvalds's avatar
      Merge tag 'input-for-v5.20-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 2ae08b36
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
      
       - changes to input core to properly queue synthetic events (such as
         autorepeat) and to release multitouch contacts when an input device
         is inhibited or suspended
      
       - reworked quirk handling in i8042 driver that consolidates multiple
         DMI tables into one and adds several quirks for TUXEDO line of
         laptops
      
       - update to mt6779 keypad to better reflect organization of the
         hardware
      
       - changes to mtk-pmic-keys driver preparing it to handle more variants
      
       - facelift of adp5588-keys driver
      
       - improvements to iqs7222 driver
      
       - adjustments to various DT binding documents for input devices
      
       - other assorted driver fixes.
      
      * tag 'input-for-v5.20-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (54 commits)
        Input: adc-joystick - fix ordering in adc_joystick_probe()
        dt-bindings: input: ariel-pwrbutton: use spi-peripheral-props.yaml
        Input: deactivate MT slots when inhibiting or suspending devices
        Input: properly queue synthetic events
        dt-bindings: input: iqs7222: Use central 'linux,code' definition
        Input: i8042 - add dritek quirk for Acer Aspire One AO532
        dt-bindings: input: gpio-keys: accept also interrupt-extended
        dt-bindings: input: gpio-keys: reference input.yaml and document properties
        dt-bindings: input: gpio-keys: enforce node names to match all properties
        dt-bindings: input: Convert adc-keys to DT schema
        dt-bindings: input: Centralize 'linux,input-type' definition
        dt-bindings: input: Use common 'linux,keycodes' definition
        dt-bindings: input: Centralize 'linux,code' definition
        dt-bindings: input: Increase maximum keycode value to 0x2ff
        Input: mt6779-keypad - implement row/column selection
        Input: mt6779-keypad - match hardware matrix organization
        Input: i8042 - add additional TUXEDO devices to i8042 quirk tables
        Input: goodix - switch use of acpi_gpio_get_*_resource() APIs
        Input: i8042 - add TUXEDO devices to i8042 quirk tables
        Input: i8042 - add debug output for quirks
        ...
      2ae08b36
    • Jialiang Wang's avatar
      nfp: fix use-after-free in area_cache_get() · 02e1a114
      Jialiang Wang authored
      area_cache_get() is used to distribute cache->area and set cache->id,
       and if cache->id is not 0 and cache->area->kref refcount is 0, it will
       release the cache->area by nfp_cpp_area_release(). area_cache_get()
       set cache->id before cpp->op->area_init() and nfp_cpp_area_acquire().
      
      But if area_init() or nfp_cpp_area_acquire() fails, the cache->id is
       is already set but the refcount is not increased as expected. At this
       time, calling the nfp_cpp_area_release() will cause use-after-free.
      
      To avoid the use-after-free, set cache->id after area_init() and
       nfp_cpp_area_acquire() complete successfully.
      
      Note: This vulnerability is triggerable by providing emulated device
       equipped with specified configuration.
      
       BUG: KASAN: use-after-free in nfp6000_area_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:760)
        Write of size 4 at addr ffff888005b7f4a0 by task swapper/0/1
      
       Call Trace:
        <TASK>
       nfp6000_area_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:760)
       area_cache_get.constprop.8 (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:884)
      
       Allocated by task 1:
       nfp_cpp_area_alloc_with_name (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:303)
       nfp_cpp_area_cache_add (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:802)
       nfp6000_init (drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c:1230)
       nfp_cpp_from_operations (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:1215)
       nfp_pci_probe (drivers/net/ethernet/netronome/nfp/nfp_main.c:744)
      
       Freed by task 1:
       kfree (mm/slub.c:4562)
       area_cache_get.constprop.8 (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:873)
       nfp_cpp_read (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:924 drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c:973)
       nfp_cpp_readl (drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpplib.c:48)
      Signed-off-by: default avatarJialiang Wang <wangjialiang0806@163.com>
      Reviewed-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
      Acked-by: default avatarSimon Horman <simon.horman@corigine.com>
      Link: https://lore.kernel.org/r/20220810073057.4032-1-wangjialiang0806@163.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      02e1a114
    • Jakub Kicinski's avatar
      MAINTAINERS: use my korg address for mt7601u · cef8e326
      Jakub Kicinski authored
      Change my address for mt7601u to the main one.
      
      Link: https://lore.kernel.org/r/20220809233843.408004-1-kuba@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      cef8e326
    • Vadim Pasternak's avatar
      mlxsw: minimal: Fix deadlock in ports creation · 4f98cb04
      Vadim Pasternak authored
      Drop devl_lock() / devl_unlock() from ports creation and removal flows
      since the devlink instance lock is now taken by mlxsw_core.
      
      Fixes: 72a4c8c9 ("mlxsw: convert driver to use unlocked devlink API during init/fini")
      Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
      Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
      Link: https://lore.kernel.org/r/f4afce5ab0318617f3866b85274be52542d59b32.1660211614.git.petrm@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4f98cb04
    • Jay Vosburgh's avatar
      bonding: fix reference count leak in balance-alb mode · 4f5d33f4
      Jay Vosburgh authored
      Commit d5410ac7 ("net:bonding:support balance-alb interface
      with vlan to bridge") introduced a reference count leak by not releasing
      the reference acquired by ip_dev_find().  Remedy this by insuring the
      reference is released.
      
      Fixes: d5410ac7 ("net:bonding:support balance-alb interface with vlan to bridge")
      Signed-off-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Reviewed-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
      Link: https://lore.kernel.org/r/26758.1660194413@famineSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      4f5d33f4
    • Linus Torvalds's avatar
      Revert "Makefile.extrawarn: re-enable -Wformat for clang" · 21f9c8a1
      Linus Torvalds authored
      This reverts commit 258fafcd.
      
      The clang -Wformat warning is terminally broken, and the clang people
      can't seem to get their act together.
      
      This test program causes a warning with clang:
      
      	#include <stdio.h>
      
      	int main(int argc, char **argv)
      	{
      		printf("%hhu\n", 'a');
      	}
      
      resulting in
      
        t.c:5:19: warning: format specifies type 'unsigned char' but the argument has type 'int' [-Wformat]
                printf("%hhu\n", 'a');
                        ~~~~     ^~~
                        %d
      
      and apparently clang people consider that a feature, because they don't
      want to face the reality of how either C character constants, C
      arithmetic, and C varargs functions work.
      
      The rest of the world just shakes their head at that kind of
      incompetence, and turns off -Wformat for clang again.
      
      And no, the "you should use a pointless cast to shut this up" is not a
      valid answer.  That warning should not exist in the first place, or at
      least be optinal with some "-Wformat-me-harder" kind of option.
      
      [ Admittedly, there's also very little reason to *ever* use '%hh[ud]' in
        C, but what little reason there is is entirely about 'I want to see
        only the low 8 bits of the argument'. So I would suggest nobody ever
        use that format in the first place, but if they do, the clang
        behavious is simply always wrong. Because '%hhu' takes an 'int'. It's
        that simple. ]
      Reported-by: default avatarSudip Mukherjee (Codethink) <sudipm.mukherjee@gmail.com>
      Cc: Nick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      21f9c8a1