1. 26 Feb, 2023 3 commits
    • Fedor Pchelkin's avatar
      nfc: fix memory leak of se_io context in nfc_genl_se_io · 25ff6f8a
      Fedor Pchelkin authored
      The callback context for sending/receiving APDUs to/from the selected
      secure element is allocated inside nfc_genl_se_io and supposed to be
      eventually freed in se_io_cb callback function. However, there are several
      error paths where the bwi_timer is not charged to call se_io_cb later, and
      the cb_context is leaked.
      
      The patch proposes to free the cb_context explicitly on those error paths.
      
      At the moment we can't simply check 'dev->ops->se_io()' return value as it
      may be negative in both cases: when the timer was charged and was not.
      
      Fixes: 5ce3f32b ("NFC: netlink: SE API implementation")
      Reported-by: syzbot+df64c0a2e8d68e78a4fa@syzkaller.appspotmail.com
      Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
      Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      25ff6f8a
    • Jacob Keller's avatar
      ice: remove unnecessary CONFIG_ICE_GNSS · cf871006
      Jacob Keller authored
      CONFIG_ICE_GNSS was added by commit c7ef8221 ("ice: use GNSS subsystem
      instead of TTY") as a way to allow the ice driver to optionally support
      GNSS features without forcing a dependency on CONFIG_GNSS.
      
      The original implementation of that commit at [1] used IS_REACHABLE. This
      was rejected by Olek at [2] with the suggested implementation of
      CONFIG_ICE_GNSS.
      
      Eventually after merging, Linus reported a .config which had
      CONFIG_ICE_GNSS = y when both GNSS = n and ICE = n. This confused him and
      he felt that the config option was not useful, and commented about it at
      [3].
      
      CONFIG_ICE_GNSS is defined to y whenever GNSS = ICE. This results in it
      being set in cases where both options are not enabled.
      
      The goal of CONFIG_ICE_GNSS is to ensure that the GNSS support in the ice
      driver is enabled when GNSS is enabled.
      
      The complaint from Olek about the original IS_REACHABLE was due to the
      required IS_REACHABLE checks throughout the ice driver code and the fact
      that ice_gnss.c was compiled regardless of GNSS support.
      
      This can be fixed in the Makefile by using ice-$(CONFIG_GNSS) += ice_gnss.o
      
      In this case, if GNSS = m and ICE = y, we can result in some confusing
      behavior where GNSS support is not enabled because its not built in. See
      [4].
      
      To disallow this, have CONFIG_ICE depend on GNSS || GNSS = n. This ensures
      that we cannot enable CONFIG_ICE as builtin while GNSS is a module.
      
      Drop CONFIG_ICE_GNSS, and replace the IS_ENABLED checks for it with
      checks for GNSS. Update the Makefile to add the ice_gnss.o object based on
      CONFIG_GNSS.
      
      This works to ensure that GNSS support can optionally be enabled, doesn't
      have an unnnecessary extra config option, and has Kbuild enforce the
      dependency such that you can't accidentally enable GNSS as a module and ICE
      as a builtin.
      
      [1] https://lore.kernel.org/intel-wired-lan/20221019095603.44825-1-arkadiusz.kubalewski@intel.com/
      [2] https://lore.kernel.org/intel-wired-lan/20221028165706.96849-1-alexandr.lobakin@intel.com/
      [3] https://lore.kernel.org/all/CAHk-=wi_410KZqHwF-WL5U7QYxnpHHHNP-3xL=g_y89XnKc-uw@mail.gmail.com/
      [4] https://lore.kernel.org/netdev/20230223161309.0e439c5f@kernel.org/Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Fixes: c7ef8221 ("ice: use GNSS subsystem instead of TTY")
      Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
      Cc: Alexander Lobakin <alexandr.lobakin@intel.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Anthony Nguyen <anthony.l.nguyen@intel.com>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cf871006
    • Nathan Chancellor's avatar
      net/sched: cls_api: Move call to tcf_exts_miss_cookie_base_destroy() · 37e1f3ac
      Nathan Chancellor authored
      When CONFIG_NET_CLS_ACT is disabled:
      
        ../net/sched/cls_api.c:141:13: warning: 'tcf_exts_miss_cookie_base_destroy' defined but not used [-Wunused-function]
          141 | static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts)
              |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Due to the way the code is structured, it is possible for a definition
      of tcf_exts_miss_cookie_base_destroy() to be present without actually
      being used. Its single callsite is in an '#ifdef CONFIG_NET_CLS_ACT'
      block but a definition will always be present in the file. The version
      of tcf_exts_miss_cookie_base_destroy() that actually does something
      depends on CONFIG_NET_TC_SKB_EXT, so the stub function is used in both
      CONFIG_NET_CLS_ACT=n and CONFIG_NET_CLS_ACT=y + CONFIG_NET_TC_SKB_EXT=n
      configurations.
      
      Move the call to tcf_exts_miss_cookie_base_destroy() in
      tcf_exts_destroy() out of the '#ifdef CONFIG_NET_CLS_ACT', so that it
      always appears used to the compiler, while not changing any behavior
      with any of the various configuration combinations.
      
      Fixes: 80cd22c3 ("net/sched: cls_api: Support hardware miss to tc action")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      37e1f3ac
  2. 25 Feb, 2023 2 commits
  3. 24 Feb, 2023 8 commits
  4. 23 Feb, 2023 13 commits
  5. 22 Feb, 2023 7 commits
    • Pavel Tikhomirov's avatar
      netfilter: x_tables: fix percpu counter block leak on error path when creating new netns · 0af8c09c
      Pavel Tikhomirov authored
      Here is the stack where we allocate percpu counter block:
      
        +-< __alloc_percpu
          +-< xt_percpu_counter_alloc
            +-< find_check_entry # {arp,ip,ip6}_tables.c
              +-< translate_table
      
      And it can be leaked on this code path:
      
        +-> ip6t_register_table
          +-> translate_table # allocates percpu counter block
          +-> xt_register_table # fails
      
      there is no freeing of the counter block on xt_register_table fail.
      Note: xt_percpu_counter_free should be called to free it like we do in
      do_replace through cleanup_entry helper (or in __ip6t_unregister_table).
      
      Probability of hitting this error path is low AFAICS (xt_register_table
      can only return ENOMEM here, as it is not replacing anything, as we are
      creating new netns, and it is hard to imagine that all previous
      allocations succeeded and after that one in xt_register_table failed).
      But it's worth fixing even the rare leak.
      
      Fixes: 71ae0dff ("netfilter: xtables: use percpu rule counters")
      Signed-off-by: default avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      0af8c09c
    • Linus Torvalds's avatar
      Merge tag 'net-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 5b7c4cab
      Linus Torvalds authored
      Pull networking updates from Jakub Kicinski:
       "Core:
      
         - Add dedicated kmem_cache for typical/small skb->head, avoid having
           to access struct page at kfree time, and improve memory use.
      
         - Introduce sysctl to set default RPS configuration for new netdevs.
      
         - Define Netlink protocol specification format which can be used to
           describe messages used by each family and auto-generate parsers.
           Add tools for generating kernel data structures and uAPI headers.
      
         - Expose all net/core sysctls inside netns.
      
         - Remove 4s sleep in netpoll if carrier is instantly detected on
           boot.
      
         - Add configurable limit of MDB entries per port, and port-vlan.
      
         - Continue populating drop reasons throughout the stack.
      
         - Retire a handful of legacy Qdiscs and classifiers.
      
        Protocols:
      
         - Support IPv4 big TCP (TSO frames larger than 64kB).
      
         - Add IP_LOCAL_PORT_RANGE socket option, to control local port range
           on socket by socket basis.
      
         - Track and report in procfs number of MPTCP sockets used.
      
         - Support mixing IPv4 and IPv6 flows in the in-kernel MPTCP path
           manager.
      
         - IPv6: don't check net.ipv6.route.max_size and rely on garbage
           collection to free memory (similarly to IPv4).
      
         - Support Penultimate Segment Pop (PSP) flavor in SRv6 (RFC8986).
      
         - ICMP: add per-rate limit counters.
      
         - Add support for user scanning requests in ieee802154.
      
         - Remove static WEP support.
      
         - Support minimal Wi-Fi 7 Extremely High Throughput (EHT) rate
           reporting.
      
         - WiFi 7 EHT channel puncturing support (client & AP).
      
        BPF:
      
         - Add a rbtree data structure following the "next-gen data structure"
           precedent set by recently added linked list, that is, by using
           kfunc + kptr instead of adding a new BPF map type.
      
         - Expose XDP hints via kfuncs with initial support for RX hash and
           timestamp metadata.
      
         - Add BPF_F_NO_TUNNEL_KEY extension to bpf_skb_set_tunnel_key to
           better support decap on GRE tunnel devices not operating in collect
           metadata.
      
         - Improve x86 JIT's codegen for PROBE_MEM runtime error checks.
      
         - Remove the need for trace_printk_lock for bpf_trace_printk and
           bpf_trace_vprintk helpers.
      
         - Extend libbpf's bpf_tracing.h support for tracing arguments of
           kprobes/uprobes and syscall as a special case.
      
         - Significantly reduce the search time for module symbols by
           livepatch and BPF.
      
         - Enable cpumasks to be used as kptrs, which is useful for tracing
           programs tracking which tasks end up running on which CPUs in
           different time intervals.
      
         - Add support for BPF trampoline on s390x and riscv64.
      
         - Add capability to export the XDP features supported by the NIC.
      
         - Add __bpf_kfunc tag for marking kernel functions as kfuncs.
      
         - Add cgroup.memory=nobpf kernel parameter option to disable BPF
           memory accounting for container environments.
      
        Netfilter:
      
         - Remove the CLUSTERIP target. It has been marked as obsolete for
           years, and we still have WARN splats wrt races of the out-of-band
           /proc interface installed by this target.
      
         - Add 'destroy' commands to nf_tables. They are identical to the
           existing 'delete' commands, but do not return an error if the
           referenced object (set, chain, rule...) did not exist.
      
        Driver API:
      
         - Improve cpumask_local_spread() locality to help NICs set the right
           IRQ affinity on AMD platforms.
      
         - Separate C22 and C45 MDIO bus transactions more clearly.
      
         - Introduce new DCB table to control DSCP rewrite on egress.
      
         - Support configuration of Physical Layer Collision Avoidance (PLCA)
           Reconciliation Sublayer (RS) (802.3cg-2019). Modern version of
           shared medium Ethernet.
      
         - Support for MAC Merge layer (IEEE 802.3-2018 clause 99). Allowing
           preemption of low priority frames by high priority frames.
      
         - Add support for controlling MACSec offload using netlink SET.
      
         - Rework devlink instance refcounts to allow registration and
           de-registration under the instance lock. Split the code into
           multiple files, drop some of the unnecessarily granular locks and
           factor out common parts of netlink operation handling.
      
         - Add TX frame aggregation parameters (for USB drivers).
      
         - Add a new attr TCA_EXT_WARN_MSG to report TC (offload) warning
           messages with notifications for debug.
      
         - Allow offloading of UDP NEW connections via act_ct.
      
         - Add support for per action HW stats in TC.
      
         - Support hardware miss to TC action (continue processing in SW from
           a specific point in the action chain).
      
         - Warn if old Wireless Extension user space interface is used with
           modern cfg80211/mac80211 drivers. Do not support Wireless
           Extensions for Wi-Fi 7 devices at all. Everyone should switch to
           using nl80211 interface instead.
      
         - Improve the CAN bit timing configuration. Use extack to return
           error messages directly to user space, update the SJW handling,
           including the definition of a new default value that will benefit
           CAN-FD controllers, by increasing their oscillator tolerance.
      
        New hardware / drivers:
      
         - Ethernet:
            - nVidia BlueField-3 support (control traffic driver)
            - Ethernet support for imx93 SoCs
            - Motorcomm yt8531 gigabit Ethernet PHY
            - onsemi NCN26000 10BASE-T1S PHY (with support for PLCA)
            - Microchip LAN8841 PHY (incl. cable diagnostics and PTP)
            - Amlogic gxl MDIO mux
      
         - WiFi:
            - RealTek RTL8188EU (rtl8xxxu)
            - Qualcomm Wi-Fi 7 devices (ath12k)
      
         - CAN:
            - Renesas R-Car V4H
      
        Drivers:
      
         - Bluetooth:
            - Set Per Platform Antenna Gain (PPAG) for Intel controllers.
      
         - Ethernet NICs:
            - Intel (1G, igc):
               - support TSN / Qbv / packet scheduling features of i226 model
            - Intel (100G, ice):
               - use GNSS subsystem instead of TTY
               - multi-buffer XDP support
               - extend support for GPIO pins to E823 devices
            - nVidia/Mellanox:
               - update the shared buffer configuration on PFC commands
               - implement PTP adjphase function for HW offset control
               - TC support for Geneve and GRE with VF tunnel offload
               - more efficient crypto key management method
               - multi-port eswitch support
            - Netronome/Corigine:
               - add DCB IEEE support
               - support IPsec offloading for NFP3800
            - Freescale/NXP (enetc):
               - support XDP_REDIRECT for XDP non-linear buffers
               - improve reconfig, avoid link flap and waiting for idle
               - support MAC Merge layer
            - Other NICs:
               - sfc/ef100: add basic devlink support for ef100
               - ionic: rx_push mode operation (writing descriptors via MMIO)
               - bnxt: use the auxiliary bus abstraction for RDMA
               - r8169: disable ASPM and reset bus in case of tx timeout
               - cpsw: support QSGMII mode for J721e CPSW9G
               - cpts: support pulse-per-second output
               - ngbe: add an mdio bus driver
               - usbnet: optimize usbnet_bh() by avoiding unnecessary queuing
               - r8152: handle devices with FW with NCM support
               - amd-xgbe: support 10Mbps, 2.5GbE speeds and rx-adaptation
               - virtio-net: support multi buffer XDP
               - virtio/vsock: replace virtio_vsock_pkt with sk_buff
               - tsnep: XDP support
      
         - Ethernet high-speed switches:
            - nVidia/Mellanox (mlxsw):
               - add support for latency TLV (in FW control messages)
            - Microchip (sparx5):
               - separate explicit and implicit traffic forwarding rules, make
                 the implicit rules always active
               - add support for egress DSCP rewrite
               - IS0 VCAP support (Ingress Classification)
               - IS2 VCAP filters (protos, L3 addrs, L4 ports, flags, ToS
                 etc.)
               - ES2 VCAP support (Egress Access Control)
               - support for Per-Stream Filtering and Policing (802.1Q,
                 8.6.5.1)
      
         - Ethernet embedded switches:
            - Marvell (mv88e6xxx):
               - add MAB (port auth) offload support
               - enable PTP receive for mv88e6390
            - NXP (ocelot):
               - support MAC Merge layer
               - support for the the vsc7512 internal copper phys
            - Microchip:
               - lan9303: convert to PHYLINK
               - lan966x: support TC flower filter statistics
               - lan937x: PTP support for KSZ9563/KSZ8563 and LAN937x
               - lan937x: support Credit Based Shaper configuration
               - ksz9477: support Energy Efficient Ethernet
            - other:
               - qca8k: convert to regmap read/write API, use bulk operations
               - rswitch: Improve TX timestamp accuracy
      
         - Intel WiFi (iwlwifi):
            - EHT (Wi-Fi 7) rate reporting
            - STEP equalizer support: transfer some STEP (connection to radio
              on platforms with integrated wifi) related parameters from the
              BIOS to the firmware.
      
         - Qualcomm 802.11ax WiFi (ath11k):
            - IPQ5018 support
            - Fine Timing Measurement (FTM) responder role support
            - channel 177 support
      
         - MediaTek WiFi (mt76):
            - per-PHY LED support
            - mt7996: EHT (Wi-Fi 7) support
            - Wireless Ethernet Dispatch (WED) reset support
            - switch to using page pool allocator
      
         - RealTek WiFi (rtw89):
            - support new version of Bluetooth co-existance
      
         - Mobile:
            - rmnet: support TX aggregation"
      
      * tag 'net-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1872 commits)
        page_pool: add a comment explaining the fragment counter usage
        net: ethtool: fix __ethtool_dev_mm_supported() implementation
        ethtool: pse-pd: Fix double word in comments
        xsk: add linux/vmalloc.h to xsk.c
        sefltests: netdevsim: wait for devlink instance after netns removal
        selftest: fib_tests: Always cleanup before exit
        net/mlx5e: Align IPsec ASO result memory to be as required by hardware
        net/mlx5e: TC, Set CT miss to the specific ct action instance
        net/mlx5e: Rename CHAIN_TO_REG to MAPPED_OBJ_TO_REG
        net/mlx5: Refactor tc miss handling to a single function
        net/mlx5: Kconfig: Make tc offload depend on tc skb extension
        net/sched: flower: Support hardware miss to tc action
        net/sched: flower: Move filter handle initialization earlier
        net/sched: cls_api: Support hardware miss to tc action
        net/sched: Rename user cookie and act cookie
        sfc: fix builds without CONFIG_RTC_LIB
        sfc: clean up some inconsistent indentings
        net/mlx4_en: Introduce flexible array to silence overflow warning
        net: lan966x: Fix possible deadlock inside PTP
        net/ulp: Remove redundant ->clone() test in inet_clone_ulp().
        ...
      5b7c4cab
    • Linus Torvalds's avatar
      Merge tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 36289a03
      Linus Torvalds authored
      Pull crypto update from Herbert Xu:
       "API:
         - Use kmap_local instead of kmap_atomic
         - Change request callback to take void pointer
         - Print FIPS status in /proc/crypto (when enabled)
      
        Algorithms:
         - Add rfc4106/gcm support on arm64
         - Add ARIA AVX2/512 support on x86
      
        Drivers:
         - Add TRNG driver for StarFive SoC
         - Delete ux500/hash driver (subsumed by stm32/hash)
         - Add zlib support in qat
         - Add RSA support in aspeed"
      
      * tag 'v6.3-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (156 commits)
        crypto: x86/aria-avx - Do not use avx2 instructions
        crypto: aspeed - Fix modular aspeed-acry
        crypto: hisilicon/qm - fix coding style issues
        crypto: hisilicon/qm - update comments to match function
        crypto: hisilicon/qm - change function names
        crypto: hisilicon/qm - use min() instead of min_t()
        crypto: hisilicon/qm - remove some unused defines
        crypto: proc - Print fips status
        crypto: crypto4xx - Call dma_unmap_page when done
        crypto: octeontx2 - Fix objects shared between several modules
        crypto: nx - Fix sparse warnings
        crypto: ecc - Silence sparse warning
        tls: Pass rec instead of aead_req into tls_encrypt_done
        crypto: api - Remove completion function scaffolding
        tls: Remove completion function scaffolding
        tipc: Remove completion function scaffolding
        net: ipv6: Remove completion function scaffolding
        net: ipv4: Remove completion function scaffolding
        net: macsec: Remove completion function scaffolding
        dm: Remove completion function scaffolding
        ...
      36289a03
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v6.3-1' of... · 69308402
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
      
      Pull x86 platform driver updates from Hans de Goede:
      
       - AMD PMC: Improvements to aid s2idle debugging
      
       - Dell WMI-DDV: hwmon support
      
       - INT3472 camera sensor power-management: Improve privacy LED support
      
       - Intel VSEC: Base TPMI (Topology Aware Register and PM Capsule
         Interface) support
      
       - Mellanox: SN5600 and Nvidia L1 switch support
      
       - Microsoft Surface Support: Various cleanups + code improvements
      
       - tools/intel-speed-select: Various improvements
      
       - Miscellaneous other cleanups / fixes
      
      * tag 'platform-drivers-x86-v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (80 commits)
        platform/x86: nvidia-wmi-ec-backlight: Add force module parameter
        platform/x86/amd/pmf: Add depends on CONFIG_POWER_SUPPLY
        platform/x86: dell-ddv: Prefer asynchronous probing
        platform/x86: dell-ddv: Add hwmon support
        Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces
        platform: mellanox: mlx-platform: Move bus shift assignment out of the loop
        platform: mellanox: mlx-platform: Add mux selection register to regmap
        platform_data/mlxreg: Add field with mapped resource address
        platform/mellanox: mlxreg-hotplug: Allow more flexible hotplug events configuration
        platform: mellanox: Extend all systems with I2C notification callback
        platform: mellanox: Split logic in init and exit flow
        platform: mellanox: Split initialization procedure
        platform: mellanox: Introduce support of new Nvidia L1 switch
        platform: mellanox: Introduce support for next-generation 800GB/s switch
        platform: mellanox: Cosmetic changes - rename to more common name
        platform: mellanox: Change "reset_pwr_converter_fail" attribute
        platform: mellanox: Introduce support for rack manager switch
        MAINTAINERS: dell-wmi-sysman: drop Divya Bharathi
        x86/platform/uv: Make kobj_type structure constant
        platform/x86: think-lmi: Make kobj_type structure constant
        ...
      69308402
    • Linus Torvalds's avatar
      Merge tag 'tag-chrome-platform-for-v6.3' of... · 5f5ce6bc
      Linus Torvalds authored
      Merge tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome platform updates from Tzung-Bi Shih:
       "New drivers:
         - cros_ec_uart for ChromeOS EC protocol over UART
         - cros_typec_vdm for USB PD Vendor Defined Message
      
        Improvements:
         - Preserve logs as much as possible when EC panics
         - Shutdown to refrain from potential HW damages when EC panics
      
        Fixes:
         - Fix DP_PORT_VDO to include DP_CAP_RECEPTACLE
         - Fix a lockdep false positive
      
        Cleanups:
         - Use sysfs_emit*() instead of scnprintf()
         - Use asm instead of asm-generic for unaligned.h
      
        Misc:
         - Rename module name from cros_ec_typec to cros-ec-typec
         - Minor fixes"
      
      * tag 'tag-chrome-platform-for-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (34 commits)
        platform/chrome: cros_ec_typec: Fix spelling mistake
        platform/chrome: cros_typec_vdm: Add Attention support
        platform/chrome: cros_ec: Add VDM attention headers
        platform/chrome: cros_typec_vdm: Fix VDO copy
        platform/chrome: cros_ec_typec: allow deferred probe of switch handles
        platform/chrome: cros_ec_proto: remove big stub objects from stack
        platform/chrome: cros_ec_uart: fix negative type promoted to high
        platform/chrome: cros_ec: Use per-device lockdep key
        platform/chrome: fix kernel-doc warnings for cros_ec_command
        platform/chrome: fix kernel-doc warning for last_resume_result
        platform/chrome: fix kernel-doc warning for suspend_timeout_ms
        platform/chrome: fix kernel-doc warnings for panic notifier
        platform/chrome: cros_ec_lpc: initialize the buf variable
        platform/chrome: cros_ec: Fix panic notifier registration
        platform/chrome: cros_typec_switch: Check for retimer flag
        platform/chrome: cros_typec_switch: Use fwnode* prop check
        platform/chrome: cros_typec_vdm: Add VDM send support
        platform/chrome: cros_typec_vdm: Add VDM reply support
        platform/chrome: cros_ec_typec: Add initial VDM support
        platform/chrome: cros_ec_typec: Alter module name with hyphens
        ...
      5f5ce6bc
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 239451e9
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - help deprecate the /proc/xen files by making the related information
         available via sysfs
      
       - mark the Xen variants of play_dead "noreturn"
      
       - support a shared Xen platform interrupt
      
       - several small cleanups and fixes
      
      * tag 'for-linus-6.3-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: sysfs: make kobj_type structure constant
        x86/Xen: drop leftover VM-assist uses
        xen: Replace one-element array with flexible-array member
        xen/grant-dma-iommu: Implement a dummy probe_device() callback
        xen/pvcalls-back: fix permanently masked event channel
        xen: Allow platform PCI interrupt to be shared
        x86/xen/time: prefer tsc as clocksource when it is invariant
        x86/xen: mark xen_pv_play_dead() as __noreturn
        x86/xen: don't let xen_pv_play_dead() return
        drivers/xen/hypervisor: Expose Xen SIF flags to userspace
      239451e9
    • Linus Torvalds's avatar
      Merge tag 'hyperv-next-signed-20230220' of... · b8878e5a
      Linus Torvalds authored
      Merge tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux
      
      Pull hyperv updates from Wei Liu:
      
       - allow Linux to run as the nested root partition for Microsoft
         Hypervisor (Jinank Jain and Nuno Das Neves)
      
       - clean up the return type of callback functions (Dawei Li)
      
      * tag 'hyperv-next-signed-20230220' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux:
        x86/hyperv: Fix hv_get/set_register for nested bringup
        Drivers: hv: Make remove callback of hyperv driver void returned
        Drivers: hv: Enable vmbus driver for nested root partition
        x86/hyperv: Add an interface to do nested hypercalls
        Drivers: hv: Setup synic registers in case of nested root partition
        x86/hyperv: Add support for detecting nested hypervisor
      b8878e5a
  6. 21 Feb, 2023 7 commits
    • Florian Westphal's avatar
      netfilter: ctnetlink: make event listener tracking global · fdf64911
      Florian Westphal authored
      pernet tracking doesn't work correctly because other netns might have
      set NETLINK_LISTEN_ALL_NSID on its event socket.
      
      In this case its expected that events originating in other net
      namespaces are also received.
      
      Making pernet-tracking work while also honoring NETLINK_LISTEN_ALL_NSID
      requires much more intrusive changes both in netlink and nfnetlink,
      f.e. adding a 'setsockopt' callback that lets nfnetlink know that the
      event socket entered (or left) ALL_NSID mode.
      
      Move to global tracking instead: if there is an event socket anywhere
      on the system, all net namespaces which have conntrack enabled and
      use autobind mode will allocate the ecache extension.
      
      netlink_has_listeners() returns false only if the given group has no
      subscribers in any net namespace, the 'net' argument passed to
      nfnetlink_has_listeners is only used to derive the protocol (nfnetlink),
      it has no other effect.
      
      For proper NETLINK_LISTEN_ALL_NSID-aware pernet tracking of event
      listeners a new netlink_has_net_listeners() is also needed.
      
      Fixes: 90d1daa4 ("netfilter: conntrack: add nf_conntrack_events autodetect mode")
      Reported-by: default avatarBryce Kahle <bryce.kahle@datadoghq.com>
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      fdf64911
    • Xin Long's avatar
      netfilter: xt_length: use skb len to match in length_mt6 · 05c07c0c
      Xin Long authored
      For IPv6 Jumbo packets, the ipv6_hdr(skb)->payload_len is always 0,
      and its real payload_len ( > 65535) is saved in hbh exthdr. With 0
      length for the jumbo packets, it may mismatch.
      
      To fix this, we can just use skb->len instead of parsing exthdrs, as
      the hbh exthdr parsing has been done before coming to length_mt6 in
      ip6_rcv_core() and br_validate_ipv6() and also the packet has been
      trimmed according to the correct IPv6 (ext)hdr length there, and skb
      len is trustable in length_mt6().
      
      Note that this patch is especially needed after the IPv6 BIG TCP was
      supported in kernel, which is using IPv6 Jumbo packets. Besides, to
      match the packets greater than 65535 more properly, a v1 revision of
      xt_length may be needed to extend "min, max" to u32 in the future,
      and for now the IPv6 Jumbo packets can be matched by:
      
        # ip6tables -m length ! --length 0:65535
      
      Fixes: 7c4e983c ("net: allow gso_max_size to exceed 65536")
      Fixes: 0fe79f28 ("net: allow gro_max_size to exceed 65536")
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      05c07c0c
    • Linus Torvalds's avatar
      Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8bf1a529
      Linus Torvalds authored
      Pull arm64 updates from Catalin Marinas:
      
       - Support for arm64 SME 2 and 2.1. SME2 introduces a new 512-bit
         architectural register (ZT0, for the look-up table feature) that
         Linux needs to save/restore
      
       - Include TPIDR2 in the signal context and add the corresponding
         kselftests
      
       - Perf updates: Arm SPEv1.2 support, HiSilicon uncore PMU updates, ACPI
         support to the Marvell DDR and TAD PMU drivers, reset DTM_PMU_CONFIG
         (ARM CMN) at probe time
      
       - Support for DYNAMIC_FTRACE_WITH_CALL_OPS on arm64
      
       - Permit EFI boot with MMU and caches on. Instead of cleaning the
         entire loaded kernel image to the PoC and disabling the MMU and
         caches before branching to the kernel bare metal entry point, leave
         the MMU and caches enabled and rely on EFI's cacheable 1:1 mapping of
         all of system RAM to populate the initial page tables
      
       - Expose the AArch32 (compat) ELF_HWCAP features to user in an arm64
         kernel (the arm32 kernel only defines the values)
      
       - Harden the arm64 shadow call stack pointer handling: stash the shadow
         stack pointer in the task struct on interrupt, load it directly from
         this structure
      
       - Signal handling cleanups to remove redundant validation of size
         information and avoid reading the same data from userspace twice
      
       - Refactor the hwcap macros to make use of the automatically generated
         ID registers. It should make new hwcaps writing less error prone
      
       - Further arm64 sysreg conversion and some fixes
      
       - arm64 kselftest fixes and improvements
      
       - Pointer authentication cleanups: don't sign leaf functions, unify
         asm-arch manipulation
      
       - Pseudo-NMI code generation optimisations
      
       - Minor fixes for SME and TPIDR2 handling
      
       - Miscellaneous updates: ARCH_FORCE_MAX_ORDER is now selectable,
         replace strtobool() to kstrtobool() in the cpufeature.c code, apply
         dynamic shadow call stack in two passes, intercept pfn changes in
         set_pte_at() without the required break-before-make sequence, attempt
         to dump all instructions on unhandled kernel faults
      
      * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (130 commits)
        arm64: fix .idmap.text assertion for large kernels
        kselftest/arm64: Don't require FA64 for streaming SVE+ZA tests
        kselftest/arm64: Copy whole EXTRA context
        arm64: kprobes: Drop ID map text from kprobes blacklist
        perf: arm_spe: Print the version of SPE detected
        perf: arm_spe: Add support for SPEv1.2 inverted event filtering
        perf: Add perf_event_attr::config3
        arm64/sme: Fix __finalise_el2 SMEver check
        drivers/perf: fsl_imx8_ddr_perf: Remove set-but-not-used variable
        arm64/signal: Only read new data when parsing the ZT context
        arm64/signal: Only read new data when parsing the ZA context
        arm64/signal: Only read new data when parsing the SVE context
        arm64/signal: Avoid rereading context frame sizes
        arm64/signal: Make interface for restore_fpsimd_context() consistent
        arm64/signal: Remove redundant size validation from parse_user_sigframe()
        arm64/signal: Don't redundantly verify FPSIMD magic
        arm64/cpufeature: Use helper macros to specify hwcaps
        arm64/cpufeature: Always use symbolic name for feature value in hwcaps
        arm64/sysreg: Initial unsigned annotations for ID registers
        arm64/sysreg: Initial annotation of signed ID registers
        ...
      8bf1a529
    • Florian Westphal's avatar
      netfilter: ebtables: fix table blob use-after-free · e58a171d
      Florian Westphal authored
      We are not allowed to return an error at this point.
      Looking at the code it looks like ret is always 0 at this
      point, but its not.
      
      t = find_table_lock(net, repl->name, &ret, &ebt_mutex);
      
      ... this can return a valid table, with ret != 0.
      
      This bug causes update of table->private with the new
      blob, but then frees the blob right away in the caller.
      
      Syzbot report:
      
      BUG: KASAN: vmalloc-out-of-bounds in __ebt_unregister_table+0xc00/0xcd0 net/bridge/netfilter/ebtables.c:1168
      Read of size 4 at addr ffffc90005425000 by task kworker/u4:4/74
      Workqueue: netns cleanup_net
      Call Trace:
       kasan_report+0xbf/0x1f0 mm/kasan/report.c:517
       __ebt_unregister_table+0xc00/0xcd0 net/bridge/netfilter/ebtables.c:1168
       ebt_unregister_table+0x35/0x40 net/bridge/netfilter/ebtables.c:1372
       ops_exit_list+0xb0/0x170 net/core/net_namespace.c:169
       cleanup_net+0x4ee/0xb10 net/core/net_namespace.c:613
      ...
      
      ip(6)tables appears to be ok (ret should be 0 at this point) but make
      this more obvious.
      
      Fixes: c58dd2dd ("netfilter: Can't fail and free after table replacement")
      Reported-by: syzbot+f61594de72d6705aea03@syzkaller.appspotmail.com
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      e58a171d
    • Phil Sutter's avatar
      netfilter: ip6t_rpfilter: Fix regression with VRF interfaces · efb056e5
      Phil Sutter authored
      When calling ip6_route_lookup() for the packet arriving on the VRF
      interface, the result is always the real (slave) interface. Expect this
      when validating the result.
      
      Fixes: acc641ab ("netfilter: rpfilter/fib: Populate flowic_l3mdev field")
      Signed-off-by: default avatarPhil Sutter <phil@nwl.cc>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      efb056e5
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · b327dfe0
      Linus Torvalds authored
      Pull ARM udpates from Russell King:
      
       - Improve Kconfig help text for Cortex A8 and Cortex A9 errata
      
       - Kconfig spelling and grammar fixes
      
       - Allow kernel-mode VFP/Neon in softirq context
      
       - Use Neon in softirq context
      
       - Implement AES-CTR/GHASH version of GCM
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm:
        ARM: 9289/1: Allow pre-ARMv5 builds with ld.lld 16.0.0 and newer
        ARM: 9288/1: Kconfigs: fix spelling & grammar
        ARM: 9286/1: crypto: Implement fused AES-CTR/GHASH version of GCM
        ARM: 9285/1: remove meaningless arch/arm/mach-rda/Makefile
        ARM: 9283/1: permit non-nested kernel mode NEON in softirq context
        ARM: 9282/1: vfp: Manipulate task VFP state with softirqs disabled
        ARM: 9281/1: improve Cortex A8/A9 errata help text
      b327dfe0
    • Florian Westphal's avatar
      netfilter: conntrack: fix rmmod double-free race · e6d57e9f
      Florian Westphal authored
      nf_conntrack_hash_check_insert() callers free the ct entry directly, via
      nf_conntrack_free.
      
      This isn't safe anymore because
      nf_conntrack_hash_check_insert() might place the entry into the conntrack
      table and then delteted the entry again because it found that a conntrack
      extension has been removed at the same time.
      
      In this case, the just-added entry is removed again and an error is
      returned to the caller.
      
      Problem is that another cpu might have picked up this entry and
      incremented its reference count.
      
      This results in a use-after-free/double-free, once by the other cpu and
      once by the caller of nf_conntrack_hash_check_insert().
      
      Fix this by making nf_conntrack_hash_check_insert() not fail anymore
      after the insertion, just like before the 'Fixes' commit.
      
      This is safe because a racing nf_ct_iterate() has to wait for us
      to release the conntrack hash spinlocks.
      
      While at it, make the function return -EAGAIN in the rmmod (genid
      changed) case, this makes nfnetlink replay the command (suggested
      by Pablo Neira).
      
      Fixes: c56716c6 ("netfilter: extensions: introduce extension genid count")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      e6d57e9f