Changes in 5.10.188
media: atomisp: fix "variable dereferenced before check 'asd'"
x86/smp: Use dedicated cache-line for mwait_play_dead()
can: isotp: isotp_sendmsg(): fix return error fix on TX path
video: imsttfb: check for ioremap() failures
fbdev: imsttfb: Fix use after free bug in imsttfb_probe
HID: wacom: Use ktime_t rather than int when dealing with timestamps
HID: logitech-hidpp: add HIDPP_QUIRK_DELAYED_INIT for the T651.
Revert "thermal/drivers/mediatek: Use devm_of_iomap to avoid resource leak in mtk_thermal_probe"
scripts/tags.sh: Resolve gtags empty index generation
drm/amdgpu: Validate VM ioctl flags.
nubus: Partially revert proc_create_single_data() conversion
fs: pipe: reveal missing function protoypes
x86/resctrl: Only show tasks' pid in current pid namespace
blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost
md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
md/raid10: fix overflow of md/safe_mode_delay
md/raid10: fix wrong setting of max_corr_read_errors
md/raid10: fix null-ptr-deref of mreplace in raid10_sync_request
md/raid10: fix io loss while replacement replace rdev
irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
posix-timers: Prevent RT livelock in itimer_delete()
tracing/timer: Add missing hrtimer modes to decode_hrtimer_mode().
clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
PM: domains: fix integer overflow issues in genpd_parse_state()
perf/arm-cmn: Fix DTC reset
powercap: RAPL: Fix CONFIG_IOSF_MBI dependency
ARM: 9303/1: kprobes: avoid missing-declaration warnings
cpufreq: intel_pstate: Fix energy_performance_preference for passive
thermal/drivers/sun8i: Fix some error handling paths in sun8i_ths_probe()
rcuscale: Console output claims too few grace periods
rcuscale: Always log error message
rcuscale: Move shutdown from wait_event() to wait_event_idle()
rcu/rcuscale: Move rcu_scale_*() after kfree_scale_cleanup()
rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale
perf/ibs: Fix interface via core pmu events
x86/mm: Fix __swp_entry_to_pte() for Xen PV guests
evm: Complete description of evm_inode_setattr()
ima: Fix build warnings
pstore/ram: Add check for kstrdup
igc: Enable and fix RX hash usage by netstack
wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
samples/bpf: Fix buffer overflow in tcp_basertt
spi: spi-geni-qcom: Correct CS_TOGGLE bit in SPI_TRANS_CFG
wifi: wilc1000: fix for absent RSN capabilities WFA testcase
wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
bpf: Remove extra lock_sock for TCP_ZEROCOPY_RECEIVE
sctp: add bpf_bypass_getsockopt proto callback
libbpf: fix offsetof() and container_of() to work with CO-RE
nfc: constify several pointers to u8, char and sk_buff
nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
bpftool: JIT limited misreported as negative value on aarch64
regulator: core: Fix more error checking for debugfs_create_dir()
regulator: core: Streamline debugfs operations
wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
wifi: atmel: Fix an error handling path in atmel_probe()
wl3501_cs: Fix misspelling and provide missing documentation
net: create netdev->dev_addr assignment helpers
wl3501_cs: use eth_hw_addr_set()
wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
wifi: ray_cs: Utilize strnlen() in parse_addr()
wifi: ray_cs: Drop useless status variable in parse_addr()
wifi: ray_cs: Fix an error handling path in ray_probe()
wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled
wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
watchdog/perf: more properly prevent false positives with turbo modes
kexec: fix a memory leak in crash_shrink_memory()
memstick r592: make memstick_debug_get_tpc_name() static
wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
rtnetlink: extend RTEXT_FILTER_SKIP_STATS to IFLA_VF_INFO
wifi: iwlwifi: pull from TXQs with softirqs disabled
wifi: cfg80211: rewrite merging of inherited elements
wifi: ath9k: convert msecs to jiffies where needed
igc: Fix race condition in PTP tx code
net: stmmac: fix double serdes powerdown
netlink: fix potential deadlock in netlink_set_err()
netlink: do not hard code device address lenth in fdb dumps
selftests: rtnetlink: remove netdevsim device after ipsec offload test
gtp: Fix use-after-free in __gtp_encap_destroy().
net: axienet: Move reset before 64-bit DMA detection
sfc: fix crash when reading stats while NIC is resetting
nfc: llcp: simplify llcp_sock_connect() error paths
net: nfc: Fix use-after-free caused by nfc_llcp_find_local
lib/ts_bm: reset initial match offset for every block of text
netfilter: conntrack: dccp: copy entire header to stack buffer, not just basic one
netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
ipvlan: Fix return value of ipvlan_queue_xmit()
netlink: Add __sock_i_ino() for __netlink_diag_dump().
radeon: avoid double free in ci_dpm_init()
drm/amd/display: Explicitly specify update type per plane info change
Input: drv260x - sleep between polling GO bit
drm/bridge: tc358768: always enable HS video mode
drm/bridge: tc358768: fix PLL parameters computation
drm/bridge: tc358768: fix PLL target frequency
drm/bridge: tc358768: fix TCLK_ZEROCNT computation
drm/bridge: tc358768: Add atomic_get_input_bus_fmts() implementation
drm/bridge: tc358768: fix TCLK_TRAILCNT computation
drm/bridge: tc358768: fix THS_ZEROCNT computation
drm/bridge: tc358768: fix TXTAGOCNT computation
drm/bridge: tc358768: fix THS_TRAILCNT computation
drm/vram-helper: fix function names in vram helper doc
ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
ARM: dts: meson8b: correct uart_B and uart_C clock references
Input: adxl34x - do not hardcode interrupt trigger type
drm: sun4i_tcon: use devm_clk_get_enabled in `sun4i_tcon_init_clocks`
drm/panel: sharp-ls043t1le01: adjust mode settings
ARM: dts: stm32: Move ethernet MAC EEPROM from SoM to carrier boards
bus: ti-sysc: Fix dispc quirk masking bool variables
arm64: dts: microchip: sparx5: do not use PSCI on reference boards
RDMA/bnxt_re: Disable/kill tasklet only if it is enabled
RDMA/bnxt_re: Fix to remove unnecessary return labels
RDMA/bnxt_re: Use unique names while registering interrupts
RDMA/bnxt_re: Remove a redundant check inside bnxt_re_update_gid
RDMA/bnxt_re: Fix to remove an unnecessary log
ARM: dts: gta04: Move model property out of pinctrl node
arm64: dts: qcom: msm8916: correct camss unit address
arm64: dts: qcom: msm8994: correct SPMI unit address
arm64: dts: qcom: msm8996: correct camss unit address
drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
ARM: ep93xx: fix missing-prototype warnings
ARM: omap2: fix missing tick_broadcast() prototype
arm64: dts: qcom: apq8096: fix fixed regulator name property
ARM: dts: stm32: Shorten the AV96 HDMI sound card name
memory: brcmstb_dpfe: fix testing array offset after use
ASoC: es8316: Increment max value for ALC Capture Target Volume control
ASoC: es8316: Do not set rate constraints for unsupported MCLKs
ARM: dts: meson8: correct uart_B and uart_C clock references
soc/fsl/qe: fix usb.c build errors
IB/hfi1: Use bitmap_zalloc() when applicable
IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
IB/hfi1: Fix wrong mmu_node used for user SDMA packet after invalidate
RDMA: Remove uverbs_ex_cmd_mask values that are linked to functions
RDMA/hns: Fix coding style issues
RDMA/hns: Use refcount_t APIs for HEM
RDMA/hns: Clean the hardware related code for HEM
RDMA/hns: Fix hns_roce_table_get return value
ARM: dts: iwg20d-q7-common: Fix backlight pwm specifier
arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
arm64: dts: ti: k3-j7200: Fix physical address of pin
ARM: dts: stm32: Fix audio routing on STM32MP15xx DHCOM PDK2
ARM: dts: stm32: fix i2s endpoint format property for stm32mp15xx-dkx
hwmon: (gsc-hwmon) fix fan pwm temperature scaling
hwmon: (adm1275) enable adm1272 temperature reporting
hwmon: (adm1275) Allow setting sample averaging
hwmon: (pmbus/adm1275) Fix problems with temperature monitoring on ADM1272
ARM: dts: BCM5301X: fix duplex-full => full-duplex
drm/amdkfd: Fix potential deallocation of previously deallocated memory.
drm/radeon: fix possible division-by-zero errors
amdgpu: validate offset_in_bo of drm_amdgpu_gem_va
RDMA/bnxt_re: wraparound mbox producer index
RDMA/bnxt_re: Avoid calling wake_up threads from spin_lock context
clk: imx: clk-imx8mn: fix memory leak in imx8mn_clocks_probe
clk: imx: clk-imx8mp: improve error handling in imx8mp_clocks_probe()
clk: tegra: tegra124-emc: Fix potential memory leak
ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
drm/msm/dpu: do not enable color-management if DSPPs are not available
drm/msm/dp: Free resources after unregistering them
clk: vc5: check memory returned by kasprintf()
clk: cdce925: check return value of kasprintf()
clk: si5341: Allow different output VDD_SEL values
clk: si5341: Add sysfs properties to allow checking/resetting device faults
clk: si5341: return error if one synth clock registration fails
clk: si5341: check return value of {devm_}kasprintf()
clk: si5341: free unused memory on probe failure
clk: keystone: sci-clk: check return value of kasprintf()
clk: ti: clkctrl: check return value of kasprintf()
drivers: meson: secure-pwrc: always enable DMA domain
ovl: update of dentry revalidate flags after copy up
ASoC: imx-audmix: check return value of devm_kasprintf()
PCI: cadence: Fix Gen2 Link Retraining process
scsi: qedf: Fix NULL dereference in error handling
pinctrl: bcm2835: Handle gpiochip_add_pin_range() errors
PCI/ASPM: Disable ASPM on MFD function removal to avoid use-after-free
scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
PCI: pciehp: Cancel bringup sequence if card is not present
PCI: ftpci100: Release the clock resources
PCI: Add pci_clear_master() stub for non-CONFIG_PCI
perf bench: Use unbuffered output when pipe/tee'ing to a file
perf bench: Add missing setlocale() call to allow usage of %'d style formatting
pinctrl: cherryview: Return correct value if pin in push-pull mode
kcsan: Don't expect 64 bits atomic builtins from 32 bits architectures
perf script: Fixup 'struct evsel_script' method prefix
perf script: Fix allocation of evsel->priv related to per-event dump files
perf dwarf-aux: Fix off-by-one in die_get_varname()
pinctrl: at91-pio4: check return value of devm_kasprintf()
powerpc/powernv/sriov: perform null check on iov before dereferencing iov
mm: rename pud_page_vaddr to pud_pgtable and make it return pmd_t *
mm: rename p4d_page_vaddr to p4d_pgtable and make it return pud_t *
powerpc/book3s64/mm: Fix DirectMap stats in /proc/meminfo
powerpc/mm/dax: Fix the condition when checking if altmap vmemap can cross-boundary
hwrng: virtio - add an internal buffer
hwrng: virtio - don't wait on cleanup
hwrng: virtio - don't waste entropy
hwrng: virtio - always add a pending request
hwrng: virtio - Fix race on data_avail and actual data
crypto: nx - fix build warnings when DEBUG_FS is not enabled
modpost: fix section mismatch message for R_ARM_ABS32
modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
crypto: marvell/cesa - Fix type mismatch warning
modpost: fix off by one in is_executable_section()
ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
dax: Fix dax_mapping_release() use after free
dax: Introduce alloc_dev_dax_id()
hwrng: st - keep clock enabled while hwrng is registered
io_uring: ensure IOPOLL locks around deferred work
USB: serial: option: add LARA-R6 01B PIDs
usb: dwc3: gadget: Propagate core init errors to UDC during pullup
phy: tegra: xusb: Clear the driver reference in usb-phy dev
block: fix signed int overflow in Amiga partition support
block: change all __u32 annotations to __be32 in affs_hardblocks.h
SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
w1: w1_therm: fix locking behavior in convert_t
w1: fix loop in w1_fini()
sh: j2: Use ioremap() to translate device tree address into kernel memory
serial: 8250: omap: Fix freeing of resources on failed register
clk: qcom: gcc-ipq6018: Use floor ops for sdcc clocks
media: usb: Check az6007_read() return value
media: videodev2.h: Fix struct v4l2_input tuner index comment
media: usb: siano: Fix warning due to null work_func_t function pointer
clk: qcom: reset: Allow specifying custom reset delay
clk: qcom: reset: support resetting multiple bits
clk: qcom: ipq6018: fix networking resets
usb: dwc3: qcom: Fix potential memory leak
usb: gadget: u_serial: Add null pointer check in gserial_suspend
extcon: Fix kernel doc of property fields to avoid warnings
extcon: Fix kernel doc of property capability fields to avoid warnings
usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
usb: hide unused usbfs_notify_suspend/resume functions
serial: 8250: lock port for stop_rx() in omap8250_irq()
serial: 8250: lock port for UART_IER access in omap8250_irq()
kernfs: fix missing kernfs_idr_lock to remove an ID from the IDR
coresight: Fix loss of connection info when a module is unloaded
mfd: rt5033: Drop rt5033-battery sub-device
media: venus: helpers: Fix ALIGN() of non power of two
media: atomisp: gmin_platform: fix out_len in gmin_get_config_dsm_var()
KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
usb: dwc3: qcom: Release the correct resources in dwc3_qcom_remove()
usb: dwc3: qcom: Fix an error handling path in dwc3_qcom_probe()
usb: common: usb-conn-gpio: Set last role to unknown before initial detection
usb: dwc3-meson-g12a: Fix an error handling path in dwc3_meson_g12a_probe()
mfd: intel-lpss: Add missing check for platform_get_resource
Revert "usb: common: usb-conn-gpio: Set last role to unknown before initial detection"
serial: 8250_omap: Use force_suspend and resume for system suspend
test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
mfd: stmfx: Fix error path in stmfx_chip_init
mfd: stmfx: Nullify stmfx->vdd in case of error
KVM: s390: vsie: fix the length of APCB bitmap
mfd: stmpe: Only disable the regulators if they are enabled
phy: tegra: xusb: check return value of devm_kzalloc()
pwm: imx-tpm: force 'real_period' to be zero in suspend
pwm: sysfs: Do not apply state to already disabled PWMs
rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
media: cec: i2c: ch7322: also select REGMAP
sctp: fix potential deadlock on &net->sctp.addr_wq_lock
Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
net: dsa: vsc73xx: fix MTU configuration
spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
f2fs: fix error path handling in truncate_dnode()
octeontx2-af: Fix mapping for NIX block from CGX connection
powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
tcp: annotate data races in __tcp_oow_rate_limited()
xsk: Honor SO_BINDTODEVICE on bind
net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
pptp: Fix fib lookup calls.
net: dsa: tag_sja1105: fix MAC DA patching from meta frames
s390/qeth: Fix vipa deletion
sh: dma: Fix DMA channel offset calculation
apparmor: fix missing error check for rhashtable_insert_fast
i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
i2c: xiic: Don't try to handle more interrupt events after error
ALSA: jack: Fix mutex call in snd_jack_report()
i2c: qup: Add missing unwind goto in qup_i2c_probe()
NFSD: add encoding of op_recall flag for write delegation
io_uring: wait interruptibly for request completions on exit
mmc: core: disable TRIM on Kingston EMMC04G-M627
mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
mmc: mmci: Set PROBE_PREFER_ASYNCHRONOUS
mmc: sdhci: fix DMA configure compatibility issue when 64bit DMA mode is used.
bcache: fixup btree_cache_wait list damage
bcache: Remove unnecessary NULL point check in node allocations
bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
um: Use HOST_DIR for mrproper
integrity: Fix possible multiple allocation in integrity_inode_get()
autofs: use flexible array in ioctl structure
shmem: use ramfs_kill_sb() for kill_sb method of ramfs-based tmpfs
jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
fs: avoid empty option when generating legacy mount string
ext4: Remove ext4 locking of moved directory
Revert "f2fs: fix potential corruption when moving a directory"
fs: Establish locking order for unrelated directories
fs: Lock moved directories
btrfs: add handling for RAID1C23/DUP to btrfs_reduce_alloc_profile
btrfs: fix race when deleting quota root from the dirty cow roots list
ASoC: mediatek: mt8173: Fix irq error path
ASoC: mediatek: mt8173: Fix snd_soc_component_initialize error path
ARM: orion5x: fix d2net gpio initialization
leds: trigger: netdev: Recheck NETDEV_LED_MODE_LINKUP on dev rename
fs: no need to check source
fanotify: disallow mount/sb marks on kernel internal pseudo fs
tpm, tpm_tis: Claim locality in interrupt handler
selftests/bpf: Add verifier test for PTR_TO_MEM spill
block: add overflow checks for Amiga partition support
sh: pgtable-3level: Fix cast to pointer from integer of different size
netfilter: nf_tables: use net_generic infra for transaction data
netfilter: nf_tables: add rescheduling points during loop detection walks
netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
netfilter: nf_tables: fix chain binding transaction logic
netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
netfilter: nf_tables: reject unbound anonymous set before commit phase
netfilter: nf_tables: reject unbound chain set before commit phase
netfilter: nftables: rename set element data activation/deactivation functions
netfilter: nf_tables: drop map element references from preparation phase
netfilter: nf_tables: unbind non-anonymous set if rule construction fails
netfilter: nf_tables: fix scheduling-while-atomic splat
netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
netfilter: nf_tables: do not ignore genmask when looking up chain by id
netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
wireguard: queueing: use saner cpu selection wrapping
wireguard: netlink: send staged packets when setting initial private key
tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
rcu-tasks: Mark ->trc_reader_nesting data races
rcu-tasks: Mark ->trc_reader_special.b.need_qs data races
rcu-tasks: Simplify trc_read_check_handler() atomic operations
block/partition: fix signedness issue for Amiga partitions
io_uring: Use io_schedule* in cqring wait
io_uring: add reschedule point to handle_tw_list()
net: lan743x: Don't sleep in atomic context
workqueue: clean up WORK_* constant types, clarify masking
drm/panel: simple: Add connector_type for innolux_at043tn24
drm/panel: simple: Add Powertip PH800480T013 drm_display_mode flags
igc: Remove delay during TX ring configuration
net/mlx5e: fix double free in mlx5e_destroy_flow_table
net/mlx5e: Check for NOT_READY flag state after locking
igc: set TP bit in 'supported' and 'advertising' fields of ethtool_link_ksettings
scsi: qla2xxx: Fix error code in qla2x00_start_sp()
net: mvneta: fix txq_map in case of txq_number==1
net/sched: cls_fw: Fix improper refcount update leads to use-after-free
gve: Set default duplex configuration to full
ionic: remove WARN_ON to prevent panic_on_warn
net: bgmac: postpone turning IRQs off to avoid SoC hangs
net: prevent skb corruption on frag list segmentation
icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
udp6: fix udp6_ehashfn() typo
ntb: idt: Fix error handling in idt_pci_driver_init()
NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
NTB: ntb_transport: fix possible memory leak while device_register() fails
NTB: ntb_tool: Add check for devm_kcalloc
ipv6/addrconf: fix a potential refcount underflow for idev
platform/x86: wmi: remove unnecessary argument
platform/x86: wmi: use guid_t and guid_equal()
platform/x86: wmi: move variables
platform/x86: wmi: Break possible infinite loop when parsing GUID
igc: Fix launchtime before start of cycle
igc: Fix inserting of empty frame for launchtime
riscv: bpf: Move bpf_jit_alloc_exec() and bpf_jit_free_exec() to core
riscv: bpf: Avoid breaking W^X
bpf, riscv: Support riscv jit to provide bpf_line_info
riscv, bpf: Fix inconsistent JIT image generation
erofs: avoid infinite loop in z_erofs_do_read_page() when reading beyond EOF
wifi: airo: avoid uninitialized warning in airo_get_rate()
net/sched: flower: Ensure both minimum and maximum ports are specified
netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write()
net/sched: make psched_mtu() RTNL-less safe
net/sched: sch_qfq: refactor parsing of netlink parameters
net/sched: sch_qfq: account for stab overhead in qfq_enqueue
nvme-pci: fix DMA direction of unmapping integrity data
f2fs: fix to avoid NULL pointer dereference f2fs_write_end_io()
pinctrl: amd: Fix mistake in handling clearing pins at startup
pinctrl: amd: Detect internal GPIO0 debounce handling
pinctrl: amd: Only use special debounce behavior for GPIO 0
tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
mtd: rawnand: meson: fix unaligned DMA buffers handling
net: bcmgenet: Ensure MDIO unregistration has clocks enabled
powerpc: Fail build if using recordmcount with binutils v2.37
misc: fastrpc: Create fastrpc scalar with correct buffer count
erofs: fix compact 4B support for 16k block size
MIPS: Loongson: Fix cpu_probe_loongson() again
ext4: Fix reusing stale buffer heads from last failed mounting
ext4: fix wrong unit use in ext4_mb_clear_bb
ext4: get block from bh in ext4_free_blocks for fast commit replay
ext4: fix wrong unit use in ext4_mb_new_blocks
ext4: only update i_reserved_data_blocks on successful block allocation
jfs: jfs_dmap: Validate db_l2nbperpage while mounting
hwrng: imx-rngc - fix the timeout for init and self check
PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
PCI: qcom: Disable write access to read only registers for IP v2.3.3
PCI: rockchip: Assert PCI Configuration Enable bit after probe
PCI: rockchip: Write PCI Device ID to correct register
PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
PCI: rockchip: Use u32 variable to access 32-bit registers
PCI: rockchip: Set address alignment for endpoint mode
misc: pci_endpoint_test: Free IRQs before removing the device
misc: pci_endpoint_test: Re-init completion for every test
md/raid0: add discard support for the 'original' layout
fs: dlm: return positive pid value for F_GETLK
drm/atomic: Allow vblank-enabled + self-refresh "disable"
drm/rockchip: vop: Leave vblank enabled in self-refresh
drm/amd/display: Correct `DMUB_FW_VERSION` macro
serial: atmel: don't enable IRQs prematurely
tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
firmware: stratix10-svc: Fix a potential resource leak in svc_create_memory_pool()
ceph: don't let check_caps skip sending responses for revoke msgs
xhci: Fix resume issue of some ZHAOXIN hosts
xhci: Fix TRB prefetch issue of ZHAOXIN hosts
xhci: Show ZHAOXIN xHCI root hub speed correctly
meson saradc: fix clock divider mask length
Revert "8250: add support for ASIX devices with a FIFO bug"
s390/decompressor: fix misaligned symbol build error
tracing/histograms: Add histograms to hist_vars if they have referenced variables
samples: ftrace: Save required argument registers in sample trampolines
net: ena: fix shift-out-of-bounds in exponential backoff
ring-buffer: Fix deadloop issue on reading trace_pipe
xtensa: ISS: fix call to split_if_spec
tracing: Fix null pointer dereference in tracing_err_log_open()
tracing/probes: Fix not to count error code to total length
scsi: qla2xxx: Wait for io return on terminate rport
scsi: qla2xxx: Array index may go out of bound
scsi: qla2xxx: Fix buffer overrun
scsi: qla2xxx: Fix potential NULL pointer dereference
scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
scsi: qla2xxx: Correct the index of array
scsi: qla2xxx: Pointer may be dereferenced
scsi: qla2xxx: Remove unused nvme_ls_waitq wait queue
net/sched: sch_qfq: reintroduce lmax bound check for MTU
RDMA/cma: Ensure rdma_addr_cancel() happens before issuing more requests
drm/atomic: Fix potential use-after-free in nonblocking commits
ALSA: hda/realtek - remove 3k pull low procedure
ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxx
keys: Fix linking a duplicate key to a keyring's assoc_array
perf probe: Add test for regression introduced by switch to die_get_decl_file()
btrfs: fix warning when putting transaction with qgroups enabled after abort
fuse: revalidate: don't invalidate if interrupted
selftests: tc: set timeout to 15 minutes
selftests: tc: add 'ct' action kconfig dep
regmap: Drop initial version of maximum transfer length fixes
regmap: Account for register length in SMBus I/O limits
can: bcm: Fix UAF in bcm_proc_show()
drm/client: Fix memory leak in drm_client_target_cloned
drm/client: Fix memory leak in drm_client_modeset_probe
ASoC: fsl_sai: Disable bit clock with transmitter
ext4: correct inline offset when handling xattrs in inode body
debugobjects: Recheck debug_objects_enabled before reporting
nbd: Add the maximum limit of allocated index in nbd_dev_add
md: fix data corruption for raid456 when reshape restart while grow up
md/raid10: prevent soft lockup while flush writes
posix-timers: Ensure timer ID search-loop limit is valid
btrfs: add xxhash to fast checksum implementations
ACPI: button: Add lid disable DMI quirk for Nextbook Ares 8A
ACPI: video: Add backlight=native DMI quirk for Apple iMac11,3
ACPI: video: Add backlight=native DMI quirk for Lenovo ThinkPad X131e (3371 AMD version)
arm64: set __exception_irq_entry with __irq_entry as a default
arm64: mm: fix VA-range sanity check
sched/fair: Don't balance task to its current running CPU
wifi: ath11k: fix registration of 6Ghz-only phy without the full channel range
bpf: Address KCSAN report on bpf_lru_list
devlink: report devlink_port_type_warn source device
wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
wifi: iwlwifi: mvm: avoid baid size integer overflow
igb: Fix igb_down hung on surprise removal
spi: bcm63xx: fix max prepend length
fbdev: imxfb: warn about invalid left/right margin
pinctrl: amd: Use amd_pinconf_set() for all config options
net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
bridge: Add extack warning when enabling STP in netns.
iavf: Fix use-after-free in free_netdev
iavf: Fix out-of-bounds when setting channels on remove
security: keys: Modify mismatched function name
octeontx2-pf: Dont allocate BPIDs for LBK interfaces
tcp: annotate data-races around tcp_rsk(req)->ts_recent
net: ipv4: Use kfree_sensitive instead of kfree
net:ipv6: check return value of pskb_trim()
Revert "tcp: avoid the lookup process failing to get sk in ehash table"
fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
llc: Don't drop packet from non-root netns.
netfilter: nf_tables: fix spurious set element insertion failure
netfilter: nf_tables: can't schedule in nft_chain_validate
netfilter: nft_set_pipapo: fix improper element removal
netfilter: nf_tables: skip bound chain in netns release path
netfilter: nf_tables: skip bound chain on rule flush
tcp: annotate data-races around tp->tcp_tx_delay
tcp: annotate data-races around tp->keepalive_time
tcp: annotate data-races around tp->keepalive_intvl
tcp: annotate data-races around tp->keepalive_probes
net: Introduce net.ipv4.tcp_migrate_req.
tcp: Fix data-races around sysctl_tcp_syn(ack)?_retries.
tcp: annotate data-races around icsk->icsk_syn_retries
tcp: annotate data-races around tp->linger2
tcp: annotate data-races around rskq_defer_accept
tcp: annotate data-races around tp->notsent_lowat
tcp: annotate data-races around icsk->icsk_user_timeout
tcp: annotate data-races around fastopenq.max_qlen
net: phy: prevent stale pointer dereference in phy_init()
tracing/histograms: Return an error if we fail to add histogram to hist_vars list
tracing: Fix memory leak of iter->temp when reading trace_pipe
ftrace: Store the order of pages allocated in ftrace_page
ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
Linux 5.10.188
Change-Id: Ibcc1adc43df5b8f649b12078eedd5d4f57de4578
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
535 lines
17 KiB
C
535 lines
17 KiB
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* INET An implementation of the TCP/IP protocol suite for the LINUX
|
|
* operating system. INET is implemented using the BSD Socket
|
|
* interface as the means of communication with the user level.
|
|
*
|
|
* Definitions for the TCP protocol.
|
|
*
|
|
* Version: @(#)tcp.h 1.0.2 04/28/93
|
|
*
|
|
* Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
|
|
*/
|
|
#ifndef _LINUX_TCP_H
|
|
#define _LINUX_TCP_H
|
|
|
|
|
|
#include <linux/skbuff.h>
|
|
#include <linux/win_minmax.h>
|
|
#include <linux/android_kabi.h>
|
|
#include <net/sock.h>
|
|
#include <net/inet_connection_sock.h>
|
|
#include <net/inet_timewait_sock.h>
|
|
#include <uapi/linux/tcp.h>
|
|
|
|
static inline struct tcphdr *tcp_hdr(const struct sk_buff *skb)
|
|
{
|
|
return (struct tcphdr *)skb_transport_header(skb);
|
|
}
|
|
|
|
static inline unsigned int __tcp_hdrlen(const struct tcphdr *th)
|
|
{
|
|
return th->doff * 4;
|
|
}
|
|
|
|
static inline unsigned int tcp_hdrlen(const struct sk_buff *skb)
|
|
{
|
|
return __tcp_hdrlen(tcp_hdr(skb));
|
|
}
|
|
|
|
static inline struct tcphdr *inner_tcp_hdr(const struct sk_buff *skb)
|
|
{
|
|
return (struct tcphdr *)skb_inner_transport_header(skb);
|
|
}
|
|
|
|
static inline unsigned int inner_tcp_hdrlen(const struct sk_buff *skb)
|
|
{
|
|
return inner_tcp_hdr(skb)->doff * 4;
|
|
}
|
|
|
|
static inline unsigned int tcp_optlen(const struct sk_buff *skb)
|
|
{
|
|
return (tcp_hdr(skb)->doff - 5) * 4;
|
|
}
|
|
|
|
/* TCP Fast Open */
|
|
#define TCP_FASTOPEN_COOKIE_MIN 4 /* Min Fast Open Cookie size in bytes */
|
|
#define TCP_FASTOPEN_COOKIE_MAX 16 /* Max Fast Open Cookie size in bytes */
|
|
#define TCP_FASTOPEN_COOKIE_SIZE 8 /* the size employed by this impl. */
|
|
|
|
/* TCP Fast Open Cookie as stored in memory */
|
|
struct tcp_fastopen_cookie {
|
|
__le64 val[DIV_ROUND_UP(TCP_FASTOPEN_COOKIE_MAX, sizeof(u64))];
|
|
s8 len;
|
|
bool exp; /* In RFC6994 experimental option format */
|
|
};
|
|
|
|
/* This defines a selective acknowledgement block. */
|
|
struct tcp_sack_block_wire {
|
|
__be32 start_seq;
|
|
__be32 end_seq;
|
|
};
|
|
|
|
struct tcp_sack_block {
|
|
u32 start_seq;
|
|
u32 end_seq;
|
|
};
|
|
|
|
/*These are used to set the sack_ok field in struct tcp_options_received */
|
|
#define TCP_SACK_SEEN (1 << 0) /*1 = peer is SACK capable, */
|
|
#define TCP_DSACK_SEEN (1 << 2) /*1 = DSACK was received from peer*/
|
|
|
|
struct tcp_options_received {
|
|
/* PAWS/RTTM data */
|
|
int ts_recent_stamp;/* Time we stored ts_recent (for aging) */
|
|
u32 ts_recent; /* Time stamp to echo next */
|
|
u32 rcv_tsval; /* Time stamp value */
|
|
u32 rcv_tsecr; /* Time stamp echo reply */
|
|
u16 saw_tstamp : 1, /* Saw TIMESTAMP on last packet */
|
|
tstamp_ok : 1, /* TIMESTAMP seen on SYN packet */
|
|
dsack : 1, /* D-SACK is scheduled */
|
|
wscale_ok : 1, /* Wscale seen on SYN packet */
|
|
sack_ok : 3, /* SACK seen on SYN packet */
|
|
smc_ok : 1, /* SMC seen on SYN packet */
|
|
snd_wscale : 4, /* Window scaling received from sender */
|
|
rcv_wscale : 4; /* Window scaling to send to receiver */
|
|
u8 saw_unknown:1, /* Received unknown option */
|
|
unused:7;
|
|
u8 num_sacks; /* Number of SACK blocks */
|
|
u16 user_mss; /* mss requested by user in ioctl */
|
|
u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
|
|
};
|
|
|
|
static inline void tcp_clear_options(struct tcp_options_received *rx_opt)
|
|
{
|
|
rx_opt->tstamp_ok = rx_opt->sack_ok = 0;
|
|
rx_opt->wscale_ok = rx_opt->snd_wscale = 0;
|
|
#if IS_ENABLED(CONFIG_SMC)
|
|
rx_opt->smc_ok = 0;
|
|
#endif
|
|
}
|
|
|
|
/* This is the max number of SACKS that we'll generate and process. It's safe
|
|
* to increase this, although since:
|
|
* size = TCPOLEN_SACK_BASE_ALIGNED (4) + n * TCPOLEN_SACK_PERBLOCK (8)
|
|
* only four options will fit in a standard TCP header */
|
|
#define TCP_NUM_SACKS 4
|
|
|
|
struct tcp_request_sock_ops;
|
|
|
|
struct tcp_request_sock {
|
|
struct inet_request_sock req;
|
|
const struct tcp_request_sock_ops *af_specific;
|
|
u64 snt_synack; /* first SYNACK sent time */
|
|
bool tfo_listener;
|
|
bool is_mptcp;
|
|
#if IS_ENABLED(CONFIG_MPTCP)
|
|
bool drop_req;
|
|
#endif
|
|
u32 txhash;
|
|
u32 rcv_isn;
|
|
u32 snt_isn;
|
|
u32 ts_off;
|
|
u32 last_oow_ack_time; /* last SYNACK */
|
|
u32 rcv_nxt; /* the ack # by SYNACK. For
|
|
* FastOpen it's the seq#
|
|
* after data-in-SYN.
|
|
*/
|
|
u8 syn_tos;
|
|
};
|
|
|
|
static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
|
|
{
|
|
return (struct tcp_request_sock *)req;
|
|
}
|
|
|
|
struct tcp_sock {
|
|
/* inet_connection_sock has to be the first member of tcp_sock */
|
|
struct inet_connection_sock inet_conn;
|
|
u16 tcp_header_len; /* Bytes of tcp header to send */
|
|
u16 gso_segs; /* Max number of segs per GSO packet */
|
|
|
|
/*
|
|
* Header prediction flags
|
|
* 0x5?10 << 16 + snd_wnd in net byte order
|
|
*/
|
|
__be32 pred_flags;
|
|
|
|
/*
|
|
* RFC793 variables by their proper names. This means you can
|
|
* read the code and the spec side by side (and laugh ...)
|
|
* See RFC793 and RFC1122. The RFC writes these in capitals.
|
|
*/
|
|
u64 bytes_received; /* RFC4898 tcpEStatsAppHCThruOctetsReceived
|
|
* sum(delta(rcv_nxt)), or how many bytes
|
|
* were acked.
|
|
*/
|
|
u32 segs_in; /* RFC4898 tcpEStatsPerfSegsIn
|
|
* total number of segments in.
|
|
*/
|
|
u32 data_segs_in; /* RFC4898 tcpEStatsPerfDataSegsIn
|
|
* total number of data segments in.
|
|
*/
|
|
u32 rcv_nxt; /* What we want to receive next */
|
|
u32 copied_seq; /* Head of yet unread data */
|
|
u32 rcv_wup; /* rcv_nxt on last window update sent */
|
|
u32 snd_nxt; /* Next sequence we send */
|
|
u32 segs_out; /* RFC4898 tcpEStatsPerfSegsOut
|
|
* The total number of segments sent.
|
|
*/
|
|
u32 data_segs_out; /* RFC4898 tcpEStatsPerfDataSegsOut
|
|
* total number of data segments sent.
|
|
*/
|
|
u64 bytes_sent; /* RFC4898 tcpEStatsPerfHCDataOctetsOut
|
|
* total number of data bytes sent.
|
|
*/
|
|
u64 bytes_acked; /* RFC4898 tcpEStatsAppHCThruOctetsAcked
|
|
* sum(delta(snd_una)), or how many bytes
|
|
* were acked.
|
|
*/
|
|
u32 dsack_dups; /* RFC4898 tcpEStatsStackDSACKDups
|
|
* total number of DSACK blocks received
|
|
*/
|
|
u32 snd_una; /* First byte we want an ack for */
|
|
u32 snd_sml; /* Last byte of the most recently transmitted small packet */
|
|
u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
|
|
u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
|
|
u32 last_oow_ack_time; /* timestamp of last out-of-window ACK */
|
|
u32 compressed_ack_rcv_nxt;
|
|
|
|
u32 tsoffset; /* timestamp offset */
|
|
|
|
struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
|
|
struct list_head tsorted_sent_queue; /* time-sorted sent but un-SACKed skbs */
|
|
|
|
u32 snd_wl1; /* Sequence for window update */
|
|
u32 snd_wnd; /* The window we expect to receive */
|
|
u32 max_window; /* Maximal window ever seen from peer */
|
|
u32 mss_cache; /* Cached effective mss, not including SACKS */
|
|
|
|
u32 window_clamp; /* Maximal window to advertise */
|
|
u32 rcv_ssthresh; /* Current window clamp */
|
|
|
|
/* Information of the most recently (s)acked skb */
|
|
struct tcp_rack {
|
|
u64 mstamp; /* (Re)sent time of the skb */
|
|
u32 rtt_us; /* Associated RTT */
|
|
u32 end_seq; /* Ending TCP sequence of the skb */
|
|
u32 last_delivered; /* tp->delivered at last reo_wnd adj */
|
|
u8 reo_wnd_steps; /* Allowed reordering window */
|
|
#define TCP_RACK_RECOVERY_THRESH 16
|
|
u8 reo_wnd_persist:5, /* No. of recovery since last adj */
|
|
dsack_seen:1, /* Whether DSACK seen after last adj */
|
|
advanced:1; /* mstamp advanced since last lost marking */
|
|
} rack;
|
|
u16 advmss; /* Advertised MSS */
|
|
u8 compressed_ack;
|
|
u8 dup_ack_counter:2,
|
|
tlp_retrans:1, /* TLP is a retransmission */
|
|
unused:5;
|
|
u32 chrono_start; /* Start time in jiffies of a TCP chrono */
|
|
u32 chrono_stat[3]; /* Time in jiffies for chrono_stat stats */
|
|
u8 chrono_type:2, /* current chronograph type */
|
|
rate_app_limited:1, /* rate_{delivered,interval_us} limited? */
|
|
fastopen_connect:1, /* FASTOPEN_CONNECT sockopt */
|
|
fastopen_no_cookie:1, /* Allow send/recv SYN+data without a cookie */
|
|
is_sack_reneg:1, /* in recovery from loss with SACK reneg? */
|
|
fastopen_client_fail:2; /* reason why fastopen failed */
|
|
u8 nonagle : 4,/* Disable Nagle algorithm? */
|
|
thin_lto : 1,/* Use linear timeouts for thin streams */
|
|
recvmsg_inq : 1,/* Indicate # of bytes in queue upon recvmsg */
|
|
repair : 1,
|
|
frto : 1;/* F-RTO (RFC5682) activated in CA_Loss */
|
|
u8 repair_queue;
|
|
u8 save_syn:2, /* Save headers of SYN packet */
|
|
syn_data:1, /* SYN includes data */
|
|
syn_fastopen:1, /* SYN includes Fast Open option */
|
|
syn_fastopen_exp:1,/* SYN includes Fast Open exp. option */
|
|
syn_fastopen_ch:1, /* Active TFO re-enabling probe */
|
|
syn_data_acked:1,/* data in SYN is acked by SYN-ACK */
|
|
is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */
|
|
u32 tlp_high_seq; /* snd_nxt at the time of TLP */
|
|
|
|
u32 tcp_tx_delay; /* delay (in usec) added to TX packets */
|
|
u64 tcp_wstamp_ns; /* departure time for next sent data packet */
|
|
u64 tcp_clock_cache; /* cache last tcp_clock_ns() (see tcp_mstamp_refresh()) */
|
|
|
|
/* RTT measurement */
|
|
u64 tcp_mstamp; /* most recent packet received/sent */
|
|
u32 srtt_us; /* smoothed round trip time << 3 in usecs */
|
|
u32 mdev_us; /* medium deviation */
|
|
u32 mdev_max_us; /* maximal mdev for the last rtt period */
|
|
u32 rttvar_us; /* smoothed mdev_max */
|
|
u32 rtt_seq; /* sequence number to update rttvar */
|
|
struct minmax rtt_min;
|
|
|
|
u32 packets_out; /* Packets which are "in flight" */
|
|
u32 retrans_out; /* Retransmitted packets out */
|
|
u32 max_packets_out; /* max packets_out in last window */
|
|
/* GENKSYMS hack to preserve the ABI because of f4ce91ce12a7 ("tcp: fix
|
|
* tcp_cwnd_validate() to not forget is_cwnd_limited")
|
|
*/
|
|
#ifndef __GENKSYMS__
|
|
u32 cwnd_usage_seq; /* right edge of cwnd usage tracking flight */
|
|
#else
|
|
u32 max_packets_seq; /* right edge of max_packets_out flight */
|
|
#endif
|
|
|
|
u16 urg_data; /* Saved octet of OOB data and control flags */
|
|
u8 ecn_flags; /* ECN status bits. */
|
|
u8 keepalive_probes; /* num of allowed keep alive probes */
|
|
u32 reordering; /* Packet reordering metric. */
|
|
u32 reord_seen; /* number of data packet reordering events */
|
|
u32 snd_up; /* Urgent pointer */
|
|
|
|
/*
|
|
* Options received (usually on last packet, some only on SYN packets).
|
|
*/
|
|
struct tcp_options_received rx_opt;
|
|
|
|
/*
|
|
* Slow start and congestion control (see also Nagle, and Karn & Partridge)
|
|
*/
|
|
u32 snd_ssthresh; /* Slow start size threshold */
|
|
u32 snd_cwnd; /* Sending congestion window */
|
|
u32 snd_cwnd_cnt; /* Linear increase counter */
|
|
u32 snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
|
|
u32 snd_cwnd_used;
|
|
u32 snd_cwnd_stamp;
|
|
u32 prior_cwnd; /* cwnd right before starting loss recovery */
|
|
u32 prr_delivered; /* Number of newly delivered packets to
|
|
* receiver in Recovery. */
|
|
u32 prr_out; /* Total number of pkts sent during Recovery. */
|
|
u32 delivered; /* Total data packets delivered incl. rexmits */
|
|
u32 delivered_ce; /* Like the above but only ECE marked packets */
|
|
u32 lost; /* Total data packets lost incl. rexmits */
|
|
u32 app_limited; /* limited until "delivered" reaches this val */
|
|
u64 first_tx_mstamp; /* start of window send phase */
|
|
u64 delivered_mstamp; /* time we reached "delivered" */
|
|
u32 rate_delivered; /* saved rate sample: packets delivered */
|
|
u32 rate_interval_us; /* saved rate sample: time elapsed */
|
|
|
|
u32 rcv_wnd; /* Current receiver window */
|
|
u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
|
|
u32 notsent_lowat; /* TCP_NOTSENT_LOWAT */
|
|
u32 pushed_seq; /* Last pushed seq, required to talk to windows */
|
|
u32 lost_out; /* Lost packets */
|
|
u32 sacked_out; /* SACK'd packets */
|
|
|
|
struct hrtimer pacing_timer;
|
|
struct hrtimer compressed_ack_timer;
|
|
|
|
/* from STCP, retrans queue hinting */
|
|
struct sk_buff* lost_skb_hint;
|
|
struct sk_buff *retransmit_skb_hint;
|
|
|
|
/* OOO segments go in this rbtree. Socket lock must be held. */
|
|
struct rb_root out_of_order_queue;
|
|
struct sk_buff *ooo_last_skb; /* cache rb_last(out_of_order_queue) */
|
|
|
|
/* SACKs data, these 2 need to be together (see tcp_options_write) */
|
|
struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
|
|
struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
|
|
|
|
struct tcp_sack_block recv_sack_cache[4];
|
|
|
|
struct sk_buff *highest_sack; /* skb just after the highest
|
|
* skb with SACKed bit set
|
|
* (validity guaranteed only if
|
|
* sacked_out > 0)
|
|
*/
|
|
|
|
int lost_cnt_hint;
|
|
|
|
u32 prior_ssthresh; /* ssthresh saved at recovery start */
|
|
u32 high_seq; /* snd_nxt at onset of congestion */
|
|
|
|
u32 retrans_stamp; /* Timestamp of the last retransmit,
|
|
* also used in SYN-SENT to remember stamp of
|
|
* the first SYN. */
|
|
u32 undo_marker; /* snd_una upon a new recovery episode. */
|
|
int undo_retrans; /* number of undoable retransmissions. */
|
|
u64 bytes_retrans; /* RFC4898 tcpEStatsPerfOctetsRetrans
|
|
* Total data bytes retransmitted
|
|
*/
|
|
u32 total_retrans; /* Total retransmits for entire connection */
|
|
|
|
u32 urg_seq; /* Seq of received urgent pointer */
|
|
unsigned int keepalive_time; /* time before keep alive takes place */
|
|
unsigned int keepalive_intvl; /* time interval between keep alive probes */
|
|
|
|
int linger2;
|
|
|
|
|
|
/* Sock_ops bpf program related variables */
|
|
#ifdef CONFIG_BPF
|
|
u8 bpf_sock_ops_cb_flags; /* Control calling BPF programs
|
|
* values defined in uapi/linux/tcp.h
|
|
*/
|
|
#define BPF_SOCK_OPS_TEST_FLAG(TP, ARG) (TP->bpf_sock_ops_cb_flags & ARG)
|
|
#else
|
|
#define BPF_SOCK_OPS_TEST_FLAG(TP, ARG) 0
|
|
#endif
|
|
|
|
u16 timeout_rehash; /* Timeout-triggered rehash attempts */
|
|
|
|
u32 rcv_ooopack; /* Received out-of-order packets, for tcpinfo */
|
|
|
|
/* Receiver side RTT estimation */
|
|
u32 rcv_rtt_last_tsecr;
|
|
struct {
|
|
u32 rtt_us;
|
|
u32 seq;
|
|
u64 time;
|
|
} rcv_rtt_est;
|
|
|
|
/* Receiver queue space */
|
|
struct {
|
|
u32 space;
|
|
u32 seq;
|
|
u64 time;
|
|
} rcvq_space;
|
|
|
|
/* TCP-specific MTU probe information. */
|
|
struct {
|
|
u32 probe_seq_start;
|
|
u32 probe_seq_end;
|
|
} mtu_probe;
|
|
u32 mtu_info; /* We received an ICMP_FRAG_NEEDED / ICMPV6_PKT_TOOBIG
|
|
* while socket was owned by user.
|
|
*/
|
|
#if IS_ENABLED(CONFIG_MPTCP)
|
|
bool is_mptcp;
|
|
#endif
|
|
#if IS_ENABLED(CONFIG_SMC)
|
|
bool syn_smc; /* SYN includes SMC */
|
|
#endif
|
|
|
|
#ifdef CONFIG_TCP_MD5SIG
|
|
/* TCP AF-Specific parts; only used by MD5 Signature support so far */
|
|
const struct tcp_sock_af_ops *af_specific;
|
|
|
|
/* TCP MD5 Signature Option information */
|
|
struct tcp_md5sig_info __rcu *md5sig_info;
|
|
#endif
|
|
|
|
/* TCP fastopen related information */
|
|
struct tcp_fastopen_request *fastopen_req;
|
|
/* fastopen_rsk points to request_sock that resulted in this big
|
|
* socket. Used to retransmit SYNACKs etc.
|
|
*/
|
|
struct request_sock __rcu *fastopen_rsk;
|
|
struct saved_syn *saved_syn;
|
|
|
|
ANDROID_KABI_RESERVE(1);
|
|
};
|
|
|
|
enum tsq_enum {
|
|
TSQ_THROTTLED,
|
|
TSQ_QUEUED,
|
|
TCP_TSQ_DEFERRED, /* tcp_tasklet_func() found socket was owned */
|
|
TCP_WRITE_TIMER_DEFERRED, /* tcp_write_timer() found socket was owned */
|
|
TCP_DELACK_TIMER_DEFERRED, /* tcp_delack_timer() found socket was owned */
|
|
TCP_MTU_REDUCED_DEFERRED, /* tcp_v{4|6}_err() could not call
|
|
* tcp_v{4|6}_mtu_reduced()
|
|
*/
|
|
};
|
|
|
|
enum tsq_flags {
|
|
TSQF_THROTTLED = (1UL << TSQ_THROTTLED),
|
|
TSQF_QUEUED = (1UL << TSQ_QUEUED),
|
|
TCPF_TSQ_DEFERRED = (1UL << TCP_TSQ_DEFERRED),
|
|
TCPF_WRITE_TIMER_DEFERRED = (1UL << TCP_WRITE_TIMER_DEFERRED),
|
|
TCPF_DELACK_TIMER_DEFERRED = (1UL << TCP_DELACK_TIMER_DEFERRED),
|
|
TCPF_MTU_REDUCED_DEFERRED = (1UL << TCP_MTU_REDUCED_DEFERRED),
|
|
};
|
|
|
|
static inline struct tcp_sock *tcp_sk(const struct sock *sk)
|
|
{
|
|
return (struct tcp_sock *)sk;
|
|
}
|
|
|
|
struct tcp_timewait_sock {
|
|
struct inet_timewait_sock tw_sk;
|
|
#define tw_rcv_nxt tw_sk.__tw_common.skc_tw_rcv_nxt
|
|
#define tw_snd_nxt tw_sk.__tw_common.skc_tw_snd_nxt
|
|
u32 tw_rcv_wnd;
|
|
u32 tw_ts_offset;
|
|
u32 tw_ts_recent;
|
|
|
|
/* The time we sent the last out-of-window ACK: */
|
|
u32 tw_last_oow_ack_time;
|
|
|
|
int tw_ts_recent_stamp;
|
|
u32 tw_tx_delay;
|
|
#ifdef CONFIG_TCP_MD5SIG
|
|
struct tcp_md5sig_key *tw_md5_key;
|
|
#endif
|
|
};
|
|
|
|
static inline struct tcp_timewait_sock *tcp_twsk(const struct sock *sk)
|
|
{
|
|
return (struct tcp_timewait_sock *)sk;
|
|
}
|
|
|
|
static inline bool tcp_passive_fastopen(const struct sock *sk)
|
|
{
|
|
return sk->sk_state == TCP_SYN_RECV &&
|
|
rcu_access_pointer(tcp_sk(sk)->fastopen_rsk) != NULL;
|
|
}
|
|
|
|
static inline void fastopen_queue_tune(struct sock *sk, int backlog)
|
|
{
|
|
struct request_sock_queue *queue = &inet_csk(sk)->icsk_accept_queue;
|
|
int somaxconn = READ_ONCE(sock_net(sk)->core.sysctl_somaxconn);
|
|
|
|
WRITE_ONCE(queue->fastopenq.max_qlen, min_t(unsigned int, backlog, somaxconn));
|
|
}
|
|
|
|
static inline void tcp_move_syn(struct tcp_sock *tp,
|
|
struct request_sock *req)
|
|
{
|
|
tp->saved_syn = req->saved_syn;
|
|
req->saved_syn = NULL;
|
|
}
|
|
|
|
static inline void tcp_saved_syn_free(struct tcp_sock *tp)
|
|
{
|
|
kfree(tp->saved_syn);
|
|
tp->saved_syn = NULL;
|
|
}
|
|
|
|
static inline u32 tcp_saved_syn_len(const struct saved_syn *saved_syn)
|
|
{
|
|
return saved_syn->mac_hdrlen + saved_syn->network_hdrlen +
|
|
saved_syn->tcp_hdrlen;
|
|
}
|
|
|
|
struct sk_buff *tcp_get_timestamping_opt_stats(const struct sock *sk,
|
|
const struct sk_buff *orig_skb);
|
|
|
|
static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss)
|
|
{
|
|
/* We use READ_ONCE() here because socket might not be locked.
|
|
* This happens for listeners.
|
|
*/
|
|
u16 user_mss = READ_ONCE(tp->rx_opt.user_mss);
|
|
|
|
return (user_mss && user_mss < mss) ? user_mss : mss;
|
|
}
|
|
|
|
int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,
|
|
int shiftlen);
|
|
|
|
void tcp_sock_set_cork(struct sock *sk, bool on);
|
|
int tcp_sock_set_keepcnt(struct sock *sk, int val);
|
|
int tcp_sock_set_keepidle_locked(struct sock *sk, int val);
|
|
int tcp_sock_set_keepidle(struct sock *sk, int val);
|
|
int tcp_sock_set_keepintvl(struct sock *sk, int val);
|
|
void tcp_sock_set_nodelay(struct sock *sk);
|
|
void tcp_sock_set_quickack(struct sock *sk, int val);
|
|
int tcp_sock_set_syncnt(struct sock *sk, int val);
|
|
void tcp_sock_set_user_timeout(struct sock *sk, u32 val);
|
|
|
|
#endif /* _LINUX_TCP_H */
|