1. 18 Jul, 2024 5 commits
    • Ido Schimmel's avatar
      ipv4: Fix incorrect TOS in route get reply · 338bb57e
      Ido Schimmel authored
      The TOS value that is returned to user space in the route get reply is
      the one with which the lookup was performed ('fl4->flowi4_tos'). This is
      fine when the matched route is configured with a TOS as it would not
      match if its TOS value did not match the one with which the lookup was
      performed.
      
      However, matching on TOS is only performed when the route's TOS is not
      zero. It is therefore possible to have the kernel incorrectly return a
      non-zero TOS:
      
       # ip link add name dummy1 up type dummy
       # ip address add 192.0.2.1/24 dev dummy1
       # ip route get 192.0.2.2 tos 0xfc
       192.0.2.2 tos 0x1c dev dummy1 src 192.0.2.1 uid 0
           cache
      
      Fix by adding a DSCP field to the FIB result structure (inside an
      existing 4 bytes hole), populating it in the route lookup and using it
      when filling the route get reply.
      
      Output after the patch:
      
       # ip link add name dummy1 up type dummy
       # ip address add 192.0.2.1/24 dev dummy1
       # ip route get 192.0.2.2 tos 0xfc
       192.0.2.2 dev dummy1 src 192.0.2.1 uid 0
           cache
      
      Fixes: 1a00fee4 ("ipv4: Remove rt_key_{src,dst,tos} from struct rtable.")
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Reviewed-by: default avatarGuillaume Nault <gnault@redhat.com>
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      338bb57e
    • Pablo Neira Ayuso's avatar
      net: flow_dissector: use DEBUG_NET_WARN_ON_ONCE · 120f1c85
      Pablo Neira Ayuso authored
      The following splat is easy to reproduce upstream as well as in -stable
      kernels. Florian Westphal provided the following commit:
      
        d1dab4f7 ("net: add and use __skb_get_hash_symmetric_net")
      
      but this complementary fix has been also suggested by Willem de Bruijn
      and it can be easily backported to -stable kernel which consists in
      using DEBUG_NET_WARN_ON_ONCE instead to silence the following splat
      given __skb_get_hash() is used by the nftables tracing infrastructure to
      to identify packets in traces.
      
      [69133.561393] ------------[ cut here ]------------
      [69133.561404] WARNING: CPU: 0 PID: 43576 at net/core/flow_dissector.c:1104 __skb_flow_dissect+0x134f/
      [...]
      [69133.561944] CPU: 0 PID: 43576 Comm: socat Not tainted 6.10.0-rc7+ #379
      [69133.561959] RIP: 0010:__skb_flow_dissect+0x134f/0x2ad0
      [69133.561970] Code: 83 f9 04 0f 84 b3 00 00 00 45 85 c9 0f 84 aa 00 00 00 41 83 f9 02 0f 84 81 fc ff
      ff 44 0f b7 b4 24 80 00 00 00 e9 8b f9 ff ff <0f> 0b e9 20 f3 ff ff 41 f6 c6 20 0f 84 e4 ef ff ff 48 8d 7b 12 e8
      [69133.561979] RSP: 0018:ffffc90000006fc0 EFLAGS: 00010246
      [69133.561988] RAX: 0000000000000000 RBX: ffffffff82f33e20 RCX: ffffffff81ab7e19
      [69133.561994] RDX: dffffc0000000000 RSI: ffffc90000007388 RDI: ffff888103a1b418
      [69133.562001] RBP: ffffc90000007310 R08: 0000000000000000 R09: 0000000000000000
      [69133.562007] R10: ffffc90000007388 R11: ffffffff810cface R12: ffff888103a1b400
      [69133.562013] R13: 0000000000000000 R14: ffffffff82f33e2a R15: ffffffff82f33e28
      [69133.562020] FS:  00007f40f7131740(0000) GS:ffff888390800000(0000) knlGS:0000000000000000
      [69133.562027] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [69133.562033] CR2: 00007f40f7346ee0 CR3: 000000015d200001 CR4: 00000000001706f0
      [69133.562040] Call Trace:
      [69133.562044]  <IRQ>
      [69133.562049]  ? __warn+0x9f/0x1a0
      [ 1211.841384]  ? __skb_flow_dissect+0x107e/0x2860
      [...]
      [ 1211.841496]  ? bpf_flow_dissect+0x160/0x160
      [ 1211.841753]  __skb_get_hash+0x97/0x280
      [ 1211.841765]  ? __skb_get_hash_symmetric+0x230/0x230
      [ 1211.841776]  ? mod_find+0xbf/0xe0
      [ 1211.841786]  ? get_stack_info_noinstr+0x12/0xe0
      [ 1211.841798]  ? bpf_ksym_find+0x56/0xe0
      [ 1211.841807]  ? __rcu_read_unlock+0x2a/0x70
      [ 1211.841819]  nft_trace_init+0x1b9/0x1c0 [nf_tables]
      [ 1211.841895]  ? nft_trace_notify+0x830/0x830 [nf_tables]
      [ 1211.841964]  ? get_stack_info+0x2b/0x80
      [ 1211.841975]  ? nft_do_chain_arp+0x80/0x80 [nf_tables]
      [ 1211.842044]  nft_do_chain+0x79c/0x850 [nf_tables]
      
      Fixes: 9b52e3f2 ("flow_dissector: handle no-skb use case")
      Suggested-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
      Link: https://patch.msgid.link/20240715141442.43775-1-pablo@netfilter.orgSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      120f1c85
    • Shay Drory's avatar
      driver core: auxiliary bus: Fix documentation of auxiliary_device · c14112a5
      Shay Drory authored
      Fix the documentation of the below field of struct auxiliary_device
      
      include/linux/auxiliary_bus.h:150: warning: Function parameter or struct member 'sysfs' not described in 'auxiliary_device'
      include/linux/auxiliary_bus.h:150: warning: Excess struct member 'irqs' description in 'auxiliary_device'
      include/linux/auxiliary_bus.h:150: warning: Excess struct member 'lock' description in 'auxiliary_device'
      include/linux/auxiliary_bus.h:150: warning: Excess struct member 'irq_dir_exists' description in 'auxiliary_device'
      
      Fixes: a8088783 ("driver core: auxiliary bus: show auxiliary device IRQs")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarShay Drory <shayd@nvidia.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
      Link: https://patch.msgid.link/20240717172916.595808-1-saeed@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c14112a5
    • Lorenzo Bianconi's avatar
      net: airoha: fix error branch in airoha_dev_xmit and airoha_set_gdm_ports · 1f038d58
      Lorenzo Bianconi authored
      Fix error case management in airoha_dev_xmit routine since we need to
      DMA unmap pending buffers starting from q->head.
      Moreover fix a typo in error case branch in airoha_set_gdm_ports
      routine.
      
      Fixes: 23020f04 ("net: airoha: Introduce ethernet support for EN7581 SoC")
      Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://patch.msgid.link/b628871bc8ae4861b5e2ab4db90aaf373cbb7cee.1721203880.git.lorenzo@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      1f038d58
    • Joshua Washington's avatar
      gve: Fix XDP TX completion handling when counters overflow · 03b54bad
      Joshua Washington authored
      In gve_clean_xdp_done, the driver processes the TX completions based on
      a 32-bit NIC counter and a 32-bit completion counter stored in the tx
      queue.
      
      Fix the for loop so that the counter wraparound is handled correctly.
      
      Fixes: 75eaae15 ("gve: Add XDP DROP and TX support for GQI-QPL format")
      Signed-off-by: default avatarJoshua Washington <joshwash@google.com>
      Signed-off-by: default avatarPraveen Kaligineedi <pkaligineedi@google.com>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Link: https://patch.msgid.link/20240716171041.1561142-1-pkaligineedi@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      03b54bad
  2. 17 Jul, 2024 8 commits
    • Paolo Abeni's avatar
      eth: fbnic: fix s390 build. · 0e03c643
      Paolo Abeni authored
      Building the fbnic nn s390, yield a build bug:
      
      In function ‘fbnic_config_drop_mode_rcq’,
          inlined from ‘fbnic_enable’ at drivers/net/ethernet/meta/fbnic/fbnic_txrx.c:1836:4:
      ././include/linux/compiler_types.h:510:45: error: call to ‘__compiletime_assert_919’ declared with attribute error: FIELD_PREP: value too large for the field
      
      The relevant mask is 9 bits wide, and the related value is the cacheline
      aligned size of struct skb_shared_info.
      
      On s390 the cacheline size is 256 bytes, and skb_shared_info minimum
      size on 64 bits system is 320 bytes.
      
      Avoid building the driver for such arch.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Link: https://lore.kernel.org/202407170432.dYJQOWVz-lkp@intel.com/Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Fixes: 0cb4c0a1 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Link: https://patch.msgid.link/5dfefd3e90e77828f38e68854b171a5b8b8c6ede.1721215379.git.pabeni@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      0e03c643
    • Linus Torvalds's avatar
      Merge tag 'net-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next · 51835949
      Linus Torvalds authored
      Pull networking updates from Jakub Kicinski:
       "Not much excitement - a handful of large patchsets (devmem among them)
        did not make it in time.
      
        Core & protocols:
      
         - Use local_lock in addition to local_bh_disable() to protect per-CPU
           resources in networking, a step closer for local_bh_disable() not
           to act as a big lock on PREEMPT_RT
      
         - Use flex array for netdevice priv area, ensure its cache alignment
      
         - Add a sysctl knob to allow user to specify a default rto_min at
           socket init time. Bit of a big hammer but multiple companies were
           independently carrying such patch downstream so clearly it's useful
      
         - Support scheduling transmission of packets based on CLOCK_TAI
      
         - Un-pin TCP TIMEWAIT timer to avoid it firing on CPUs later cordoned
           off using cpusets
      
         - Support multiple L2TPv3 UDP tunnels using the same 5-tuple address
      
         - Allow configuration of multipath hash seed, to both allow
           synchronizing hashing of two routers, and preventing partial
           accidental sync
      
         - Improve TCP compliance with RFC 9293 for simultaneous connect()
      
         - Support sending NAT keepalives in IPsec ESP in UDP states.
           Userspace IKE daemon had to do this before, but the kernel can
           better keep track of it
      
         - Support sending supervision HSR frames with MAC addresses stored in
           ProxyNodeTable when RedBox (i.e. HSR-SAN) is enabled
      
         - Introduce IPPROTO_SMC for selecting SMC when socket is created
      
         - Allow UDP GSO transmit from devices with no checksum offload
      
         - openvswitch: add packet sampling via psample, separating the
           sampled traffic from "upcall" packets sent to user space for
           forwarding
      
         - nf_tables: shrink memory consumption for transaction objects
      
        Things we sprinkled into general kernel code:
      
         - Power Sequencing subsystem (used by Qualcomm Bluetooth driver for
           QCA6390)           [ Already merged separately - Linus ]
      
         - Add IRQ information in sysfs for auxiliary bus
      
         - Introduce guard definition for local_lock
      
         - Add aligned flavor of __cacheline_group_{begin, end}() markings for
           grouping fields in structures
      
        BPF:
      
         - Notify user space (via epoll) when a struct_ops object is getting
           detached/unregistered
      
         - Add new kfuncs for a generic, open-coded bits iterator
      
         - Enable BPF programs to declare arrays of kptr, bpf_rb_root, and
           bpf_list_head
      
         - Support resilient split BTF which cuts down on duplication and
           makes BTF as compact as possible WRT BTF from modules
      
         - Add support for dumping kfunc prototypes from BTF which enables
           both detecting as well as dumping compilable prototypes for kfuncs
      
         - riscv64 BPF JIT improvements in particular to add 12-argument
           support for BPF trampolines and to utilize bpf_prog_pack for the
           latter
      
         - Add the capability to offload the netfilter flowtable in XDP layer
           through kfuncs
      
        Driver API:
      
         - Allow users to configure IRQ tresholds between which automatic IRQ
           moderation can choose
      
         - Expand Power Sourcing (PoE) status with power, class and failure
           reason. Support setting power limits
      
         - Track additional RSS contexts in the core, make sure configuration
           changes don't break them
      
         - Support IPsec crypto offload for IPv6 ESP and IPv4 UDP-encapsulated
           ESP data paths
      
         - Support updating firmware on SFP modules
      
        Tests and tooling:
      
         - mptcp: use net/lib.sh to manage netns
      
         - TCP-AO and TCP-MD5: replace debug prints used by tests with
           tracepoints
      
         - openvswitch: make test self-contained (don't depend on OvS CLI
           tools)
      
        Drivers:
      
         - Ethernet high-speed NICs:
            - Broadcom (bnxt):
               - increase the max total outstanding PTP TX packets to 4
               - add timestamping statistics support
               - implement netdev_queue_mgmt_ops
               - support new RSS context API
            - Intel (100G, ice, idpf):
               - implement FEC statistics and dumping signal quality indicators
               - support E825C products (with 56Gbps PHYs)
            - nVidia/Mellanox:
               - support HW-GRO
               - mlx4/mlx5: support per-queue statistics via netlink
               - obey the max number of EQs setting in sub-functions
            - AMD/Solarflare:
               - support new RSS context API
            - AMD/Pensando:
               - ionic: rework fix for doorbell miss to lower overhead and
                 skip it on new HW
            - Wangxun:
               - txgbe: support Flow Director perfect filters
      
         - Ethernet NICs consumer, embedded and virtual:
            - Add driver for Tehuti Networks TN40xx chips
            - Add driver for Meta's internal NIC chips
            - Add driver for Ethernet MAC on Airoha EN7581 SoCs
            - Add driver for Renesas Ethernet-TSN devices
            - Google cloud vNIC:
               - flow steering support
            - Microsoft vNIC:
               - support page sizes other than 4KB on ARM64
            - vmware vNIC:
               - support latency measurement (update to version 9)
            - VirtIO net:
               - support for Byte Queue Limits
               - support configuring thresholds for automatic IRQ moderation
               - support for AF_XDP Rx zero-copy
            - Synopsys (stmmac):
               - support for STM32MP13 SoC
               - let platforms select the right PCS implementation
            - TI:
               - icssg-prueth: add multicast filtering support
               - icssg-prueth: enable PTP timestamping and PPS
            - Renesas:
               - ravb: improve Rx performance 30-400% by using page pool,
                 theaded NAPI and timer-based IRQ coalescing
               - ravb: add MII support for R-Car V4M
            - Cadence (macb):
               - macb: add ARP support to Wake-On-LAN
            - Cortina:
               - use phylib for RX and TX pause configuration
      
         - Ethernet switches:
            - nVidia/Mellanox:
               - support configuration of multipath hash seed
               - report more accurate max MTU
               - use page_pool to improve Rx performance
            - MediaTek:
               - mt7530: add support for bridge port isolation
            - Qualcomm:
               - qca8k: add support for bridge port isolation
            - Microchip:
               - lan9371/2: add 100BaseTX PHY support
            - NXP:
               - vsc73xx: implement VLAN operations
      
         - Ethernet PHYs:
            - aquantia: enable support for aqr115c
            - aquantia: add support for PHY LEDs
            - realtek: add support for rtl8224 2.5Gbps PHY
            - xpcs: add memory-mapped device support
            - add BroadR-Reach link mode and support in Broadcom's PHY driver
      
         - CAN:
            - add document for ISO 15765-2 protocol support
            - mcp251xfd: workaround for erratum DS80000789E, use timestamps to
              catch when device returns incorrect FIFO status
      
         - WiFi:
            - mac80211/cfg80211:
               - parse Transmit Power Envelope (TPE) data in mac80211 instead
                 of in drivers
               - improvements for 6 GHz regulatory flexibility
               - multi-link improvements
               - support multiple radios per wiphy
               - remove DEAUTH_NEED_MGD_TX_PREP flag
            - Intel (iwlwifi):
               - bump FW API to 91 for BZ/SC devices
               - report 64-bit radiotap timestamp
               - enable P2P low latency by default
               - handle Transmit Power Envelope (TPE) advertised by AP
               - remove support for older FW for new devices
               - fast resume (keeping the device configured)
               - mvm: re-enable Multi-Link Operation (MLO)
               - aggregation (A-MSDU) optimizations
            - MediaTek (mt76):
               - mt7925 Multi-Link Operation (MLO) support
            - Qualcomm (ath10k):
               - LED support for various chipsets
            - Qualcomm (ath12k):
               - remove unsupported Tx monitor handling
               - support channel 2 in 6 GHz band
               - support Spatial Multiplexing Power Save (SMPS) in 6 GHz band
               - supprt multiple BSSID (MBSSID) and Enhanced Multi-BSSID
                 Advertisements (EMA)
               - support dynamic VLAN
               - add panic handler for resetting the firmware state
               - DebugFS support for datapath statistics
               - WCN7850: support for Wake on WLAN
            - Microchip (wilc1000):
               - read MAC address during probe to make it visible to user space
               - suspend/resume improvements
            - TI (wl18xx):
               - support newer firmware versions
            - RealTek (rtw89):
               - preparation for RTL8852BE-VT support
               - Wake on WLAN support for WiFi 6 chips
               - 36-bit PCI DMA support
            - RealTek (rtlwifi):
               - RTL8192DU support
            - Broadcom (brcmfmac):
               - Management Frame Protection support (to enable WPA3)
      
         - Bluetooth:
            - qualcomm: use the power sequencer for QCA6390
            - btusb: mediatek: add ISO data transmission functions
            - hci_bcm4377: add BCM4388 support
            - btintel: add support for BlazarU core
            - btintel: add support for Whale Peak2
            - btnxpuart: add support for AW693 A1 chipset
            - btnxpuart: add support for IW615 chipset
            - btusb: add Realtek RTL8852BE support ID 0x13d3:0x3591"
      
      * tag 'net-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1589 commits)
        eth: fbnic: Fix spelling mistake "tiggerring" -> "triggering"
        tcp: Replace strncpy() with strscpy()
        wifi: ath12k: fix build vs old compiler
        tcp: Don't access uninit tcp_rsk(req)->ao_keyid in tcp_create_openreq_child().
        eth: fbnic: Write the TCAM tables used for RSS control and Rx to host
        eth: fbnic: Add L2 address programming
        eth: fbnic: Add basic Rx handling
        eth: fbnic: Add basic Tx handling
        eth: fbnic: Add link detection
        eth: fbnic: Add initial messaging to notify FW of our presence
        eth: fbnic: Implement Rx queue alloc/start/stop/free
        eth: fbnic: Implement Tx queue alloc/start/stop/free
        eth: fbnic: Allocate a netdevice and napi vectors with queues
        eth: fbnic: Add FW communication mechanism
        eth: fbnic: Add message parsing for FW messages
        eth: fbnic: Add register init to set PCIe/Ethernet device config
        eth: fbnic: Allocate core device specific structures and devlink interface
        eth: fbnic: Add scaffolding for Meta's NIC driver
        PCI: Add Meta Platforms vendor ID
        net/sched: cls_flower: propagate tca[TCA_OPTIONS] to NL_REQ_ATTR_CHECK
        ...
      51835949
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-next-6.11-rc1' of... · 0434dbe3
      Linus Torvalds authored
      Merge tag 'linux_kselftest-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest updates from Shuah Khan:
      
       - change resctrl test to cleanup resctrl_val() and generalize it by
         removing test name specific handling from the function.
      
       - several clang build failure fixes to framework and tests
      
       - add tests to verify IFS (In Field Scan) driver functionality
      
       - cleanups to remove unused variables and document changes
      
      * tag 'linux_kselftest-next-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (33 commits)
        selftests: ifs: verify IFS ARRAY BIST functionality
        selftests: ifs: verify IFS scan test functionality
        selftests: ifs: verify test image loading functionality
        selftests: ifs: verify test interfaces are created by the driver
        selftests/dma:remove unused variable
        selftests/breakpoints:Remove unused variable
        selftests/x86: fix printk warnings reported by clang
        selftests/x86: remove (or use) unused variables and functions
        selftests/x86: avoid -no-pie warnings from clang during compilation
        selftests/x86: build sysret_rip.c with clang
        selftests/x86: build fsgsbase_restore.c with clang
        selftests: x86: test_FISTTP: use fisttps instead of ambiguous fisttp
        selftests/x86: fix Makefile dependencies to work with clang
        selftests/timers: remove unused irqcount variable
        selftests: Add information about TAP conformance in tests
        selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()
        selftests/resctrl: Remove mongrp from CMT test
        selftests/resctrl: Remove mongrp from MBA test
        selftests/resctrl: Convert ctrlgrp & mongrp to pointers
        selftests/resctrl: Make some strings passed to resctrlfs functions const
        ...
      0434dbe3
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-kunit-6.11-rc1' of... · f8d22a31
      Linus Torvalds authored
      Merge tag 'linux_kselftest-kunit-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull KUnit updates from Shuah Khan:
      
       - add vm_mmap() allocation resource manager
      
       - convert usercopy kselftest to KUnit
      
       - disable usercopy testing on !CONFIG_MMU
      
       - add MODULE_DESCRIPTION() to core, list, and usercopy tests
      
       - add tests for assertion formatting functions - assert.c
      
       - introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros
      
       - fix KUNIT_ASSERT_STRNEQ comments to make it clear that it is an
         assertion
      
       - rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT
      
      * tag 'linux_kselftest-kunit-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        kunit: Introduce KUNIT_ASSERT_MEMEQ and KUNIT_ASSERT_MEMNEQ macros
        kunit: Rename KUNIT_ASSERT_FAILURE to KUNIT_FAIL_AND_ABORT for readability
        kunit: Fix the comment of KUNIT_ASSERT_STRNEQ as assertion
        kunit: executor: Simplify string allocation handling
        kunit/usercopy: Add missing MODULE_DESCRIPTION()
        kunit/usercopy: Disable testing on !CONFIG_MMU
        usercopy: Convert test_user_copy to KUnit test
        kunit: test: Add vm_mmap() allocation resource manager
        list: test: add the missing MODULE_DESCRIPTION() macro
        kunit: add missing MODULE_DESCRIPTION() macros to core modules
        list: test: remove unused struct 'klist_test_struct'
        kunit: Cover 'assert.c' with tests
      f8d22a31
    • Linus Torvalds's avatar
      firmware: qcom: tzmem: don't ask about allocator mode when not enabled · 9de4ad3b
      Linus Torvalds authored
      The Qualcomm firmware code shouldn't ask about what memory allocator
      mode should be used when the code isn't even enabled.
      
      Get rid of pointless config-time question.
      
      Link: https://lore.kernel.org/all/CAHk-=wg+38EHPKGou1MqXwAAXC30cM8sMgZAGnZ7TcFO4L9J2w@mail.gmail.com/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9de4ad3b
    • Linus Torvalds's avatar
      um: Use generic runtime constant implementation · 17e6a121
      Linus Torvalds authored
      UML should not be using the architecture native runtime constants, since
      that requires also having the appropriate instruction fixups (and all
      the linker script details).
      
      Not that using that code would be impossible, but it's not worth it.
      Just point UML at the generic version.
      Reported-by: default avatarNathan Chancellor <nathan@kernel.org>
      Fixes: e3c92e81 ("runtime constants: add x86 architecture support")
      Link: https://lore.kernel.org/all/20240716143644.GA1827132@thelio-3990X/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17e6a121
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 576a997c
      Linus Torvalds authored
      Pull performance events updates from Ingo Molnar:
      
       - Intel PT support enhancements & fixes
      
       - Fix leaked SIGTRAP events
      
       - Improve and fix the Intel uncore driver
      
       - Add support for Intel HBM and CXL uncore counters
      
       - Add Intel Lake and Arrow Lake support
      
       - AMD uncore driver fixes
      
       - Make SIGTRAP and __perf_pending_irq() work on RT
      
       - Micro-optimizations
      
       - Misc cleanups and fixes
      
      * tag 'perf-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
        perf/x86/intel: Add a distinct name for Granite Rapids
        perf/x86/intel/ds: Fix non 0 retire latency on Raptorlake
        perf/x86/intel: Hide Topdown metrics events if the feature is not enumerated
        perf/x86/intel/uncore: Fix the bits of the CHA extended umask for SPR
        perf: Split __perf_pending_irq() out of perf_pending_irq()
        perf: Don't disable preemption in perf_pending_task().
        perf: Move swevent_htable::recursion into task_struct.
        perf: Shrink the size of the recursion counter.
        perf: Enqueue SIGTRAP always via task_work.
        task_work: Add TWA_NMI_CURRENT as an additional notify mode.
        perf: Move irq_work_queue() where the event is prepared.
        perf: Fix event leak upon exec and file release
        perf: Fix event leak upon exit
        task_work: Introduce task_work_cancel() again
        task_work: s/task_work_cancel()/task_work_cancel_func()/
        perf/x86/amd/uncore: Fix DF and UMC domain identification
        perf/x86/amd/uncore: Avoid PMU registration if counters are unavailable
        perf/x86/intel: Support Perfmon MSRs aliasing
        perf/x86/intel: Support PERFEVTSEL extension
        perf/x86: Add config_mask to represent EVENTSEL bitmask
        ...
      576a997c
    • Linus Torvalds's avatar
      Merge tag 'sched-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 4a996d90
      Linus Torvalds authored
      Pull scheduler updates from Ingo Molnar:
      
       - Update Daniel Bristot de Oliveira's entry in MAINTAINERS,
         and credit him in CREDITS
      
       - Harmonize the lock-yielding behavior on dynamically selected
         preemption models with static ones
      
       - Reorganize the code a bit: split out sched/syscalls.c to reduce
         the size of sched/core.c
      
       - Micro-optimize psi_group_change()
      
       - Fix set_load_weight() for SCHED_IDLE tasks
      
       - Misc cleanups & fixes
      
      * tag 'sched-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched: Update MAINTAINERS and CREDITS
        sched/fair: set_load_weight() must also call reweight_task() for SCHED_IDLE tasks
        sched/psi: Optimise psi_group_change a bit
        sched/core: Drop spinlocks on contention iff kernel is preemptible
        sched/core: Move preempt_model_*() helpers from sched.h to preempt.h
        sched/balance: Skip unnecessary updates to idle load balancer's flags
        idle: Remove stale RCU comment
        sched/headers: Move struct pre-declarations to the beginning of the header
        sched/core: Clean up kernel/sched/sched.h a bit
        sched/core: Simplify prefetch_curr_exec_start()
        sched: Fix spelling in comments
        sched/syscalls: Split out kernel/sched/syscalls.c from kernel/sched/core.c
      4a996d90
  3. 16 Jul, 2024 27 commits
    • Linus Torvalds's avatar
      Merge tag 'objtool-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0c182ac2
      Linus Torvalds authored
      Pull objtool updates from Ingo Molnar:
      
       - Fix bug that caused objtool to confuse certain memory ops added by
         KASAN instrumentation as stack accesses
      
       - Various faddr2line optimizations
      
       - Improve error messages
      
      * tag 'objtool-core-2024-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        objtool/x86: objtool can confuse memory and stack access
        objtool: Use "action" in error message to be consistent with help
        scripts/faddr2line: Check only two symbols when calculating symbol size
        scripts/faddr2line: Remove call to addr2line from find_dir_prefix()
        scripts/faddr2line: Invoke addr2line as a single long-running process
        scripts/faddr2line: Pass --addresses argument to addr2line
        scripts/faddr2line: Check vmlinux only once
        scripts/faddr2line: Combine three readelf calls into one
        scripts/faddr2line: Reduce number of readelf calls to three
      0c182ac2
    • Linus Torvalds's avatar
      Merge tag 'locking-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 151647ab
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
      
       - Jump label fixes, including a perf events fix that originally
         manifested as jump label failures, but was a serialization bug at the
         usage site
      
       - Mark down_write*() helpers as __always_inline, to improve WCHAN
         debuggability
      
       - Misc cleanups and fixes
      
      * tag 'locking-core-2024-07-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/rwsem: Add __always_inline annotation to __down_write_common() and inlined callers
        jump_label: Simplify and clarify static_key_fast_inc_cpus_locked()
        jump_label: Clarify condition in static_key_fast_inc_not_disabled()
        jump_label: Fix concurrency issues in static_key_slow_dec()
        perf/x86: Serialize set_attr_rdpmc()
        cleanup: Standardize the header guard define's name
      151647ab
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 923a327e
      Linus Torvalds authored
      Pull ACPI updates from Rafael Wysocki:
       "The only kind of new feature added by these is the hwmon interface
        support in the ACPI fan driver. Apart from that, they mostly address
        issues and clean up code.
      
        Specifics:
      
         - Switch the ACPI x86 utility code and the ACPI LPSS driver to new
           Intel CPU model defines (Tony Luck)
      
         - Add hwmon interface support to the ACPI fan driver (Armin Wolf)
      
         - Add sysfs entry for guaranteed performance to the ACPI CPPC library
           and replace a ternary operator with umax() in it (Petr Tesařík,
           Prabhakar Pujeri)
      
         - Clean up the ACPI PMIC driver in multiple ways (Andy Shevchenko,
           Christophe JAILLET)
      
         - Add support for charge limiting state to the ACPI battery driver
           and update _OSC to indicate support for it (Armin Wolf)
      
         - Clean up the sysfs interface in the ACPI battery, SBS (smart
           battery subsystem) and AC drivers (Thomas Weißschuh)
      
         - Coordinate header includes in the ACPI NUMA code and make it use
           ACCESS_COORDINATE_CPU when appropriate (Huang Ying, Thorsten Blum)
      
         - Downgrade Intel _OSC and _PDC messages in the ACPI processor driver
           to debug to reduce log noise (Mario Limonciello)
      
         - Still evaluate _OST when _PUR evaluation fails in the ACPI PAD
           (processor aggregator) driver as per the spec (Armin Wolf)
      
         - Skip ACPI IRQ override on Asus Vivobook Pro N6506MJ and N6506MU
           platforms (Tamim Khan)
      
         - Force native mode on some T2 macbooks in the ACPI backlight driver
           and replace strcpy() with strscpy() in it (Orlando Chamberlain,
           Muhammad Qasim Abdul Majeed)
      
         - Add missing MODULE_DESCRIPTION() macros in two places (Jeff
           Johnson)"
      
      * tag 'acpi-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (26 commits)
        ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MJ
        ACPI: video: force native for some T2 macbooks
        ACPI: video: Use strscpy() instead of strcpy()
        ACPI: CPPC: Replace ternary operator with umax()
        ACPI: resource: Skip IRQ override on Asus Vivobook Pro N6506MU
        ACPI: PMIC: Constify struct pmic_table
        ACPI: bus: Indicate support for battery charge limiting thru _OSC
        ACPI: battery: Add support for charge limiting state
        ACPI: processor: Downgrade Intel _OSC and _PDC messages to debug
        ACPI: SBS: manage alarm sysfs attribute through psy core
        ACPI: battery: create alarm sysfs attribute atomically
        ACPI: battery: use sysfs_emit over sprintf
        ACPI: battery: constify powersupply properties
        ACPI: SBS: constify powersupply properties
        ACPI: AC: constify powersupply properties
        ACPI: PMIC: Replace open coded be16_to_cpu()
        ACPI: PMIC: Convert pr_*() to dev_*() printing macros
        ACPI: PMIC: Use sizeof() instead of hard coded value
        ACPI: NUMA: Consolidate header includes
        ACPI: CPPC: add sysfs entry for guaranteed performance
        ...
      923a327e
    • Linus Torvalds's avatar
      Merge tag 'pm-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 41906248
      Linus Torvalds authored
      Pull power management updates from Rafael Wysocki:
       "These add a new cpufreq driver for Loongson-3, add support for new
        features in the intel_pstate (Lunar Lake and Arrow Lake platforms, OOB
        mode for Emerald Rapids, highest performance change interrupt),
        amd-pstate (fast CPPC) and sun50i (Allwinner H700 speed bin) cpufreq
        drivers, simplify the cpufreq driver interface, simplify the teo
        cpuidle governor, adjust the pm-graph utility for a new version of
        Python, address issues and clean up code.
      
        Specifics:
      
         - Add Loongson-3 CPUFreq driver support (Huacai Chen)
      
         - Add support for the Arrow Lake and Lunar Lake platforms and the
           out-of-band (OOB) mode on Emerald Rapids to the intel_pstate
           cpufreq driver, make it support the highest performance change
           interrupt and clean it up (Srinivas Pandruvada)
      
         - Switch cpufreq to new Intel CPU model defines (Tony Luck)
      
         - Simplify the cpufreq driver interface by switching the .exit()
           driver callback to the void return data type (Lizhe, Viresh Kumar)
      
         - Make cpufreq_boost_enabled() return bool (Dhruva Gole)
      
         - Add fast CPPC support to the amd-pstate cpufreq driver, address
           multiple assorted issues in it and clean it up (Perry Yuan, Mario
           Limonciello, Dhananjay Ugwekar, Meng Li, Xiaojian Du)
      
         - Add Allwinner H700 speed bin to the sun50i cpufreq driver (Ryan
           Walklin)
      
         - Fix memory leaks and of_node_put() usage in the sun50i and
           qcom-nvmem cpufreq drivers (Javier Carrasco)
      
         - Clean up the sti and dt-platdev cpufreq drivers (Jeff Johnson,
           Raphael Gallais-Pou)
      
         - Fix deferred probe handling in the TI cpufreq driver and wrong
           return values of ti_opp_supply_probe(), and add OPP tables for the
           AM62Ax and AM62Px SoCs to it (Bryan Brattlof, Primoz Fiser)
      
         - Avoid overflow of target_freq in .fast_switch() in the SCMI cpufreq
           driver (Jagadeesh Kona)
      
         - Use dev_err_probe() in every error path in probe in the Mediatek
           cpufreq driver (Nícolas Prado)
      
         - Fix kernel-doc param for longhaul_setstate in the longhaul cpufreq
           driver (Yang Li)
      
         - Fix system resume handling in the CPPC cpufreq driver (Riwen Lu)
      
         - Improve the teo cpuidle governor and clean up leftover comments
           from the menu cpuidle governor (Christian Loehle)
      
         - Clean up a comment typo in the teo cpuidle governor (Atul Kumar
           Pant)
      
         - Add missing MODULE_DESCRIPTION() macro to cpuidle haltpoll (Jeff
           Johnson)
      
         - Switch the intel_idle driver to new Intel CPU model defines (Tony
           Luck)
      
         - Switch the Intel RAPL driver new Intel CPU model defines (Tony
           Luck)
      
         - Simplify if condition in the idle_inject driver (Thorsten Blum)
      
         - Fix missing cleanup on error in _opp_attach_genpd() (Viresh Kumar)
      
         - Introduce an OF helper function to inform if required-opps is used
           and drop a redundant in-parameter to _set_opp_level() (Ulf Hansson)
      
         - Update pm-graph to v5.12 which includes fixes and major code revamp
           for python3.12 (Todd Brandt)
      
         - Address several assorted issues in the cpupower utility (Roman
           Storozhenko)"
      
      * tag 'pm-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (77 commits)
        cpufreq: sti: fix build warning
        cpufreq: mediatek: Use dev_err_probe in every error path in probe
        cpufreq: Add Loongson-3 CPUFreq driver support
        cpufreq: Make cpufreq_driver->exit() return void
        cpufreq/amd-pstate: Fix the scaling_max_freq setting on shared memory CPPC systems
        cpufreq/amd-pstate-ut: Convert nominal_freq to khz during comparisons
        cpufreq: pcc: Remove empty exit() callback
        cpufreq: loongson2: Remove empty exit() callback
        cpufreq: nforce2: Remove empty exit() callback
        cpupower: fix lib default installation path
        cpufreq: docs: Add missing scaling_available_frequencies description
        cpuidle: teo: Don't count non-existent intercepts
        cpupower: Disable direct build of the 'bench' subproject
        cpuidle: teo: Remove recent intercepts metric
        Revert: "cpuidle: teo: Introduce util-awareness"
        cpufreq: make cpufreq_boost_enabled() return bool
        cpufreq: intel_pstate: Support highest performance change interrupt
        x86/cpufeatures: Add HWP highest perf change feature flag
        Documentation: cpufreq: amd-pstate: update doc for Per CPU boost control method
        cpufreq: amd-pstate: Cap the CPPC.max_perf to nominal_perf if CPB is off
        ...
      41906248
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 15114e8f
      Linus Torvalds authored
      Pull thermal control updates from Rafael Wysocki:
       "These add some new hardware support (notably, the Lunar Lake platform
        support in int340x and X1E80100 temperature sensor), continue to
        rework the thermal driver interface to eliminate trip point IDs from
        it, update DT bindings for a number of platforms and simplify probe in
        a number of thermal drivers, address issues and clean up code.
      
        Specifics:
      
         - Add DLVR and MSI interrupt support for the Lunar Lake platform to
           the int340x thermal driver (Srinivas Pandruvada)
      
         - Enable workload type hints (WLT) support and power floor interrupt
           support for the Lunar Lake platform in int340x ((Srinivas
           Pandruvada)
      
         - Switch Intel thermal drivers to new Intel CPU model defines (Tony
           Luck)
      
         - Clean up the int3400 and int3403 drivers (Erick Archer and David
           Alan Gilbert)
      
         - Improve intel_pch_thermal kernel log messages printed during
           suspend to idle (Zhang Rui)
      
         - Make the intel_tcc_cooling driver use a model-specific bitmask for
           TCC offset (Ricardo Neri)
      
         - Redesign the .set_trip_temp() thermal zone callback to take a trip
           pointer instead of a trip ID and update its users (Rafael Wysocki)
      
         - Avoid using invalid combinations of polling_delay and passive_delay
           thermal zone parameters (Rafael Wysocki)
      
         - Update a cooling device registration function to take a const
           argument (Krzysztof Kozlowski)
      
         - Make the uniphier thermal driver use thermal_zone_for_each_trip()
           for walking trip points (Rafael Wysocki)
      
         - Fix and clean up several minor shortcomings in thermal debug
           (Rafael Wysocki)
      
         - Rename __thermal_zone_set_trips() to thermal_zone_set_trips() and
           make it use trip thresholds (Rafael Wysocki)
      
         - Use READ_ONCE() for lockless access to trip temperature and
           hysteresis (Rafael Wysocki)
      
         - Drop unnecessary cooling device target state checks from the
           Bang-Bang thermal governor (Rafael Wysocki)
      
         - Avoid invoking thermal governor .trip_crossed() callback for
           critical and hot trip points (Rafael Wysocki)
      
         - Group all Renesas drivers inside a dedicated sub directory and add
           the missing dependency to OF (Niklas Söderlund)
      
         - Add suspend/resume support on k3_j72xx_bandgap and take the
           opportunity to remove an unneeded delay in the init time code path
           (Théo Lebrun)
      
         - Fix thermal zone definition for MT8186 and MT8188 (Julien Panis)
      
         - Convert hisilicon-thermal.txt to dt-schema (Abdulrasaq Lawani)
      
         - Add DT bindings for the X1E80100 temperature sensor (Abel Vesa)
      
         - Fix the thermal zone node name regular expression in the DT schema
           (Krzysztof Kozlowski)
      
         - Avoid failing thermal control initialization by using default
           values on some platforms where calibration data is missing (Chen-Yu
           Tsai)
      
         - Fix the sensor cell size in DT for the Exynos platform (Krzysztof
           Kozlowski)
      
         - Bring the common definition of '#thermal-sensor-cells' property in
           order to simplify the bindings on all the platforms where this
           change makes sense and do some minor cleanups (Krzysztof Kozlowski)
      
         - Fix a race between removal and clock disable in the broadcom
           thermal driver (Krzysztof Kozlowski)
      
         - Drop 'trips' DT node as required from the thermal zone bindings in
           order to fix the remaining warnings appearing for thermal zones
           without trip points (Rob Herring)
      
         - Simplify all the drivers where dev_err_probe() can apply (Krzysztof
           Kozlowski)
      
         - Clean up code related to stih416 as this platform is not described
           anywhere (Raphael Gallais-Pou)"
      
      * tag 'thermal-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (81 commits)
        thermal/drivers/sti: Cleanup code related to stih416
        thermal/drivers/generic-adc: Simplify with dev_err_probe()
        thermal/drivers/generic-adc: Simplify probe() with local dev variable
        thermal/drivers/qcom-tsens: Simplify with dev_err_probe()
        thermal/drivers/qcom-spmi-adc-tm5: Simplify with dev_err_probe()
        thermal/drivers/imx: Simplify with dev_err_probe()
        thermal/drivers/imx: Simplify probe() with local dev variable
        thermal/drivers/hisi: Simplify with dev_err_probe()
        thermal/drivers/exynos: Simplify with dev_err_probe()
        thermal/drivers/exynos: Simplify probe() with local dev variable
        thermal/drivers/broadcom: Simplify with dev_err_probe()
        thermal/drivers/broadcom: Simplify probe() with local dev variable
        thermal/drivers/broadcom: Fix race between removal and clock disable
        dt-bindings: thermal: Drop 'trips' node as required
        dt-bindings: thermal: qoriq: reference thermal-sensor schema
        dt-bindings: thermal: cleanup examples indentation
        dt-bindings: thermal: simplify few bindings
        dt-bindings: thermal: ti,j72xx: reference thermal-sensor schema
        dt-bindings: thermal: ti,am654: reference thermal-sensor schema
        dt-bindings: thermal: st,stm32: reference thermal-sensor schema
        ...
      15114e8f
    • Linus Torvalds's avatar
      Merge tag 'Smack-for-6.10' of https://github.com/cschaufler/smack-next · 42b5a015
      Linus Torvalds authored
      Pull smack updates from Casey Schaufler:
       "Two fixes for Smack networking labeling by Konstantin Andreev"
      
      * tag 'Smack-for-6.10' of https://github.com/cschaufler/smack-next:
        smack: unix sockets: fix accept()ed socket label
        smack: tcp: ipv4, fix incorrect labeling
      42b5a015
    • Linus Torvalds's avatar
      Merge tag 'lsm-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm · 11ab4cd5
      Linus Torvalds authored
      Pull lsm updates from Paul Moore:
       "Two LSM patches focused on cleaning up the inode xattr capability
        handling"
      
      * tag 'lsm-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/lsm:
        selinux,smack: remove the capability checks in the removexattr hooks
        lsm: fixup the inode xattr capability handling
      11ab4cd5
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · dad8d1a3
      Linus Torvalds authored
      Pull selinux update from Paul Moore:
       "A single SELinux patch to change the type of a pre-processor constant
        to better match its use"
      
      * tag 'selinux-pr-20240715' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: Use 1UL for EBITMAP_BIT to match maps type
      dad8d1a3
    • Linus Torvalds's avatar
      Merge tag 'sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl · f8a8b94d
      Linus Torvalds authored
      Pull sysctl updates from Joel Granados:
      
       - Remove "->procname == NULL" check when iterating through sysctl table
         arrays
      
         Removing sentinels in ctl_table arrays reduces the build time size
         and runtime memory consumed by ~64 bytes per array. With all
         ctl_table sentinels gone, the additional check for ->procname == NULL
         that worked in tandem with the ARRAY_SIZE to calculate the size of
         the ctl_table arrays is no longer needed and has been removed. The
         sysctl register functions now returns an error if a sentinel is used.
      
       - Preparation patches for sysctl constification
      
         Constifying ctl_table structs prevents the modification of
         proc_handler function pointers as they would reside in .rodata. The
         ctl_table arguments in sysctl utility functions are const qualified
         in preparation for a future treewide proc_handler argument
         constification commit.
      
       - Misc fixes
      
         Increase robustness of set_ownership by providing sane default
         ownership values in case the callee doesn't set them. Bound check
         proc_dou8vec_minmax to avoid loading buggy modules and give sysctl
         testing module a name to avoid compiler complaints.
      
      * tag 'sysctl-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl:
        sysctl: Warn on an empty procname element
        sysctl: Remove ctl_table sentinel code comments
        sysctl: Remove "child" sysctl code comments
        sysctl: Remove superfluous empty allocations from sysctl internals
        sysctl: Replace nr_entries with ctl_table_size in new_links
        sysctl: Remove check for sentinel element in ctl_table arrays
        mm profiling: Remove superfluous sentinel element from ctl_table
        locking: Remove superfluous sentinel element from kern_lockdep_table
        sysctl: Add module description to sysctl-testing
        sysctl: constify ctl_table arguments of utility function
        utsname: constify ctl_table arguments of utility function
        sysctl: move the extra1/2 boundary check of u8 to sysctl_check_table_array
        sysctl: always initialize i_uid/i_gid
      f8a8b94d
    • Linus Torvalds's avatar
      Merge tag 'hardening-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · ce5a51bf
      Linus Torvalds authored
      Pull hardening updates from Kees Cook:
      
       - lkdtm/bugs: add test for hung smp_call_function_single() (Mark
         Rutland)
      
       - gcc-plugins: Remove duplicate included header file stringpool.h
         (Thorsten Blum)
      
       - ARM: Remove address checking for MMUless devices (Yanjun Yang)
      
       - randomize_kstack: Clean up per-arch entropy and codegen
      
       - KCFI: Make FineIBT mode Kconfig selectable
      
       - fortify: Do not special-case 0-sized destinations
      
      * tag 'hardening-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        randomize_kstack: Improve stack alignment codegen
        ARM: Remove address checking for MMUless devices
        gcc-plugins: Remove duplicate included header file stringpool.h
        randomize_kstack: Remove non-functional per-arch entropy filtering
        fortify: Do not special-case 0-sized destinations
        x86/alternatives: Make FineIBT mode Kconfig selectable
        lkdtm/bugs: add test for hung smp_call_function_single()
      ce5a51bf
    • Linus Torvalds's avatar
      Merge tag 'pstore-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 8050258b
      Linus Torvalds authored
      Pull pstore updates from Kees Cook:
      
       - Add missing MODULE_DESCRIPTION() macro (Jeff Johnson)
      
       - Replace deprecated strncpy() with strscpy() (Justin Stitt)
      
      * tag 'pstore-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        pstore: platform: add missing MODULE_DESCRIPTION() macro
        pstore/blk: replace deprecated strncpy with strscpy
      8050258b
    • Linus Torvalds's avatar
      Merge tag 'seccomp-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 1ca995ed
      Linus Torvalds authored
      Pull seccomp updates from Kees Cook:
      
       - interrupt SECCOMP_IOCTL_NOTIF_RECV when all users exit (Andrei Vagin)
      
       - Update selftests to check for expected NOTIF_RECV exits (Andrei
         Vagin)
      
      * tag 'seccomp-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        selftests/seccomp: check that a zombie leader doesn't affect others
        selftests/seccomp: add test for NOTIF_RECV and unused filters
        seccomp: release task filters when the task exits
        seccomp: interrupt SECCOMP_IOCTL_NOTIF_RECV when all users have exited
      1ca995ed
    • Linus Torvalds's avatar
      Merge tag 'execve-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · 72fda6c8
      Linus Torvalds authored
      Pull execve updates from Kees Cook:
      
       - Use value of kernel.randomize_va_space once per exec (Alexey
         Dobriyan)
      
       - Honor PT_LOAD alignment for static PIE
      
       - Make bprm->argmin only visible under CONFIG_MMU
      
       - Add KUnit testing of bprm_stack_limits()
      
      * tag 'execve-v6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        exec: Avoid pathological argc, envc, and bprm->p values
        execve: Keep bprm->argmin behind CONFIG_MMU
        ELF: fix kernel.randomize_va_space double read
        exec: Add KUnit test for bprm_stack_limits()
        binfmt_elf: Honor PT_LOAD alignment for static PIE
        binfmt_elf: Calculate total_size earlier
        selftests/exec: Build both static and non-static load_address tests
      72fda6c8
    • Linus Torvalds's avatar
      Merge tag 'for-linus-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · f83e38fc
      Linus Torvalds authored
      Pull xen updates from Juergen Gross:
      
       - some trivial cleanups
      
       - a fix for the Xen timer
      
       - add boot time selectable debug capability to the Xen multicall
         handling
      
       - two fixes for the recently added Xen irqfd handling
      
      * tag 'for-linus-6.11-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        x86/xen: remove deprecated xen_nopvspin boot parameter
        x86/xen: eliminate some private header files
        x86/xen: make some functions static
        xen: make multicall debug boot time selectable
        xen/arm: Convert comma to semicolon
        xen: privcmd: Fix possible access to a freed kirqfd instance
        xen: privcmd: Switch from mutex to spinlock for irqfds
        xen: add missing MODULE_DESCRIPTION() macros
        x86/xen: Convert comma to semicolon
        x86/xen/time: Reduce Xen timer tick
        xen/manage: Constify struct shutdown_handler
      f83e38fc
    • Linus Torvalds's avatar
      Merge tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · e55037c8
      Linus Torvalds authored
      Pull EFI updates from Ard Biesheuvel:
       "Note the removal of the EFI fake memory map support - this is believed
        to be unused and no longer worth supporting. However, we could easily
        bring it back if needed.
      
        With recent developments regarding confidential VMs and unaccepted
        memory, combined with kexec, creating a known inaccurate view of the
        firmware's memory map and handing it to the OS is a feature we can
        live without, hence the removal. Alternatively, I could imagine making
        this feature mutually exclusive with those confidential VM related
        features, but let's try simply removing it first.
      
        Summary:
      
         - Drop support for the 'fake' EFI memory map on x86
      
         - Add an SMBIOS based tweak to the EFI stub instructing the firmware
           on x86 Macbook Pros to keep both GPUs enabled
      
         - Replace 0-sized array with flexible array in EFI memory attributes
           table handling
      
         - Drop redundant BSS clearing when booting via the native PE
           entrypoint on x86
      
         - Avoid returning EFI_SUCCESS when aborting on an out-of-memory
           condition
      
         - Cosmetic tweak for arm64 KASLR loading logic"
      
      * tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array
        efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
        arm64/efistub: Clean up KASLR logic
        x86/efistub: Drop redundant clearing of BSS
        x86/efistub: Avoid returning EFI_SUCCESS on error
        x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
        x86/efistub: Enable SMBIOS protocol handling for x86
        efistub/smbios: Simplify SMBIOS enumeration API
        x86/efi: Drop support for fake EFI memory maps
      e55037c8
    • Linus Torvalds's avatar
      Merge tag 'asm-generic-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic · d80f2996
      Linus Torvalds authored
      Pull asm-generic updates from Arnd Bergmann:
       "Most of this is part of my ongoing work to clean up the system call
        tables. In this bit, all of the newer architectures are converted to
        use the machine readable syscall.tbl format instead in place of
        complex macros in include/uapi/asm-generic/unistd.h.
      
        This follows an earlier series that fixed various API mismatches and
        in turn is used as the base for planned simplifications.
      
        The other two patches are dead code removal and a warning fix"
      
      * tag 'asm-generic-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
        vmlinux.lds.h: catch .bss..L* sections into BSS")
        fixmap: Remove unused set_fixmap_offset_io()
        riscv: convert to generic syscall table
        openrisc: convert to generic syscall table
        nios2: convert to generic syscall table
        loongarch: convert to generic syscall table
        hexagon: use new system call table
        csky: convert to generic syscall table
        arm64: rework compat syscall macros
        arm64: generate 64-bit syscall.tbl
        arm64: convert unistd_32.h to syscall.tbl format
        arc: convert to generic syscall table
        clone3: drop __ARCH_WANT_SYS_CLONE3 macro
        kbuild: add syscall table generation to scripts/Makefile.asm-headers
        kbuild: verify asm-generic header list
        loongarch: avoid generating extra header files
        um: don't generate asm/bpf_perf_event.h
        csky: drop asm/gpio.h wrapper
        syscalls: add generic scripts/syscall.tbl
      d80f2996
    • Linus Torvalds's avatar
      Merge tag 'soc-arm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · a5db8e45
      Linus Torvalds authored
      Pull arm SoC platform updates from Arnd Bergmann:
       "The majority of the updates here are Dmitry Torokhov's cleanups for
        platform code in the pxa and tegra platforms, changing custom
        platform_data structures into DT-compatible software node
        declarations.
      
        The other updates are for the MAINTAINERS file, correcting some stale
        or missing entries"
      
      * tag 'soc-arm-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        ARM: pxa: fix build breakage on PXA3xx
        ti: omap: MAINTAINERS: move Benoît Cousson to CREDITS
        amazon: MAINTAINERS: change to odd fixes and Tsahee Zidenberg to CREDITS
        MAINTAINERS: thead: add git tree
        ARM: spitz: Use software nodes for the ADS7846 touchscreen
        ARM: spitz: Use software nodes to describe LED GPIOs
        ARM: spitz: Use software nodes to describe MMC GPIOs
        ARM: spitz: Use software nodes to describe LCD GPIOs
        ARM: spitz: Use software nodes to describe audio GPIOs
        ARM: spitz: Use software nodes to describe SPI CS lines
        ARM: spitz: Simplify instantiating SPI controller
        ARM: pxa/gumstix: convert vbus gpio to use software nodes
        ARM: pxa: consolidate GPIO chip platform data
        ARM: spitz: fix GPIO assignment for backlight
        ARM: tegra: paz00: Use software nodes to describe GPIOs for WiFi rfkill
        MAINTAINERS: ARM: airoha: add entry to cover Airoha SoC
        bus: vexpress-config: Add missing MODULE_DESCRIPTION() macro
        arm64: layerscape: remove redundant EDAC_SUPPORT selection
        dt-bindings: arm: Remove obsolete RTSM DCSCB binding
        arm: vexpress: Remove obsolete RTSM DCSCB support
      a5db8e45
    • Linus Torvalds's avatar
      Merge tag 'soc-defconfig-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · a9a4cd9c
      Linus Torvalds authored
      Pull SoC defconfig updates from Arnd Bergmann:
       "These are the usual updates to enable newly added drivers, mostly for
        arm64 and riscv this time"
      
      * tag 'soc-defconfig-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
        arm64: defconfig: Enable the IWLWIFI driver
        ARM: multi_v7_defconfig: Add MCP23S08 pinctrl support
        arm64: defconfig: Enable NVIDIA CoreSight PMU driver
        arm64: defconfig: enable SHM Bridge support for the TZ memory allocator
        arm64: defconfig: Enable secure QFPROM driver
        ARM: imx_v6_v7_defconfig: enable DRM_SII902X and DRM_DISPLAY_CONNECTOR
        ARM: imx_v6_v7_defconfig: Enable drivers for TQMa7x/MBa7x
        riscv: defconfig: Enable StarFive JH7110 drivers
        arm64: defconfig: Enable TI LP873X PMIC
        arm64: defconfig: Enable USB2 PHY Driver
        arm64: defconfig: Enable MTD support for Hyperbus
        ARM: configs: at91: Enable LVDS serializer support
        arm64: defconfig: enable several Qualcomm interconnects
        arm64: defconfig: Enable Marvell 88Q2XXX PHY support
        arm64: defconfig: make CONFIG_INTERCONNECT_QCOM_SM8350 built-in
        arm64: defconfig: enable CONFIG_SM_GPUCC_8350
        arm64: defconfig: Enable Renesas R-Car Gen4 PCIe controller
      a9a4cd9c
    • Linus Torvalds's avatar
      Merge tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · e3950967
      Linus Torvalds authored
      Pull SoC dt updates from Arnd Bergmann:
       "The devicetree updates are fairly well spread out across platforms,
        with Qualcomm making up about a third of the total.
      
        There are three new SoCs in existing product families this:
      
         - NXP i.MX95 is a variant of i.MX93, now with six Cortex-A55 cores
           instead of just two as well as a GPU and more high-speed I/O
           devices.
      
         - Qualcomm QCS8550 is a variant of SM8550 for IOT devices
      
         - Airoha EN7581 is a 10G-PON network chip and related to the MT7981
           Wireless router chip from its parent Mediatek.
      
        In total there are 58 new machines, including four riscv boards and
        eight for 32-bit arm.
      
        The most exciting new addition is probably a pair of laptops based on
        the Qualcomm x1e80100 (Snapdragon X1 Elite) chip, the Asus Vivobook
        S15 and the Lenovo Yoga Slim7x.
      
        Other noteworthy new additions are:
      
         - A total of 20 Qualcomm based machines, mostly Android devices from
           Samsung, Motorola and LG, as well as a wireless router and some
           reference designs
      
         - Six NXP i.MX based machines, mostly industrial boards along with
           some reference designs
      
         - Mediatek sees some interesting Filogic based routers including the
           "OpenWRT One", a few new Chromebooks as well as single-board
           computers.
      
         - Four machines from Solidrun based on Marvell cn913x, replacing the
           older Armada 8000 based counterparts
      
         - The four Amlogic machines are all set top boxes or reference
           designs for them
      
         - The nine new Rockchips machines are mostly single-board computers
           including some interesting ones based on the rk3588 chip like the
           ROCK 5 ITX board and the CM3588 with its four NVMe slots
      
         - The RISC-V boards are all single-board computers based on Starfive
           JH7110, Microchip MPFS and Allwinner D1, which all had similar
           boards already
      
        There are also a lot of updates to already supported machines, notably
        for the TI K3, Rockchips, Freescale and of course Qualcomm platforms"
      
      * tag 'soc-dt-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (846 commits)
        arm64: dts: allwinner: h616: add crypto engine node
        riscv: dts: add clock generator for Sophgo SG2042 SoC
        arm64: dts: rockchip: Add Xunlong Orange Pi 3B
        dt-bindings: arm: rockchip: Add Xunlong Orange Pi 3B
        arm64: dts: rockchip: Add Radxa ROCK 3B
        dt-bindings: arm: rockchip: Add Radxa ROCK 3B
        mailmap: Update Luca Weiss's email address
        ARM: dts: ixp4xx: nslu2: beeper uses PWM
        arm64: dts: rockchip: add ROCK 5 ITX board
        dt-bindings: arm: rockchip: Add ROCK 5 ITX board
        arm64: dts: rockchip: Add dma-names to uart1 on Pine64 rk3566 devices
        arm64: dts: rockchip: Add avdd supplies to hdmi on rock64
        arm64: dts: qcom: msm8916-lg-c50: add initial dts for LG Leon LTE
        arm64: dts: qcom: msm8916-lg-m216: Add initial device tree
        dt-bindings: arm: qcom: Add msm8916 based LG devices
        ARM: dts: qcom: msm8960: correct memory base
        arm64: dts: qcom: ipq9574: Add icc provider ability to gcc
        dt-bindings: interconnect: Add Qualcomm IPQ9574 support
        arm64: dts: qcom: sm8150: Add video clock controller node
        arm64: dts: qcom: pm6150: Add vibrator
        ...
      e3950967
    • Linus Torvalds's avatar
      Merge tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · cc0f7c3f
      Linus Torvalds authored
      Pull SoC driver updates from Arnd Bergmann:
       "The updates to the mediatek, allwinner, ti, tegra, microchip, stm32,
        samsung, imx, zynq and amlogic platoforms are fairly small maintenance
        changes, either addressing minor mistakes or enabling additional
        hardware.
      
        The qualcomm platform changes add a number of features and are larger
        than the other ones combined, introducing the use of linux/cleanup.h
        across several drivers, adding support for Snapdragon X1E and other
        SoCs in platform drivers, a new "protection domain mapper" driver, and
        a "shared memory bridge" driver.
      
        The cznic "turris omnia" router based on Marvell Armada gets a
        platform driver that talks to the board specific microcontroller.
      
        The reset and cache subsystems get a few minor updates to SoC specific
        drivers, while the ff-a, scmi and optee firmware drivers get some code
        refactoring and new features"
      
      * tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (122 commits)
        firmware: turris-mox-rwtm: Initialize completion before mailbox
        firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
        firmware: turris-mox-rwtm: Do not complete if there are no waiters
        MAINTAINERS: drop riscv list from cache controllers
        platform: cznic: turris-omnia-mcu: fix Kconfig dependencies
        bus: sunxi-rsb: Constify struct regmap_bus
        soc: sunxi: sram: Constify struct regmap_config
        platform: cznic: turris-omnia-mcu: Depend on WATCHDOG
        platform: cznic: turris-omnia-mcu: Depend on OF
        soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers
        arm64: stm32: enable scmi regulator for stm32
        firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
        soc: qcom: wcnss: simplify with cleanup.h
        soc: qcom: pdr: simplify with cleanup.h
        soc: qcom: ocmem: simplify with cleanup.h
        soc: qcom: mdt_loader: simplify with cleanup.h
        soc: qcom: llcc: simplify with cleanup.h
        firmware: qcom: tzmem: simplify returning pointer without cleanup
        soc: qcom: socinfo: Add PM6350 PMIC
        arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
        ...
      cc0f7c3f
    • Linus Torvalds's avatar
      Merge tag 'm68k-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · 99298eb6
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
      
       - Fix bootup lock-ups on Warp1260, Atari TT, and MegaSTe
      
       - Miscellaneous fixes and improvements
      
       - defconfig updates
      
      * tag 'm68k-for-v6.11-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k: cmpxchg: Fix return value for default case in __arch_xchg()
        m68k: defconfig: Update defconfigs for v6.10-rc1
        m68k: atari: Fix TT bootup freeze / unexpected (SCU) interrupt messages
        zorro: Use str_plural() in amiga_zorro_probe()
        m68k: emu: Add missing MODULE_DESCRIPTION() macros
        m68k: amiga: Turn off Warp1260 interrupts during boot
      99298eb6
    • Linus Torvalds's avatar
      Merge tag 'x86_sev_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 40832358
      Linus Torvalds authored
      Pull x86 SEV updates from Borislav Petkov:
      
       - Add support for running the kernel in a SEV-SNP guest, over a Secure
         VM Service Module (SVSM).
      
         When running over a SVSM, different services can run at different
         protection levels, apart from the guest OS but still within the
         secure SNP environment. They can provide services to the guest, like
         a vTPM, for example.
      
         This series adds the required facilities to interface with such a
         SVSM module.
      
       - The usual fixlets, refactoring and cleanups
      
      [ And as always: "SEV" is AMD's "Secure Encrypted Virtualization".
      
        I can't be the only one who gets all the newer x86 TLA's confused,
        can I?
                    - Linus ]
      
      * tag 'x86_sev_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        Documentation/ABI/configfs-tsm: Fix an unexpected indentation silly
        x86/sev: Do RMP memory coverage check after max_pfn has been set
        x86/sev: Move SEV compilation units
        virt: sev-guest: Mark driver struct with __refdata to prevent section mismatch
        x86/sev: Allow non-VMPL0 execution when an SVSM is present
        x86/sev: Extend the config-fs attestation support for an SVSM
        x86/sev: Take advantage of configfs visibility support in TSM
        fs/configfs: Add a callback to determine attribute visibility
        sev-guest: configfs-tsm: Allow the privlevel_floor attribute to be updated
        virt: sev-guest: Choose the VMPCK key based on executing VMPL
        x86/sev: Provide guest VMPL level to userspace
        x86/sev: Provide SVSM discovery support
        x86/sev: Use the SVSM to create a vCPU when not in VMPL0
        x86/sev: Perform PVALIDATE using the SVSM when not at VMPL0
        x86/sev: Use kernel provided SVSM Calling Areas
        x86/sev: Check for the presence of an SVSM in the SNP secrets page
        x86/irqflags: Provide native versions of the local_irq_save()/restore()
      40832358
    • Linus Torvalds's avatar
      Merge tag 'x86_cache_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b84b3381
      Linus Torvalds authored
      Pull x86 resource control updates from Borislav Petkov:
      
       - Enable Sub-NUMA clustering to work with resource control on Intel by
         teaching resctrl to handle scopes due to the clustering which
         partitions the L3 cache into sets. Modify and extend the subsystem to
         handle such scopes properly
      
      * tag 'x86_cache_for_v6.11_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/resctrl: Update documentation with Sub-NUMA cluster changes
        x86/resctrl: Detect Sub-NUMA Cluster (SNC) mode
        x86/resctrl: Enable shared RMID mode on Sub-NUMA Cluster (SNC) systems
        x86/resctrl: Make __mon_event_count() handle sum domains
        x86/resctrl: Fill out rmid_read structure for smp_call*() to read a counter
        x86/resctrl: Handle removing directories in Sub-NUMA Cluster (SNC) mode
        x86/resctrl: Create Sub-NUMA Cluster (SNC) monitor files
        x86/resctrl: Allocate a new field in union mon_data_bits
        x86/resctrl: Refactor mkdir_mondata_subdir() with a helper function
        x86/resctrl: Initialize on-stack struct rmid_read instances
        x86/resctrl: Add a new field to struct rmid_read for summation of domains
        x86/resctrl: Prepare for new Sub-NUMA Cluster (SNC) monitor files
        x86/resctrl: Block use of mba_MBps mount option on Sub-NUMA Cluster (SNC) systems
        x86/resctrl: Introduce snc_nodes_per_l3_cache
        x86/resctrl: Add node-scope to the options for feature scope
        x86/resctrl: Split the rdt_domain and rdt_hw_domain structures
        x86/resctrl: Prepare for different scope for control/monitor operations
        x86/resctrl: Prepare to split rdt_domain structure
        x86/resctrl: Prepare for new domain scope
      b84b3381
    • Colin Ian King's avatar
      eth: fbnic: Fix spelling mistake "tiggerring" -> "triggering" · 77ae5e5b
      Colin Ian King authored
      There is a spelling mistake in a netdev_warn message. Fix it.
      Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
      Link: https://patch.msgid.link/20240716093851.1003131-1-colin.i.king@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      77ae5e5b
    • Kees Cook's avatar
      tcp: Replace strncpy() with strscpy() · a3bfc095
      Kees Cook authored
      Replace the deprecated[1] uses of strncpy() in tcp_ca_get_name_by_key()
      and tcp_get_default_congestion_control(). The callers use the results as
      standard C strings (via nla_put_string() and proc handlers respectively),
      so trailing padding is not needed.
      
      Since passing the destination buffer arguments decays it to a pointer,
      the size can't be trivially determined by the compiler. ca->name is
      the same length in both cases, so strscpy() won't fail (when ca->name
      is NUL-terminated). Include the length explicitly instead of using the
      2-argument strscpy().
      
      Link: https://github.com/KSPP/linux/issues/90 [1]
      Signed-off-by: default avatarKees Cook <kees@kernel.org>
      Reviewed-by: default avatarSimon Horman <horms@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Link: https://patch.msgid.link/20240714041111.it.918-kees@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a3bfc095
    • Paolo Abeni's avatar
      wifi: ath12k: fix build vs old compiler · b49991d8
      Paolo Abeni authored
      gcc 11.4.1-3 warns about memcpy() with overlapping pointers:
      
      drivers/net/wireless/ath/ath12k/wow.c: In function ‘ath12k_wow_convert_8023_to_80211.constprop’:
      ./include/linux/fortify-string.h:114:33: error: ‘__builtin_memcpy’ accessing 18446744073709551611 or more bytes at offsets 0 and 0 overlaps 9223372036854775799 bytes at offset -9223372036854775804 [-Werror=restrict]
        114 | #define __underlying_memcpy     __builtin_memcpy
            |                                 ^
      ./include/linux/fortify-string.h:637:9: note: in expansion of macro ‘__underlying_memcpy’
        637 |         __underlying_##op(p, q, __fortify_size);                        \
            |         ^~~~~~~~~~~~~
      ./include/linux/fortify-string.h:682:26: note: in expansion of macro ‘__fortify_memcpy_chk’
        682 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
            |                          ^~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath12k/wow.c:190:25: note: in expansion of macro ‘memcpy’
        190 |                         memcpy(pat, eth_pat, eth_pat_len);
            |                         ^~~~~~
      ./include/linux/fortify-string.h:114:33: error: ‘__builtin_memcpy’ accessing 18446744073709551605 or more bytes at offsets 0 and 0 overlaps 9223372036854775787 bytes at offset -9223372036854775798 [-Werror=restrict]
        114 | #define __underlying_memcpy     __builtin_memcpy
            |                                 ^
      ./include/linux/fortify-string.h:637:9: note: in expansion of macro ‘__underlying_memcpy’
        637 |         __underlying_##op(p, q, __fortify_size);                        \
            |         ^~~~~~~~~~~~~
      ./include/linux/fortify-string.h:682:26: note: in expansion of macro ‘__fortify_memcpy_chk’
        682 | #define memcpy(p, q, s)  __fortify_memcpy_chk(p, q, s,                  \
            |                          ^~~~~~~~~~~~~~~~~~~~
      drivers/net/wireless/ath/ath12k/wow.c:232:25: note: in expansion of macro ‘memcpy’
        232 |                         memcpy(pat, eth_pat, eth_pat_len);
            |                         ^~~~~~
      
      The sum of size_t operands can overflow SIZE_MAX, triggering the
      warning.
      Address the issue using the suitable helper.
      
      Fixes: 4a3c212e ("wifi: ath12k: add basic WoW functionalities")
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Reviewed-by: default avatarKees Cook <kees@kernel.org>
      Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
      Link: https://patch.msgid.link/3175f87d7227e395b330fd88fb840c1645084ea7.1721127979.git.pabeni@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b49991d8
    • Kuniyuki Iwashima's avatar
      tcp: Don't access uninit tcp_rsk(req)->ao_keyid in tcp_create_openreq_child(). · 3f451813
      Kuniyuki Iwashima authored
      syzkaller reported KMSAN splat in tcp_create_openreq_child(). [0]
      
      The uninit variable is tcp_rsk(req)->ao_keyid.
      
      tcp_rsk(req)->ao_keyid is initialised only when tcp_conn_request() finds
      a valid TCP AO option in SYN.  Then, tcp_rsk(req)->used_tcp_ao is set
      accordingly.
      
      Let's not read tcp_rsk(req)->ao_keyid when tcp_rsk(req)->used_tcp_ao is
      false.
      
      [0]:
      BUG: KMSAN: uninit-value in tcp_create_openreq_child+0x198b/0x1ff0 net/ipv4/tcp_minisocks.c:610
       tcp_create_openreq_child+0x198b/0x1ff0 net/ipv4/tcp_minisocks.c:610
       tcp_v4_syn_recv_sock+0x18e/0x2170 net/ipv4/tcp_ipv4.c:1754
       tcp_check_req+0x1a3e/0x20c0 net/ipv4/tcp_minisocks.c:852
       tcp_v4_rcv+0x26a4/0x53a0 net/ipv4/tcp_ipv4.c:2265
       ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205
       ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233
       NF_HOOK include/linux/netfilter.h:314 [inline]
       ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254
       dst_input include/net/dst.h:460 [inline]
       ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline]
       ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline]
       ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639
       ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674
       __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline]
       __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751
       __netif_receive_skb_list net/core/dev.c:5803 [inline]
       netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895
       gro_normal_list include/net/gro.h:515 [inline]
       napi_complete_done+0x3f2/0x990 net/core/dev.c:6246
       e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808
       __napi_poll+0xd9/0x990 net/core/dev.c:6771
       napi_poll net/core/dev.c:6840 [inline]
       net_rx_action+0x90f/0x17e0 net/core/dev.c:6962
       handle_softirqs+0x152/0x6b0 kernel/softirq.c:554
       __do_softirq kernel/softirq.c:588 [inline]
       invoke_softirq kernel/softirq.c:428 [inline]
       __irq_exit_rcu kernel/softirq.c:637 [inline]
       irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649
       common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278
       asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
       __msan_instrument_asm_store+0xd6/0xe0
       arch_atomic_inc arch/x86/include/asm/atomic.h:53 [inline]
       raw_atomic_inc include/linux/atomic/atomic-arch-fallback.h:992 [inline]
       atomic_inc include/linux/atomic/atomic-instrumented.h:436 [inline]
       page_ref_inc include/linux/page_ref.h:153 [inline]
       folio_ref_inc include/linux/page_ref.h:160 [inline]
       filemap_map_order0_folio mm/filemap.c:3596 [inline]
       filemap_map_pages+0x11c7/0x2270 mm/filemap.c:3644
       do_fault_around mm/memory.c:4879 [inline]
       do_read_fault mm/memory.c:4912 [inline]
       do_fault mm/memory.c:5051 [inline]
       do_pte_missing mm/memory.c:3897 [inline]
       handle_pte_fault mm/memory.c:5381 [inline]
       __handle_mm_fault mm/memory.c:5524 [inline]
       handle_mm_fault+0x3677/0x6f00 mm/memory.c:5689
       do_user_addr_fault+0x1373/0x2b20 arch/x86/mm/fault.c:1338
       handle_page_fault arch/x86/mm/fault.c:1481 [inline]
       exc_page_fault+0x54/0xc0 arch/x86/mm/fault.c:1539
       asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
      
      Uninit was stored to memory at:
       tcp_create_openreq_child+0x1984/0x1ff0 net/ipv4/tcp_minisocks.c:611
       tcp_v4_syn_recv_sock+0x18e/0x2170 net/ipv4/tcp_ipv4.c:1754
       tcp_check_req+0x1a3e/0x20c0 net/ipv4/tcp_minisocks.c:852
       tcp_v4_rcv+0x26a4/0x53a0 net/ipv4/tcp_ipv4.c:2265
       ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205
       ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233
       NF_HOOK include/linux/netfilter.h:314 [inline]
       ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254
       dst_input include/net/dst.h:460 [inline]
       ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline]
       ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline]
       ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639
       ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674
       __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline]
       __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751
       __netif_receive_skb_list net/core/dev.c:5803 [inline]
       netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895
       gro_normal_list include/net/gro.h:515 [inline]
       napi_complete_done+0x3f2/0x990 net/core/dev.c:6246
       e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808
       __napi_poll+0xd9/0x990 net/core/dev.c:6771
       napi_poll net/core/dev.c:6840 [inline]
       net_rx_action+0x90f/0x17e0 net/core/dev.c:6962
       handle_softirqs+0x152/0x6b0 kernel/softirq.c:554
       __do_softirq kernel/softirq.c:588 [inline]
       invoke_softirq kernel/softirq.c:428 [inline]
       __irq_exit_rcu kernel/softirq.c:637 [inline]
       irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649
       common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278
       asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
      
      Uninit was created at:
       __alloc_pages_noprof+0x82d/0xcb0 mm/page_alloc.c:4706
       __alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
       alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
       alloc_slab_page mm/slub.c:2265 [inline]
       allocate_slab mm/slub.c:2428 [inline]
       new_slab+0x2af/0x14e0 mm/slub.c:2481
       ___slab_alloc+0xf73/0x3150 mm/slub.c:3667
       __slab_alloc mm/slub.c:3757 [inline]
       __slab_alloc_node mm/slub.c:3810 [inline]
       slab_alloc_node mm/slub.c:3990 [inline]
       kmem_cache_alloc_noprof+0x53a/0x9f0 mm/slub.c:4009
       reqsk_alloc_noprof net/ipv4/inet_connection_sock.c:920 [inline]
       inet_reqsk_alloc+0x63/0x700 net/ipv4/inet_connection_sock.c:951
       tcp_conn_request+0x339/0x4860 net/ipv4/tcp_input.c:7177
       tcp_v4_conn_request+0x13b/0x190 net/ipv4/tcp_ipv4.c:1719
       tcp_rcv_state_process+0x2dd/0x4a10 net/ipv4/tcp_input.c:6711
       tcp_v4_do_rcv+0xbee/0x10d0 net/ipv4/tcp_ipv4.c:1932
       tcp_v4_rcv+0x3fad/0x53a0 net/ipv4/tcp_ipv4.c:2334
       ip_protocol_deliver_rcu+0x884/0x1270 net/ipv4/ip_input.c:205
       ip_local_deliver_finish+0x30f/0x530 net/ipv4/ip_input.c:233
       NF_HOOK include/linux/netfilter.h:314 [inline]
       ip_local_deliver+0x230/0x4c0 net/ipv4/ip_input.c:254
       dst_input include/net/dst.h:460 [inline]
       ip_sublist_rcv_finish net/ipv4/ip_input.c:580 [inline]
       ip_list_rcv_finish net/ipv4/ip_input.c:631 [inline]
       ip_sublist_rcv+0x10f7/0x13e0 net/ipv4/ip_input.c:639
       ip_list_rcv+0x952/0x9c0 net/ipv4/ip_input.c:674
       __netif_receive_skb_list_ptype net/core/dev.c:5703 [inline]
       __netif_receive_skb_list_core+0xd92/0x11d0 net/core/dev.c:5751
       __netif_receive_skb_list net/core/dev.c:5803 [inline]
       netif_receive_skb_list_internal+0xd8f/0x1350 net/core/dev.c:5895
       gro_normal_list include/net/gro.h:515 [inline]
       napi_complete_done+0x3f2/0x990 net/core/dev.c:6246
       e1000_clean+0x1fa4/0x5e50 drivers/net/ethernet/intel/e1000/e1000_main.c:3808
       __napi_poll+0xd9/0x990 net/core/dev.c:6771
       napi_poll net/core/dev.c:6840 [inline]
       net_rx_action+0x90f/0x17e0 net/core/dev.c:6962
       handle_softirqs+0x152/0x6b0 kernel/softirq.c:554
       __do_softirq kernel/softirq.c:588 [inline]
       invoke_softirq kernel/softirq.c:428 [inline]
       __irq_exit_rcu kernel/softirq.c:637 [inline]
       irq_exit_rcu+0x5d/0x120 kernel/softirq.c:649
       common_interrupt+0x83/0x90 arch/x86/kernel/irq.c:278
       asm_common_interrupt+0x26/0x40 arch/x86/include/asm/idtentry.h:693
      
      CPU: 0 PID: 239 Comm: modprobe Tainted: G    B              6.10.0-rc7-01816-g852e42cc #3 1107521f0c7b55c9309062382d0bda9f604dbb6d
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
      
      Fixes: 06b22ef2 ("net/tcp: Wire TCP-AO to request sockets")
      Reported-by: default avatarsyzkaller <syzkaller@googlegroups.com>
      Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Acked-by: default avatarDmitry Safonov <0x7f454c46@gmail.com>
      Link: https://patch.msgid.link/20240714161719.6528-1-kuniyu@amazon.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      3f451813