Merge tag 'net-next-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Oct 2022 20:38:03 +0000 (13:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Oct 2022 20:38:03 +0000 (13:38 -0700)
Pull networking updates from Jakub Kicinski:
 "Core:

   - Introduce and use a single page frag cache for allocating small skb
     heads, clawing back the 10-20% performance regression in UDP flood
     test from previous fixes.

   - Run packets which already went thru HW coalescing thru SW GRO. This
     significantly improves TCP segment coalescing and simplifies
     deployments as different workloads benefit from HW or SW GRO.

   - Shrink the size of the base zero-copy send structure.

   - Move TCP init under a new slow / sleepable version of DO_ONCE().

  BPF:

   - Add BPF-specific, any-context-safe memory allocator.

   - Add helpers/kfuncs for PKCS#7 signature verification from BPF
     programs.

   - Define a new map type and related helpers for user space -> kernel
     communication over a ring buffer (BPF_MAP_TYPE_USER_RINGBUF).

   - Allow targeting BPF iterators to loop through resources of one
     task/thread.

   - Add ability to call selected destructive functions. Expose
     crash_kexec() to allow BPF to trigger a kernel dump. Use
     CAP_SYS_BOOT check on the loading process to judge permissions.

   - Enable BPF to collect custom hierarchical cgroup stats efficiently
     by integrating with the rstat framework.

   - Support struct arguments for trampoline based programs. Only
     structs with size <= 16B and x86 are supported.

   - Invoke cgroup/connect{4,6} programs for unprivileged ICMP ping
     sockets (instead of just TCP and UDP sockets).

   - Add a helper for accessing CLOCK_TAI for time sensitive network
     related programs.

   - Support accessing network tunnel metadata's flags.

   - Make TCP SYN ACK RTO tunable by BPF programs with TCP Fast Open.

   - Add support for writing to Netfilter's nf_conn:mark.

  Protocols:

   - WiFi: more Extremely High Throughput (EHT) and Multi-Link Operation
     (MLO) work (802.11be, WiFi 7).

   - vsock: improve support for SO_RCVLOWAT.

   - SMC: support SO_REUSEPORT.

   - Netlink: define and document how to use netlink in a "modern" way.
     Support reporting missing attributes via extended ACK.

   - IPSec: support collect metadata mode for xfrm interfaces.

   - TCPv6: send consistent autoflowlabel in SYN_RECV state and RST
     packets.

   - TCP: introduce optional per-netns connection hash table to allow
     better isolation between namespaces (opt-in, at the cost of memory
     and cache pressure).

   - MPTCP: support TCP_FASTOPEN_CONNECT.

   - Add NEXT-C-SID support in Segment Routing (SRv6) End behavior.

   - Adjust IP_UNICAST_IF sockopt behavior for connected UDP sockets.

   - Open vSwitch:
      - Allow specifying ifindex of new interfaces.
      - Allow conntrack and metering in non-initial user namespace.

   - TLS: support the Korean ARIA-GCM crypto algorithm.

   - Remove DECnet support.

  Driver API:

   - Allow selecting the conduit interface used by each port in DSA
     switches, at runtime.

   - Ethernet Power Sourcing Equipment and Power Device support.

   - Add tc-taprio support for queueMaxSDU parameter, i.e. setting per
     traffic class max frame size for time-based packet schedules.

   - Support PHY rate matching - adapting between differing host-side
     and link-side speeds.

   - Introduce QUSGMII PHY mode and 1000BASE-KX interface mode.

   - Validate OF (device tree) nodes for DSA shared ports; make
     phylink-related properties mandatory on DSA and CPU ports.
     Enforcing more uniformity should allow transitioning to phylink.

   - Require that flash component name used during update matches one of
     the components for which version is reported by info_get().

   - Remove "weight" argument from driver-facing NAPI API as much as
     possible. It's one of those magic knobs which seemed like a good
     idea at the time but is too indirect to use in practice.

   - Support offload of TLS connections with 256 bit keys.

  New hardware / drivers:

   - Ethernet:
      - Microchip KSZ9896 6-port Gigabit Ethernet Switch
      - Renesas Ethernet AVB (EtherAVB-IF) Gen4 SoCs
      - Analog Devices ADIN1110 and ADIN2111 industrial single pair
        Ethernet (10BASE-T1L) MAC+PHY.
      - Rockchip RV1126 Gigabit Ethernet (a version of stmmac IP).

   - Ethernet SFPs / modules:
      - RollBall / Hilink / Turris 10G copper SFPs
      - HALNy GPON module

   - WiFi:
      - CYW43439 SDIO chipset (brcmfmac)
      - CYW89459 PCIe chipset (brcmfmac)
      - BCM4378 on Apple platforms (brcmfmac)

  Drivers:

   - CAN:
      - gs_usb: HW timestamp support

   - Ethernet PHYs:
      - lan8814: cable diagnostics

   - Ethernet NICs:
      - Intel (100G):
         - implement control of FCS/CRC stripping
         - port splitting via devlink
         - L2TPv3 filtering offload
      - nVidia/Mellanox:
         - tunnel offload for sub-functions
         - MACSec offload, w/ Extended packet number and replay window
           offload
         - significantly restructure, and optimize the AF_XDP support,
           align the behavior with other vendors
      - Huawei:
         - configuring DSCP map for traffic class selection
         - querying standard FEC statistics
         - querying SerDes lane number via ethtool
      - Marvell/Cavium:
         - egress priority flow control
         - MACSec offload
      - AMD/SolarFlare:
         - PTP over IPv6 and raw Ethernet
      - small / embedded:
         - ax88772: convert to phylink (to support SFP cages)
         - altera: tse: convert to phylink
         - ftgmac100: support fixed link
         - enetc: standard Ethtool counters
         - macb: ZynqMP SGMII dynamic configuration support
         - tsnep: support multi-queue and use page pool
         - lan743x: Rx IP & TCP checksum offload
         - igc: add xdp frags support to ndo_xdp_xmit

   - Ethernet high-speed switches:
      - Marvell (prestera):
         - support SPAN port features (traffic mirroring)
         - nexthop object offloading
      - Microchip (sparx5):
         - multicast forwarding offload
         - QoS queuing offload (tc-mqprio, tc-tbf, tc-ets)

   - Ethernet embedded switches:
      - Marvell (mv88e6xxx):
         - support RGMII cmode
      - NXP (felix):
         - standardized ethtool counters
      - Microchip (lan966x):
         - QoS queuing offload (tc-mqprio, tc-tbf, tc-cbs, tc-ets)
         - traffic policing and mirroring
         - link aggregation / bonding offload
         - QUSGMII PHY mode support

   - Qualcomm 802.11ax WiFi (ath11k):
      - cold boot calibration support on WCN6750
      - support to connect to a non-transmit MBSSID AP profile
      - enable remain-on-channel support on WCN6750
      - Wake-on-WLAN support for WCN6750
      - support to provide transmit power from firmware via nl80211
      - support to get power save duration for each client
      - spectral scan support for 160 MHz

   - MediaTek WiFi (mt76):
      - WiFi-to-Ethernet bridging offload for MT7986 chips

   - RealTek WiFi (rtw89):
      - P2P support"

* tag 'net-next-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1864 commits)
  eth: pse: add missing static inlines
  once: rename _SLOW to _SLEEPABLE
  net: pse-pd: add regulator based PSE driver
  dt-bindings: net: pse-dt: add bindings for regulator based PoDL PSE controller
  ethtool: add interface to interact with Ethernet Power Equipment
  net: mdiobus: search for PSE nodes by parsing PHY nodes.
  net: mdiobus: fwnode_mdiobus_register_phy() rework error handling
  net: add framework to support Ethernet PSE and PDs devices
  dt-bindings: net: phy: add PoDL PSE property
  net: marvell: prestera: Propagate nh state from hw to kernel
  net: marvell: prestera: Add neighbour cache accounting
  net: marvell: prestera: add stub handler neighbour events
  net: marvell: prestera: Add heplers to interact with fib_notifier_info
  net: marvell: prestera: Add length macros for prestera_ip_addr
  net: marvell: prestera: add delayed wq and flush wq on deinit
  net: marvell: prestera: Add strict cleanup of fib arbiter
  net: marvell: prestera: Add cleanup of allocated fib_nodes
  net: marvell: prestera: Add router nexthops ABI
  eth: octeon: fix build after netif_napi_add() changes
  net/mlx5: E-Switch, Return EBUSY if can't get mode lock
  ...

14 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
Documentation/bpf/instruction-set.rst
MAINTAINERS
arch/mips/configs/decstation_64_defconfig
arch/mips/configs/decstation_defconfig
arch/mips/configs/decstation_r4k_defconfig
arch/mips/configs/gpr_defconfig
arch/mips/configs/mtx1_defconfig
arch/mips/configs/rm200_defconfig
arch/x86/Kconfig
arch/x86/net/bpf_jit_comp.c
include/asm-generic/vmlinux.lds.h
kernel/bpf/bpf_lsm.c
tools/objtool/check.c

  
        debugpat        [X86] Enable PAT debugging
  
-       decnet.addr=    [HW,NET]
-                       Format: <area>[,<node>]
-                       See also Documentation/networking/decnet.rst.
        default_hugepagesz=
                        [HW] The size of the default HugeTLB page. This is
                        the size represented by the legacy /proc/ hugepages
  
        nox2apic        [X86-64,APIC] Do not enable x2APIC mode.
  
 +                      NOTE: this parameter will be ignored on systems with the
 +                      LEGACY_XAPIC_DISABLED bit set in the
 +                      IA32_XAPIC_DISABLE_STATUS MSR.
 +
        nps_mtm_hs_ctr= [KNL,ARC]
                        This parameter sets the maximum duration, in
                        cycles, each HW thread of the CTOP can run
@@@ -1,7 -1,12 +1,12 @@@
+ .. contents::
+ .. sectnum::
+ ========================================
+ eBPF Instruction Set Specification, v1.0
+ ========================================
+ This document specifies version 1.0 of the eBPF instruction set.
  
- ====================
- eBPF Instruction Set
- ====================
  
  Registers and calling convention
  ================================
@@@ -11,10 -16,10 +16,10 @@@ all of which are 64-bits wide
  
  The eBPF calling convention is defined as:
  
 * R0: return value from function calls, and exit value for eBPF programs
 * R1 - R5: arguments for function calls
 * R6 - R9: callee saved registers that function calls will preserve
 * R10: read-only frame pointer to access stack
+ * R0: return value from function calls, and exit value for eBPF programs
+ * R1 - R5: arguments for function calls
+ * R6 - R9: callee saved registers that function calls will preserve
+ * R10: read-only frame pointer to access stack
  
  R0 - R5 are scratch registers and eBPF programs needs to spill/fill them if
  necessary across calls.
@@@ -24,17 -29,17 +29,17 @@@ Instruction encodin
  
  eBPF has two instruction encodings:
  
 * the basic instruction encoding, which uses 64 bits to encode an instruction
 * the wide instruction encoding, which appends a second 64-bit immediate value
-    (imm64) after the basic instruction for a total of 128 bits.
+ * the basic instruction encoding, which uses 64 bits to encode an instruction
+ * the wide instruction encoding, which appends a second 64-bit immediate value
+   (imm64) after the basic instruction for a total of 128 bits.
  
  The basic instruction encoding looks as follows:
  
 =============  =======  ===============  ====================  ============
 32 bits (MSB)  16 bits  4 bits           4 bits                8 bits (LSB)
 =============  =======  ===============  ====================  ============
 immediate      offset   source register  destination register  opcode
 =============  =======  ===============  ====================  ============
+ =============  =======  ===============  ====================  ============
+ 32 bits (MSB)  16 bits  4 bits           4 bits                8 bits (LSB)
+ =============  =======  ===============  ====================  ============
+ immediate      offset   source register  destination register  opcode
+ =============  =======  ===============  ====================  ============
  
  Note that most instructions do not use all of the fields.
  Unused fields shall be cleared to zero.
@@@ -44,30 -49,30 +49,30 @@@ Instruction classe
  
  The three LSB bits of the 'opcode' field store the instruction class:
  
  =========  =====  ===============================
-   class      value  description
  =========  =====  ===============================
-   BPF_LD     0x00   non-standard load operations
-   BPF_LDX    0x01   load into register operations
-   BPF_ST     0x02   store from immediate operations
-   BPF_STX    0x03   store from register operations
-   BPF_ALU    0x04   32-bit arithmetic operations
-   BPF_JMP    0x05   64-bit jump operations
-   BPF_JMP32  0x06   32-bit jump operations
-   BPF_ALU64  0x07   64-bit arithmetic operations
  =========  =====  ===============================
=========  =====  ===============================  ===================================
+ class      value  description                      reference
=========  =====  ===============================  ===================================
+ BPF_LD     0x00   non-standard load operations     `Load and store instructions`_
+ BPF_LDX    0x01   load into register operations    `Load and store instructions`_
+ BPF_ST     0x02   store from immediate operations  `Load and store instructions`_
+ BPF_STX    0x03   store from register operations   `Load and store instructions`_
+ BPF_ALU    0x04   32-bit arithmetic operations     `Arithmetic and jump instructions`_
+ BPF_JMP    0x05   64-bit jump operations           `Arithmetic and jump instructions`_
+ BPF_JMP32  0x06   32-bit jump operations           `Arithmetic and jump instructions`_
+ BPF_ALU64  0x07   64-bit arithmetic operations     `Arithmetic and jump instructions`_
=========  =====  ===============================  ===================================
  
  Arithmetic and jump instructions
  ================================
  
- For arithmetic and jump instructions (BPF_ALU, BPF_ALU64, BPF_JMP and
BPF_JMP32), the 8-bit 'opcode' field is divided into three parts:
+ For arithmetic and jump instructions (``BPF_ALU``, ``BPF_ALU64``, ``BPF_JMP`` and
``BPF_JMP32``), the 8-bit 'opcode' field is divided into three parts:
  
  ==============  ======  =================
  4 bits (MSB)    1 bit   3 bits (LSB)
  ==============  ======  =================
  operation code  source  instruction class
  ==============  ======  =================
+ ==============  ======  =================
+ 4 bits (MSB)    1 bit   3 bits (LSB)
+ ==============  ======  =================
+ operation code  source  instruction class
+ ==============  ======  =================
  
  The 4th bit encodes the source operand:
  
@@@ -84,66 -89,66 +89,66 @@@ The four MSB bits store the operation c
  Arithmetic instructions
  -----------------------
  
BPF_ALU uses 32-bit wide operands while BPF_ALU64 uses 64-bit wide operands for
``BPF_ALU`` uses 32-bit wide operands while ``BPF_ALU64`` uses 64-bit wide operands for
  otherwise identical operations.
- The code field encodes the operation as below:
  ========  =====  =================================================
  code      value  description
  ========  =====  =================================================
  BPF_ADD   0x00   dst += src
  BPF_SUB   0x10   dst -= src
  BPF_MUL   0x20   dst \*= src
  BPF_DIV   0x30   dst /= src
  BPF_OR    0x40   dst \|= src
  BPF_AND   0x50   dst &= src
  BPF_LSH   0x60   dst <<= src
  BPF_RSH   0x70   dst >>= src
  BPF_NEG   0x80   dst = ~src
  BPF_MOD   0x90   dst %= src
  BPF_XOR   0xa0   dst ^= src
  BPF_MOV   0xb0   dst = src
  BPF_ARSH  0xc0   sign extending shift right
  BPF_END   0xd0   byte swap operations (see separate section below)
  ========  =====  =================================================
BPF_ADD | BPF_X | BPF_ALU means::
+ The 'code' field encodes the operation as below:
========  =====  ==========================================================
+ code      value  description
========  =====  ==========================================================
+ BPF_ADD   0x00   dst += src
+ BPF_SUB   0x10   dst -= src
+ BPF_MUL   0x20   dst \*= src
+ BPF_DIV   0x30   dst /= src
+ BPF_OR    0x40   dst \|= src
+ BPF_AND   0x50   dst &= src
+ BPF_LSH   0x60   dst <<= src
+ BPF_RSH   0x70   dst >>= src
+ BPF_NEG   0x80   dst = ~src
+ BPF_MOD   0x90   dst %= src
+ BPF_XOR   0xa0   dst ^= src
+ BPF_MOV   0xb0   dst = src
+ BPF_ARSH  0xc0   sign extending shift right
BPF_END   0xd0   byte swap operations (see `Byte swap instructions`_ below)
========  =====  ==========================================================
``BPF_ADD | BPF_X | BPF_ALU`` means::
  
    dst_reg = (u32) dst_reg + (u32) src_reg;
  
BPF_ADD | BPF_X | BPF_ALU64 means::
``BPF_ADD | BPF_X | BPF_ALU64`` means::
  
    dst_reg = dst_reg + src_reg
  
BPF_XOR | BPF_K | BPF_ALU means::
``BPF_XOR | BPF_K | BPF_ALU`` means::
  
    src_reg = (u32) src_reg ^ (u32) imm32
  
BPF_XOR | BPF_K | BPF_ALU64 means::
``BPF_XOR | BPF_K | BPF_ALU64`` means::
  
    src_reg = src_reg ^ imm32
  
  
  Byte swap instructions
- ----------------------
+ ~~~~~~~~~~~~~~~~~~~~~~
  
  The byte swap instructions use an instruction class of ``BPF_ALU`` and a 4-bit
code field of ``BPF_END``.
'code' field of ``BPF_END``.
  
  The byte swap instructions operate on the destination register
  only and do not use a separate source register or immediate value.
  
 -The 1-bit source operand field in the opcode is used to to select what byte
 +The 1-bit source operand field in the opcode is used to select what byte
  order the operation convert from or to:
  
  =========  =====  =================================================
  source     value  description
  =========  =====  =================================================
  BPF_TO_LE  0x00   convert between host byte order and little endian
  BPF_TO_BE  0x08   convert between host byte order and big endian
  =========  =====  =================================================
+ =========  =====  =================================================
+ source     value  description
+ =========  =====  =================================================
+ BPF_TO_LE  0x00   convert between host byte order and little endian
+ BPF_TO_BE  0x08   convert between host byte order and big endian
+ =========  =====  =================================================
  
- The imm field encodes the width of the swap operations.  The following widths
+ The 'imm' field encodes the width of the swap operations.  The following widths
  are supported: 16, 32 and 64.
  
  Examples:
  
    dst_reg = htobe64(dst_reg)
  
- ``BPF_FROM_LE`` and ``BPF_FROM_BE`` exist as aliases for ``BPF_TO_LE`` and
- ``BPF_TO_BE`` respectively.
  Jump instructions
  -----------------
  
BPF_JMP32 uses 32-bit wide operands while BPF_JMP uses 64-bit wide operands for
``BPF_JMP32`` uses 32-bit wide operands while ``BPF_JMP`` uses 64-bit wide operands for
  otherwise identical operations.
- The code field encodes the operation as below:
  ========  =====  =========================  ============
  code      value  description                notes
  ========  =====  =========================  ============
  BPF_JA    0x00   PC += off                  BPF_JMP only
  BPF_JEQ   0x10   PC += off if dst == src
  BPF_JGT   0x20   PC += off if dst > src     unsigned
  BPF_JGE   0x30   PC += off if dst >= src    unsigned
  BPF_JSET  0x40   PC += off if dst & src
  BPF_JNE   0x50   PC += off if dst != src
  BPF_JSGT  0x60   PC += off if dst > src     signed
  BPF_JSGE  0x70   PC += off if dst >= src    signed
  BPF_CALL  0x80   function call
  BPF_EXIT  0x90   function / program return  BPF_JMP only
  BPF_JLT   0xa0   PC += off if dst < src     unsigned
  BPF_JLE   0xb0   PC += off if dst <= src    unsigned
  BPF_JSLT  0xc0   PC += off if dst < src     signed
  BPF_JSLE  0xd0   PC += off if dst <= src    signed
  ========  =====  =========================  ============
+ The 'code' field encodes the operation as below:
+ ========  =====  =========================  ============
+ code      value  description                notes
+ ========  =====  =========================  ============
+ BPF_JA    0x00   PC += off                  BPF_JMP only
+ BPF_JEQ   0x10   PC += off if dst == src
+ BPF_JGT   0x20   PC += off if dst > src     unsigned
+ BPF_JGE   0x30   PC += off if dst >= src    unsigned
+ BPF_JSET  0x40   PC += off if dst & src
+ BPF_JNE   0x50   PC += off if dst != src
+ BPF_JSGT  0x60   PC += off if dst > src     signed
+ BPF_JSGE  0x70   PC += off if dst >= src    signed
+ BPF_CALL  0x80   function call
+ BPF_EXIT  0x90   function / program return  BPF_JMP only
+ BPF_JLT   0xa0   PC += off if dst < src     unsigned
+ BPF_JLE   0xb0   PC += off if dst <= src    unsigned
+ BPF_JSLT  0xc0   PC += off if dst < src     signed
+ BPF_JSLE  0xd0   PC += off if dst <= src    signed
+ ========  =====  =========================  ============
  
  The eBPF program needs to store the return value into register R0 before doing a
  BPF_EXIT.
  Load and store instructions
  ===========================
  
- For load and store instructions (BPF_LD, BPF_LDX, BPF_ST and BPF_STX), the
+ For load and store instructions (``BPF_LD``, ``BPF_LDX``, ``BPF_ST``, and ``BPF_STX``), the
  8-bit 'opcode' field is divided as:
  
-   ============  ======  =================
-   3 bits (MSB)  2 bits  3 bits (LSB)
-   ============  ======  =================
-   mode          size    instruction class
-   ============  ======  =================
+ ============  ======  =================
+ 3 bits (MSB)  2 bits  3 bits (LSB)
+ ============  ======  =================
+ mode          size    instruction class
+ ============  ======  =================
+ The mode modifier is one of:
+   =============  =====  ====================================  =============
+   mode modifier  value  description                           reference
+   =============  =====  ====================================  =============
+   BPF_IMM        0x00   64-bit immediate instructions         `64-bit immediate instructions`_
+   BPF_ABS        0x20   legacy BPF packet access (absolute)   `Legacy BPF Packet access instructions`_
+   BPF_IND        0x40   legacy BPF packet access (indirect)   `Legacy BPF Packet access instructions`_
+   BPF_MEM        0x60   regular load and store operations     `Regular load and store operations`_
+   BPF_ATOMIC     0xc0   atomic operations                     `Atomic operations`_
+   =============  =====  ====================================  =============
  
  The size modifier is one of:
  
    BPF_DW         0x18   double word (8 bytes)
    =============  =====  =====================
  
- The mode modifier is one of:
-   =============  =====  ====================================
-   mode modifier  value  description
-   =============  =====  ====================================
-   BPF_IMM        0x00   64-bit immediate instructions
-   BPF_ABS        0x20   legacy BPF packet access (absolute)
-   BPF_IND        0x40   legacy BPF packet access (indirect)
-   BPF_MEM        0x60   regular load and store operations
-   BPF_ATOMIC     0xc0   atomic operations
-   =============  =====  ====================================
  Regular load and store operations
  ---------------------------------
  
@@@ -256,44 -256,42 +256,42 @@@ by other eBPF programs or means outsid
  All atomic operations supported by eBPF are encoded as store operations
  that use the ``BPF_ATOMIC`` mode modifier as follows:
  
  * ``BPF_ATOMIC | BPF_W | BPF_STX`` for 32-bit operations
  * ``BPF_ATOMIC | BPF_DW | BPF_STX`` for 64-bit operations
  * 8-bit and 16-bit wide atomic operations are not supported.
+ * ``BPF_ATOMIC | BPF_W | BPF_STX`` for 32-bit operations
+ * ``BPF_ATOMIC | BPF_DW | BPF_STX`` for 64-bit operations
+ * 8-bit and 16-bit wide atomic operations are not supported.
  
- The imm field is used to encode the actual atomic operation.
+ The 'imm' field is used to encode the actual atomic operation.
  Simple atomic operation use a subset of the values defined to encode
- arithmetic operations in the imm field to encode the atomic operation:
+ arithmetic operations in the 'imm' field to encode the atomic operation:
  
  ========  =====  ===========
  imm       value  description
  ========  =====  ===========
  BPF_ADD   0x00   atomic add
  BPF_OR    0x40   atomic or
  BPF_AND   0x50   atomic and
  BPF_XOR   0xa0   atomic xor
  ========  =====  ===========
+ ========  =====  ===========
+ imm       value  description
+ ========  =====  ===========
+ BPF_ADD   0x00   atomic add
+ BPF_OR    0x40   atomic or
+ BPF_AND   0x50   atomic and
+ BPF_XOR   0xa0   atomic xor
+ ========  =====  ===========
  
  
- ``BPF_ATOMIC | BPF_W  | BPF_STX`` with imm = BPF_ADD means::
+ ``BPF_ATOMIC | BPF_W  | BPF_STX`` with 'imm' = BPF_ADD means::
  
    *(u32 *)(dst_reg + off16) += src_reg
  
- ``BPF_ATOMIC | BPF_DW | BPF_STX`` with imm = BPF ADD means::
+ ``BPF_ATOMIC | BPF_DW | BPF_STX`` with 'imm' = BPF ADD means::
  
    *(u64 *)(dst_reg + off16) += src_reg
  
- ``BPF_XADD`` is a deprecated name for ``BPF_ATOMIC | BPF_ADD``.
  In addition to the simple atomic operations, there also is a modifier and
  two complex atomic operations:
  
  ===========  ================  ===========================
  imm          value             description
  ===========  ================  ===========================
  BPF_FETCH    0x01              modifier: return old value
  BPF_XCHG     0xe0 | BPF_FETCH  atomic exchange
  BPF_CMPXCHG  0xf0 | BPF_FETCH  atomic compare and exchange
  ===========  ================  ===========================
+ ===========  ================  ===========================
+ imm          value             description
+ ===========  ================  ===========================
+ BPF_FETCH    0x01              modifier: return old value
+ BPF_XCHG     0xe0 | BPF_FETCH  atomic exchange
+ BPF_CMPXCHG  0xf0 | BPF_FETCH  atomic compare and exchange
+ ===========  ================  ===========================
  
  The ``BPF_FETCH`` modifier is optional for simple atomic operations, and
  always set for the complex atomic operations.  If the ``BPF_FETCH`` flag
@@@ -309,16 -307,10 +307,10 @@@ The ``BPF_CMPXCHG`` operation atomicall
  value that was at ``dst_reg + off`` before the operation is zero-extended
  and loaded back to ``R0``.
  
- Clang can generate atomic instructions by default when ``-mcpu=v3`` is
- enabled. If a lower version for ``-mcpu`` is set, the only atomic instruction
- Clang can generate is ``BPF_ADD`` *without* ``BPF_FETCH``. If you need to enable
- the atomics features, while keeping a lower ``-mcpu`` version, you can use
- ``-Xclang -target-feature -Xclang +alu32``.
  64-bit immediate instructions
  -----------------------------
  
- Instructions with the ``BPF_IMM`` mode modifier use the wide instruction
+ Instructions with the ``BPF_IMM`` 'mode' modifier use the wide instruction
  encoding for an extra imm64 value.
  
  There is currently only one such instruction.
  Legacy BPF Packet access instructions
  -------------------------------------
  
- eBPF has special instructions for access to packet data that have been
- carried over from classic BPF to retain the performance of legacy socket
- filters running in the eBPF interpreter.
- The instructions come in two forms: ``BPF_ABS | <size> | BPF_LD`` and
- ``BPF_IND | <size> | BPF_LD``.
- These instructions are used to access packet data and can only be used when
- the program context is a pointer to networking packet.  ``BPF_ABS``
- accesses packet data at an absolute offset specified by the immediate data
- and ``BPF_IND`` access packet data at an offset that includes the value of
- a register in addition to the immediate data.
- These instructions have seven implicit operands:
-  * Register R6 is an implicit input that must contain pointer to a
-    struct sk_buff.
-  * Register R0 is an implicit output which contains the data fetched from
-    the packet.
-  * Registers R1-R5 are scratch registers that are clobbered after a call to
-    ``BPF_ABS | BPF_LD`` or ``BPF_IND | BPF_LD`` instructions.
- These instructions have an implicit program exit condition as well. When an
- eBPF program is trying to access the data beyond the packet boundary, the
- program execution will be aborted.
- ``BPF_ABS | BPF_W | BPF_LD`` means::
-   R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + imm32))
- ``BPF_IND | BPF_W | BPF_LD`` means::
-   R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + src_reg + imm32))
+ eBPF previously introduced special instructions for access to packet data that were
+ carried over from classic BPF. However, these instructions are
+ deprecated and should no longer be used.
diff --combined MAINTAINERS
@@@ -348,6 -348,7 +348,6 @@@ M: "Rafael J. Wysocki" <rafael@kernel.o
  R:    Len Brown <lenb@kernel.org>
  L:    linux-acpi@vger.kernel.org
  S:    Supported
 -W:    https://01.org/linux-acpi
  Q:    https://patchwork.kernel.org/project/linux-acpi/list/
  B:    https://bugzilla.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
@@@ -426,6 -427,7 +426,6 @@@ M: Rafael J. Wysocki <rafael@kernel.org
  R:    Zhang Rui <rui.zhang@intel.com>
  L:    linux-acpi@vger.kernel.org
  S:    Supported
 -W:    https://01.org/linux-acpi
  B:    https://bugzilla.kernel.org
  F:    drivers/acpi/*thermal*
  
@@@ -877,6 -879,13 +877,13 @@@ L:       netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/altera/
  
+ ALTERA TSE PCS
+ M:    Maxime Chevallier <maxime.chevallier@bootlin.com>
+ L:    netdev@vger.kernel.org
+ S:    Supported
+ F:    drivers/net/pcs/pcs-altera-tse.c
+ F:    include/linux/pcs-altera-tse.h
  ALTERA UART/JTAG UART SERIAL DRIVERS
  M:    Tobias Klauser <tklauser@distanz.ch>
  L:    linux-serial@vger.kernel.org
@@@ -2392,6 -2401,7 +2399,7 @@@ N:      atme
  ARM/Microchip Sparx5 SoC support
  M:    Lars Povlsen <lars.povlsen@microchip.com>
  M:    Steen Hegelund <Steen.Hegelund@microchip.com>
+ M:    Daniel Machon <daniel.machon@microchip.com>
  M:    UNGLinuxDriver@microchip.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
@@@ -2668,6 -2678,7 +2676,6 @@@ M:      Russell King <linux@armlinux.org.uk
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  W:    http://www.armlinux.org.uk/
 -F:    arch/arm/include/asm/hardware/entry-macro-iomd.S
  F:    arch/arm/include/asm/hardware/ioc.h
  F:    arch/arm/include/asm/hardware/iomd.h
  F:    arch/arm/include/asm/hardware/memc.h
@@@ -3822,6 -3833,7 +3830,7 @@@ F:      kernel/bpf/dispatcher.
  F:    kernel/bpf/trampoline.c
  F:    include/linux/bpf*
  F:    include/linux/filter.h
+ F:    include/linux/tnum.h
  
  BPF [BTF]
  M:    Martin KaFai Lau <martin.lau@linux.dev>
@@@ -5720,13 -5732,6 +5729,6 @@@ F:     include/linux/tfrc.
  F:    include/uapi/linux/dccp.h
  F:    net/dccp/
  
- DECnet NETWORK LAYER
- L:    linux-decnet-user@lists.sourceforge.net
- S:    Orphan
- W:    http://linux-decnet.sourceforge.net
- F:    Documentation/networking/decnet.rst
- F:    net/decnet/
  DECSTATION PLATFORM SUPPORT
  M:    "Maciej W. Rozycki" <macro@orcam.me.uk>
  L:    linux-mips@vger.kernel.org
@@@ -7685,6 -7690,7 +7687,6 @@@ R:      Kees Cook <keescook@chromium.org
  L:    linux-mm@kvack.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
 -F:    arch/alpha/kernel/binfmt_loader.c
  F:    fs/*binfmt_*.c
  F:    fs/exec.c
  F:    include/linux/binfmts.h
@@@ -8001,7 -8007,6 +8003,7 @@@ L:      linux-hardening@vger.kernel.or
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/hardening
  F:    include/linux/fortify-string.h
 +F:    lib/fortify_kunit.c
  F:    lib/test_fortify/*
  F:    scripts/test_fortify.sh
  K:    \b__NO_FORTIFY\b
@@@ -10376,6 -10381,7 +10378,6 @@@ INTEL MENLOW THERMAL DRIVE
  M:    Sujith Thomas <sujith.thomas@intel.com>
  L:    linux-pm@vger.kernel.org
  S:    Supported
 -W:    https://01.org/linux-acpi
  F:    drivers/thermal/intel/intel_menlow.c
  
  INTEL P-Unit IPC DRIVER
@@@ -14446,7 -14452,6 +14448,7 @@@ M:   Willy Tarreau <w@1wt.eu
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git
  F:    tools/include/nolibc/
 +F:    tools/testing/selftests/nolibc/
  
  NSDEPS
  M:    Matthias Maennich <maennich@google.com>
@@@ -14744,6 -14749,13 +14746,13 @@@ F: net/dsa/tag_ocelot.
  F:    net/dsa/tag_ocelot_8021q.c
  F:    tools/testing/selftests/drivers/net/ocelot/*
  
+ OCELOT EXTERNAL SWITCH CONTROL
+ M:    Colin Foster <colin.foster@in-advantage.com>
+ S:    Supported
+ F:    Documentation/devicetree/bindings/mfd/mscc,ocelot.yaml
+ F:    drivers/mfd/ocelot*
+ F:    include/linux/mfd/ocelot.h
  OCXL (Open Coherent Accelerator Processor Interface OpenCAPI) DRIVER
  M:    Frederic Barrat <fbarrat@linux.ibm.com>
  M:    Andrew Donnellan <ajd@linux.ibm.com>
@@@ -17755,24 -17767,6 +17764,24 @@@ F: include/rv
  F:    kernel/trace/rv/
  F:    tools/verification/
  
 +RUST
 +M:    Miguel Ojeda <ojeda@kernel.org>
 +M:    Alex Gaynor <alex.gaynor@gmail.com>
 +M:    Wedson Almeida Filho <wedsonaf@gmail.com>
 +R:    Boqun Feng <boqun.feng@gmail.com>
 +R:    Gary Guo <gary@garyguo.net>
 +R:    Björn Roy Baron <bjorn3_gh@protonmail.com>
 +L:    rust-for-linux@vger.kernel.org
 +S:    Supported
 +W:    https://github.com/Rust-for-Linux/linux
 +B:    https://github.com/Rust-for-Linux/linux/issues
 +T:    git https://github.com/Rust-for-Linux/linux.git rust-next
 +F:    Documentation/rust/
 +F:    rust/
 +F:    samples/rust/
 +F:    scripts/*rust*
 +K:    \b(?i:rust)\b
 +
  RXRPC SOCKETS (AF_RXRPC)
  M:    David Howells <dhowells@redhat.com>
  M:    Marc Dionne <marc.dionne@auristor.com>
@@@ -19519,6 -19513,11 +19528,11 @@@ L: netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/dlink/sundance.c
  
+ SUN HAPPY MEAL ETHERNET DRIVER
+ M:    Sean Anderson <seanga2@gmail.com>
+ S:    Maintained
+ F:    drivers/net/ethernet/sun/sunhme.*
  SUNPLUS ETHERNET DRIVER
  M:    Wells Lu <wellslutw@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -21889,9 -21888,11 +21903,11 @@@ F: drivers/input/tablet/wacom_serial4.
  
  WANGXUN ETHERNET DRIVER
  M:    Jiawen Wu <jiawenwu@trustnetic.com>
+ M:    Mengyuan Lou <mengyuanlou@net-swift.com>
+ W:    https://www.net-swift.com
  L:    netdev@vger.kernel.org
  S:    Maintained
- F:    Documentation/networking/device_drivers/ethernet/wangxun/txgbe.rst
+ F:    Documentation/networking/device_drivers/ethernet/wangxun/*
  F:    drivers/net/ethernet/wangxun/
  
  WATCHDOG DEVICE DRIVERS
@@@ -37,6 -37,9 +37,6 @@@ CONFIG_SYN_COOKIES=
  CONFIG_INET_AH=m
  CONFIG_INET_ESP=m
  CONFIG_INET_IPCOMP=m
 -CONFIG_INET_XFRM_MODE_TRANSPORT=m
 -CONFIG_INET_XFRM_MODE_TUNNEL=m
 -CONFIG_INET_XFRM_MODE_BEET=m
  CONFIG_TCP_MD5SIG=y
  CONFIG_IPV6_ROUTER_PREF=y
  CONFIG_IPV6_ROUTE_INFO=y
@@@ -44,13 -47,12 +44,11 @@@ CONFIG_INET6_AH=
  CONFIG_INET6_ESP=m
  CONFIG_INET6_IPCOMP=m
  CONFIG_IPV6_MIP6=m
 -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
  CONFIG_IPV6_MULTIPLE_TABLES=y
  CONFIG_IPV6_SUBTREES=y
  CONFIG_NETWORK_SECMARK=y
  CONFIG_IP_SCTP=m
  CONFIG_VLAN_8021Q=m
- CONFIG_DECNET=m
- CONFIG_DECNET_ROUTER=y
  # CONFIG_WIRELESS is not set
  # CONFIG_UEVENT_HELPER is not set
  # CONFIG_FW_LOADER is not set
@@@ -75,6 -77,7 +73,6 @@@ CONFIG_NETDEVICES=
  CONFIG_DECLANCE=y
  # CONFIG_NET_VENDOR_AQUANTIA is not set
  # CONFIG_NET_VENDOR_ARC is not set
 -# CONFIG_NET_VENDOR_AURORA is not set
  # CONFIG_NET_VENDOR_BROADCOM is not set
  # CONFIG_NET_VENDOR_CADENCE is not set
  # CONFIG_NET_VENDOR_CAVIUM is not set
@@@ -188,8 -191,12 +186,8 @@@ CONFIG_CRYPTO_CRC32=
  CONFIG_CRYPTO_CRCT10DIF=m
  CONFIG_CRYPTO_MD4=m
  CONFIG_CRYPTO_MICHAEL_MIC=m
 -CONFIG_CRYPTO_RMD128=m
  CONFIG_CRYPTO_RMD160=m
 -CONFIG_CRYPTO_RMD256=m
 -CONFIG_CRYPTO_RMD320=m
  CONFIG_CRYPTO_SHA512=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_ARC4=m
@@@ -199,6 -206,7 +197,6 @@@ CONFIG_CRYPTO_CAST5=
  CONFIG_CRYPTO_CAST6=m
  CONFIG_CRYPTO_FCRYPT=m
  CONFIG_CRYPTO_KHAZAD=m
 -CONFIG_CRYPTO_SALSA20=m
  CONFIG_CRYPTO_SEED=m
  CONFIG_CRYPTO_SERPENT=m
  CONFIG_CRYPTO_TEA=m
@@@ -33,6 -33,9 +33,6 @@@ CONFIG_SYN_COOKIES=
  CONFIG_INET_AH=m
  CONFIG_INET_ESP=m
  CONFIG_INET_IPCOMP=m
 -CONFIG_INET_XFRM_MODE_TRANSPORT=m
 -CONFIG_INET_XFRM_MODE_TUNNEL=m
 -CONFIG_INET_XFRM_MODE_BEET=m
  CONFIG_TCP_MD5SIG=y
  CONFIG_IPV6_ROUTER_PREF=y
  CONFIG_IPV6_ROUTE_INFO=y
@@@ -40,13 -43,12 +40,11 @@@ CONFIG_INET6_AH=
  CONFIG_INET6_ESP=m
  CONFIG_INET6_IPCOMP=m
  CONFIG_IPV6_MIP6=m
 -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
  CONFIG_IPV6_MULTIPLE_TABLES=y
  CONFIG_IPV6_SUBTREES=y
  CONFIG_NETWORK_SECMARK=y
  CONFIG_IP_SCTP=m
  CONFIG_VLAN_8021Q=m
- CONFIG_DECNET=m
- CONFIG_DECNET_ROUTER=y
  # CONFIG_WIRELESS is not set
  # CONFIG_UEVENT_HELPER is not set
  # CONFIG_FW_LOADER is not set
@@@ -71,6 -73,7 +69,6 @@@ CONFIG_NETDEVICES=
  CONFIG_DECLANCE=y
  # CONFIG_NET_VENDOR_AQUANTIA is not set
  # CONFIG_NET_VENDOR_ARC is not set
 -# CONFIG_NET_VENDOR_AURORA is not set
  # CONFIG_NET_VENDOR_BROADCOM is not set
  # CONFIG_NET_VENDOR_CADENCE is not set
  # CONFIG_NET_VENDOR_CAVIUM is not set
@@@ -183,8 -186,12 +181,8 @@@ CONFIG_CRYPTO_CRC32=
  CONFIG_CRYPTO_CRCT10DIF=m
  CONFIG_CRYPTO_MD4=m
  CONFIG_CRYPTO_MICHAEL_MIC=m
 -CONFIG_CRYPTO_RMD128=m
  CONFIG_CRYPTO_RMD160=m
 -CONFIG_CRYPTO_RMD256=m
 -CONFIG_CRYPTO_RMD320=m
  CONFIG_CRYPTO_SHA512=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_ARC4=m
@@@ -194,6 -201,7 +192,6 @@@ CONFIG_CRYPTO_CAST5=
  CONFIG_CRYPTO_CAST6=m
  CONFIG_CRYPTO_FCRYPT=m
  CONFIG_CRYPTO_KHAZAD=m
 -CONFIG_CRYPTO_SALSA20=m
  CONFIG_CRYPTO_SEED=m
  CONFIG_CRYPTO_SERPENT=m
  CONFIG_CRYPTO_TEA=m
@@@ -32,6 -32,9 +32,6 @@@ CONFIG_SYN_COOKIES=
  CONFIG_INET_AH=m
  CONFIG_INET_ESP=m
  CONFIG_INET_IPCOMP=m
 -CONFIG_INET_XFRM_MODE_TRANSPORT=m
 -CONFIG_INET_XFRM_MODE_TUNNEL=m
 -CONFIG_INET_XFRM_MODE_BEET=m
  CONFIG_TCP_MD5SIG=y
  CONFIG_IPV6_ROUTER_PREF=y
  CONFIG_IPV6_ROUTE_INFO=y
@@@ -39,13 -42,12 +39,11 @@@ CONFIG_INET6_AH=
  CONFIG_INET6_ESP=m
  CONFIG_INET6_IPCOMP=m
  CONFIG_IPV6_MIP6=m
 -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
  CONFIG_IPV6_MULTIPLE_TABLES=y
  CONFIG_IPV6_SUBTREES=y
  CONFIG_NETWORK_SECMARK=y
  CONFIG_IP_SCTP=m
  CONFIG_VLAN_8021Q=m
- CONFIG_DECNET=m
- CONFIG_DECNET_ROUTER=y
  # CONFIG_WIRELESS is not set
  # CONFIG_UEVENT_HELPER is not set
  # CONFIG_FW_LOADER is not set
@@@ -70,6 -72,7 +68,6 @@@ CONFIG_NETDEVICES=
  CONFIG_DECLANCE=y
  # CONFIG_NET_VENDOR_AQUANTIA is not set
  # CONFIG_NET_VENDOR_ARC is not set
 -# CONFIG_NET_VENDOR_AURORA is not set
  # CONFIG_NET_VENDOR_BROADCOM is not set
  # CONFIG_NET_VENDOR_CADENCE is not set
  # CONFIG_NET_VENDOR_CAVIUM is not set
@@@ -183,8 -186,12 +181,8 @@@ CONFIG_CRYPTO_CRC32=
  CONFIG_CRYPTO_CRCT10DIF=m
  CONFIG_CRYPTO_MD4=m
  CONFIG_CRYPTO_MICHAEL_MIC=m
 -CONFIG_CRYPTO_RMD128=m
  CONFIG_CRYPTO_RMD160=m
 -CONFIG_CRYPTO_RMD256=m
 -CONFIG_CRYPTO_RMD320=m
  CONFIG_CRYPTO_SHA512=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_ARC4=m
@@@ -194,6 -201,7 +192,6 @@@ CONFIG_CRYPTO_CAST5=
  CONFIG_CRYPTO_CAST6=m
  CONFIG_CRYPTO_FCRYPT=m
  CONFIG_CRYPTO_KHAZAD=m
 -CONFIG_CRYPTO_SALSA20=m
  CONFIG_CRYPTO_SEED=m
  CONFIG_CRYPTO_SERPENT=m
  CONFIG_CRYPTO_TEA=m
@@@ -29,6 -29,9 +29,6 @@@ CONFIG_IP_ROUTE_VERBOSE=
  CONFIG_IP_PNP=y
  CONFIG_IP_PNP_BOOTP=y
  CONFIG_SYN_COOKIES=y
 -# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
 -# CONFIG_INET_XFRM_MODE_TUNNEL is not set
 -# CONFIG_INET_XFRM_MODE_BEET is not set
  # CONFIG_IPV6 is not set
  CONFIG_NETWORK_SECMARK=y
  CONFIG_NETFILTER=y
@@@ -66,7 -69,6 +66,6 @@@ CONFIG_IP_NF_RAW=
  CONFIG_IP_NF_ARPTABLES=m
  CONFIG_IP_NF_ARPFILTER=m
  CONFIG_IP_NF_ARP_MANGLE=m
- CONFIG_DECNET_NF_GRABULATOR=m
  CONFIG_BRIDGE_NF_EBTABLES=m
  CONFIG_BRIDGE_EBT_BROUTE=m
  CONFIG_BRIDGE_EBT_T_FILTER=m
@@@ -96,7 -98,6 +95,6 @@@ CONFIG_ATM_MPOA=
  CONFIG_ATM_BR2684=m
  CONFIG_BRIDGE=m
  CONFIG_VLAN_8021Q=m
- CONFIG_DECNET=m
  CONFIG_LLC2=m
  CONFIG_ATALK=m
  CONFIG_DEV_APPLETALK=m
@@@ -217,6 -218,9 +215,6 @@@ CONFIG_HDLC_X25=
  CONFIG_PCI200SYN=m
  CONFIG_WANXL=m
  CONFIG_FARSYNC=m
 -CONFIG_DSCC4=m
 -CONFIG_DSCC4_PCISYNC=y
 -CONFIG_DSCC4_PCI_RST=y
  CONFIG_LAPBETHER=m
  # CONFIG_INPUT_KEYBOARD is not set
  # CONFIG_INPUT_MOUSE is not set
@@@ -282,6 -286,7 +280,6 @@@ CONFIG_CRYPTO_PCBC=
  CONFIG_CRYPTO_MD4=m
  CONFIG_CRYPTO_MICHAEL_MIC=m
  CONFIG_CRYPTO_SHA512=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_BLOWFISH=m
@@@ -292,6 -297,7 +290,6 @@@ CONFIG_CRYPTO_SERPENT=
  CONFIG_CRYPTO_TEA=m
  CONFIG_CRYPTO_TWOFISH=m
  CONFIG_CRYPTO_DEFLATE=m
 -# CONFIG_ENABLE_MUST_CHECK is not set
  CONFIG_MAGIC_SYSRQ=y
  CONFIG_CMDLINE_BOOL=y
  CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs rw ip=auto"
@@@ -58,9 -58,13 +58,9 @@@ CONFIG_SYN_COOKIES=
  CONFIG_INET_AH=m
  CONFIG_INET_ESP=m
  CONFIG_INET_IPCOMP=m
 -CONFIG_INET_XFRM_MODE_TRANSPORT=m
 -CONFIG_INET_XFRM_MODE_TUNNEL=m
 -CONFIG_INET_XFRM_MODE_BEET=m
  CONFIG_INET6_AH=m
  CONFIG_INET6_ESP=m
  CONFIG_INET6_IPCOMP=m
 -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
  CONFIG_IPV6_TUNNEL=m
  CONFIG_NETWORK_SECMARK=y
  CONFIG_NETFILTER=y
@@@ -112,7 -116,6 +112,6 @@@ CONFIG_IP6_NF_FILTER=
  CONFIG_IP6_NF_TARGET_REJECT=m
  CONFIG_IP6_NF_MANGLE=m
  CONFIG_IP6_NF_RAW=m
- CONFIG_DECNET_NF_GRABULATOR=m
  CONFIG_BRIDGE_NF_EBTABLES=m
  CONFIG_BRIDGE_EBT_BROUTE=m
  CONFIG_BRIDGE_EBT_T_FILTER=m
@@@ -142,7 -145,6 +141,6 @@@ CONFIG_ATM_MPOA=
  CONFIG_ATM_BR2684=m
  CONFIG_BRIDGE=m
  CONFIG_VLAN_8021Q=m
- CONFIG_DECNET=m
  CONFIG_LLC2=m
  CONFIG_ATALK=m
  CONFIG_DEV_APPLETALK=m
@@@ -280,6 -282,7 +278,6 @@@ CONFIG_PCMCIA_XIRCOM=
  CONFIG_DL2K=m
  CONFIG_SUNDANCE=m
  CONFIG_PCMCIA_FMVJ18X=m
 -CONFIG_HP100=m
  CONFIG_E100=m
  CONFIG_E1000=m
  CONFIG_IXGB=m
@@@ -363,6 -366,9 +361,6 @@@ CONFIG_HDLC_X25=
  CONFIG_PCI200SYN=m
  CONFIG_WANXL=m
  CONFIG_FARSYNC=m
 -CONFIG_DSCC4=m
 -CONFIG_DSCC4_PCISYNC=y
 -CONFIG_DSCC4_PCI_RST=y
  CONFIG_LAPBETHER=m
  # CONFIG_KEYBOARD_ATKBD is not set
  CONFIG_KEYBOARD_GPIO=y
@@@ -675,6 -681,7 +673,6 @@@ CONFIG_CRYPTO_PCBC=
  CONFIG_CRYPTO_HMAC=y
  CONFIG_CRYPTO_MD5=y
  CONFIG_CRYPTO_MICHAEL_MIC=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_BLOWFISH=m
@@@ -683,4 -690,5 +681,4 @@@ CONFIG_CRYPTO_KHAZAD=
  CONFIG_CRYPTO_SERPENT=m
  CONFIG_CRYPTO_TEA=m
  CONFIG_CRYPTO_TWOFISH=m
 -# CONFIG_ENABLE_MUST_CHECK is not set
  CONFIG_MAGIC_SYSRQ=y
@@@ -29,6 -29,9 +29,6 @@@ CONFIG_NET_IPIP=
  CONFIG_IP_MROUTE=y
  CONFIG_IP_PIMSM_V1=y
  CONFIG_IP_PIMSM_V2=y
 -CONFIG_INET_XFRM_MODE_TRANSPORT=m
 -CONFIG_INET_XFRM_MODE_TUNNEL=m
 -CONFIG_INET_XFRM_MODE_BEET=m
  CONFIG_TCP_MD5SIG=y
  CONFIG_IPV6_ROUTER_PREF=y
  CONFIG_IPV6_ROUTE_INFO=y
@@@ -36,6 -39,7 +36,6 @@@ CONFIG_INET6_AH=
  CONFIG_INET6_ESP=m
  CONFIG_INET6_IPCOMP=m
  CONFIG_IPV6_MIP6=m
 -CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
  CONFIG_IPV6_TUNNEL=m
  CONFIG_IPV6_MULTIPLE_TABLES=y
  CONFIG_IPV6_SUBTREES=y
@@@ -112,7 -116,6 +112,6 @@@ CONFIG_IP6_NF_FILTER=
  CONFIG_IP6_NF_TARGET_REJECT=m
  CONFIG_IP6_NF_MANGLE=m
  CONFIG_IP6_NF_RAW=m
- CONFIG_DECNET_NF_GRABULATOR=m
  CONFIG_BRIDGE_NF_EBTABLES=m
  CONFIG_BRIDGE_EBT_BROUTE=m
  CONFIG_BRIDGE_EBT_T_FILTER=m
@@@ -133,7 -136,6 +132,6 @@@ CONFIG_BRIDGE_EBT_REDIRECT=
  CONFIG_BRIDGE_EBT_SNAT=m
  CONFIG_BRIDGE_EBT_LOG=m
  CONFIG_BRIDGE=m
- CONFIG_DECNET=m
  CONFIG_NET_SCHED=y
  CONFIG_NET_SCH_CBQ=m
  CONFIG_NET_SCH_HTB=m
@@@ -188,7 -190,9 +186,7 @@@ CONFIG_PARIDE_KTTI=
  CONFIG_PARIDE_ON20=m
  CONFIG_PARIDE_ON26=m
  CONFIG_BLK_DEV_LOOP=m
 -CONFIG_BLK_DEV_CRYPTOLOOP=m
  CONFIG_BLK_DEV_NBD=m
 -CONFIG_BLK_DEV_SX8=m
  CONFIG_BLK_DEV_RAM=m
  CONFIG_CDROM_PKTCDVD=m
  CONFIG_ATA_OVER_ETH=m
@@@ -394,6 -398,7 +392,6 @@@ CONFIG_CRYPTO_PCBC=
  CONFIG_CRYPTO_HMAC=y
  CONFIG_CRYPTO_XCBC=m
  CONFIG_CRYPTO_MICHAEL_MIC=m
 -CONFIG_CRYPTO_TGR192=m
  CONFIG_CRYPTO_WP512=m
  CONFIG_CRYPTO_ANUBIS=m
  CONFIG_CRYPTO_BLOWFISH=m
diff --combined arch/x86/Kconfig
@@@ -107,8 -107,6 +107,8 @@@ config X8
        select ARCH_SUPPORTS_PAGE_TABLE_CHECK   if X86_64
        select ARCH_SUPPORTS_NUMA_BALANCING     if X86_64
        select ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP       if NR_CPUS <= 4096
 +      select ARCH_SUPPORTS_CFI_CLANG          if X86_64
 +      select ARCH_USES_CFI_TRAPS              if X86_64 && CFI_CLANG
        select ARCH_SUPPORTS_LTO_CLANG
        select ARCH_SUPPORTS_LTO_CLANG_THIN
        select ARCH_USE_BUILTIN_BSWAP
        select HAVE_STATIC_CALL_INLINE          if HAVE_OBJTOOL
        select HAVE_PREEMPT_DYNAMIC_CALL
        select HAVE_RSEQ
 +      select HAVE_RUST                        if X86_64
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_UACCESS_VALIDATION          if HAVE_OBJTOOL
        select HAVE_UNSTABLE_SCHED_CLOCK
        select PROC_PID_ARCH_STATUS             if PROC_FS
        select HAVE_ARCH_NODE_DEV_GROUP         if X86_SGX
        imply IMA_SECURE_AND_OR_TRUSTED_BOOT    if EFI
+       select HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
  
  config INSTRUCTION_DECODER
        def_bool y
@@@ -451,11 -449,6 +452,11 @@@ config X86_X2API
          This allows 32-bit apic IDs (so it can support very large systems),
          and accesses the local apic via MSRs not via mmio.
  
 +        Some Intel systems circa 2022 and later are locked into x2APIC mode
 +        and can not fall back to the legacy APIC modes if SGX or TDX are
 +        enabled in the BIOS.  They will be unable to boot without enabling
 +        this option.
 +
          If you don't know what to do here, say N.
  
  config X86_MPPARSE
@@@ -1927,7 -1920,7 +1928,7 @@@ endchoic
  
  config X86_SGX
        bool "Software Guard eXtensions (SGX)"
 -      depends on X86_64 && CPU_SUP_INTEL
 +      depends on X86_64 && CPU_SUP_INTEL && X86_X2APIC
        depends on CRYPTO=y
        depends on CRYPTO_SHA256=y
        select SRCU
@@@ -2577,7 -2570,7 +2578,7 @@@ menuconfig AP
  
          1) make sure that you have enough swap space and that it is
          enabled.
 -        2) pass the "no-hlt" option to the kernel
 +        2) pass the "idle=poll" option to the kernel
          3) switch on floating point emulation in the kernel and pass
          the "no387" option to the kernel
          4) pass the "floppy=nodma" option to the kernel
@@@ -419,9 -419,7 +419,9 @@@ static void emit_indirect_jump(u8 **ppr
                OPTIMIZER_HIDE_VAR(reg);
                emit_jump(&prog, &__x86_indirect_thunk_array[reg], ip);
        } else {
 -              EMIT2(0xFF, 0xE0 + reg);
 +              EMIT2(0xFF, 0xE0 + reg);        /* jmp *%\reg */
 +              if (IS_ENABLED(CONFIG_RETPOLINE) || IS_ENABLED(CONFIG_SLS))
 +                      EMIT1(0xCC);            /* int3 */
        }
  
        *pprog = prog;
@@@ -664,7 -662,7 +664,7 @@@ static void emit_mov_imm64(u8 **pprog, 
                 */
                emit_mov_imm32(&prog, false, dst_reg, imm32_lo);
        } else {
-               /* movabsq %rax, imm64 */
+               /* movabsq rax, imm64 */
                EMIT2(add_1mod(0x48, dst_reg), add_1reg(0xB8, dst_reg));
                EMIT(imm32_lo, 4);
                EMIT(imm32_hi, 4);
@@@ -1753,34 -1751,60 +1753,60 @@@ emit_jmp
  static void save_regs(const struct btf_func_model *m, u8 **prog, int nr_args,
                      int stack_size)
  {
-       int i;
+       int i, j, arg_size, nr_regs;
        /* Store function arguments to stack.
         * For a function that accepts two pointers the sequence will be:
         * mov QWORD PTR [rbp-0x10],rdi
         * mov QWORD PTR [rbp-0x8],rsi
         */
-       for (i = 0; i < min(nr_args, 6); i++)
-               emit_stx(prog, bytes_to_bpf_size(m->arg_size[i]),
-                        BPF_REG_FP,
-                        i == 5 ? X86_REG_R9 : BPF_REG_1 + i,
-                        -(stack_size - i * 8));
+       for (i = 0, j = 0; i < min(nr_args, 6); i++) {
+               if (m->arg_flags[i] & BTF_FMODEL_STRUCT_ARG) {
+                       nr_regs = (m->arg_size[i] + 7) / 8;
+                       arg_size = 8;
+               } else {
+                       nr_regs = 1;
+                       arg_size = m->arg_size[i];
+               }
+               while (nr_regs) {
+                       emit_stx(prog, bytes_to_bpf_size(arg_size),
+                                BPF_REG_FP,
+                                j == 5 ? X86_REG_R9 : BPF_REG_1 + j,
+                                -(stack_size - j * 8));
+                       nr_regs--;
+                       j++;
+               }
+       }
  }
  
  static void restore_regs(const struct btf_func_model *m, u8 **prog, int nr_args,
                         int stack_size)
  {
-       int i;
+       int i, j, arg_size, nr_regs;
  
        /* Restore function arguments from stack.
         * For a function that accepts two pointers the sequence will be:
         * EMIT4(0x48, 0x8B, 0x7D, 0xF0); mov rdi,QWORD PTR [rbp-0x10]
         * EMIT4(0x48, 0x8B, 0x75, 0xF8); mov rsi,QWORD PTR [rbp-0x8]
         */
-       for (i = 0; i < min(nr_args, 6); i++)
-               emit_ldx(prog, bytes_to_bpf_size(m->arg_size[i]),
-                        i == 5 ? X86_REG_R9 : BPF_REG_1 + i,
-                        BPF_REG_FP,
-                        -(stack_size - i * 8));
+       for (i = 0, j = 0; i < min(nr_args, 6); i++) {
+               if (m->arg_flags[i] & BTF_FMODEL_STRUCT_ARG) {
+                       nr_regs = (m->arg_size[i] + 7) / 8;
+                       arg_size = 8;
+               } else {
+                       nr_regs = 1;
+                       arg_size = m->arg_size[i];
+               }
+               while (nr_regs) {
+                       emit_ldx(prog, bytes_to_bpf_size(arg_size),
+                                j == 5 ? X86_REG_R9 : BPF_REG_1 + j,
+                                BPF_REG_FP,
+                                -(stack_size - j * 8));
+                       nr_regs--;
+                       j++;
+               }
+       }
  }
  
  static int invoke_bpf_prog(const struct btf_func_model *m, u8 **pprog,
        if (p->aux->sleepable) {
                enter = __bpf_prog_enter_sleepable;
                exit = __bpf_prog_exit_sleepable;
+       } else if (p->type == BPF_PROG_TYPE_STRUCT_OPS) {
+               enter = __bpf_prog_enter_struct_ops;
+               exit = __bpf_prog_exit_struct_ops;
        } else if (p->expected_attach_type == BPF_LSM_CGROUP) {
                enter = __bpf_prog_enter_lsm_cgroup;
                exit = __bpf_prog_exit_lsm_cgroup;
@@@ -2015,13 -2042,14 +2044,14 @@@ static int invoke_bpf_mod_ret(const str
  int arch_prepare_bpf_trampoline(struct bpf_tramp_image *im, void *image, void *image_end,
                                const struct btf_func_model *m, u32 flags,
                                struct bpf_tramp_links *tlinks,
-                               void *orig_call)
+                               void *func_addr)
  {
-       int ret, i, nr_args = m->nr_args;
+       int ret, i, nr_args = m->nr_args, extra_nregs = 0;
        int regs_off, ip_off, args_off, stack_size = nr_args * 8, run_ctx_off;
        struct bpf_tramp_links *fentry = &tlinks[BPF_TRAMP_FENTRY];
        struct bpf_tramp_links *fexit = &tlinks[BPF_TRAMP_FEXIT];
        struct bpf_tramp_links *fmod_ret = &tlinks[BPF_TRAMP_MODIFY_RETURN];
+       void *orig_call = func_addr;
        u8 **branches = NULL;
        u8 *prog;
        bool save_ret;
        if (nr_args > 6)
                return -ENOTSUPP;
  
+       for (i = 0; i < MAX_BPF_FUNC_ARGS; i++) {
+               if (m->arg_flags[i] & BTF_FMODEL_STRUCT_ARG)
+                       extra_nregs += (m->arg_size[i] + 7) / 8 - 1;
+       }
+       if (nr_args + extra_nregs > 6)
+               return -ENOTSUPP;
+       stack_size += extra_nregs * 8;
        /* Generated trampoline stack layout:
         *
         * RBP + 8         [ return address  ]
         *                 [ ...             ]
         * RBP - regs_off  [ reg_arg1        ]  program's ctx pointer
         *
-        * RBP - args_off  [ args count      ]  always
+        * RBP - args_off  [ arg regs count  ]  always
         *
         * RBP - ip_off    [ traced function ]  BPF_TRAMP_F_IP_ARG flag
         *
        EMIT4(0x48, 0x83, 0xEC, stack_size); /* sub rsp, stack_size */
        EMIT1(0x53);             /* push rbx */
  
-       /* Store number of arguments of the traced function:
-        *   mov rax, nr_args
+       /* Store number of argument registers of the traced function:
+        *   mov rax, nr_args + extra_nregs
         *   mov QWORD PTR [rbp - args_off], rax
         */
-       emit_mov_imm64(&prog, BPF_REG_0, 0, (u32) nr_args);
+       emit_mov_imm64(&prog, BPF_REG_0, 0, (u32) nr_args + extra_nregs);
        emit_stx(&prog, BPF_DW, BPF_REG_FP, BPF_REG_0, -args_off);
  
        if (flags & BPF_TRAMP_F_IP_ARG) {
                /* Store IP address of the traced function:
-                * mov rax, QWORD PTR [rbp + 8]
-                * sub rax, X86_PATCH_SIZE
+                * movabsq rax, func_addr
                 * mov QWORD PTR [rbp - ip_off], rax
                 */
-               emit_ldx(&prog, BPF_DW, BPF_REG_0, BPF_REG_FP, 8);
-               EMIT4(0x48, 0x83, 0xe8, X86_PATCH_SIZE);
+               emit_mov_imm64(&prog, BPF_REG_0, (long) func_addr >> 32, (u32) (long) func_addr);
                emit_stx(&prog, BPF_DW, BPF_REG_FP, BPF_REG_0, -ip_off);
        }
  
@@@ -2211,7 -2245,7 +2247,7 @@@ cleanup
        return ret;
  }
  
- static int emit_bpf_dispatcher(u8 **pprog, int a, int b, s64 *progs)
+ static int emit_bpf_dispatcher(u8 **pprog, int a, int b, s64 *progs, u8 *image, u8 *buf)
  {
        u8 *jg_reloc, *prog = *pprog;
        int pivot, err, jg_bytes = 1;
                EMIT2_off32(0x81, add_1reg(0xF8, BPF_REG_3),
                            progs[a]);
                err = emit_cond_near_jump(&prog,        /* je func */
-                                         (void *)progs[a], prog,
+                                         (void *)progs[a], image + (prog - buf),
                                          X86_JE);
                if (err)
                        return err;
  
-               emit_indirect_jump(&prog, 2 /* rdx */, prog);
+               emit_indirect_jump(&prog, 2 /* rdx */, image + (prog - buf));
  
                *pprog = prog;
                return 0;
        jg_reloc = prog;
  
        err = emit_bpf_dispatcher(&prog, a, a + pivot,  /* emit lower_part */
-                                 progs);
+                                 progs, image, buf);
        if (err)
                return err;
  
        emit_code(jg_reloc - jg_bytes, jg_offset, jg_bytes);
  
        err = emit_bpf_dispatcher(&prog, a + pivot + 1, /* emit upper_part */
-                                 b, progs);
+                                 b, progs, image, buf);
        if (err)
                return err;
  
@@@ -2291,12 -2325,12 +2327,12 @@@ static int cmp_ips(const void *a, cons
        return 0;
  }
  
- int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs)
+ int arch_prepare_bpf_dispatcher(void *image, void *buf, s64 *funcs, int num_funcs)
  {
-       u8 *prog = image;
+       u8 *prog = buf;
  
        sort(funcs, num_funcs, sizeof(funcs[0]), cmp_ips, NULL);
-       return emit_bpf_dispatcher(&prog, 0, num_funcs - 1, funcs);
+       return emit_bpf_dispatcher(&prog, 0, num_funcs - 1, funcs, image, buf);
  }
  
  struct x64_jit_data {
  #define MEM_DISCARD(sec) *(.mem##sec)
  #endif
  
+ #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE
+ #define KEEP_PATCHABLE                KEEP(*(__patchable_function_entries))
+ #define PATCHABLE_DISCARDS
+ #else
+ #define KEEP_PATCHABLE
+ #define PATCHABLE_DISCARDS    *(__patchable_function_entries)
+ #endif
  #ifdef CONFIG_FTRACE_MCOUNT_RECORD
  /*
   * The ftrace call sites are logged to a section whose name depends on the
  #define MCOUNT_REC()  . = ALIGN(8);                           \
                        __start_mcount_loc = .;                 \
                        KEEP(*(__mcount_loc))                   \
-                       KEEP(*(__patchable_function_entries))   \
+                       KEEP_PATCHABLE                          \
                        __stop_mcount_loc = .;                  \
                        ftrace_stub_graph = ftrace_stub;        \
                        ftrace_ops_list_func = arch_ftrace_ops_list_func;
        __end_ro_after_init = .;
  #endif
  
 +/*
 + * .kcfi_traps contains a list KCFI trap locations.
 + */
 +#ifndef KCFI_TRAPS
 +#ifdef CONFIG_ARCH_USES_CFI_TRAPS
 +#define KCFI_TRAPS                                                    \
 +      __kcfi_traps : AT(ADDR(__kcfi_traps) - LOAD_OFFSET) {           \
 +              __start___kcfi_traps = .;                               \
 +              KEEP(*(.kcfi_traps))                                    \
 +              __stop___kcfi_traps = .;                                \
 +      }
 +#else
 +#define KCFI_TRAPS
 +#endif
 +#endif
 +
  /*
   * Read only Data
   */
                __stop___modver = .;                                    \
        }                                                               \
                                                                        \
 +      KCFI_TRAPS                                                      \
 +                                                                      \
        RO_EXCEPTION_TABLE                                              \
        NOTES                                                           \
        BTF                                                             \
        __end_rodata = .;
  
  
 -/*
 - * .text..L.cfi.jumptable.* contain Control-Flow Integrity (CFI)
 - * jump table entries.
 - */
 -#ifdef CONFIG_CFI_CLANG
 -#define TEXT_CFI_JT                                                   \
 -              ALIGN_FUNCTION();                                       \
 -              __cfi_jt_start = .;                                     \
 -              *(.text..L.cfi.jumptable .text..L.cfi.jumptable.*)      \
 -              __cfi_jt_end = .;
 -#else
 -#define TEXT_CFI_JT
 -#endif
 -
  /*
   * Non-instrumentable text section
   */
                *(.text..refcount)                                      \
                *(.ref.text)                                            \
                *(.text.asan.* .text.tsan.*)                            \
 -              TEXT_CFI_JT                                             \
        MEM_KEEP(init.text*)                                            \
        MEM_KEEP(exit.text*)                                            \
  
   * keep any .init_array.* sections.
   * https://bugs.llvm.org/show_bug.cgi?id=46478
   */
 -#if defined(CONFIG_GCOV_KERNEL) || defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN) || \
 -      defined(CONFIG_CFI_CLANG)
 +#if defined(CONFIG_GCOV_KERNEL) || defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN)
  # ifdef CONFIG_CONSTRUCTORS
  #  define SANITIZER_DISCARDS                                          \
        *(.eh_frame)
  
  #define COMMON_DISCARDS                                                       \
        SANITIZER_DISCARDS                                              \
+       PATCHABLE_DISCARDS                                              \
        *(.discard)                                                     \
        *(.discard.*)                                                   \
        *(.modinfo)                                                     \
diff --combined kernel/bpf/bpf_lsm.c
@@@ -41,17 -41,21 +41,21 @@@ BTF_SET_END(bpf_lsm_hooks
   */
  BTF_SET_START(bpf_lsm_current_hooks)
  /* operate on freshly allocated sk without any cgroup association */
+ #ifdef CONFIG_SECURITY_NETWORK
  BTF_ID(func, bpf_lsm_sk_alloc_security)
  BTF_ID(func, bpf_lsm_sk_free_security)
+ #endif
  BTF_SET_END(bpf_lsm_current_hooks)
  
  /* List of LSM hooks that trigger while the socket is properly locked.
   */
  BTF_SET_START(bpf_lsm_locked_sockopt_hooks)
+ #ifdef CONFIG_SECURITY_NETWORK
  BTF_ID(func, bpf_lsm_socket_sock_rcv_skb)
  BTF_ID(func, bpf_lsm_sock_graft)
  BTF_ID(func, bpf_lsm_inet_csk_clone)
  BTF_ID(func, bpf_lsm_inet_conn_established)
+ #endif
  BTF_SET_END(bpf_lsm_locked_sockopt_hooks)
  
  /* List of LSM hooks that trigger while the socket is _not_ locked,
   * in the early init phase.
   */
  BTF_SET_START(bpf_lsm_unlocked_sockopt_hooks)
+ #ifdef CONFIG_SECURITY_NETWORK
  BTF_ID(func, bpf_lsm_socket_post_create)
  BTF_ID(func, bpf_lsm_socket_socketpair)
+ #endif
  BTF_SET_END(bpf_lsm_unlocked_sockopt_hooks)
  
  #ifdef CONFIG_CGROUP_BPF
@@@ -189,6 -195,14 +195,14 @@@ static const struct bpf_func_proto bpf_
  static const struct bpf_func_proto *
  bpf_lsm_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
  {
+       const struct bpf_func_proto *func_proto;
+       if (prog->expected_attach_type == BPF_LSM_CGROUP) {
+               func_proto = cgroup_common_func_proto(func_id, prog);
+               if (func_proto)
+                       return func_proto;
+       }
        switch (func_id) {
        case BPF_FUNC_inode_storage_get:
                return &bpf_inode_storage_get_proto;
                return prog->aux->sleepable ? &bpf_ima_file_hash_proto : NULL;
        case BPF_FUNC_get_attach_cookie:
                return bpf_prog_has_trampoline(prog) ? &bpf_get_attach_cookie_proto : NULL;
-       case BPF_FUNC_get_local_storage:
-               return prog->expected_attach_type == BPF_LSM_CGROUP ?
-                       &bpf_get_local_storage_proto : NULL;
-       case BPF_FUNC_set_retval:
-               return prog->expected_attach_type == BPF_LSM_CGROUP ?
-                       &bpf_set_retval_proto : NULL;
-       case BPF_FUNC_get_retval:
-               return prog->expected_attach_type == BPF_LSM_CGROUP ?
-                       &bpf_get_retval_proto : NULL;
  #ifdef CONFIG_NET
        case BPF_FUNC_setsockopt:
                if (prog->expected_attach_type != BPF_LSM_CGROUP)
@@@ -335,7 -340,6 +340,7 @@@ BTF_ID(func, bpf_lsm_task_getsecid_obj
  BTF_ID(func, bpf_lsm_task_prctl)
  BTF_ID(func, bpf_lsm_task_setscheduler)
  BTF_ID(func, bpf_lsm_task_to_inode)
 +BTF_ID(func, bpf_lsm_userns_create)
  BTF_SET_END(sleepable_lsm_hooks)
  
  bool bpf_lsm_is_sleepable_hook(u32 btf_id)
diff --combined tools/objtool/check.c
@@@ -1073,9 -1073,6 +1073,9 @@@ static const char *uaccess_safe_builtin
        "copy_mc_fragile_handle_tail",
        "copy_mc_enhanced_fast_string",
        "ftrace_likely_update", /* CONFIG_TRACE_BRANCH_PROFILING */
 +      "clear_user_erms",
 +      "clear_user_rep_good",
 +      "clear_user_original",
        NULL
  };
  
@@@ -3319,10 -3316,6 +3319,10 @@@ static int validate_branch(struct objto
                next_insn = next_insn_to_validate(file, insn);
  
                if (func && insn->func && func != insn->func->pfunc) {
 +                      /* Ignore KCFI type preambles, which always fall through */
 +                      if (!strncmp(func->name, "__cfi_", 6))
 +                              return 0;
 +
                        WARN("%s() falls through to next function %s()",
                             func->name, insn->func->name);
                        return 1;
@@@ -4121,7 -4114,7 +4121,8 @@@ static int validate_ibt(struct objtool_
                    !strcmp(sec->name, "__ex_table")                    ||
                    !strcmp(sec->name, "__jump_table")                  ||
                    !strcmp(sec->name, "__mcount_loc")                  ||
-                   !strcmp(sec->name, ".kcfi_traps"))
++                  !strcmp(sec->name, ".kcfi_traps")                   ||
+                   strstr(sec->name, "__patchable_function_entries"))
                        continue;
  
                list_for_each_entry(reloc, &sec->reloc->reloc_list, list)