1. 12 Sep, 2023 7 commits
  2. 11 Sep, 2023 7 commits
  3. 08 Sep, 2023 6 commits
    • Jiri Olsa's avatar
      selftests/bpf: Add kprobe_multi override test · 7182e564
      Jiri Olsa authored
      Adding test that tries to attach program with bpf_override_return
      helper to function not within error injection list.
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Link: https://lore.kernel.org/bpf/20230907200652.926951-2-jolsa@kernel.org
      7182e564
    • Jiri Olsa's avatar
      bpf: Add override check to kprobe multi link attach · 41bc46c1
      Jiri Olsa authored
      Currently the multi_kprobe link attach does not check error
      injection list for programs with bpf_override_return helper
      and allows them to attach anywhere. Adding the missing check.
      
      Fixes: 0dcac272 ("bpf: Add multi kprobe link")
      Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
      Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
      Reviewed-by: default avatarAlan Maguire <alan.maguire@oracle.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/bpf/20230907200652.926951-1-jolsa@kernel.org
      41bc46c1
    • Liu Jian's avatar
      net: ipv4: fix one memleak in __inet_del_ifa() · ac28b1ec
      Liu Jian authored
      I got the below warning when do fuzzing test:
      unregister_netdevice: waiting for bond0 to become free. Usage count = 2
      
      It can be repoduced via:
      
      ip link add bond0 type bond
      sysctl -w net.ipv4.conf.bond0.promote_secondaries=1
      ip addr add 4.117.174.103/0 scope 0x40 dev bond0
      ip addr add 192.168.100.111/255.255.255.254 scope 0 dev bond0
      ip addr add 0.0.0.4/0 scope 0x40 secondary dev bond0
      ip addr del 4.117.174.103/0 scope 0x40 dev bond0
      ip link delete bond0 type bond
      
      In this reproduction test case, an incorrect 'last_prim' is found in
      __inet_del_ifa(), as a result, the secondary address(0.0.0.4/0 scope 0x40)
      is lost. The memory of the secondary address is leaked and the reference of
      in_device and net_device is leaked.
      
      Fix this problem:
      Look for 'last_prim' starting at location of the deleted IP and inserting
      the promoted IP into the location of 'last_prim'.
      
      Fixes: 0ff60a45 ("[IPV4]: Fix secondary IP addresses after promotion")
      Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
      Signed-off-by: default avatarJulian Anastasov <ja@ssi.bg>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac28b1ec
    • Linus Torvalds's avatar
      Merge tag 'net-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 73be7fb1
      Linus Torvalds authored
      Pull networking updates from Jakub Kicinski:
       "Including fixes from netfilter and bpf.
      
        Current release - regressions:
      
         - eth: stmmac: fix failure to probe without MAC interface specified
      
        Current release - new code bugs:
      
         - docs: netlink: fix missing classic_netlink doc reference
      
        Previous releases - regressions:
      
         - deal with integer overflows in kmalloc_reserve()
      
         - use sk_forward_alloc_get() in sk_get_meminfo()
      
         - bpf_sk_storage: fix the missing uncharge in sk_omem_alloc
      
         - fib: avoid warn splat in flow dissector after packet mangling
      
         - skb_segment: call zero copy functions before using skbuff frags
      
         - eth: sfc: check for zero length in EF10 RX prefix
      
        Previous releases - always broken:
      
         - af_unix: fix msg_controllen test in scm_pidfd_recv() for
           MSG_CMSG_COMPAT
      
         - xsk: fix xsk_build_skb() dereferencing possible ERR_PTR()
      
         - netfilter:
            - nft_exthdr: fix non-linear header modification
            - xt_u32, xt_sctp: validate user space input
            - nftables: exthdr: fix 4-byte stack OOB write
            - nfnetlink_osf: avoid OOB read
            - one more fix for the garbage collection work from last release
      
         - igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
      
         - bpf, sockmap: fix preempt_rt splat when using raw_spin_lock_t
      
         - handshake: fix null-deref in handshake_nl_done_doit()
      
         - ip: ignore dst hint for multipath routes to ensure packets are
           hashed across the nexthops
      
         - phy: micrel:
            - correct bit assignments for cable test errata
            - disable EEE according to the KSZ9477 errata
      
        Misc:
      
         - docs/bpf: document compile-once-run-everywhere (CO-RE) relocations
      
         - Revert "net: macsec: preserve ingress frame ordering", it appears
           to have been developed against an older kernel, problem doesn't
           exist upstream"
      
      * tag 'net-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (95 commits)
        net: enetc: distinguish error from valid pointers in enetc_fixup_clear_rss_rfs()
        Revert "net: team: do not use dynamic lockdep key"
        net: hns3: remove GSO partial feature bit
        net: hns3: fix the port information display when sfp is absent
        net: hns3: fix invalid mutex between tc qdisc and dcb ets command issue
        net: hns3: fix debugfs concurrency issue between kfree buffer and read
        net: hns3: fix byte order conversion issue in hclge_dbg_fd_tcam_read()
        net: hns3: Support query tx timeout threshold by debugfs
        net: hns3: fix tx timeout issue
        net: phy: Provide Module 4 KSZ9477 errata (DS80000754C)
        netfilter: nf_tables: Unbreak audit log reset
        netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
        netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
        netfilter: nf_tables: uapi: Describe NFTA_RULE_CHAIN_ID
        netfilter: nfnetlink_osf: avoid OOB read
        netfilter: nftables: exthdr: fix 4-byte stack OOB write
        selftests/bpf: Check bpf_sk_storage has uncharged sk_omem_alloc
        bpf: bpf_sk_storage: Fix the missing uncharge in sk_omem_alloc
        bpf: bpf_sk_storage: Fix invalid wait context lockdep report
        s390/bpf: Pass through tail call counter in trampolines
        ...
      73be7fb1
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 2ab35ce2
      Linus Torvalds authored
      Pull more devicetree updates from Rob Herring:
       "A couple of conversions which didn't get picked up by the subsystems
        and one fix:
      
         - Convert st,stih407-irq-syscfg and Omnivision OV7251 bindings to DT
           schema
      
         - Merge Omnivision OV5695 into OV5693 binding
      
         - Fix of_overlay_fdt_apply prototype when !CONFIG_OF_OVERLAY"
      
      * tag 'devicetree-fixes-for-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        dt-bindings: irqchip: convert st,stih407-irq-syscfg to DT schema
        media: dt-bindings: Convert Omnivision OV7251 to DT schema
        media: dt-bindings: Merge OV5695 into OV5693 binding
        of: overlay: Fix of_overlay_fdt_apply prototype when !CONFIG_OF_OVERLAY
      2ab35ce2
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.6-rc1' of... · 8d844b35
      Linus Torvalds authored
      Merge tag 'pwm/for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "Various cleanups and fixes across the board"
      
      * tag 'pwm/for-6.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (31 commits)
        pwm: lpc32xx: Remove handling of PWM channels
        pwm: atmel: Simplify using devm functions
        dt-bindings: pwm: brcm,kona-pwm: convert to YAML
        pwm: stmpe: Handle errors when disabling the signal
        pwm: stm32: Simplify using devm_pwmchip_add()
        pwm: stm32: Don't modify HW state in .remove() callback
        pwm: Fix order of freeing resources in pwmchip_remove()
        pwm: ntxec: Use device_set_of_node_from_dev()
        pwm: ntxec: Drop a write-only variable from driver data
        pwm: pxa: Don't reimplement of_device_get_match_data()
        pwm: lpc18xx-sct: Simplify using devm_clk_get_enabled()
        pwm: atmel-tcb: Don't track polarity in driver data
        pwm: atmel-tcb: Unroll atmel_tcb_pwm_set_polarity() into only caller
        pwm: atmel-tcb: Put per-channel data into driver data
        pwm: atmel-tcb: Fix resource freeing in error path and remove
        pwm: atmel-tcb: Harmonize resource allocation order
        pwm: Drop unused #include <linux/radix-tree.h>
        pwm: rz-mtu3: Fix build warning 'num_channel_ios' not described
        pwm: Remove outdated documentation for pwmchip_remove()
        pwm: atmel: Enable clk when pwm already enabled in bootloader
        ...
      8d844b35
  4. 07 Sep, 2023 20 commits
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · ff6e6ded
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "Subsystem:
      
         - Add a way for drivers to tell the core the supported alarm range is
           smaller than the date range. This is not used yet but will be
           useful for the alarmtimers in the next release.
      
         - fix Wvoid-pointer-to-enum-cast warnings
      
         - remove redundant of_match_ptr()
      
         - stop warning for invalid alarms when the alarm is disabled
      
        Drivers:
      
         - isl12022: allow setting the trip level for battery level detection
      
         - pcf2127: add support for PCF2131 and multiple timestamps
      
         - stm32: time precision improvement, many fixes
      
         - twl: NVRAM support"
      
      * tag 'rtc-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (73 commits)
        dt-bindings: rtc: ds3231: Remove text binding
        rtc: wm8350: remove unnecessary messages
        rtc: twl: remove unnecessary messages
        rtc: sun6i: remove unnecessary message
        rtc: stop warning for invalid alarms when the alarm is disabled
        rtc: twl: add NVRAM support
        rtc: pcf85363: Allow to wake up system without IRQ
        rtc: m48t86: add DT support for m48t86
        dt-bindings: rtc: Add ST M48T86
        rtc: pcf2127: remove useless check
        rtc: rzn1: Report maximum alarm limit to rtc core
        rtc: ds1305: Report maximum alarm limit to rtc core
        rtc: tps6586x: Report maximum alarm limit to rtc core
        rtc: cmos: Report supported alarm limit to rtc infrastructure
        rtc: cros-ec: Detect and report supported alarm window size
        rtc: Add support for limited alarm timer offsets
        rtc: isl1208: Fix incorrect logic in isl1208_set_xtoscb()
        MAINTAINERS: remove obsolete pattern in RTC SUBSYSTEM section
        rtc: tps65910: Remove redundant dev_warn() and do not check for 0 return after calling platform_get_irq()
        rtc: omap: Do not check for 0 return after calling platform_get_irq()
        ...
      ff6e6ded
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · e59a698b
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
       "Core:
         - Fix SETDASA when static and dynamic adress are equal
         - Fix cmd_v1 DAA exit criteria
      
        Drivers:
         - svc: allow probing without any device"
      
      * tag 'i3c/for-6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: master: svc: fix probe failure when no i3c device exist
        i3c: master: Fix SETDASA process
        dt-bindings: i3c: Fix description for assigned-address
        i3c: master: svc: Describe member 'saved_regs'
        i3c: master: svc: Do not check for 0 return after calling platform_get_irq()
        i3c/master: cmd_v1: Fix the exit criteria for the daa procedure
        i3c: Explicitly include correct DT includes
      e59a698b
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v6.6-merge-window' of... · d9b9ea58
      Linus Torvalds authored
      Merge tag 'regulator-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fixes from Mark Brown:
       "A couple of fixes that came in during the merge window, both driver
        specific - one for a bug that came up in testing, one for a bug due
        to a misreading of the datasheet"
      
      * tag 'regulator-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: tps6594-regulator: Fix random kernel crash
        regulator: tps6287x: Fix n_voltages
      d9b9ea58
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 32904dec
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A couple of fixes for the sun6i driver. The patch to reduce DMA RX to
        single byte width all the time is *hopefully* excessively cautious but
        it's unclear which SoCs are affected so the fix just covers everything
        for safety"
      
      * tag 'spi-fix-v6.6-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain
        spi: sun6i: reduce DMA RX transfer width to single byte
      32904dec
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 0c021834
      Linus Torvalds authored
      Pull kvm updates from Paolo Bonzini:
       "ARM:
      
         - Clean up vCPU targets, always returning generic v8 as the preferred
           target
      
         - Trap forwarding infrastructure for nested virtualization (used for
           traps that are taken from an L2 guest and are needed by the L1
           hypervisor)
      
         - FEAT_TLBIRANGE support to only invalidate specific ranges of
           addresses when collapsing a table PTE to a block PTE. This avoids
           that the guest refills the TLBs again for addresses that aren't
           covered by the table PTE.
      
         - Fix vPMU issues related to handling of PMUver.
      
         - Don't unnecessary align non-stack allocations in the EL2 VA space
      
         - Drop HCR_VIRT_EXCP_MASK, which was never used...
      
         - Don't use smp_processor_id() in kvm_arch_vcpu_load(), but the cpu
           parameter instead
      
         - Drop redundant call to kvm_set_pfn_accessed() in user_mem_abort()
      
         - Remove prototypes without implementations
      
        RISC-V:
      
         - Zba, Zbs, Zicntr, Zicsr, Zifencei, and Zihpm support for guest
      
         - Added ONE_REG interface for SATP mode
      
         - Added ONE_REG interface to enable/disable multiple ISA extensions
      
         - Improved error codes returned by ONE_REG interfaces
      
         - Added KVM_GET_REG_LIST ioctl() implementation for KVM RISC-V
      
         - Added get-reg-list selftest for KVM RISC-V
      
        s390:
      
         - PV crypto passthrough enablement (Tony, Steffen, Viktor, Janosch)
      
           Allows a PV guest to use crypto cards. Card access is governed by
           the firmware and once a crypto queue is "bound" to a PV VM every
           other entity (PV or not) looses access until it is not bound
           anymore. Enablement is done via flags when creating the PV VM.
      
         - Guest debug fixes (Ilya)
      
        x86:
      
         - Clean up KVM's handling of Intel architectural events
      
         - Intel bugfixes
      
         - Add support for SEV-ES DebugSwap, allowing SEV-ES guests to use
           debug registers and generate/handle #DBs
      
         - Clean up LBR virtualization code
      
         - Fix a bug where KVM fails to set the target pCPU during an IRTE
           update
      
         - Fix fatal bugs in SEV-ES intrahost migration
      
         - Fix a bug where the recent (architecturally correct) change to
           reinject #BP and skip INT3 broke SEV guests (can't decode INT3 to
           skip it)
      
         - Retry APIC map recalculation if a vCPU is added/enabled
      
         - Overhaul emergency reboot code to bring SVM up to par with VMX, tie
           the "emergency disabling" behavior to KVM actually being loaded,
           and move all of the logic within KVM
      
         - Fix user triggerable WARNs in SVM where KVM incorrectly assumes the
           TSC ratio MSR cannot diverge from the default when TSC scaling is
           disabled up related code
      
         - Add a framework to allow "caching" feature flags so that KVM can
           check if the guest can use a feature without needing to search
           guest CPUID
      
         - Rip out the ancient MMU_DEBUG crud and replace the useful bits with
           CONFIG_KVM_PROVE_MMU
      
         - Fix KVM's handling of !visible guest roots to avoid premature
           triple fault injection
      
         - Overhaul KVM's page-track APIs, and KVMGT's usage, to reduce the
           API surface that is needed by external users (currently only
           KVMGT), and fix a variety of issues in the process
      
        Generic:
      
         - Wrap kvm_{gfn,hva}_range.pte in a union to allow mmu_notifier
           events to pass action specific data without needing to constantly
           update the main handlers.
      
         - Drop unused function declarations
      
        Selftests:
      
         - Add testcases to x86's sync_regs_test for detecting KVM TOCTOU bugs
      
         - Add support for printf() in guest code and covert all guest asserts
           to use printf-based reporting
      
         - Clean up the PMU event filter test and add new testcases
      
         - Include x86 selftests in the KVM x86 MAINTAINERS entry"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (279 commits)
        KVM: x86/mmu: Include mmu.h in spte.h
        KVM: x86/mmu: Use dummy root, backed by zero page, for !visible guest roots
        KVM: x86/mmu: Disallow guest from using !visible slots for page tables
        KVM: x86/mmu: Harden TDP MMU iteration against root w/o shadow page
        KVM: x86/mmu: Harden new PGD against roots without shadow pages
        KVM: x86/mmu: Add helper to convert root hpa to shadow page
        drm/i915/gvt: Drop final dependencies on KVM internal details
        KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers
        KVM: x86/mmu: Drop @slot param from exported/external page-track APIs
        KVM: x86/mmu: Bug the VM if write-tracking is used but not enabled
        KVM: x86/mmu: Assert that correct locks are held for page write-tracking
        KVM: x86/mmu: Rename page-track APIs to reflect the new reality
        KVM: x86/mmu: Drop infrastructure for multiple page-track modes
        KVM: x86/mmu: Use page-track notifiers iff there are external users
        KVM: x86/mmu: Move KVM-only page-track declarations to internal header
        KVM: x86: Remove the unused page-track hook track_flush_slot()
        drm/i915/gvt: switch from ->track_flush_slot() to ->track_remove_region()
        KVM: x86: Add a new page-track hook to handle memslot deletion
        drm/i915/gvt: Don't bother removing write-protection on to-be-deleted slot
        KVM: x86: Reject memslot MOVE operations if KVMGT is attached
        ...
      0c021834
    • Vladimir Oltean's avatar
      net: enetc: distinguish error from valid pointers in enetc_fixup_clear_rss_rfs() · 1b36955c
      Vladimir Oltean authored
      enetc_psi_create() returns an ERR_PTR() or a valid station interface
      pointer, but checking for the non-NULL quality of the return code blurs
      that difference away. So if enetc_psi_create() fails, we call
      enetc_psi_destroy() when we shouldn't. This will likely result in
      crashes, since enetc_psi_create() cleans up everything after itself when
      it returns an ERR_PTR().
      
      Fixes: f0168042 ("net: enetc: reimplement RFS/RSS memory clearing as PCI quirk")
      Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Closes: https://lore.kernel.org/netdev/582183ef-e03b-402b-8e2d-6d9bb3c83bd9@moroto.mountain/Suggested-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://lore.kernel.org/r/20230906141609.247579-1-vladimir.oltean@nxp.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1b36955c
    • Jakub Kicinski's avatar
      Revert "net: team: do not use dynamic lockdep key" · 6afcf0fb
      Jakub Kicinski authored
      This reverts commit 39285e12.
      
      Looks like the change has unintended consequences in exposing
      objects before they are initialized. Let's drop this patch
      and try again in net-next.
      
      Reported-by: syzbot+44ae022028805f4600fc@syzkaller.appspotmail.com
      Fixes: 39285e12 ("net: team: do not use dynamic lockdep key")
      Link: https://lore.kernel.org/all/20230907103124.6adb7256@kernel.org/Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6afcf0fb
    • Linus Torvalds's avatar
      Merge tag 's390-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 4a0fc73d
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - A couple of virtual vs physical address confusion fixes
      
       - Rework locking in dcssblk driver to address a lockdep warning
      
       - Remove support for "noexec" kernel command line option since there is
         no use case where it would make sense
      
       - Simplify kernel mapping setup and get rid of quite a bit of code
      
       - Add architecture specific __set_memory_yy() functions which allow us
         to modify kernel mappings. Unlike the set_memory_xx() variants they
         take void pointer start and end parameters, which allows using them
         without the usual casts, and also to use them on areas larger than
         8TB.
      
         Note that the set_memory_xx() family comes with an int num_pages
         parameter which overflows with 8TB. This could be addressed by
         changing the num_pages parameter to unsigned long, however requires
         to change all architectures, since the module code expects an int
         parameter (see module_set_memory()).
      
         This was indeed an issue since for debug_pagealloc() we call
         set_memory_4k() on the whole identity mapping. Therefore address this
         for now with the __set_memory_yy() variant, and address common code
         later
      
       - Use dev_set_name() and also fix memory leak in zcrypt driver error
         handling
      
       - Remove unused lsi_mask from airq_struct
      
       - Add warning for invalid kernel mapping requests
      
      * tag 's390-6.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/vmem: do not silently ignore mapping limit
        s390/zcrypt: utilize dev_set_name() ability to use a formatted string
        s390/zcrypt: don't leak memory if dev_set_name() fails
        s390/mm: fix MAX_DMA_ADDRESS physical vs virtual confusion
        s390/airq: remove lsi_mask from airq_struct
        s390/mm: use __set_memory() variants where useful
        s390/set_memory: add __set_memory() variant
        s390/set_memory: generate all set_memory() functions
        s390/mm: improve description of mapping permissions of prefix pages
        s390/amode31: change type of __samode31, __eamode31, etc
        s390/mm: simplify kernel mapping setup
        s390: remove "noexec" option
        s390/vmem: fix virtual vs physical address confusion
        s390/dcssblk: fix lockdep warning
        s390/monreader: fix virtual vs physical address confusion
      4a0fc73d
    • Linus Torvalds's avatar
      Merge tag 'mips_6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · ac2224a4
      Linus Torvalds authored
      Pull MIPS updates from Thomas Bogendoerfer:
       "Just cleanups and fixes"
      
      * tag 'mips_6.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: TXx9: Do PCI error checks on own line
        arch/mips/configs/*_defconfig cleanup
        MIPS: VDSO: Conditionally export __vdso_gettimeofday()
        Mips: loongson3_defconfig: Enable ast drm driver by default
        mips: remove <asm/export.h>
        mips: replace #include <asm/export.h> with #include <linux/export.h>
        mips: remove unneeded #include <asm/export.h>
        MIPS: Loongson64: Fix more __iomem attributes
        MIPS: loongson32: Remove regs-rtc.h
        MIPS: loongson32: Remove regs-clk.h
        MIPS: More explicit DT include clean-ups
        MIPS: Fixup explicit DT include clean-up
        Revert MIPS: Loongson: Fix build error when make modules_install
        MIPS: Only fiddle with CHECKFLAGS if `need-compiler'
        MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression
        MIPS: Explicitly include correct DT includes
      ac2224a4
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20230905' of https://github.com/jcmvbkbc/linux-xtensa · dd1386dd
      Linus Torvalds authored
      Pull xtensa updates from Max Filippov:
      
       - enable MTD XIP support
      
       - fix base address of the xtensa perf module in newer hardware
      
      * tag 'xtensa-20230905' of https://github.com/jcmvbkbc/linux-xtensa:
        xtensa: add XIP-aware MTD support
        xtensa: PMU: fix base address for the newer hardware
      dd1386dd
    • Christian Brauner's avatar
      ntfs3: drop inode references in ntfs_put_super() · 78a06688
      Christian Brauner authored
      Recently we moved most cleanup from ntfs_put_super() into
      ntfs3_kill_sb() as part of a bigger cleanup.  This accidently also moved
      dropping inode references stashed in ntfs3's sb->s_fs_info from
      @sb->put_super() to @sb->kill_sb().  But generic_shutdown_super()
      verifies that there are no busy inodes past sb->put_super().  Fix this
      and disentangle dropping inode references from freeing @sb->s_fs_info.
      
      Fixes: a4f64a30 ("ntfs3: free the sbi in ->kill_sb") # mainline only
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      78a06688
    • Linus Torvalds's avatar
      vfs: mostly undo glibc turning 'fstat()' into 'fstatat(AT_EMPTY_PATH)' · 9013c51c
      Linus Torvalds authored
      Mateusz reports that glibc turns 'fstat()' calls into 'fstatat()', and
      that seems to have been going on for quite a long time due to glibc
      having tried to simplify its stat logic into just one point.
      
      This turns out to cause completely unnecessary overhead, where we then
      go off and allocate the kernel side pathname, and actually look up the
      empty path.  Sure, our path lookup is quite optimized, but it still
      causes a fair bit of allocation overhead and a couple of completely
      unnecessary rounds of lockref accesses etc.
      
      This is all hopefully getting fixed in user space, and there is a patch
      floating around for just having glibc use the native fstat() system
      call.  But even with the current situation we can at least improve on
      things by catching the situation and short-circuiting it.
      
      Note that this is still measurably slower than just a plain 'fstat()',
      since just checking that the filename is actually empty is somewhat
      expensive due to inevitable user space access overhead from the kernel
      (ie verifying pointers, and SMAP on x86).  But it's still quite a bit
      faster than actually looking up the path for real.
      
      To quote numers from Mateusz:
       "Sapphire Rapids, will-it-scale, ops/s
      
        stock fstat	5088199
        patched fstat	7625244	(+49%)
        real fstat	8540383	(+67% / +12%)"
      
      where that 'stock fstat' is the glibc translation of fstat into
      fstatat() with an empty path, the 'patched fstat' is with this short
      circuiting of the path lookup, and the 'real fstat' is the actual native
      fstat() system call with none of this overhead.
      
      Link: https://lore.kernel.org/lkml/20230903204858.lv7i3kqvw6eamhgz@f/Reported-by: default avatarMateusz Guzik <mjguzik@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9013c51c
    • Paolo Abeni's avatar
      Merge tag 'nf-23-09-06' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf · 7153a404
      Paolo Abeni authored
      Florian Westphal says:
      
      ====================
      netfilter updates for net
      
      This PR contains nf_tables updates for your *net* tree.
      This time almost all fixes are for old bugs:
      
      First patch fixes a 4-byte stack OOB write, from myself.
      This was broken ever since nftables was switches from 128 to 32bit
      register addressing in v4.1.
      
      2nd patch fixes an out-of-bounds read.
      This has been broken ever since xt_osf got added in 2.6.31, the bug
      was then just moved around during refactoring, from Wander Lairson Costa.
      
      3rd patch adds a missing enum description, from Phil Sutter.
      
      4th patch fixes a UaF inftables that occurs when userspace adds
      elements with a timeout so small that expiration happens while the
      transaction is still in progress.  Fix from Pablo Neira Ayuso.
      
      Patch 5 fixes a memory out of bounds access, this was
      broken since v4.20. Patch from Kyle Zeng and Jozsef Kadlecsik.
      
      Patch 6 fixes another bogus memory access when building audit
      record. Bug added in the previous pull request, fix from Pablo.
      
      netfilter pull request 2023-09-06
      
      * tag 'nf-23-09-06' of https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf:
        netfilter: nf_tables: Unbreak audit log reset
        netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
        netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
        netfilter: nf_tables: uapi: Describe NFTA_RULE_CHAIN_ID
        netfilter: nfnetlink_osf: avoid OOB read
        netfilter: nftables: exthdr: fix 4-byte stack OOB write
      ====================
      
      Link: https://lore.kernel.org/r/20230906162525.11079-1-fw@strlen.deSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      7153a404
    • Paolo Abeni's avatar
      Merge branch 'there-are-some-bugfix-for-the-hns3-ethernet-driver' · 35494b0d
      Paolo Abeni authored
      Jijie Shao says:
      
      ====================
      There are some bugfix for the HNS3 ethernet driver
      ====================
      
      Link: https://lore.kernel.org/r/20230906072018.3020671-1-shaojijie@huawei.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      35494b0d
    • Jie Wang's avatar
      net: hns3: remove GSO partial feature bit · 60326634
      Jie Wang authored
      HNS3 NIC does not support GSO partial packets segmentation. Actually tunnel
      packets for example NvGRE packets segment offload and checksum offload is
      already supported. There is no need to keep gso partial feature bit. So
      this patch removes it.
      
      Fixes: 76ad4f0e ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
      Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      60326634
    • Yisen Zhuang's avatar
      net: hns3: fix the port information display when sfp is absent · 674d9591
      Yisen Zhuang authored
      When sfp is absent or unidentified, the port type should be
      displayed as PORT_OTHERS, rather than PORT_FIBRE.
      
      Fixes: 88d10bd6 ("net: hns3: add support for multiple media type")
      Signed-off-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      674d9591
    • Jijie Shao's avatar
      net: hns3: fix invalid mutex between tc qdisc and dcb ets command issue · fa556494
      Jijie Shao authored
      We hope that tc qdisc and dcb ets commands can not be used crosswise.
      If we want to use any of the commands to configure tc,
      We must use the other command to clear the existing configuration.
      
      However, when we configure a single tc with tc qdisc,
      we can still configure it with dcb ets.
      Because we use mqprio_active as the tag of tc qdisc configuration,
      but with dcb ets, we do not check mqprio_active.
      
      This patch fix this issue by check mqprio_active before
      executing the dcb ets command. and add dcb_ets_active to
      replace HCLGE_FLAG_DCB_ENABLE and HCLGE_FLAG_MQPRIO_ENABLE
      at the hclge layer,
      
      Fixes: cacde272 ("net: hns3: Add hclge_dcb module for the support of DCB feature")
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      fa556494
    • Hao Chen's avatar
      net: hns3: fix debugfs concurrency issue between kfree buffer and read · c295160b
      Hao Chen authored
      Now in hns3_dbg_uninit(), there may be concurrency between
      kfree buffer and read, it may result in memory error.
      
      Moving debugfs_remove_recursive() in front of kfree buffer to ensure
      they don't happen at the same time.
      
      Fixes: 5e69ea7e ("net: hns3: refactor the debugfs process")
      Signed-off-by: default avatarHao Chen <chenhao418@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      c295160b
    • Hao Chen's avatar
      net: hns3: fix byte order conversion issue in hclge_dbg_fd_tcam_read() · efccf655
      Hao Chen authored
      req1->tcam_data is defined as "u8 tcam_data[8]", and we convert it as
      (u32 *) without considerring byte order conversion,
      it may result in printing wrong data for tcam_data.
      
      Convert tcam_data to (__le32 *) first to fix it.
      
      Fixes: b5a0b70d ("net: hns3: refactor dump fd tcam of debugfs")
      Signed-off-by: default avatarHao Chen <chenhao418@huawei.com>
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      efccf655
    • Jijie Shao's avatar
      net: hns3: Support query tx timeout threshold by debugfs · dd2bbc2e
      Jijie Shao authored
      support query tx timeout threshold by debugfs
      Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      dd2bbc2e