Skip to content
Permalink
Jordy-Zomer/ip…
Switch branches/tags

Commits on Nov 17, 2021

  1. ipv6: check return value of ipv6_skip_exthdr

    The offset value is used in pointer math on skb->data.
    Since ipv6_skip_exthdr may return -1 the pointer to uh and th
    may not point to the actual udp and tcp headers and potentially
    overwrite other stuff. This is why I think this should be checked.
    
    Signed-off-by: Jordy Zomer <jordy@pwning.systems>
    JordyZomer authored and intel-lab-lkp committed Nov 17, 2021

Commits on Sep 23, 2021

  1. xfrm: fix rcu lock in xfrm_notify_userpolicy()

    As stated in the comment above xfrm_nlmsg_multicast(), rcu read lock must
    be held before calling this function.
    
    Reported-by: syzbot+3d9866419b4aa8f985d6@syzkaller.appspotmail.com
    Fixes: 703b94b93c19 ("xfrm: notify default policy on update")
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    NicolasDichtel authored and Steffen Klassert committed Sep 23, 2021

Commits on Sep 17, 2021

  1. Merge branch 'xfrm: fix uapi for the default policy'

    Nicolas Dichtel says:
    
    ====================
    This feature has just been merged after the last release, thus it's still
    time to fix the uapi.
    As stated in the thread, the uapi is based on some magic values (from the
    userland POV).
    Here is a proposal to simplify this uapi and make it clear how to use it.
    The other problem was the notification: changing the default policy may
    radically change the packets flows.
    
    v2 -> v3: rebase on top of ipsec tree
    
    v1 -> v2: fix warnings reported by the kernel test robot
    ====================
    
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Steffen Klassert committed Sep 17, 2021

Commits on Sep 15, 2021

  1. xfrm: notify default policy on update

    This configuration knob is very sensible, it should be notified when
    changing.
    
    Fixes: 2d151d3 ("xfrm: Add possibility to set the default to block if we have no policy")
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    NicolasDichtel authored and Steffen Klassert committed Sep 15, 2021
  2. xfrm: make user policy API complete

    >From a userland POV, this API was based on some magic values:
     - dirmask and action were bitfields but meaning of bits
       (XFRM_POL_DEFAULT_*) are not exported;
     - action is confusing, if a bit is set, does it mean drop or accept?
    
    Let's try to simplify this uapi by using explicit field and macros.
    
    Fixes: 2d151d3 ("xfrm: Add possibility to set the default to block if we have no policy")
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    NicolasDichtel authored and Steffen Klassert committed Sep 15, 2021

Commits on Sep 14, 2021

  1. include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage

    Commit 2d151d3 ("xfrm: Add possibility to set the default to block
    if we have no policy") broke ABI by changing the value of the XFRM_MSG_MAPPING
    enum item, thus also evading the build-time check
    in security/selinux/nlmsgtab.c:selinux_nlmsg_lookup for presence of proper
    security permission checks in nlmsg_xfrm_perms.  Fix it by placing
    XFRM_MSG_SETDEFAULT/XFRM_MSG_GETDEFAULT to the end of the enum, right before
    __XFRM_MSG_MAX, and updating the nlmsg_xfrm_perms accordingly.
    
    Fixes: 2d151d3 ("xfrm: Add possibility to set the default to block if we have no policy")
    References: https://lore.kernel.org/netdev/20210901151402.GA2557@altlinux.org/
    Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
    Acked-by: Antony Antony <antony.antony@secunet.com>
    Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    esyr-rh authored and Steffen Klassert committed Sep 14, 2021

Commits on Sep 9, 2021

  1. net: xfrm: fix shift-out-of-bounds in xfrm_get_default

    Syzbot hit shift-out-of-bounds in xfrm_get_default. The problem was in
    missing validation check for user data.
    
    up->dirmask comes from user-space, so we need to check if this value
    is less than XFRM_USERPOLICY_DIRMASK_MAX to avoid shift-out-of-bounds bugs.
    
    Fixes: 2d151d3 ("xfrm: Add possibility to set the default to block if we have no policy")
    Reported-and-tested-by: syzbot+b2be9dd8ca6f6c73ee2d@syzkaller.appspotmail.com
    Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    pskrgag authored and Steffen Klassert committed Sep 9, 2021

Commits on Sep 7, 2021

  1. Merge tag 'net-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel…

    …/git/netdev/net
    
    Pull networking fixes and stragglers from Jakub Kicinski:
     "Networking stragglers and fixes, including changes from netfilter,
      wireless and can.
    
      Current release - regressions:
    
       - qrtr: revert check in qrtr_endpoint_post(), fixes audio and wifi
    
       - ip_gre: validate csum_start only on pull
    
       - bnxt_en: fix 64-bit doorbell operation on 32-bit kernels
    
       - ionic: fix double use of queue-lock, fix a sleeping in atomic
    
       - can: c_can: fix null-ptr-deref on ioctl()
    
       - cs89x0: disable compile testing on powerpc
    
      Current release - new code bugs:
    
       - bridge: mcast: fix vlan port router deadlock, consistently disable
         BH
    
      Previous releases - regressions:
    
       - dsa: tag_rtl4_a: fix egress tags, only port 0 was working
    
       - mptcp: fix possible divide by zero
    
       - netfilter: nft_ct: protect nft_ct_pcpu_template_refcnt with mutex
    
       - netfilter: socket: icmp6: fix use-after-scope
    
       - stmmac: fix MAC not working when system resume back with WoL active
    
      Previous releases - always broken:
    
       - ip/ip6_gre: use the same logic as SIT interfaces when computing
         v6LL address
    
       - seg6: set fc_nlinfo in nh_create_ipv4, nh_create_ipv6
    
       - mptcp: only send extra TCP acks in eligible socket states
    
       - dsa: lantiq_gswip: fix maximum frame length
    
       - stmmac: fix overall budget calculation for rxtx_napi
    
       - bnxt_en: fix firmware version reporting via devlink
    
       - renesas: sh_eth: add missing barrier to fix freeing wrong tx
         descriptor
    
      Stragglers:
    
       - netfilter: conntrack: switch to siphash
    
       - netfilter: refuse insertion if chain has grown too large
    
       - ncsi: add get MAC address command to get Intel i210 MAC address"
    
    * tag 'net-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (76 commits)
      ieee802154: Remove redundant initialization of variable ret
      net: stmmac: fix MAC not working when system resume back with WoL active
      net: phylink: add suspend/resume support
      net: renesas: sh_eth: Fix freeing wrong tx descriptor
      bonding: 3ad: pass parameter bond_params by reference
      cxgb3: fix oops on module removal
      can: c_can: fix null-ptr-deref on ioctl()
      can: rcar_canfd: add __maybe_unused annotation to silence warning
      net: wwan: iosm: Unify IO accessors used in the driver
      net: wwan: iosm: Replace io.*64_lo_hi() with regular accessors
      net: qcom/emac: Replace strlcpy with strscpy
      ip6_gre: Revert "ip6_gre: add validation for csum_start"
      net: hns3: make hclgevf_cmd_caps_bit_map0 and hclge_cmd_caps_bit_map0 static
      selftests/bpf: Test XDP bonding nest and unwind
      bonding: Fix negative jump label count on nested bonding
      MAINTAINERS: add VM SOCKETS (AF_VSOCK) entry
      stmmac: dwmac-loongson:Fix missing return value
      iwlwifi: fix printk format warnings in uefi.c
      net: create netdev->dev_addr assignment helpers
      bnxt_en: Fix possible unintended driver initiated error recovery
      ...
    torvalds committed Sep 7, 2021
  2. Merge tag 'linux-watchdog-5.15-rc1' of git://www.linux-watchdog.org/l…

    …inux-watchdog
    
    Pull watchdog updates from Wim Van Sebroeck:
    
     - add Mediatek MT7986 & MT8195 wdt support
    
     - add Maxim MAX63xx
    
     - drop bd70528 support
    
     - rewrite ixp4xx to watchdog framework
    
     - constify static struct watchdog_ops for sl28cpld_wdt, mpc8xxx_wdt and
       tqmx86
    
     - introduce watchdog_dev_suspend/resume
    
     - several fixes and improvements
    
    * tag 'linux-watchdog-5.15-rc1' of git://www.linux-watchdog.org/linux-watchdog:
      dt-bindings: watchdog: Add compatible for Mediatek MT7986
      watchdog: ixp4xx: Rewrite driver to use core
      watchdog: Start watchdog in watchdog_set_last_hw_keepalive only if appropriate
      watchdog: max63xx_wdt: Add device tree probing
      dt-bindings: watchdog: Add Maxim MAX63xx bindings
      watchdog: mediatek: mt8195: add wdt support
      dt-bindings: reset: mt8195: add toprgu reset-controller header file
      watchdog: tqmx86: Constify static struct watchdog_ops
      watchdog: mpc8xxx_wdt: Constify static struct watchdog_ops
      watchdog: sl28cpld_wdt: Constify static struct watchdog_ops
      watchdog: iTCO_wdt: Fix detection of SMI-off case
      watchdog: bcm2835_wdt: consider system-power-controller property
      watchdog: imx2_wdg: notify wdog core to stop ping worker on suspend
      watchdog: introduce watchdog_dev_suspend/resume
      watchdog: Fix NULL pointer dereference when releasing cdev
      watchdog: only run driver set_pretimeout op if device supports it
      watchdog: bd70528 drop bd70528 support
    torvalds committed Sep 7, 2021
  3. Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

    Pull KVM updates from Paolo Bonzini:
     "ARM:
       - Page ownership tracking between host EL1 and EL2
       - Rely on userspace page tables to create large stage-2 mappings
       - Fix incompatibility between pKVM and kmemleak
       - Fix the PMU reset state, and improve the performance of the virtual
         PMU
       - Move over to the generic KVM entry code
       - Address PSCI reset issues w.r.t. save/restore
       - Preliminary rework for the upcoming pKVM fixed feature
       - A bunch of MM cleanups
       - a vGIC fix for timer spurious interrupts
       - Various cleanups
    
      s390:
       - enable interpretation of specification exceptions
       - fix a vcpu_idx vs vcpu_id mixup
    
      x86:
       - fast (lockless) page fault support for the new MMU
       - new MMU now the default
       - increased maximum allowed VCPU count
       - allow inhibit IRQs on KVM_RUN while debugging guests
       - let Hyper-V-enabled guests run with virtualized LAPIC as long as
         they do not enable the Hyper-V "AutoEOI" feature
       - fixes and optimizations for the toggling of AMD AVIC (virtualized
         LAPIC)
       - tuning for the case when two-dimensional paging (EPT/NPT) is
         disabled
       - bugfixes and cleanups, especially with respect to vCPU reset and
         choosing a paging mode based on CR0/CR4/EFER
       - support for 5-level page table on AMD processors
    
      Generic:
       - MMU notifier invalidation callbacks do not take mmu_lock unless
         necessary
       - improved caching of LRU kvm_memory_slot
       - support for histogram statistics
       - add statistics for halt polling and remote TLB flush requests"
    
    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (210 commits)
      KVM: Drop unused kvm_dirty_gfn_invalid()
      KVM: x86: Update vCPU's hv_clock before back to guest when tsc_offset is adjusted
      KVM: MMU: mark role_regs and role accessors as maybe unused
      KVM: MIPS: Remove a "set but not used" variable
      x86/kvm: Don't enable IRQ when IRQ enabled in kvm_wait
      KVM: stats: Add VM stat for remote tlb flush requests
      KVM: Remove unnecessary export of kvm_{inc,dec}_notifier_count()
      KVM: x86/mmu: Move lpage_disallowed_link further "down" in kvm_mmu_page
      KVM: x86/mmu: Relocate kvm_mmu_page.tdp_mmu_page for better cache locality
      Revert "KVM: x86: mmu: Add guest physical address check in translate_gpa()"
      KVM: x86/mmu: Remove unused field mmio_cached in struct kvm_mmu_page
      kvm: x86: Increase KVM_SOFT_MAX_VCPUS to 710
      kvm: x86: Increase MAX_VCPUS to 1024
      kvm: x86: Set KVM_MAX_VCPU_ID to 4*KVM_MAX_VCPUS
      KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation
      KVM: x86/mmu: Don't freak out if pml5_root is NULL on 4-level host
      KVM: s390: index kvm->arch.idle_mask by vcpu_idx
      KVM: s390: Enable specification exception interpretation
      KVM: arm64: Trim guest debug exception handling
      KVM: SVM: Add 5-level page table support for SVM
      ...
    torvalds committed Sep 7, 2021
  4. Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/jdelvare/staging
    
    Pull dmi fix from Jean Delvare.
    
    Unbreak some existing udev/hwdb modalias matches due to misplaced
    product_sku field.
    
    * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
      firmware: dmi: Move product_sku info to the end of the modalias
    torvalds committed Sep 7, 2021
  5. Merge tag 'ntb-5.15' of git://github.com/jonmason/ntb

    Pull NTB updates from Jon Mason:
     "Bug fixes and clean-ups for Linux v5.15"
    
    * tag 'ntb-5.15' of git://github.com/jonmason/ntb:
      NTB: switch from 'pci_' to 'dma_' API
      ntb: ntb_pingpong: remove redundant initialization of variables msg_data and spad_data
      NTB: perf: Fix an error code in perf_setup_inbuf()
      NTB: Fix an error code in ntb_msit_probe()
      ntb: intel: remove invalid email address in header comment
    torvalds committed Sep 7, 2021
  6. Merge tag 'rproc-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/…

    …git/andersson/remoteproc
    
    Pull remoteproc updates from Bjorn Andersson:
    
     - move the crash recovery worker to the freezable work queue to avoid
       interaction with other drivers during suspend & resume
    
     - fix a couple of typos in comments
    
     - add support for handling the audio DSP on SDM660
    
     - fix a race between the Qualcomm wireless subsystem driver and the
       associated driver for the RF chip
    
    * tag 'rproc-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc:
      remoteproc: q6v5_pas: Add sdm660 ADSP PIL compatible
      dt-bindings: remoteproc: qcom: adsp: Add SDM660 ADSP
      remoteproc: use freezable workqueue for crash notifications
      remoteproc: fix kernel doc for struct rproc_ops
      remoteproc: fix an typo in fw_elf_get_class code comments
      remoteproc: qcom: wcnss: Fix race with iris probe
    torvalds committed Sep 7, 2021
  7. Merge tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux…

    …/kernel/git/lee/backlight
    
    Pull backlight updates from Lee Jones:
     "Fix-ups:
       - Improve bootloader/kernel device handover
    
      Bug Fixes:
       - Stabilise backlight in ktd253 driver"
    
    * tag 'backlight-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
      backlight: pwm_bl: Improve bootloader/kernel device handover
      backlight: ktd253: Stabilize backlight
    torvalds committed Sep 7, 2021
  8. Merge tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/lee/mfd
    
    Pull MFD updates from Lee Jones:
     "Core Frameworks:
       - Add support for registering devices via MFD cells to Simple MFD (I2C)
    
      New Drivers:
       - Add support for Renesas Synchronization Management Unit (SMU)
    
      New Device Support:
       - Add support for N5010 to Intel M10 BMC
       - Add support for Cannon Lake to Intel LPSS ACPI
       - Add support for Samsung SSG{1,2} to ST-Ericsson's U8500 family
       - Add support for TQMx110EB and TQMxE40x to TQ-Systems PLD TQMx86
    
      New Functionality:
       - Add support for GPIO to Intel LPC ICH
       - Add support for Reset to Texas Instruments TPS65086
    
      Fix-ups:
       - Trivial, sorting, whitespace, renaming, etc; mt6360-core, db8500-prcmu-regs, tqmx86
       - Device Tree fiddling; syscon, axp20x, qcom,pm8008, ti,tps65086, brcm,cru
       - Use proper APIs for IRQ map resolution; ab8500-core, stmpe, tc3589x, wm8994-irq
       - Pass 'supplied-from' property through axp288_fuel_gauge via swnode
       - Remove unused file entry; MAINTAINERS
       - Make interrupt line optional; tps65086
       - Rename db8500-cpuidle driver symbol; db8500-prcmu
       - Remove support for unused hardware; tqmx86
       - Provide a standard LPC clock frequency for unknown boards; tqmx86
       - Remove unused code; ti_am335x_tscadc
       - Use of_iomap() instead of ioremap(); syscon
    
      Bug Fixes:
       - Clear GPIO IRQ resource flags when no IRQ is set; tqmx86
       - Fix incorrect/misleading frequencies; db8500-prcmu
       - Mitigate namespace clash with other GPIOBASE users"
    
    * tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (31 commits)
      mfd: lpc_sch: Rename GPIOBASE to prevent build error
      mfd: syscon: Use of_iomap() instead of ioremap()
      dt-bindings: mfd: Add Broadcom CRU
      mfd: ti_am335x_tscadc: Delete superfluous error message
      mfd: tqmx86: Assume 24MHz LPC clock for unknown boards
      mfd: tqmx86: Add support for TQ-Systems DMI IDs
      mfd: tqmx86: Add support for TQMx110EB and TQMxE40x
      mfd: tqmx86: Fix typo in "platform"
      mfd: tqmx86: Remove incorrect TQMx90UC board ID
      mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set
      mfd: simple-mfd-i2c: Add support for registering devices via MFD cells
      mfd/cpuidle: ux500: Rename driver symbol
      mfd: tps65086: Add cell entry for reset driver
      mfd: tps65086: Make interrupt line optional
      dt-bindings: mfd: Convert tps65086.txt to YAML
      MAINTAINERS: Adjust ARM/NOMADIK/Ux500 ARCHITECTURES to file renaming
      mfd: db8500-prcmu: Handle missing FW variant
      mfd: db8500-prcmu: Rename register header
      mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cell
      mfd: Don't use irq_create_mapping() to resolve a mapping
      ...
    torvalds committed Sep 7, 2021
  9. Merge tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/li…

    …nux/kernel/git/brgl/linux
    
    Pull gpio updates from Bartosz Golaszewski:
     "We mostly have various improvements and refactoring all over the place
      but also some interesting new features - like the virtio GPIO driver
      that allows guest VMs to use host's GPIOs. We also have a new/old GPIO
      driver for rockchip - this one has been split out of the pinctrl
      driver.
    
      Summary:
    
       - new driver: gpio-virtio allowing a guest VM running linux to access
         GPIO lines provided by the host
    
       - split the GPIO driver out of the rockchip pin control driver
    
       - add support for a new model to gpio-aspeed-sgpio, refactor the
         driver and use generic device property interfaces, improve property
         sanitization
    
       - add ACPI support to gpio-tegra186
    
       - improve the code setting the line names to support multiple GPIO
         banks per device
    
       - constify a bunch of OF functions in the core GPIO code and make the
         declaration for one of the core OF functions we use consistent
         within its header
    
       - use software nodes in intel_quark_i2c_gpio
    
       - add support for the gpio-line-names property in gpio-mt7621
    
       - use the standard GPIO function for setting the GPIO names in
         gpio-brcmstb
    
       - fix a bunch of leaks and other bugs in gpio-mpc8xxx
    
       - use generic pm callbacks in gpio-ml-ioh
    
       - improve resource management and PM handling in gpio-mlxbf2
    
       - modernize and improve the gpio-dwapb driver
    
       - coding style improvements in gpio-rcar
    
       - documentation fixes and improvements
    
       - update the MAINTAINERS entry for gpio-zynq
    
       - minor tweaks in several drivers"
    
    * tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (35 commits)
      gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak
      gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()'
      gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()'
      gpio: viperboard: remove platform_set_drvdata() call in probe
      gpio: virtio: Add missing mailings lists in MAINTAINERS entry
      gpio: virtio: Fix sparse warnings
      gpio: remove the obsolete MX35 3DS BOARD MC9S08DZ60 GPIO functions
      gpio: max730x: Use the right include
      gpio: Add virtio-gpio driver
      gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro
      gpio: mlxbf2: Use devm_platform_ioremap_resource()
      gpio: mlxbf2: Drop wrong use of ACPI_PTR()
      gpio: mlxbf2: Convert to device PM ops
      gpio: dwapb: Get rid of legacy platform data
      mfd: intel_quark_i2c_gpio: Convert GPIO to use software nodes
      gpio: dwapb: Read GPIO base from gpio-base property
      gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs()
      gpiolib: Deduplicate forward declaration in the consumer.h header
      MAINTAINERS: update gpio-zynq.yaml reference
      gpio: tegra186: Add ACPI support
      ...
    torvalds committed Sep 7, 2021
  10. Merge tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/ke…

    …rnel/git/mszeredi/fuse
    
    Pull fuse updates from Miklos Szeredi:
    
     - Allow mounting an active fuse device. Previously the fuse device
       would always be mounted during initialization, and sharing a fuse
       superblock was only possible through mount or namespace cloning
    
     - Fix data flushing in syncfs (virtiofs only)
    
     - Fix data flushing in copy_file_range()
    
     - Fix a possible deadlock in atomic O_TRUNC
    
     - Misc fixes and cleanups
    
    * tag 'fuse-update-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
      fuse: remove unused arg in fuse_write_file_get()
      fuse: wait for writepages in syncfs
      fuse: flush extending writes
      fuse: truncate pagecache on atomic_o_trunc
      fuse: allow sharing existing sb
      fuse: move fget() to fuse_get_tree()
      fuse: move option checking into fuse_fill_super()
      fuse: name fs_context consistently
      fuse: fix use after free in fuse_read_interrupt()
    torvalds committed Sep 7, 2021
  11. Merge tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kerne…

    …l/git/danielt/linux
    
    Pull kgdb updates from Daniel Thompson:
     "Changes for kgdb/kdb this cycle are dominated by a change from Sumit
      that removes as small (256K) private heap from kdb. This is change
      I've hoped for ever since I discovered how few users of this heap
      remained in the kernel, so many thanks to Sumit for hunting these
      down.
    
      The other change is an incremental step towards SPDX headers"
    
    * tag 'kgdb-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
      kernel: debug: Convert to SPDX identifier
      kdb: Rename members of struct kdbtab_t
      kdb: Simplify kdb_defcmd macro logic
      kdb: Get rid of redundant kdb_register_flags()
      kdb: Rename struct defcmd_set to struct kdb_macro
      kdb: Get rid of custom debug heap allocator
    torvalds committed Sep 7, 2021
  12. Revert "memcg: enable accounting for pollfd and select bits arrays"

    This reverts commit b655843.
    
    Just like with the memcg lock accounting, the kernel test robot reports
    a sizeable performance regression for this commit, and while it clearly
    does the rigth thing in theory, we'll need to look at just how to avoid
    or minimize the performance overhead of the memcg accounting.
    
    People already have suggestions on how to do that, but it's "future
    work".
    
    So revert it for now.
    
    [ Note: the first link below is for this same commit but a different
      commit ID, because it's the kernel test robot ended up noticing it in
      Andrew Morton's patch queue ]
    
    Link: https://lore.kernel.org/lkml/20210905132732.GC15026@xsang-OptiPlex-9020/
    Link: https://lore.kernel.org/lkml/20210907150757.GE17617@xsang-OptiPlex-9020/
    Acked-by: Jens Axboe <axboe@kernel.dk>
    Acked-by: Shakeel Butt <shakeelb@google.com>
    Acked-by: Roman Gushchin <guro@fb.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Sep 7, 2021
  13. Revert "memcg: enable accounting for file lock caches"

    This reverts commit 0f12156.
    
    The kernel test robot reports a sizeable performance regression for this
    commit, and while it clearly does the rigth thing in theory, we'll need
    to look at just how to avoid or minimize the performance overhead of the
    memcg accounting.
    
    People already have suggestions on how to do that, but it's "future
    work".
    
    So revert it for now.
    
    Link: https://lore.kernel.org/lkml/20210907150757.GE17617@xsang-OptiPlex-9020/
    Acked-by: Jens Axboe <axboe@kernel.dk>
    Acked-by: Shakeel Butt <shakeelb@google.com>
    Acked-by: Roman Gushchin <guro@fb.com>
    Cc: Tejun Heo <tj@kernel.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Sep 7, 2021
  14. Revert "mm/gup: remove try_get_page(), call try_get_compound_head() d…

    …irectly"
    
    This reverts commit 9857a17.
    
    That commit was completely broken, and I should have caught on to it
    earlier.  But happily, the kernel test robot noticed the breakage fairly
    quickly.
    
    The breakage is because "try_get_page()" is about avoiding the page
    reference count overflow case, but is otherwise the exact same as a
    plain "get_page()".
    
    In contrast, "try_get_compound_head()" is an entirely different beast,
    and uses __page_cache_add_speculative() because it's not just about the
    page reference count, but also about possibly racing with the underlying
    page going away.
    
    So all the commentary about how
    
     "try_get_page() has fallen a little behind in terms of maintenance,
      try_get_compound_head() handles speculative page references more
      thoroughly"
    
    was just completely wrong: yes, try_get_compound_head() handles
    speculative page references, but the point is that try_get_page() does
    not, and must not.
    
    So there's no lack of maintainance - there are fundamentally different
    semantics.
    
    A speculative page reference would be entirely wrong in "get_page()",
    and it's entirely wrong in "try_get_page()".  It's not about
    speculation, it's purely about "uhhuh, you can't get this page because
    you've tried to increment the reference count too much already".
    
    The reason the kernel test robot noticed this bug was that it hit the
    VM_BUG_ON() in __page_cache_add_speculative(), which is all about
    verifying that the context of any speculative page access is correct.
    But since that isn't what try_get_page() is all about, the VM_BUG_ON()
    tests things that are not correct to test for try_get_page().
    
    Reported-by: kernel test robot <oliver.sang@intel.com>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: Christoph Hellwig <hch@lst.de>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Sep 7, 2021
  15. ieee802154: Remove redundant initialization of variable ret

    The variable ret is being initialized with a value that is never read, it
    is being updated later on. The assignment is redundant and can be removed.
    
    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Sep 7, 2021
  16. Merge branch 'stmmac-wol-fix'

    Joakim Zhang says:
    
    ====================
    net: stmmac: fix WoL issue
    
    This patch set fixes stmmac not working after system resume back with WoL
    active. Thanks a lot for Russell King keeps looking into this issue.
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 7, 2021
  17. net: stmmac: fix MAC not working when system resume back with WoL active

    We can reproduce this issue with below steps:
    1) enable WoL on the host
    2) host system suspended
    3) remote client send out wakeup packets
    We can see that host system resume back, but can't work, such as ping failed.
    
    After a bit digging, this issue is introduced by the commit 46f69de
    ("net: stmmac: Use resolved link config in mac_link_up()"), which use
    the finalised link parameters in mac_link_up() rather than the
    parameters in mac_config().
    
    There are two scenarios for MAC suspend/resume in STMMAC driver:
    
    1) MAC suspend with WoL inactive, stmmac_suspend() call
    phylink_mac_change() to notify phylink machine that a change in MAC
    state, then .mac_link_down callback would be invoked. Further, it will
    call phylink_stop() to stop the phylink instance. When MAC resume back,
    firstly phylink_start() is called to start the phylink instance, then
    call phylink_mac_change() which will finally trigger phylink machine to
    invoke .mac_config and .mac_link_up callback. All is fine since
    configuration in these two callbacks will be initialized, that means MAC
    can restore the state.
    
    2) MAC suspend with WoL active, phylink_mac_change() will put link
    down, but there is no phylink_stop() to stop the phylink instance, so it
    will link up again, that means .mac_config and .mac_link_up would be
    invoked before system suspended. After system resume back, it will do
    DMA initialization and SW reset which let MAC lost the hardware setting
    (i.e MAC_Configuration register(offset 0x0) is reset). Since link is up
    before system suspended, so .mac_link_up would not be invoked after
    system resume back, lead to there is no chance to initialize the
    configuration in .mac_link_up callback, as a result, MAC can't work any
    longer.
    
    After discussed with Russell King [1], we confirm that phylink framework
    have not take WoL into consideration yet. This patch calls
    phylink_suspend()/phylink_resume() functions which is newly introduced
    by Russell King to fix this issue.
    
    [1] https://lore.kernel.org/netdev/20210901090228.11308-1-qiangqing.zhang@nxp.com/
    
    Fixes: 46f69de ("net: stmmac: Use resolved link config in mac_link_up()")
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Joakim Zhang authored and davem330 committed Sep 7, 2021
  18. net: phylink: add suspend/resume support

    Joakim Zhang reports that Wake-on-Lan with the stmmac ethernet driver broke
    when moving the incorrect handling of mac link state out of mac_config().
    This reason this breaks is because the stmmac's WoL is handled by the MAC
    rather than the PHY, and phylink doesn't cater for that scenario.
    
    This patch adds the necessary phylink code to handle suspend/resume events
    according to whether the MAC still needs a valid link or not. This is the
    barest minimum for this support.
    
    Reported-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Tested-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Russell King (Oracle) authored and davem330 committed Sep 7, 2021
  19. net: renesas: sh_eth: Fix freeing wrong tx descriptor

    The cur_tx counter must be incremented after TACT bit of
    txdesc->status was set. However, a CPU is possible to reorder
    instructions and/or memory accesses between cur_tx and
    txdesc->status. And then, if TX interrupt happened at such a
    timing, the sh_eth_tx_free() may free the descriptor wrongly.
    So, add wmb() before cur_tx++.
    Otherwise NETDEV WATCHDOG timeout is possible to happen.
    
    Fixes: 86a74ff ("net: sh_eth: add support for Renesas SuperH Ethernet")
    Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    shimoday authored and davem330 committed Sep 7, 2021
  20. bonding: 3ad: pass parameter bond_params by reference

    The parameter bond_params is a relatively large 192 byte sized
    struct so pass it by reference rather than by value to reduce
    copying.
    
    Addresses-Coverity: ("Big parameter passed by value")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Colin Ian King authored and davem330 committed Sep 7, 2021
  21. Merge tag 'linux-can-fixes-for-5.15-20210907' of git://git.kernel.org…

    …/pub/scm/linux/kernel/git/mkl/linux-can
    
    linux-can-fixes-for-5.15-20210907
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 7, 2021
  22. Merge tag 'wireless-drivers-2021-09-07' of git://git.kernel.org/pub/s…

    …cm/linux/kernel/git/kvalo/wireless-drivers
    
    Kalle Valo says:
    
    ====================
    wireless-drivers fixes for v5.15
    
    First set of fixes for v5.15 and only iwlwifi patches this time. Most
    important being support for new hardware and new firmware API.
    
    I had already earlier applied a fix which also Linus applied to this
    tree as commit 1476ff2 ("iwl: fix debug printf format strings"),
    but this doesn't seem to cause any conflicts so I left it there.
    
    iwlwifi
    
    * add support for firmware API 66
    
    * add support for Samsung Galaxy Book Flex2 Alpha
    
    * fix a leak happening every time module is loaded
    
    * fix a printk compiler warning
    ====================
    
    Signed-off-by: David S. Miller <davem@davemloft.net>
    davem330 committed Sep 7, 2021
  23. cxgb3: fix oops on module removal

    When removing the driver module w/o bringing an interface up before
    the error below occurs. Reason seems to be that cancel_work_sync() is
    called in t3_sge_stop() for a queue that hasn't been initialized yet.
    
    [10085.941785] ------------[ cut here ]------------
    [10085.941799] WARNING: CPU: 1 PID: 5850 at kernel/workqueue.c:3074 __flush_work+0x3ff/0x480
    [10085.941819] Modules linked in: vfat snd_hda_codec_hdmi fat snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio led_class ee1004 iTCO_
    wdt intel_tcc_cooling x86_pkg_temp_thermal coretemp aesni_intel crypto_simd cryptd snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hda_core r
    8169 snd_pcm realtek mdio_devres snd_timer snd i2c_i801 i2c_smbus libphy i915 i2c_algo_bit cxgb3(-) intel_gtt ttm mdio drm_kms_helper mei_me s
    yscopyarea sysfillrect sysimgblt mei fb_sys_fops acpi_pad sch_fq_codel crypto_user drm efivarfs ext4 mbcache jbd2 crc32c_intel
    [10085.941944] CPU: 1 PID: 5850 Comm: rmmod Not tainted 5.14.0-rc7-next-20210826+ torvalds#6
    [10085.941974] Hardware name: System manufacturer System Product Name/PRIME H310I-PLUS, BIOS 2603 10/21/2019
    [10085.941992] RIP: 0010:__flush_work+0x3ff/0x480
    [10085.942003] Code: c0 74 6b 65 ff 0d d1 bd 78 75 e8 bc 2f 06 00 48 c7 c6 68 b1 88 8a 48 c7 c7 e0 5f b4 8b 45 31 ff e8 e6 66 04 00 e9 4b fe ff ff <0f> 0b 45 31 ff e9 41 fe ff ff e8 72 c1 79 00 85 c0 74 87 80 3d 22
    [10085.942036] RSP: 0018:ffffa1744383fc08 EFLAGS: 00010246
    [10085.942048] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000923
    [10085.942062] RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff91c901710a88
    [10085.942076] RBP: ffffa1744383fce8 R08: 0000000000000001 R09: 0000000000000001
    [10085.942090] R10: 00000000000000c2 R11: 0000000000000000 R12: ffff91c901710a88
    [10085.942104] R13: 0000000000000000 R14: ffff91c909a96100 R15: 0000000000000001
    [10085.942118] FS:  00007fe417837740(0000) GS:ffff91c969d00000(0000) knlGS:0000000000000000
    [10085.942134] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [10085.942146] CR2: 000055a8d567ecd8 CR3: 0000000121690003 CR4: 00000000003706e0
    [10085.942160] Call Trace:
    [10085.942166]  ? __lock_acquire+0x3af/0x22e0
    [10085.942177]  ? cancel_work_sync+0xb/0x10
    [10085.942187]  __cancel_work_timer+0x128/0x1b0
    [10085.942197]  ? __pm_runtime_resume+0x5b/0x90
    [10085.942208]  cancel_work_sync+0xb/0x10
    [10085.942217]  t3_sge_stop+0x2f/0x50 [cxgb3]
    [10085.942234]  remove_one+0x26/0x190 [cxgb3]
    [10085.942248]  pci_device_remove+0x39/0xa0
    [10085.942258]  __device_release_driver+0x15e/0x240
    [10085.942269]  driver_detach+0xd9/0x120
    [10085.942278]  bus_remove_driver+0x53/0xd0
    [10085.942288]  driver_unregister+0x2c/0x50
    [10085.942298]  pci_unregister_driver+0x31/0x90
    [10085.942307]  cxgb3_cleanup_module+0x10/0x18c [cxgb3]
    [10085.942324]  __do_sys_delete_module+0x191/0x250
    [10085.942336]  ? syscall_enter_from_user_mode+0x21/0x60
    [10085.942347]  ? trace_hardirqs_on+0x2a/0xe0
    [10085.942357]  __x64_sys_delete_module+0x13/0x20
    [10085.942368]  do_syscall_64+0x40/0x90
    [10085.942377]  entry_SYSCALL_64_after_hwframe+0x44/0xae
    [10085.942389] RIP: 0033:0x7fe41796323b
    
    Fixes: 5e0b892 ("net:cxgb3: replace tasklets with works")
    Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    hkallweit authored and davem330 committed Sep 7, 2021
  24. mfd: lpc_sch: Rename GPIOBASE to prevent build error

    One MIPS platform (mach-rc32434) defines GPIOBASE. This macro
    conflicts with one of the same name in lpc_sch.c. Rename the latter one
    to prevent the build error.
    
    ../drivers/mfd/lpc_sch.c:25: error: "GPIOBASE" redefined [-Werror]
       25 | #define GPIOBASE        0x44
    ../arch/mips/include/asm/mach-rc32434/rb.h:32: note: this is the location of the previous definition
       32 | #define GPIOBASE        0x050000
    
    Cc: Denis Turischev <denis@compulab.co.il>
    Fixes: e82c60a ("mfd: Introduce lpc_sch for Intel SCH LPC bridge")
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    rddunlap authored and lag-linaro committed Sep 7, 2021
  25. mfd: syscon: Use of_iomap() instead of ioremap()

    This automatically selects between ioremap() and ioremap_np() on
    platforms that require it, such as Apple SoCs.
    
    Signed-off-by: Hector Martin <marcan@marcan.st>
    Acked-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    marcan authored and lag-linaro committed Sep 7, 2021
  26. can: c_can: fix null-ptr-deref on ioctl()

    The pdev maybe not a platform device, e.g. c_can_pci device, in this
    case, calling to_platform_device() would not make sense. Also, per the
    comment in drivers/net/can/c_can/c_can_ethtool.c, @bus_info should
    match dev_name() string, so I am replacing this with dev_name() to fix
    this issue.
    
    [    1.458583] BUG: unable to handle page fault for address: 0000000100000000
    [    1.460921] RIP: 0010:strnlen+0x1a/0x30
    [    1.466336]  ? c_can_get_drvinfo+0x65/0xb0 [c_can]
    [    1.466597]  ethtool_get_drvinfo+0xae/0x360
    [    1.466826]  dev_ethtool+0x10f8/0x2970
    [    1.467880]  sock_ioctl+0xef/0x300
    
    Fixes: 2722ac9 ("can: c_can: add ethtool support")
    Link: https://lore.kernel.org/r/20210906233704.1162666-1-ztong0001@gmail.com
    Cc: stable@vger.kernel.org # 5.14+
    Signed-off-by: Tong Zhang <ztong0001@gmail.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    lzto authored and marckleinebudde committed Sep 7, 2021
  27. can: rcar_canfd: add __maybe_unused annotation to silence warning

    Since commit
    
    | dd3bd23 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
    
    the rcar_canfd driver can be compile tested on all architectures. On
    non OF enabled archs, or archs where OF is optional (and disabled in
    the .config) the compilation throws the following warning:
    
    | drivers/net/can/rcar/rcar_canfd.c:2020:34: warning: unused variable 'rcar_canfd_of_table' [-Wunused-const-variable]
    | static const struct of_device_id rcar_canfd_of_table[] = {
    |                                  ^
    
    This patch fixes the warning by marking the variable
    rcar_canfd_of_table as __maybe_unused.
    
    Fixes: ac42240 ("can: rcar: Kconfig: Add helper dependency on COMPILE_TEST")
    Fixes: dd3bd23 ("can: rcar_canfd: Add Renesas R-Car CAN FD driver")
    Link: https://lore.kernel.org/all/20210907064537.1054268-1-mkl@pengutronix.de
    Cc: linux-renesas-soc@vger.kernel.org
    Cc: Cai Huoqing <caihuoqing@baidu.com>
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
    marckleinebudde committed Sep 7, 2021

Commits on Sep 6, 2021

  1. thunderbolt: test: split up test cases in tb_test_credit_alloc_all

    The tb_test_credit_alloc_all() function had a huge number of
    KUNIT_ASSERT() statements, all of which (though the magic of many many
    layers of inscrutable macros) ended up allocating and initializing
    various test assertion structures on the stack.
    
    Don't do that.  The kernel stack isn't infinite, and we have compiler
    warnings (now errors) for the case where a stack frame grows too large.
    
    Like it did here, by not an inconsiderable margin:
    
       drivers/thunderbolt/test.c: In function ‘tb_test_credit_alloc_all’:
       drivers/thunderbolt/test.c:2367:1: error: the frame size of 4500 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]
        2367 | }
             | ^
    
    Solve this similarly to the lib/test_scanf case: split out the tests
    into several smaller functions, each just testing one particular tunnel
    credit allocation.
    
    This makes the i386 allyesconfig build work for me again.
    
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    torvalds committed Sep 6, 2021
Older