Commit Graph

215 Commits

Author SHA1 Message Date
Martin KaFai Lau
d0c59e3f28 UPSTREAM: tcp: bpf: Optionally store mac header in TCP_SAVE_SYN
This patch is adapted from Eric's patch in an earlier discussion [1].

The TCP_SAVE_SYN currently only stores the network header and
tcp header.  This patch allows it to optionally store
the mac header also if the setsockopt's optval is 2.

It requires one more bit for the "save_syn" bit field in tcp_sock.
This patch achieves this by moving the syn_smc bit next to the is_mptcp.
The syn_smc is currently used with the TCP experimental option.  Since
syn_smc is only used when CONFIG_SMC is enabled, this patch also puts
the "IS_ENABLED(CONFIG_SMC)" around it like the is_mptcp did
with "IS_ENABLED(CONFIG_MPTCP)".

The mac_hdrlen is also stored in the "struct saved_syn"
to allow a quick offset from the bpf prog if it chooses to start
getting from the network header or the tcp header.

[1]: https://lore.kernel.org/netdev/CANn89iLJNWh6bkH7DNhy_kmcAexuUCccqERqe7z2QsvPhGrYPQ@mail.gmail.com/

Suggested-by: Eric Dumazet <edumazet@google.com>
Change-Id: Id12b23200ccba9017f1792fda9c8b6aec2998d38
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/bpf/20200820190123.2886935-1-kafai@fb.com
2025-09-08 17:27:49 +03:00
Martin KaFai Lau
e5c5b864b1 UPSTREAM: tcp: Add saw_unknown to struct tcp_options_received
In a later patch, the bpf prog only wants to be called to handle
a header option if that particular header option cannot be handled by
the kernel.  This unknown option could be written by the peer's bpf-prog.
It could also be a new standard option that the running kernel does not
support it while a bpf-prog can handle it.

This patch adds a "saw_unknown" bit to "struct tcp_options_received"
and it uses an existing one byte hole to do that.  "saw_unknown" will
be set in tcp_parse_options() if it sees an option that the kernel
cannot handle.

Change-Id: Id286fa01661751f40261cade7a433c9701ffa61a
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200820190033.2884430-1-kafai@fb.com
2025-09-08 17:27:48 +03:00
Martin KaFai Lau
33daaa062c UPSTREAM: tcp: Use a struct to represent a saved_syn
The TCP_SAVE_SYN has both the network header and tcp header.
The total length of the saved syn packet is currently stored in
the first 4 bytes (u32) of an array and the actual packet data is
stored after that.

A later patch will add a bpf helper that allows to get the tcp header
alone from the saved syn without the network header.  It will be more
convenient to have a direct offset to a specific header instead of
re-parsing it.  This requires to separately store the network hdrlen.
The total header length (i.e. network + tcp) is still needed for the
current usage in getsockopt.  Although this total length can be obtained
by looking into the tcphdr and then get the (th->doff << 2), this patch
chooses to directly store the tcp hdrlen in the second four bytes of
this newly created "struct saved_syn".  By using a new struct, it can
give a readable name to each individual header length.

Change-Id: I52001b912b19d40f78a74c23105670449ec000d6
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200820190014.2883694-1-kafai@fb.com
2025-09-08 17:27:45 +03:00
Eric Dumazet
b5cc7e056b BACKPORT: tcp: add rcu protection around tp->fastopen_rsk
Both tcp_v4_err() and tcp_v6_err() do the following operations
while they do not own the socket lock :

	fastopen = tp->fastopen_rsk;
 	snd_una = fastopen ? tcp_rsk(fastopen)->snt_isn : tp->snd_una;

The problem is that without appropriate barrier, the compiler
might reload tp->fastopen_rsk and trigger a NULL deref.

request sockets are protected by RCU, we can simply add
the missing annotations and barriers to solve the issue.

Fixes: 168a8f5805 ("tcp: TCP Fast Open Server - main code path")
Change-Id: Ic343bfeee8985f1105235407560340e5ecf66320
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-09-08 17:27:45 +03:00
Dmitry Yakunin
1fa1f50fb9 UPSTREAM: tcp: Expose tcp_sock_set_keepidle_locked
This is preparation for usage in bpf_setsockopt.

v2:
  - remove redundant EXPORT_SYMBOL (Alexei Starovoitov)

Change-Id: I98ae5d66751d84a859ad0e1c7688980f4a5a7998
Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200620153052.9439-2-zeil@yandex-team.ru
2025-09-08 17:27:15 +03:00
Christoph Hellwig
17f752eeae UPSTREAM: tcp: add tcp_sock_set_keepidle
Add a helper to directly set the TCP_KEEP_IDLE sockopt from kernel
space without going through a fake uaccess.

Change-Id: Ie673ab61bb47f73dcd200c3a3ffd14ecae5eebc4
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-09-08 17:27:15 +03:00
Eric Dumazet
06c1d19897 UPSTREAM: tcp: do not change tcp_wstamp_ns in tcp_mstamp_refresh
In EDT design, I made the mistake of using tcp_wstamp_ns
to store the last tcp_clock_ns() sample and to store the
pacing virtual timer.

This causes major regressions at high speed flows.

Introduce tcp_clock_cache to store last tcp_clock_ns().
This is needed because some arches have slow high-resolution
kernel time service.

tcp_wstamp_ns is only updated when a packet is sent.

Note that we can remove tcp_mstamp in the future since
tcp_mstamp is essentially tcp_clock_cache/1000, so the
apparent socket size increase is temporary.

Fixes: 9799ccb0e984 ("tcp: add tcp_wstamp_ns socket field")
Change-Id: Id9ff9a714bed83db08208e7b3da0a601d51e19e0
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-09-08 17:24:11 +03:00
Eric Dumazet
33c9d9112f UPSTREAM: tcp: add tcp_wstamp_ns socket field
TCP will soon provide earliest departure time on TX skbs.
It needs to track this in a new variable.

tcp_mstamp_refresh() needs to update this variable, and
became too big to stay an inline.

Change-Id: I9230564dac5f4dfe282528de4cec8c970cf54d5a
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2025-09-08 17:24:09 +03:00
Wilson Sung
e3167a4609 Merge android-4.19-stable (4.19.294) into android-msm-pixel-4.19-lts
Merge 4.19.294 into android-4.19-stable
Linux 4.19.294
    Revert "ARM: ep93xx: fix missing-prototype warnings"
    Revert "MIPS: Alchemy: fix dbdma2"
    Merge 4.19.293 into android-4.19-stable
Linux 4.19.293
    dma-buf/sw_sync: Avoid recursive lock during fence signal
  * clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
      include/linux/clk.h
  * scsi: core: raid_class: Remove raid_component_add()
      include/linux/raid_class.h
    scsi: snic: Fix double free in snic_tgt_create()
    irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
  * rtnetlink: Reject negative ifindexes in RTM_NEWLINK
      net/core/rtnetlink.c
  * netfilter: nf_queue: fix socket leak
      net/netfilter/nf_queue.c
  * sched/rt: pick_next_rt_entity(): check list_entry
      kernel/sched/rt.c
  * mmc: block: Fix in_flight[issue_type] value error
      drivers/mmc/core/block.c
    x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
    PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
    media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
  * lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
      lib/clz_ctz.c
    batman-adv: Fix batadv_v_ogm_aggr_send memory leak
    batman-adv: Fix TT global entry leak when client roamed back
    batman-adv: Do not get eth header before batadv_check_management_packet
    batman-adv: Don't increase MTU when set by user
    batman-adv: Trigger events for auto adjusted MTU
    nfsd: Fix race to FREE_STATEID and cl_revoked
    ibmveth: Use dcbf rather than dcbfl
    ipvs: fix racy memcpy in proc_do_sync_threshold
    ipvs: Improve robustness to the ipvs sysctl
  * bonding: fix macvlan over alb bond support
      drivers/net/bonding/bond_alb.c
      include/net/bonding.h
  * net: remove bond_slave_has_mac_rcu()
      include/net/bonding.h
  * net/sched: fix a qdisc modification with ambiguous command request
      net/sched/sch_api.c
    igb: Avoid starting unnecessary workqueues
    dccp: annotate data-races in dccp_poll()
  * sock: annotate data-races around prot->memory_pressure
      include/net/sock.h
      net/sctp/socket.c
  * tracing: Fix memleak due to race between current_tracer and trace
      kernel/trace/trace.c
    drm/amd/display: check TG is non-null before checking if enabled
    drm/amd/display: do not wait for mpc idle if tg is disabled
  * regmap: Account for register length in SMBus I/O limits
      drivers/base/regmap/regmap-i2c.c
    dm integrity: reduce vmalloc space footprint on 32-bit architectures
    dm integrity: increase RECALC_SECTORS to improve recalculate speed
    powerpc: Fail build if using recordmcount with binutils v2.37
    powerpc: remove leftover code of old GCC version checks
    powerpc/32: add stack protector support
    fbdev: fix potential OOB read in fast_imageblit()
    fbdev: Fix sys_imageblit() for arbitrary image widths
    fbdev: Improve performance of sys_imageblit()
    tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
    Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
    MIPS: cpu-features: Use boot_cpu_type for CPU type based features
    MIPS: cpu-features: Enable octeon_cache by cpu_type
    fs: dlm: fix mismatch of plock results from userspace
    fs: dlm: use dlm_plock_info for do_unlock_close
    fs: dlm: change plock interrupted message to debug again
    fs: dlm: add pid to debug log
    dlm: replace usage of found with dedicated list iterator variable
    dlm: improve plock logging if interrupted
    PCI: acpiphp: Reassign resources on bridge if necessary
    net: phy: broadcom: stub c45 read/write for 54810
  * net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
      net/xfrm/xfrm_user.c
  * net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
      net/ipv4/tcp_timer.c
    virtio-net: set queues after driver_ok
  * af_unix: Fix null-ptr-deref in unix_stream_sendpage().
      net/unix/af_unix.c
  * netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
      net/netfilter/nf_conntrack_proto_sctp.c
    test_firmware: prevent race conditions by a correct implementation of locking
    mmc: wbsd: fix double mmc_free_host() in wbsd_init()
    cifs: Release folio lock on fscache read hit.
  * ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
      sound/usb/quirks-table.h
    serial: 8250: Fix oops for port->pm on uart_change_pm()
    ASoC: meson: axg-tdm-formatter: fix channel slot allocation
    ASoC: rt5665: add missed regulator_bulk_disable
  * net: do not allow gso_size to be set to GSO_BY_FRAGS
      include/linux/virtio_net.h
  * sock: Fix misuse of sk_under_memory_pressure()
      include/net/sock.h
      net/core/sock.c
    i40e: fix misleading debug logs
    team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
    netfilter: nft_dynset: disallow object maps
    selftests: mirror_gre_changes: Tighten up the TTL test match
  * xfrm: add NULL check in xfrm_update_ae_params
      net/xfrm/xfrm_user.c
  * ip_vti: fix potential slab-use-after-free in decode_session6
      net/ipv4/ip_vti.c
  * ip6_vti: fix slab-use-after-free in decode_session6
      net/ipv6/ip6_vti.c
  * xfrm: fix slab-use-after-free in decode_session6
      net/xfrm/xfrm_interface_core.c
  * xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
      net/xfrm/Makefile
  * net: af_key: fix sadb_x_filter validation
      net/key/af_key.c
  * net: xfrm: Fix xfrm_address_filter OOB read
      net/xfrm/xfrm_user.c
    btrfs: fix BUG_ON condition in btrfs_cancel_balance
    powerpc/rtas_flash: allow user copy to flash block cache objects
    fbdev: mmp: fix value check in mmphw_probe()
    virtio-mmio: don't break lifecycle of vm_dev
    virtio-mmio: Use to_virtio_mmio_device() to simply code
    virtio-mmio: convert to devm_platform_ioremap_resource
    nfsd: Remove incorrect check in nfsd4_validate_stateid
    nfsd4: kill warnings on testing stateids with mismatched clientids
    block: fix signed int overflow in Amiga partition support
    mmc: sunxi: fix deferred probing
    mmc: bcm2835: fix deferred probing
  * mmc: Remove dev_err() usage after platform_get_irq()
      drivers/mmc/host/sdhci-msm.c
    mmc: tmio: move tmio_mmc_set_clock() to platform hook
    mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()
    mmc: meson-gx: remove redundant mmc_request_done() call from irq context
    mmc: meson-gx: remove useless lock
  * USB: dwc3: qcom: fix NULL-deref on suspend
      drivers/usb/dwc3/dwc3-qcom.c
  * usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
      drivers/usb/dwc3/dwc3-qcom.c
    irqchip/mips-gic: Use raw spinlock for gic_lock
    irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
    x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
    powerpc/64s/radix: Fix soft dirty tracking
    powerpc: Move page table dump files in a dedicated subdirectory
    powerpc/mm: dump block address translation on book3s/32
    powerpc/mm: dump segment registers on book3s/32
    powerpc/mm: Move pgtable_t into platform headers
    powerpc/mm: move platform specific mmu-xxx.h in platform directories
    iio: addac: stx104: Fix race condition when converting analog-to-digital
    iio: addac: stx104: Fix race condition for stx104_write_raw()
    iio: adc: stx104: Implement and utilize register structures
    iio: adc: stx104: Utilize iomap interface
  * iio: add addac subdirectory
      drivers/iio/Kconfig
      drivers/iio/Makefile
      drivers/iio/addac/Kconfig
      drivers/iio/addac/Makefile
  * IMA: allow/fix UML builds
      security/integrity/ima/Kconfig
    drm/amdgpu: Fix potential fence use-after-free v2
  * Bluetooth: L2CAP: Fix use-after-free
      net/bluetooth/l2cap_core.c
    pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
    gfs2: Fix possible data races in gfs2_show_options()
    media: platform: mediatek: vpu: fix NULL ptr dereference
  * media: v4l2-mem2mem: add lock to protect parameter num_rdy
      include/media/v4l2-mem2mem.h
    FS: JFS: Check for read-only mounted filesystem in txBegin
    FS: JFS: Fix null-ptr-deref Read in txBegin
    MIPS: dec: prom: Address -Warray-bounds warning
    fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
    udf: Fix uninitialized array access for some pathnames
  * HID: add quirk for 03f0:464a HP Elite Presenter Mouse
      drivers/hid/hid-ids.h
      drivers/hid/hid-quirks.c
  * quota: fix warning in dqgrab()
      fs/quota/dquot.c
  * quota: Properly disable quotas when add_dquot_ref() fails
      fs/quota/dquot.c
    ALSA: emu10k1: roll up loops in DSP setup code for Audigy
    drm/radeon: Fix integer overflow in radeon_cs_parser_init
    selftests: forwarding: tc_flower: Relax success criterion
  * lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
      lib/mpi/longlong.h
    Merge 4.19.292 into android-4.19-stable
  * Revert "posix-timers: Ensure timer ID search-loop limit is valid"
      include/linux/sched/signal.h
      kernel/time/posix-timers.c
    Merge 4.19.291 into android-4.19-stable
    Merge 4.19.290 into android-4.19-stable
    UPSTREAM: media: usb: siano: Fix warning due to null work_func_t function pointer
  * UPSTREAM: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
      net/bluetooth/l2cap_sock.c
    UPSTREAM: net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  * UPSTREAM: net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
      net/sched/cls_u32.c
Linux 4.19.292
  * sch_netem: fix issues in netem_change() vs get_dist_table()
      net/sched/sch_netem.c
    alpha: remove __init annotation from exported page_is_ram()
    scsi: core: Fix possible memory leak if device_add() fails
    scsi: snic: Fix possible memory leak if device_add() fails
    scsi: 53c700: Check that command slot is not NULL
    scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
  * scsi: core: Fix legacy /proc parsing buffer overflow
      drivers/scsi/scsi_proc.c
  * netfilter: nf_tables: report use refcount overflow
      include/net/netfilter/nf_tables.h
  * netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush
      include/net/netfilter/nf_tables.h
    btrfs: don't stop integrity writeback too early
    ibmvnic: Handle DMA unmapping of login buffs in release functions
  * wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
      include/net/cfg80211.h
    IB/hfi1: Fix possible panic during hotplug remove
  * drivers: net: prevent tun_build_skb() to exceed the packet size limit
      drivers/net/tun.c
    dccp: fix data-race around dp->dccps_mss_cache
  * bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
      drivers/net/bonding/bond_main.c
  * net/packet: annotate data-races around tp->status
      net/packet/af_packet.c
    mISDN: Update parameter type of dsp_cmx_send()
    drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
    x86: Move gds_ucode_mitigated() declaration to header
    x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
    x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
  * usb: dwc3: Properly handle processing of pending events
      drivers/usb/dwc3/gadget.c
    usb-storage: alauda: Fix uninit-value in alauda_check_media()
  * binder: fix memory leak in binder_init()
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
    iio: cros_ec: Fix the allocation size for cros_ec_command
    nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
    radix tree test suite: fix incorrect allocation size for pthreads
    drm/nouveau/gr: enable memory loads on helper invocation on all channels
    dmaengine: pl330: Return DMA_PAUSED when transaction is paused
  * ipv6: adjust ndisc_is_useropt() to also return true for PIO
      net/ipv6/ndisc.c
    mmc: moxart: read scr register without changing byte order
    sparc: fix up arch_cpu_finalize_init() build breakage.
  * UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free
      net/sched/cls_fw.c
Linux 4.19.291
  * drm/edid: fix objtool warning in drm_cvt_modes()
      drivers/gpu/drm/drm_edid.c
    arm64: dts: stratix10: fix incorrect I2C property for SCL signal
  * drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
      drivers/base/arch_topology.c
      drivers/base/cacheinfo.c
      drivers/base/core.c
      drivers/base/cpu.c
      drivers/base/firmware_loader/fallback.c
      drivers/base/platform.c
      drivers/base/power/sysfs.c
      drivers/base/soc.c
    ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
    ARM: dts: imx6sll: fixup of operating points
    ARM: dts: imx: add usb alias
    ARM: dts: imx6sll: Make ssi node name same as other platforms
  * PM: sleep: wakeirq: fix wake irq arming
      drivers/base/power/power.h
      drivers/base/power/wakeirq.c
  * PM / wakeirq: support enabling wake-up irq after runtime_suspend called
      drivers/base/power/power.h
      drivers/base/power/runtime.c
      drivers/base/power/wakeirq.c
      include/linux/pm_wakeirq.h
    powerpc/mm/altmap: Fix altmap boundary check
    mtd: rawnand: omap_elm: Fix incorrect type in assignment
    test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
    test_firmware: fix a memory leak with reqs buffer
    ext2: Drop fragment support
  * net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
      drivers/net/usb/usbnet.c
  * Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
      net/bluetooth/l2cap_sock.c
    fs/sysv: Null check to prevent null-ptr-deref bug
  * USB: zaurus: Add ID for A-300/B-500/C-700
      drivers/net/usb/cdc_ether.c
      drivers/net/usb/zaurus.c
    libceph: fix potential hang in ceph_osdc_notify()
    scsi: zfcp: Defer fc_rport blocking until after ADISC response
  * tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
      net/ipv4/tcp_metrics.c
  * tcp_metrics: annotate data-races around tm->tcpm_net
      net/ipv4/tcp_metrics.c
  * tcp_metrics: annotate data-races around tm->tcpm_vals[]
      net/ipv4/tcp_metrics.c
  * tcp_metrics: annotate data-races around tm->tcpm_lock
      net/ipv4/tcp_metrics.c
  * tcp_metrics: annotate data-races around tm->tcpm_stamp
      net/ipv4/tcp_metrics.c
  * tcp_metrics: fix addr_same() helper
      net/ipv4/tcp_metrics.c
    ip6mr: Fix skb_under_panic in ip6mr_cache_report()
    net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  * net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
      net/sched/cls_u32.c
  * net: add missing data-race annotation for sk_ll_usec
      net/core/sock.c
  * net: add missing data-race annotations around sk->sk_peek_off
      net/core/sock.c
      net/unix/af_unix.c
  * net: sched: cls_u32: Fix match key mis-addressing
      net/sched/cls_u32.c
    perf test uprobe_from_different_cu: Skip if there is no gcc
    net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
    KVM: s390: fix sthyi error handling
  * word-at-a-time: use the same return type for has_zero regardless of endianness
      include/asm-generic/word-at-a-time.h
  * loop: Select I/O scheduler 'none' from inside add_disk()
      drivers/block/loop.c
  * perf: Fix function pointer case
      kernel/events/core.c
  * net/sched: cls_u32: Fix reference counter leak leading to overflow
      net/sched/cls_u32.c
    ASoC: cs42l51: fix driver to properly autoload with automatic module loading
    net/sched: sch_qfq: account for stab overhead in qfq_enqueue
  * net/sched: cls_fw: Fix improper refcount update leads to use-after-free
      net/sched/cls_fw.c
    drm/client: Fix memory leak in drm_client_target_cloned
    dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
    ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
    s390/dasd: fix hanging device after quiesce/resume
    virtio-net: fix race between set queues and probe
    serial: 8250_dw: Preserve original value of DLF register
  * serial: 8250_dw: split Synopsys DesignWare 8250 common functions
      drivers/tty/serial/8250/Kconfig
    irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
    tpm_tis: Explicitly check for error code
    btrfs: check for commit error at btrfs_attach_transaction_barrier()
    hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
    staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
    Documentation: security-bugs.rst: clarify CVE handling
    Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
    usb: xhci-mtk: set the dma max_seg_size
  * USB: quirks: add quirk for Focusrite Scarlett
      drivers/usb/core/quirks.c
    usb: ohci-at91: Fix the unhandle interrupt when resume
  * usb: dwc3: don't reset device side if dwc3 was configured as host-only
      drivers/usb/dwc3/core.c
    usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
  * Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
      drivers/usb/dwc3/core.c
      drivers/usb/dwc3/core.h
    can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
    USB: serial: simple: sort driver entries
    USB: serial: simple: add Kaufmann RKS+CAN VCP
    USB: serial: option: add Quectel EC200A module support
    USB: serial: option: support Quectel EM060K_128
  * tracing: Fix warning in trace_buffered_event_disable()
      kernel/trace/trace_events.c
  * ring-buffer: Fix wrong stat of cpu_buffer->read
      kernel/trace/ring_buffer.c
    ata: pata_ns87415: mark ns87560_tf_read static
    dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
  * block: Fix a source code comment in include/uapi/linux/blkzoned.h
      include/uapi/linux/blkzoned.h
    ASoC: fsl_spdif: Silence output on stop
    drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
    RDMA/mlx4: Make check for invalid flags stricter
    benet: fix return value check in be_lancer_xmit_workarounds()
    net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
    net/sched: mqprio: add extack to mqprio_parse_nlattr()
    net/sched: mqprio: refactor nlattr parsing to a separate function
    platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
    team: reset team's flags when down link is P2P device
  * bonding: reset bond's flags when down link is P2P device
      drivers/net/bonding/bond_main.c
  * tcp: Reduce chance of collisions in inet6_hashfn().
      include/net/ipv6.h
  * ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
      net/ipv6/addrconf.c
    ethernet: atheros: fix return value check in atl1e_tso_csum()
    phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
    i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
  * ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
      fs/ext4/ioctl.c
    scsi: qla2xxx: Array index may go out of bound
    scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
    ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
    ftrace: Store the order of pages allocated in ftrace_page
    ftrace: Check if pages were allocated before calling free_pages()
  * ftrace: Add information on number of page groups allocated
      kernel/trace/trace.c
      kernel/trace/trace.h
    fs: dlm: interrupt posix locks only when process is killed
    dlm: rearrange async condition return
    dlm: cleanup plock_op vs plock_xop
    PCI/ASPM: Avoid link retraining race
    PCI/ASPM: Factor out pcie_wait_for_retrain()
    PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
    PCI: Rework pcie_retrain_link() wait loop
  * ext4: Fix reusing stale buffer heads from last failed mounting
      fs/ext4/super.c
  * ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
      fs/ext4/ext4.h
      fs/ext4/fsmap.c
      fs/ext4/super.c
    btrfs: fix extent buffer leak after tree mod log failure at split_node()
    bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
    bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
    bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
    gpio: tps68470: Make tps68470_gpio_output() always set the initial value
    tracing/histograms: Return an error if we fail to add histogram to hist_vars list
  * tcp: annotate data-races around fastopenq.max_qlen
      include/linux/tcp.h
      net/ipv4/tcp.c
      net/ipv4/tcp_fastopen.c
  * tcp: annotate data-races around tp->notsent_lowat
      include/net/tcp.h
      net/ipv4/tcp.c
  * tcp: annotate data-races around rskq_defer_accept
      net/ipv4/tcp.c
  * tcp: annotate data-races around tp->linger2
      net/ipv4/tcp.c
  * net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
      include/net/tcp.h
      net/ipv4/tcp.c
    netfilter: nf_tables: can't schedule in nft_chain_validate
    netfilter: nf_tables: fix spurious set element insertion failure
  * llc: Don't drop packet from non-root netns.
      net/llc/llc_input.c
    fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
  * Revert "tcp: avoid the lookup process failing to get sk in ehash table"
      net/ipv4/inet_hashtables.c
      net/ipv4/inet_timewait_sock.c
    net:ipv6: check return value of pskb_trim()
    net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
    pinctrl: amd: Use amd_pinconf_set() for all config options
    fbdev: imxfb: warn about invalid left/right margin
    spi: bcm63xx: fix max prepend length
    igb: Fix igb_down hung on surprise removal
    wifi: iwlwifi: mvm: avoid baid size integer overflow
  * wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
      net/wireless/wext-core.c
  * bpf: Address KCSAN report on bpf_lru_list
      kernel/bpf/bpf_lru_list.c
      kernel/bpf/bpf_lru_list.h
  * sched/fair: Don't balance task to its current running CPU
      kernel/sched/fair.c
  * posix-timers: Ensure timer ID search-loop limit is valid
      include/linux/sched/signal.h
      kernel/time/posix-timers.c
    md/raid10: prevent soft lockup while flush writes
    md: fix data corruption for raid456 when reshape restart while grow up
    nbd: Add the maximum limit of allocated index in nbd_dev_add
    debugobjects: Recheck debug_objects_enabled before reporting
  * ext4: correct inline offset when handling xattrs in inode body
      fs/ext4/xattr.c
    can: bcm: Fix UAF in bcm_proc_show()
  * fuse: revalidate: don't invalidate if interrupted
      fs/fuse/dir.c
    perf probe: Add test for regression introduced by switch to die_get_decl_file()
    tracing/histograms: Add histograms to hist_vars if they have referenced variables
  * drm/atomic: Fix potential use-after-free in nonblocking commits
      drivers/gpu/drm/drm_atomic.c
    scsi: qla2xxx: Pointer may be dereferenced
    scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
    scsi: qla2xxx: Fix potential NULL pointer dereference
    scsi: qla2xxx: Wait for io return on terminate rport
    xtensa: ISS: fix call to split_if_spec
  * ring-buffer: Fix deadloop issue on reading trace_pipe
      kernel/trace/ring_buffer.c
    tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
    tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
  * Revert "8250: add support for ASIX devices with a FIFO bug"
      include/linux/serial_8250.h
    meson saradc: fix clock divider mask length
    ceph: don't let check_caps skip sending responses for revoke msgs
    hwrng: imx-rngc - fix the timeout for init and self check
    serial: atmel: don't enable IRQs prematurely
    fs: dlm: return positive pid value for F_GETLK
    md/raid0: add discard support for the 'original' layout
    misc: pci_endpoint_test: Re-init completion for every test
    misc: pci_endpoint_test: Free IRQs before removing the device
    PCI: rockchip: Use u32 variable to access 32-bit registers
    PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
    PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
    PCI: rockchip: Write PCI Device ID to correct register
    PCI: rockchip: Assert PCI Configuration Enable bit after probe
    PCI: qcom: Disable write access to read only registers for IP v2.3.3
  * PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
      drivers/pci/quirks.c
  * PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
      drivers/pci/pci.c
    jfs: jfs_dmap: Validate db_l2nbperpage while mounting
  * ext4: only update i_reserved_data_blocks on successful block allocation
      fs/ext4/indirect.c
      fs/ext4/inode.c
  * ext4: fix wrong unit use in ext4_mb_clear_bb
      fs/ext4/mballoc.c
    perf intel-pt: Fix CYC timestamps after standalone CBR
    SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
    net: bcmgenet: Ensure MDIO unregistration has clocks enabled
    tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
    pinctrl: amd: Only use special debounce behavior for GPIO 0
    pinctrl: amd: Detect internal GPIO0 debounce handling
    pinctrl: amd: Fix mistake in handling clearing pins at startup
  * net/sched: make psched_mtu() RTNL-less safe
      include/net/pkt_sched.h
    wifi: airo: avoid uninitialized warning in airo_get_rate()
  * ipv6/addrconf: fix a potential refcount underflow for idev
      net/ipv6/addrconf.c
    NTB: ntb_tool: Add check for devm_kcalloc
    NTB: ntb_transport: fix possible memory leak while device_register() fails
    ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
    NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
    ntb: idt: Fix error handling in idt_pci_driver_init()
  * udp6: fix udp6_ehashfn() typo
      net/ipv6/udp.c
  * icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
      net/ipv6/icmp.c
  * vrf: Increment Icmp6InMsgs on the original netdev
      include/net/addrconf.h
      net/ipv6/icmp.c
      net/ipv6/reassembly.c
    net: mvneta: fix txq_map in case of txq_number==1
  * workqueue: clean up WORK_* constant types, clarify masking
      include/linux/workqueue.h
      kernel/workqueue.c
    net: lan743x: Don't sleep in atomic context
    netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
  * netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
      net/netfilter/nf_conntrack_helper.c
    netfilter: nf_tables: fix scheduling-while-atomic splat
    netfilter: nf_tables: unbind non-anonymous set if rule construction fails
  * netfilter: nf_tables: reject unbound anonymous set before commit phase
      include/net/netfilter/nf_tables.h
  * netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
      include/net/netfilter/nf_tables.h
    netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
  * netfilter: nf_tables: use net_generic infra for transaction data
      include/net/netfilter/nf_tables.h
      include/net/netns/nftables.h
  * netfilter: add helper function to set up the nfnetlink header and use it
      include/linux/netfilter/nfnetlink.h
      net/netfilter/nf_conntrack_netlink.c
      net/netfilter/nfnetlink_log.c
      net/netfilter/nfnetlink_queue.c
    netfilter: nftables: add helper function to set the base sequence number
    netfilter: nf_tables: add rescheduling points during loop detection walks
    netfilter: nf_tables: fix nat hook table deletion
    spi: spi-fsl-spi: allow changing bits_per_word while CS is still active
    spi: spi-fsl-spi: relax message sanity checking a little
    spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
    ARM: orion5x: fix d2net gpio initialization
    btrfs: fix race when deleting quota root from the dirty cow roots list
    jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
  * integrity: Fix possible multiple allocation in integrity_inode_get()
      security/integrity/iint.c
    bcache: Remove unnecessary NULL point check in node allocations
    mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
    mmc: core: disable TRIM on Kingston EMMC04G-M627
    NFSD: add encoding of op_recall flag for write delegation
  * ALSA: jack: Fix mutex call in snd_jack_report()
      sound/core/jack.c
    i2c: xiic: Don't try to handle more interrupt events after error
    i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
    sh: dma: Fix DMA channel offset calculation
    net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
  * tcp: annotate data races in __tcp_oow_rate_limited()
      net/ipv4/tcp_input.c
  * net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
      net/bridge/br_if.c
    powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
  * f2fs: fix error path handling in truncate_dnode()
      fs/f2fs/node.c
    mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
    spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
    Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
  * sctp: fix potential deadlock on &net->sctp.addr_wq_lock
      net/sctp/socket.c
    rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
    mfd: stmpe: Only disable the regulators if they are enabled
    mfd: intel-lpss: Add missing check for platform_get_resource
    KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
    mfd: rt5033: Drop rt5033-battery sub-device
    usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
  * extcon: Fix kernel doc of property capability fields to avoid warnings
      drivers/extcon/extcon.c
  * extcon: Fix kernel doc of property fields to avoid warnings
      drivers/extcon/extcon.c
    media: usb: siano: Fix warning due to null work_func_t function pointer
  * media: videodev2.h: Fix struct v4l2_input tuner index comment
      include/uapi/linux/videodev2.h
    media: usb: Check az6007_read() return value
    sh: j2: Use ioremap() to translate device tree address into kernel memory
    w1: fix loop in w1_fini()
  * block: change all __u32 annotations to __be32 in affs_hardblocks.h
      include/uapi/linux/affs_hardblocks.h
    USB: serial: option: add LARA-R6 01B PIDs
    ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
    ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
    ARCv2: entry: avoid a branch
    ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
    ARCv2: entry: comments about hardware auto-save on taken interrupts
  * modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
      scripts/mod/modpost.c
  * modpost: fix section mismatch message for R_ARM_ABS32
      scripts/mod/modpost.c
    crypto: nx - fix build warnings when DEBUG_FS is not enabled
    hwrng: virtio - Fix race on data_avail and actual data
    hwrng: virtio - always add a pending request
    hwrng: virtio - don't waste entropy
    hwrng: virtio - don't wait on cleanup
    hwrng: virtio - add an internal buffer
    pinctrl: at91-pio4: check return value of devm_kasprintf()
    perf dwarf-aux: Fix off-by-one in die_get_varname()
    pinctrl: cherryview: Return correct value if pin in push-pull mode
  * PCI: Add pci_clear_master() stub for non-CONFIG_PCI
      include/linux/pci.h
    scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
    ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
    drm/radeon: fix possible division-by-zero errors
    fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
    arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
    IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
  * soc/fsl/qe: fix usb.c build errors
      drivers/soc/fsl/qe/Kconfig
    ASoC: es8316: Increment max value for ALC Capture Target Volume control
    ARM: ep93xx: fix missing-prototype warnings
    drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
    Input: adxl34x - do not hardcode interrupt trigger type
    ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
    Input: drv260x - sleep between polling GO bit
    radeon: avoid double free in ci_dpm_init()
  * netlink: Add __sock_i_ino() for __netlink_diag_dump().
      include/net/sock.h
      net/core/sock.c
    ipvlan: Fix return value of ipvlan_queue_xmit()
    netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
  * lib/ts_bm: reset initial match offset for every block of text
      lib/ts_bm.c
    gtp: Fix use-after-free in __gtp_encap_destroy().
  * netlink: do not hard code device address lenth in fdb dumps
      net/core/rtnetlink.c
  * netlink: fix potential deadlock in netlink_set_err()
      net/netlink/af_netlink.c
    wifi: ath9k: convert msecs to jiffies where needed
    wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
    memstick r592: make memstick_debug_get_tpc_name() static
    kexec: fix a memory leak in crash_shrink_memory()
    watchdog/perf: more properly prevent false positives with turbo modes
  * watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
      include/linux/nmi.h
    wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
    wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
    wifi: ray_cs: Fix an error handling path in ray_probe()
    wifi: ray_cs: Drop useless status variable in parse_addr()
    wifi: ray_cs: Utilize strnlen() in parse_addr()
    wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
    wl3501_cs: use eth_hw_addr_set()
  * net: create netdev->dev_addr assignment helpers
      include/linux/etherdevice.h
      include/linux/netdevice.h
    wl3501_cs: Fix misspelling and provide missing documentation
    wl3501_cs: Remove unnecessary NULL check
    wl3501_cs: Fix a bunch of formatting issues related to function docs
    wifi: atmel: Fix an error handling path in atmel_probe()
    wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
    wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
    nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
  * nfc: constify several pointers to u8, char and sk_buff
      include/net/nfc/nfc.h
    wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
    samples/bpf: Fix buffer overflow in tcp_basertt
    wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
    wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
    evm: Complete description of evm_inode_setattr()
    ARM: 9303/1: kprobes: avoid missing-declaration warnings
  * PM: domains: fix integer overflow issues in genpd_parse_state()
      drivers/base/power/domain.c
    clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
    clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
  * clocksource/drivers: Unify the names to timer-* format
      drivers/clocksource/Makefile
    irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
    irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
    md/raid10: fix io loss while replacement replace rdev
    md/raid10: fix wrong setting of max_corr_read_errors
    md/raid10: fix overflow of md/safe_mode_delay
    md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
  * treewide: Remove uninitialized_var() usage
      drivers/clk/clk-gate.c
      drivers/gpu/drm/drm_edid.c
      drivers/md/dm-io.c
      drivers/md/dm-ioctl.c
      drivers/md/dm-snap-persistent.c
      drivers/md/dm-table.c
      fs/fat/dir.c
      fs/fuse/control.c
      fs/fuse/file.c
      fs/overlayfs/copy_up.c
      kernel/async.c
      kernel/audit.c
      kernel/events/core.c
      kernel/events/uprobes.c
      kernel/exit.c
      kernel/futex.c
      kernel/trace/ring_buffer.c
      lib/radix-tree.c
      mm/memcontrol.c
      mm/percpu.c
      mm/slub.c
      mm/swap.c
      net/ipv4/netfilter/nf_socket_ipv4.c
      net/ipv6/ip6_flowlabel.c
      net/ipv6/netfilter/nf_socket_ipv6.c
      net/netfilter/nf_conntrack_ftp.c
      net/netfilter/nfnetlink_log.c
      net/netfilter/nfnetlink_queue.c
      net/sched/cls_flow.c
      sound/core/control_compat.c
      sound/usb/endpoint.c
    drm/amdgpu: Validate VM ioctl flags.
    scripts/tags.sh: Resolve gtags empty index generation
  * drm/edid: Fix uninitialized variable in drm_cvt_modes()
      drivers/gpu/drm/drm_edid.c
    fbdev: imsttfb: Fix use after free bug in imsttfb_probe
    video: imsttfb: check for ioremap() failures
    x86/smp: Use dedicated cache-line for mwait_play_dead()
    gfs2: Don't deref jdesc in evict
Linux 4.19.290
    x86: fix backwards merge of GDS/SRSO bit
    xen/netback: Fix buffer overrun triggered by unusual packet
    Documentation/x86: Fix backwards on/off logic about YMM support
    x86/xen: Fix secondary processors' FPU initialization
    KVM: Add GDS_NO support to KVM
    x86/speculation: Add Kconfig option for GDS
    x86/speculation: Add force option to GDS mitigation
  * x86/speculation: Add Gather Data Sampling mitigation
      drivers/base/cpu.c
    x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
    x86/fpu: Mark init functions __init
    x86/fpu: Remove cpuinfo argument from init functions
  * init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init()
      init/main.c
  * init: Invoke arch_cpu_finalize_init() earlier
      init/main.c
  * init: Remove check_bugs() leftovers
      init/main.c
    um/cpu: Switch to arch_cpu_finalize_init()
    sparc/cpu: Switch to arch_cpu_finalize_init()
    sh/cpu: Switch to arch_cpu_finalize_init()
    mips/cpu: Switch to arch_cpu_finalize_init()
    m68k/cpu: Switch to arch_cpu_finalize_init()
    ia64/cpu: Switch to arch_cpu_finalize_init()
    ARM: cpu: Switch to arch_cpu_finalize_init()
    x86/cpu: Switch to arch_cpu_finalize_init()
  * init: Provide arch_cpu_finalize_init()
      arch/Kconfig
      include/linux/cpu.h
      init/main.c
    Merge 4.19.289 into android-4.19-stable
Linux 4.19.289
    x86/cpu/amd: Add a Zenbleed fix
    x86/cpu/amd: Move the errata checking functionality up
    x86/microcode/AMD: Load late on both threads too
    Merge 4.19.288 into android-4.19-stable
Linux 4.19.288
    i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
    x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
    drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
    drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
    drm/exynos: vidi: fix a wrong error return
    ASoC: nau8824: Add quirk to active-high jack-detect
    s390/cio: unregister device when the only path is gone
    usb: gadget: udc: fix NULL dereference in remove()
    nfcsim.c: Fix error checking for debugfs_create_dir
    media: cec: core: don't set last_initiator if tx in progress
  * arm64: Add missing Set/Way CMO encodings
      arch/arm64/include/asm/sysreg.h
  * HID: wacom: Add error check to wacom_parse_and_register()
      drivers/hid/wacom_sys.c
    scsi: target: iscsi: Prevent login threads from racing between each other
  * sch_netem: acquire qdisc lock in netem_change()
      net/sched/sch_netem.c
    netfilter: nfnetlink_osf: fix module autoload
    netfilter: nf_tables: disallow element updates of bound anonymous sets
    be2net: Extend xmit workaround to BE3 chip
    mmc: usdhi60rol0: fix deferred probing
    mmc: sdhci-acpi: fix deferred probing
    mmc: omap_hsmmc: fix deferred probing
    mmc: omap: fix deferred probing
    mmc: mvsdio: fix deferred probing
    mmc: mvsdio: convert to devm_platform_ioremap_resource
    mmc: mtk-sd: fix deferred probing
    net: qca_spi: Avoid high load if QCA7000 is not available
    xfrm: Linearize the skb after offloading if needed.
    ieee802154: hwsim: Fix possible memory leaks
  * rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
      include/linux/rcupdate.h
    nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
  * cgroup: Do not corrupt task iteration when rebinding subsystem
      kernel/cgroup/cgroup.c
    PCI: hv: Fix a race condition bug in hv_pci_query_relations()
    Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
    nilfs2: fix buffer corruption due to concurrent device reads
    ipmi: move message error checking to avoid deadlock
  * ipmi: Make the smi watcher be disabled immediately when not needed
      include/linux/ipmi_smi.h
    x86/purgatory: remove PGO flags
    nilfs2: reject devices with insufficient block count
    serial: lantiq: add missing interrupt ack
    serial: lantiq: Do not swap register read/writes
    serial: lantiq: Use readl/writel instead of ltq_r32/ltq_w32
    serial: lantiq: Change ltq_w32_mask to asc_update_bits
    Merge 4.19.287 into android-4.19-stable
Linux 4.19.287
  * mmc: block: ensure error propagation for non-blk
      drivers/mmc/core/block.c
    powerpc: Fix defconfig choice logic when cross compiling
    drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
  * neighbour: delete neigh_lookup_nodev as not used
      include/net/neighbour.h
      net/core/neighbour.c
  * net: Remove unused inline function dst_hold_and_use()
      include/net/dst.h
  * neighbour: Remove unused inline function neigh_key_eq16()
      include/net/neighbour.h
    selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
  * net: tipc: resize nlattr array to correct size
      net/tipc/bearer.c
    net: lapbether: only support ethernet devices
    drm/nouveau: add nv_encoder pointer check for NULL
    drm/nouveau/kms: Don't change EDID when it hasn't actually changed
    drm/nouveau/dp: check for NULL nv_connector->native_mode
    igb: fix nvm.ops.read() error handling
  * sctp: fix an error code in sctp_sf_eat_auth()
      net/sctp/sm_statefuns.c
    IB/isert: Fix incorrect release of isert connection
    IB/isert: Fix possible list corruption in CMA handler
    IB/isert: Fix dead lock in ib_isert
    IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
    RDMA/rxe: Fix the use-before-initialization error of resp_pkts
    RDMA/rxe: Removed unused name from rxe_task struct
    RDMA/rxe: Remove the unused variable obj
  * ping6: Fix send to link-local addresses with VRF.
      net/ipv6/ping.c
  * netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
      net/netfilter/nfnetlink.c
  * usb: gadget: f_ncm: Fix NTP-32 support
      drivers/usb/gadget/function/f_ncm.c
  * usb: gadget: f_ncm: Add OS descriptor support
      drivers/usb/gadget/function/f_ncm.c
      drivers/usb/gadget/function/u_ncm.h
  * usb: dwc3: gadget: Reset num TRBs before giving back the request
      drivers/usb/dwc3/gadget.c
    USB: serial: option: add Quectel EM061KGL series
  * Remove DECnet support from kernel
      include/linux/netdevice.h
      include/linux/netfilter.h
      include/linux/netfilter_defs.h
      include/net/netns/netfilter.h
      include/uapi/linux/netlink.h
      net/Kconfig
      net/Makefile
      net/core/dev.c
      net/core/neighbour.c
      net/netfilter/core.c
    net: usb: qmi_wwan: add support for Compal RXM-G1
    RDMA/uverbs: Restrict usage of privileged QKEYs
    nouveau: fix client work fence deletion race
    powerpc/purgatory: remove PGO flags
    kexec: support purgatories with .text.hot sections
    nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
    nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
    nios2: dts: Fix tse_mac "max-frame-size" property
    ocfs2: check new file size on fallocate call
    ocfs2: fix use-after-free when unmounting read-only filesystem
    xen/blkfront: Only check REQ_FUA for writes
    mips: Move initrd_start check after initrd address sanitisation.
    MIPS: Alchemy: fix dbdma2
    parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
  * power: supply: Fix logic checking if system is running from battery
      drivers/power/supply/power_supply_core.c
    irqchip/meson-gpio: Mark OF related data as maybe unused
  * regulator: Fix error checking for debugfs_create_dir
      drivers/regulator/core.c
  * power: supply: Ratelimit no data debug output
      drivers/power/supply/power_supply_sysfs.c
    ARM: dts: vexpress: add missing cache properties
    power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
    power: supply: ab8500: Fix external_power_changed race
    Merge "Merge 4.19.286 into android-4.19-stable" into android-4.19-stable
  * Revert "tcp: deny tcp_disconnect() when threads are waiting"
      include/net/sock.h
      net/ipv4/af_inet.c
      net/ipv4/inet_connection_sock.c
      net/ipv4/tcp.c
    Merge "Merge 4.19.285 into android-4.19-stable" into android-4.19-stable
    Merge 4.19.286 into android-4.19-stable
  * Revert "tcp: deny tcp_disconnect() when threads are waiting"
      include/net/sock.h
      net/ipv4/af_inet.c
      net/ipv4/inet_connection_sock.c
      net/ipv4/tcp.c
  * ANDROID: GKI: update ABI xml for incrementalfs.ko
      android/abi_gki_aarch64.xml
    Merge 4.19.285 into android-4.19-stable
Linux 4.19.286
    Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE"
    btrfs: unset reloc control if transaction commit fails in prepare_to_relocate()
    btrfs: check return value of btrfs_commit_transaction in relocation
  * ext4: only check dquot_initialize_needed() when debugging
      fs/ext4/xattr.c
    i2c: sprd: Delete i2c adapter in .remove's error path
    pinctrl: meson-axg: add missing GPIOA_18 gpio group
  * Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk
      net/bluetooth/hci_core.c
    ceph: fix use-after-free bug for inodes when flushing capsnaps
    drm/amdgpu: fix xclk freq on CHIP_STONEY
    Input: psmouse - fix OOB access in Elantech protocol
  * Input: xpad - delete a Razer DeathAdder mouse VID/PID entry
      drivers/input/joystick/xpad.c
    batman-adv: Broken sync while rescheduling delayed work
  * lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
      lib/cpu_rmap.c
  * net: sched: fix possible refcount leak in tc_chain_tmplt_add()
      net/sched/cls_api.c
  * net: sched: move rtm_tca_policy declaration to include file
      include/net/pkt_sched.h
      net/sched/cls_api.c
  * rfs: annotate lockless accesses to RFS sock flow table
      include/linux/netdevice.h
      net/core/dev.c
  * rfs: annotate lockless accesses to sk->sk_rxhash
      include/net/sock.h
  * Bluetooth: L2CAP: Add missing checks for invalid DCID
      net/bluetooth/l2cap_core.c
  * Bluetooth: Fix l2cap_disconnect_req deadlock
      net/bluetooth/l2cap_core.c
    net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
    spi: qup: Request DMA before enabling clocks
    i40e: fix build warnings in i40e_alloc.h
    i40iw: fix build warning in i40iw_manage_apbvt()
  * UPSTREAM: net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
      drivers/net/usb/cdc_ncm.c
  * UPSTREAM: cdc_ncm: Fix the build warning
      drivers/net/usb/cdc_ncm.c
  * UPSTREAM: cdc_ncm: Implement the 32-bit version of NCM Transfer Block
      drivers/net/usb/cdc_ncm.c
      include/linux/usb/cdc_ncm.h
  * Revert "tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT"
      include/net/sock.h
      include/net/tcp.h
      net/core/stream.c
  * Revert "tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit"
      net/ipv4/tcp.c
  * Revert "tcp: factor out __tcp_close() helper"
      include/net/tcp.h
      net/ipv4/tcp.c
  * Revert "tcp: add annotations around sk->sk_shutdown accesses"
      net/ipv4/af_inet.c
      net/ipv4/tcp.c
      net/ipv4/tcp_input.c
  * ANDROID: fix abi break in 4.19.284 for cpuhotplug.h
      include/linux/cpuhotplug.h
    Merge "Merge 4.19.284 into android-4.19-stable" into android-4.19-stable
    UPSTREAM: mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
    UPSTREAM: mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
Linux 4.19.285
    wifi: rtlwifi: 8192de: correct checking of IQK reload
  * scsi: dpt_i2o: Do not process completions with invalid addresses
      drivers/scsi/Kconfig
    scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
  * regmap: Account for register length when chunking
      drivers/base/regmap/regmap.c
    fbcon: Fix null-ptr-deref in soft_cursor
  * ext4: add lockdep annotations for i_data_sem for ea_inode's
      fs/ext4/ext4.h
      fs/ext4/xattr.c
  * selinux: don't use make's grouped targets feature yet
      security/selinux/Makefile
    tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
    mmc: vub300: fix invalid response handling
    rsi: Remove unnecessary boolean condition
    regulator: da905{2,5}: Remove unnecessary array check
    hwmon: (scmi) Remove redundant pointer check
    wifi: rtlwifi: remove always-true condition pointed out by GCC 12
    lib/dynamic_debug.c: use address-of operator on section symbols
  * kernel/extable.c: use address-of operator on section symbols
      kernel/extable.c
    eth: sun: cassini: remove dead code
  * gcc-12: disable '-Wdangling-pointer' warning for now
      Makefile
    ACPI: thermal: drop an always true check
    x86/boot: Wrap literal addresses in absolute_pointer()
    ata: libata-scsi: Use correct device no in ata_find_dev()
    scsi: stex: Fix gcc 13 warnings
  * usb: gadget: f_fs: Add unbind event before functionfs_unbind
      drivers/usb/gadget/function/f_fs.c
    net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
  * iio: dac: build ad5758 driver when AD5758 is selected
      drivers/iio/dac/Makefile
    iio: dac: mcp4725: Fix i2c_master_send() return value handling
  * HID: wacom: avoid integer overflow in wacom_intuos_inout()
      drivers/hid/wacom_wac.c
  * HID: google: add jewel USB id
      drivers/hid/hid-ids.h
    iio: adc: mxs-lradc: fix the order of two cleanup operations
    mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
    atm: hide unused procfs functions
    ALSA: oss: avoid missing-prototype warnings
  * netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
      net/netfilter/nf_conntrack_netlink.c
    wifi: b43: fix incorrect __packed annotation
  * scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
      drivers/scsi/scsi_lib.c
  * arm64/mm: mark private VM_FAULT_X defines as vm_fault_t
      arch/arm64/mm/fault.c
    ARM: dts: stm32: add pin map for CAN controller on stm32f7
    wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
    media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
    media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
  * media: dvb-core: Fix use-after-free due on race condition at dvb_net
      include/media/dvb_net.h
    media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table
    media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
    media: dvb_ca_en50221: fix a size write bug
    media: netup_unidvb: fix irq init by register it at the end of probe
    media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
    media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
    media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
    media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
    media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
    media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
  * media: dvb_demux: fix a bug for the continuity counter
      drivers/media/dvb-core/dvb_demux.c
    ASoC: ssm2602: Add workaround for playback distortions
  * xfrm: Check if_id in inbound policy/secpath match
      net/xfrm/xfrm_policy.c
    ASoC: dwc: limit the number of overrun messages
    nbd: Fix debugfs_create_dir error checking
    fbdev: stifb: Fix info entry in sti_struct on error path
    fbdev: modedb: Add 1920x1080 at 60 Hz video mode
    media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
    ARM: 9295/1: unwind:fix unwind abort for uleb128 case
    mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
    watchdog: menz069_wdt: fix watchdog initialisation
    net: dsa: mv88e6xxx: Increase wait after reset deactivation
    net/sched: flower: fix possible OOB write in fl_set_geneve_opt()
  * udp6: Fix race condition in udp6_sendmsg & connect
      net/core/sock.c
  * net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
      net/netlink/af_netlink.c
  * ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
      include/linux/bitops.h
  * net: sched: fix NULL pointer dereference in mq_attach
      net/sched/sch_api.c
  * net/sched: Prohibit regrafting ingress or clsact Qdiscs
      net/sched/sch_api.c
  * net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs
      net/sched/sch_api.c
      net/sched/sch_ingress.c
  * net/sched: sch_clsact: Only create under TC_H_CLSACT
      net/sched/sch_ingress.c
  * net/sched: sch_ingress: Only create under TC_H_INGRESS
      net/sched/sch_ingress.c
  * tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
      net/ipv4/tcp.c
  * tcp: deny tcp_disconnect() when threads are waiting
      include/net/sock.h
      net/ipv4/af_inet.c
      net/ipv4/inet_connection_sock.c
      net/ipv4/tcp.c
  * af_packet: do not use READ_ONCE() in packet_bind()
      net/packet/af_packet.c
    amd-xgbe: fix the false linkup in xgbe_phy_status
  * af_packet: Fix data-races of pkt_sk(sk)->num.
      net/packet/af_packet.c
    netrom: fix info-leak in nr_write_internal()
    net/mlx5: fw_tracer, Fix event handling
    dmaengine: pl330: rename _start to prevent build error
  * netfilter: ctnetlink: Support offloaded conntrack entry deletion
      net/netfilter/nf_conntrack_netlink.c
  * ipv{4,6}/raw: fix output xfrm lookup wrt protocol
      include/net/ip.h
      include/uapi/linux/in.h
      net/ipv4/ip_sockglue.c
      net/ipv4/raw.c
      net/ipv6/raw.c
  * bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
      net/bluetooth/hci_sock.c
  * cdc_ncm: Fix the build warning
      drivers/net/usb/cdc_ncm.c
    power: supply: bq24190: Call power_supply_changed() after updating input current
  * power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()
      drivers/power/supply/power_supply_core.c
      include/linux/power_supply.h
    power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
  * net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
      drivers/net/usb/cdc_ncm.c
  * cdc_ncm: Implement the 32-bit version of NCM Transfer Block
      drivers/net/usb/cdc_ncm.c
      include/linux/usb/cdc_ncm.h
    Merge 4.19.284 into android-4.19-stable
    UPSTREAM: efi: rt-wrapper: Add missing include
  * BACKPORT: arm64: efi: Execute runtime services from a dedicated stack
      arch/arm64/include/asm/efi.h
  * Revert "uapi/linux/const.h: prefer ISO-friendly __typeof__"
      include/uapi/linux/const.h
    Merge "Merge 4.19.283 into android-4.19-stable" into android-4.19-stable
Linux 4.19.284
  * drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
      drivers/base/platform.c
    3c589_cs: Fix an error handling path in tc589_probe()
    forcedeth: Fix an error handling path in nv_probe()
  * ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
      include/uapi/sound/skl-tplg-interface.h
    x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
    xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
  * coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
      drivers/hwtracing/coresight/coresight-tmc-etr.c
    power: supply: sbs-charger: Fix INHIBITED bit for Status reg
  * power: supply: bq27xxx: Fix poll_interval handling and races on remove
      include/linux/power/bq27xxx_battery.h
    power: supply: bq27xxx: Fix I2C IRQ race on remove
    power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
  * power: supply: leds: Fix blink to LED on transition
      drivers/power/supply/power_supply_leds.c
  * ipv6: Fix out-of-bounds access in ipv6_find_tlv()
      net/ipv6/exthdrs_core.c
  * bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields
      kernel/bpf/verifier.c
  * net: fix skb leak in __skb_tstamp_tx()
      net/core/skbuff.c
    media: radio-shark: Add endpoint checks
    USB: sisusbvga: Add endpoint checks
  * USB: core: Add routines for endpoint checks in old drivers
      drivers/usb/core/usb.c
      include/linux/usb.h
  * udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
      net/ipv4/udplite.c
      net/ipv6/udplite.c
    ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G
    ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported
    parisc: Fix flush_dcache_page() for usage from irq context
    selftests/memfd: Fix unknown type name build failure
    x86/mm: Avoid incomplete Global INVLPG flushes
    btrfs: use nofs when cleaning up aborted transactions
    parisc: Allow to reboot machine after system halt
    m68k: Move signal frame following exception on 68020/030
    ALSA: hda/ca0132: add quirk for EVGA X299 DARK
    spi: fsl-cpm: Use 16 bit mode for large transfers with even size
    spi: fsl-spi: Re-organise transfer bits_per_word adaptation
    spi: spi-fsl-spi: automatically adapt bits-per-word in cpu mode
    s390/qdio: fix do_sqbs() inline assembly constraint
    s390/qdio: get rid of register asm
    vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
    vc_screen: rewrite vcs_size to accept vc, not inode
  * usb: gadget: u_ether: Fix host MAC address case
      drivers/usb/gadget/function/u_ether.c
  * usb: gadget: u_ether: Convert prints to device prints
      drivers/usb/gadget/function/u_ether.c
  * lib/string_helpers: Introduce string_upper() and string_lower() helpers
      include/linux/string_helpers.h
    ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
    ALSA: hda/realtek - ALC897 headset MIC no sound
    ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
    ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
    ALSA: hda/realtek - The front Mic on a HP machine doesn't work
    ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
    ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
    ALSA: hda/realtek - Add Headset Mic supported for HP cPC
    ALSA: hda/realtek - More constifications
    Add Acer Aspire Ethos 8951G model quirk
  * HID: wacom: Force pen out of prox if no events have been received in a while
      drivers/hid/wacom.h
      drivers/hid/wacom_sys.c
      drivers/hid/wacom_wac.c
    netfilter: nf_tables: do not allow RULE_ID to refer to another chain
    netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
    netfilter: nf_tables: stricter validation of element data
  * netfilter: nf_tables: allow up to 64 bytes in the set element data area
      include/net/netfilter/nf_tables.h
    netfilter: nf_tables: add nft_setelem_parse_key()
    netfilter: nf_tables: validate registers coming from userspace.
  * netfilter: nftables: statify nft_parse_register()
      include/net/netfilter/nf_tables.h
  * netfilter: nftables: add nft_parse_register_store() and use it
      include/net/netfilter/nf_tables.h
      include/net/netfilter/nf_tables_core.h
      include/net/netfilter/nft_fib.h
  * netfilter: nftables: add nft_parse_register_load() and use it
      include/net/netfilter/nf_tables.h
      include/net/netfilter/nf_tables_core.h
      include/net/netfilter/nft_masq.h
      include/net/netfilter/nft_redir.h
    nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
    tpm/tpm_tis: Disable interrupts for more Lenovo devices
    ceph: force updating the msg pointer in non-split case
    serial: Add support for Advantech PCI-1611U card
  * statfs: enforce statfs[64] structure initialization
      fs/statfs.c
    ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
    ALSA: hda: Fix Oops by 9.1 surround channel names
    usb: typec: altmodes/displayport: fix pin_assignment_show
  * usb-storage: fix deadlock when a scsi command timeouts more than once
      drivers/usb/storage/scsiglue.c
    vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
    igb: fix bit_shift to be in [1..8] range
    cassini: Fix a memory leak in the error handling path of cas_init_one()
    net: bcmgenet: Restore phy_stop() depending upon suspend/close
    net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
    net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
    drm/exynos: fix g2d_open/close helper function definitions
    media: netup_unidvb: fix use-after-free at del_timer()
    erspan: get the proto with the md version for collect_md
  * ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
      include/net/ip6_tunnel.h
      include/net/ip_tunnels.h
    ip6_gre: Make o_seqno start from 0 in native mode
    ip6_gre: Fix skb_under_panic in __gre6_xmit()
    serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
  * drivers: provide devm_platform_ioremap_resource()
      drivers/base/platform.c
      include/linux/platform_device.h
    vsock: avoid to close connected socket after the timeout
    net: fec: Better handle pm_runtime_get() failing in .remove()
  * af_key: Reject optional tunnel/BEET mode templates in outbound policies
      net/key/af_key.c
    cpupower: Make TSC read per CPU for Mperf monitor
    btrfs: fix space cache inconsistency after error loading it from disk
    btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
    mfd: dln2: Fix memory leak in dln2_probe()
    phy: st: miphy28lp: use _poll_timeout functions for waits
  * Input: xpad - add constants for GIP interface numbers
      drivers/input/joystick/xpad.c
    clk: tegra20: fix gcc-7 constant overflow warning
    recordmcount: Fix memory leaks in the uwrite function
  * sched: Fix KCSAN noinstr violation
      include/linux/sched/task_stack.h
    mcb-pci: Reallocate memory region to avoid memory overlapping
    serial: 8250: Reinit port->pm on port specific driver unbind
    usb: typec: tcpm: fix multiple times discover svids error
  * HID: wacom: generic: Set battery quirk only when we see battery data
      drivers/hid/wacom_wac.c
    spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
    HID: logitech-hidpp: Reconcile USB and Unifying serials
    HID: logitech-hidpp: Don't use the USB serial for USB devices
    staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
  * Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
      net/bluetooth/l2cap_core.c
    wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
  * f2fs: fix to drop all dirty pages during umount() if cp_error is set
      fs/f2fs/checkpoint.c
      fs/f2fs/data.c
  * ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
      fs/ext4/mballoc.c
  * ext4: set goal start correctly in ext4_mb_normalize_request
      fs/ext4/mballoc.c
    gfs2: Fix inode height consistency check
    scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
  * lib: cpu_rmap: Avoid use after free on rmap->obj array entries
      lib/cpu_rmap.c
  * net: Catch invalid index in XPS mapping
      net/core/dev.c
    net: pasemi: Fix return type of pasemi_mac_start_tx()
    ext2: Check block size validity during mount
    wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
    ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
    ACPICA: Avoid undefined behavior: applying zero offset to null pointer
    drm/tegra: Avoid potential 32-bit integer overflow
    ACPI: EC: Fix oops when removing custom query handlers
  * firmware: arm_sdei: Fix sleep from invalid context BUG
      include/linux/cpuhotplug.h
    memstick: r592: Fix UAF bug in r592_remove due to race condition
  * regmap: cache: Return error in cache sync operations for REGCACHE_NONE
      drivers/base/regmap/regcache.c
    drm/amd/display: Use DC_LOG_DC in the trasform pixel function
    fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
  * af_unix: Fix data races around sk->sk_shutdown.
      net/unix/af_unix.c
  * af_unix: Fix a data race of sk->sk_receive_queue->qlen.
      net/unix/af_unix.c
  * net: datagram: fix data-races in datagram_poll()
      net/core/datagram.c
    ipvlan:Fix out-of-bounds caused by unclear skb->cb
  * tcp: add annotations around sk->sk_shutdown accesses
      net/ipv4/af_inet.c
      net/ipv4/tcp.c
      net/ipv4/tcp_input.c
  * tcp: factor out __tcp_close() helper
      include/net/tcp.h
      net/ipv4/tcp.c
  * tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit
      net/ipv4/tcp.c
  * tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT
      include/net/sock.h
      include/net/tcp.h
      net/core/stream.c
  * net: annotate sk->sk_err write from do_recvmmsg()
      net/socket.c
  * netlink: annotate accesses to nlk->cb_running
      net/netlink/af_netlink.c
  * net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
      include/net/sock.h
  * UPSTREAM: ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
      fs/ext4/super.c
    Merge 4.19.283 into android-4.19-stable
  * UPSTREAM: ext4: fix invalid free tracking in ext4_xattr_move_to_block()
      fs/ext4/xattr.c
Linux 4.19.283
  * mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
      mm/page_alloc.c
  * printk: declare printk_deferred_{enter,safe}() in include/linux/printk.h
      include/linux/printk.h
    PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock
    PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors
    drbd: correctly submit flush bio on barrier
    serial: 8250: Fix serial8250_tx_empty() race with DMA Tx
  * tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH
      drivers/tty/tty_io.c
      drivers/tty/tty_ioctl.c
      include/linux/tty.h
  * ext4: fix invalid free tracking in ext4_xattr_move_to_block()
      fs/ext4/xattr.c
  * ext4: remove a BUG_ON in ext4_mb_release_group_pa()
      fs/ext4/mballoc.c
  * ext4: bail out of ext4_xattr_ibody_get() fails for any reason
      fs/ext4/inline.c
  * ext4: add bounds checking in get_max_inline_xattr_value_size()
      fs/ext4/inline.c
  * ext4: improve error recovery code paths in __ext4_remount()
      fs/ext4/super.c
  * ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
      fs/ext4/super.c
  * ext4: fix WARNING in mb_find_extent
      fs/ext4/balloc.c
  * HID: wacom: Set a default resolution for older tablets
      drivers/hid/wacom_wac.c
    drm/panel: otm8009a: Set backlight parent to panel device
    ARM: dts: s5pv210: correct MIPI CSIS clock name
    ARM: dts: exynos: fix WM8960 clock name in Itop Elite
    sh: nmi_debug: fix return value of __setup handler
    sh: init: use OF_EARLY_FLATTREE for early init
    sh: math-emu: fix macro redefined warning
    platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
    cifs: fix pcchunk length type in smb2_copychunk_range
    btrfs: print-tree: parent bytenr must be aligned to sector size
    btrfs: fix btrfs_prev_leaf() to not return the same key twice
    perf symbols: Fix return incorrect build_id size in elf_read_build_id()
    perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp()
    perf vendor events power9: Remove UTF-8 characters from JSON files
    virtio_net: suppress cpu stall when free_unused_bufs
    virtio_net: split free_unused_bufs()
    ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
    drm/amdgpu: add a missing lock for AMDGPU_SCHED
  * drm/amdgpu: Add command to override the context priority.
      include/uapi/drm/amdgpu_drm.h
    drm/amdgpu: Put enable gfx off feature to a delay thread
    drm/amdgpu: Add amdgpu_gfx_off_ctrl function
  * af_packet: Don't send zero-byte data in packet_sendmsg_spkt().
      net/packet/af_packet.c
    rxrpc: Fix hard call timeout units
  * net/sched: act_mirred: Add carrier check
      net/sched/act_mirred.c
  * writeback: fix call of incorrect macro
      fs/fs-writeback.c
    net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu
    net: dsa: mv88e6xxx: Add missing watchdog ops for 6320 family
  * sit: update dev->needed_headroom in ipip6_tunnel_bind_dev()
      net/ipv6/sit.c
    relayfs: fix out-of-bounds access in relay_file_read
    kernel/relay.c: fix read_pos error when multiple readers
  * dm verity: fix error handling for check_at_most_once on FEC
      drivers/md/dm-verity-target.c
  * dm verity: skip redundant verity_handle_err() on I/O errors
      drivers/md/dm-verity-target.c
    ipmi: fix SSIF not responding under certain cond.
    ipmi_ssif: Rename idle state and check
  * ipmi: Fix how the lower layers are told to watch for messages
      include/linux/ipmi_smi.h
    ipmi: Fix SSIF flag requests
  * tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem
      drivers/base/cpu.c
      include/linux/tick.h
      kernel/time/tick-sched.c
  * nohz: Add TICK_DEP_BIT_RCU
      include/linux/tick.h
      include/trace/events/timer.h
      kernel/time/tick-sched.c
  * netfilter: nf_tables: deactivate anonymous set from preparation phase
      include/net/netfilter/nf_tables.h
    debugobject: Ensure pool refill (again)
    perf auxtrace: Fix address filter entire kernel size
  * dm ioctl: fix nested locking in table_clear() to remove deadlock concern
      drivers/md/dm-ioctl.c
    dm flakey: fix a crash with invalid table line
    dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path
    s390/dasd: fix hanging blockdevice after request requeue
  * btrfs: scrub: reject unsupported scrub flags
      include/uapi/linux/btrfs.h
    clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent
    wifi: rtl8xxxu: RTL8192EU always needs full init
    md/raid10: fix null-ptr-deref in raid10_sync_request
    nilfs2: fix infinite loop in nilfs_mdt_get_block()
    nilfs2: do not write dirty data after degenerating to read-only
    parisc: Fix argument pointer in real64_call_asm()
    dmaengine: at_xdmac: do not enable all cyclic channels
    phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
    pwm: mtk-disp: Disable shadow registers before setting backlight values
    pwm: mtk-disp: Adjust the clocks to avoid them mismatch
    pwm: mtk-disp: Don't check the return code of pwmchip_remove()
    openrisc: Properly store r31 to pt_regs on unhandled exceptions
    RDMA/mlx5: Use correct device num_ports when modify DC
  * SUNRPC: remove the maximum number of retries in call_bind_status
      include/linux/sunrpc/sched.h
    NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease
    IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order
  * clk: add missing of_node_put() in "assigned-clocks" property parsing
      drivers/clk/clk-conf.c
    power: supply: generic-adc-battery: fix unit scaling
    RDMA/mlx4: Prevent shift wrapping in set_user_sq_size()
    RDMA/rdmavt: Delete unnecessary NULL check
  * perf/core: Fix hardlockup failure caused by perf throttle
      kernel/events/core.c
    powerpc/rtas: use memmove for potentially overlapping buffer copy
  * macintosh: via-pmu-led: requires ATA to be set
      drivers/macintosh/Kconfig
    powerpc/sysdev/tsi108: fix resource printk format warnings
    powerpc/wii: fix resource printk format warnings
    powerpc/mpc512x: fix resource printk format warning
    macintosh/windfarm_smu_sat: Add missing of_node_put()
  * spmi: Add a check for remove callback when removing a SPMI driver
      drivers/spmi/spmi.c
    staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
    serial: 8250: Add missing wakeup event reporting
    tty: serial: fsl_lpuart: adjust buffer length to the intended size
    usb: chipidea: fix missing goto in `ci_hdrc_probe`
    sh: sq: Fix incorrect element size for allocating bitmap buffer
  * uapi/linux/const.h: prefer ISO-friendly __typeof__
      include/uapi/linux/const.h
    spi: cadence-quadspi: fix suspend-resume implementations
    mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel
    mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure
    mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry
    ia64: salinfo: placate defined-but-not-used warning
    ia64: mm/contig: fix section mismatch warning/error
  * of: Fix modalias string generation
      drivers/of/device.c
    vmci_host: fix a race condition in vmci_host_poll() causing GPF
    spi: fsl-spi: Fix CPM/QE mode Litte Endian
    spi: qup: Don't skip cleanup in remove's error path
    spi: qup: fix PM reference leak in spi_qup_remove()
  * linux/vt_buffer.h: allow either builtin or modular for macros
      include/linux/vt_buffer.h
    usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition
    fpga: bridge: fix kernel-doc parameter description
    usb: host: xhci-rcar: remove leftover quirk handling
  * pstore: Revert pmsg_lock back to a normal mutex
      fs/pstore/pmsg.c
  * tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.
      net/core/skbuff.c
    net: amd: Fix link leak when verifying config failed
  * netlink: Use copy_to_user() for optval in netlink_getsockopt().
      net/netlink/af_netlink.c
    Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work"
  * ipv4: Fix potential uninit variable access bug in __ip_make_skb()
      net/ipv4/ip_output.c
  * netfilter: nf_tables: don't write table validation state without mutex
      include/linux/netfilter/nfnetlink.h
      net/netfilter/nfnetlink.c
    ixgbe: Enable setting RSS table to default values
    ixgbe: Allow flow hash to be set via ethtool
    wifi: iwlwifi: mvm: check firmware response size
    wifi: iwlwifi: make the loop for card preparation effective
    md/raid10: fix memleak of md thread
    md: update the optimal I/O size on reshape
    md/raid10: fix memleak for 'conf->bio_split'
    md/raid10: fix leak of 'r10bio->remaining' for recovery
  * crypto: drbg - Only fail when jent is unavailable in FIPS mode
      crypto/drbg.c
  * crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors
      crypto/drbg.c
    bpftool: Fix bug for long instructions in program CFG dumps
    wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg()
    wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg()
    rtlwifi: Replace RT_TRACE with rtl_dbg
    rtlwifi: Start changing RT_TRACE into rtl_dbg
    rtlwifi: rtl_pci: Fix memory leak when hardware init fails
    scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS
    scsi: target: iscsit: Fix TAS handling during conn cleanup
  * net/packet: convert po->auxdata to an atomic flag
      net/packet/af_packet.c
      net/packet/internal.h
  * net/packet: convert po->origdev to an atomic flag
      net/packet/af_packet.c
      net/packet/internal.h
    vlan: partially enable SIOCSHWTSTAMP in container
  * scm: fix MSG_CTRUNC setting condition for SO_PASSSEC
      include/net/scm.h
    tools: bpftool: Remove invalid \' json escape
    wifi: ath6kl: reduce WARN to dev_dbg() in callback
    wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list()
    wifi: ath9k: hif_usb: fix memory leak of remain_skbs
    wifi: ath6kl: minor fix for allocation size
    debugobject: Prevent init race with static objects
    debugobjects: Move printk out of db->lock critical sections
    debugobjects: Add percpu free pools
  * arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step
      arch/arm64/include/asm/debug-monitors.h
      arch/arm64/kernel/debug-monitors.c
    x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
    media: rc: gpio-ir-recv: Fix support for wake-up
    media: rcar_fdp1: Fix refcount leak in probe and remove function
    media: rcar_fdp1: Fix the correct variable assignments
    media: saa7134: fix use after free bug in saa7134_finidev due to race condition
    media: dm1105: Fix use after free bug in dm1105_remove due to race condition
    x86/apic: Fix atomic update of offset in reserve_eilvt_offset()
    drm/msm/adreno: drop bogus pm_runtime_set_active()
    drm/msm/adreno: Defer enabling runpm until hw_init()
  * firmware: qcom_scm: Clear download bit during reboot
      drivers/firmware/qcom_scm.c
    media: av7110: prevent underflow in write_ts_to_decoder()
  * media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
      include/uapi/linux/media-bus-format.h
    media: bdisp: Add missing check for create_workqueue
    ARM: dts: qcom: ipq4019: Fix the PCI I/O port range
    EDAC/skx: Fix overflows on the DRAM row address mapping arrays
    EDAC, skx: Move debugfs node under EDAC's hierarchy
  * drm/probe-helper: Cancel previous job before starting new one
      drivers/gpu/drm/drm_probe_helper.c
    drm/vgem: add missing mutex_destroy
    drm/rockchip: Drop unbalanced obj unref
  * selinux: ensure av_permissions.h is built when needed
      security/selinux/Makefile
  * selinux: fix Makefile dependencies of flask.h
      security/selinux/Makefile
    ubifs: Free memory for tmpfile name
    ubi: Fix return value overwrite issue in try_write_vid_and_data()
    ubifs: Fix memleak when insert_old_idx() failed
    Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
    i2c: omap: Fix standard mode false ACK readings
    KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted
    reiserfs: Add security prefix to xattr name in reiserfs_security_write()
  * ring-buffer: Sync IRQ works before buffer destruction
      kernel/trace/ring_buffer.c
    pwm: meson: Fix axg ao mux parents
    MIPS: fw: Allow firmware to pass a empty env
  * xhci: fix debugfs register accesses while suspended
      drivers/usb/host/xhci-debugfs.c
  * debugfs: regset32: Add Runtime PM support
      fs/debugfs/file.c
      include/linux/debugfs.h
    staging: iio: resolver: ads1210: fix config mode
    perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE)
  * USB: dwc3: fix runtime pm imbalance on unbind
      drivers/usb/dwc3/core.c
    stmmac: debugfs entry name is not be changed when udev rename device name.
    ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
    iio: adc: palmas_gpadc: fix NULL dereference on rmmod
    USB: serial: option: add UNISOC vendor and TOZED LT70C product
  * bluetooth: Perform careful capability checks in hci_sock_ioctl()
      net/bluetooth/hci_sock.c
    wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies()
  * ANDROID: incremental fs: Evict inodes before freeing mount data
      fs/incfs/main.c
      fs/incfs/vfs.c
  * Revert "Revert "mm/rmap: Fix anon_vma->degree ambiguity leading to double-reuse""
      android/abi_gki_aarch64.xml
      include/linux/rmap.h
      mm/rmap.c

Bug: 299241959
Change-Id: Ib8c4ff87b1b0b720abce0f5fcdf1a51f01a472a9
Signed-off-by: Wilson Sung <wilsonsung@google.com>
Signed-off-by: ChangYan Lee <changyan@google.com>
2023-10-17 05:00:19 +00:00
Eric Dumazet
cc4122c81d tcp: annotate data-races around fastopenq.max_qlen
[ Upstream commit 70f360dd7042cb843635ece9d28335a4addff9eb ]

This field can be read locklessly.

Fixes: 1536e2857b ("tcp: Add a TCP_FASTOPEN socket option to get a max backlog on its listner")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230719212857.3943972-12-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:27 +02:00
Wilson Sung
05a5973ef4 Merge android-4.19-stable (4.19.266) into android-msm-pixel-4.19-lts
Merge 4.19.266 into android-4.19-stable
Linux 4.19.266
    x86/speculation: Add RSB VM Exit protections
    x86/bugs: Warn when "ibrs" mitigation is selected on Enhanced IBRS parts
    x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current
    x86/speculation: Disable RRSBA behavior
    x86/bugs: Add Cannon lake to RETBleed affected CPU list
    x86/cpu/amd: Enumerate BTC_NO
    x86/common: Stamp out the stepping madness
    x86/speculation: Fill RSB on vmexit for IBRS
    KVM: VMX: Fix IBRS handling after vmexit
    KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS
    x86/speculation: Remove x86_spec_ctrl_mask
    x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit
    x86/speculation: Fix SPEC_CTRL write on SMT state change
    x86/speculation: Fix firmware entry SPEC_CTRL handling
    x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n
    x86/speculation: Change FILL_RETURN_BUFFER to work with objtool
    intel_idle: Disable IBRS during long idle
    x86/bugs: Report Intel retbleed vulnerability
    x86/bugs: Split spectre_v2_select_mitigation() and spectre_v2_user_select_mitigation()
    x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS
    x86/bugs: Optimize SPEC_CTRL MSR writes
    x86/entry: Add kernel IBRS implementation
    x86/entry: Remove skip_r11rcx
    x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
    x86/bugs: Add AMD retbleed= boot parameter
  * x86/bugs: Report AMD retbleed vulnerability
      drivers/base/cpu.c
      include/linux/cpu.h
    x86/cpufeatures: Move RETPOLINE flags to word 11
  * x86/cpu: Add a steppings field to struct x86_cpu_id
      include/linux/kvm_host.h
      include/linux/mod_devicetable.h
    x86/cpu: Add consistent CPU match macros
  * x86/devicetable: Move x86 specific macro out of generic code
      include/linux/mod_devicetable.h
    x86/cpufeature: Fix various quality problems in the <asm/cpu_device_hd.h> header
    x86/cpufeature: Add facility to check for min microcode revisions
  * Revert "x86/cpu: Add a steppings field to struct x86_cpu_id"
      include/linux/mod_devicetable.h
    Revert "x86/speculation: Add RSB VM Exit protections"
  * ANDROID: preserve CRC for some DRM functions
      include/linux/bits.h
  * Revert "tcp/udp: Make early_demux back namespacified."
      include/net/protocol.h
      include/net/tcp.h
      include/net/udp.h
      net/ipv4/af_inet.c
      net/ipv4/ip_input.c
      net/ipv4/sysctl_net_ipv4.c
      net/ipv6/ip6_input.c
      net/ipv6/tcp_ipv6.c
      net/ipv6/udp.c
    Merge 4.19.265 into android-4.19-stable
Linux 4.19.265
    wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker()
  * linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
      include/linux/bits.h
    KVM: x86: emulator: update the emulation mode after CR0 write
    KVM: x86: emulator: introduce emulator_recalc_and_set_mode
    KVM: x86: emulator: em_sysexit should update ctxt->mode
    KVM: x86: Mask off reserved bits in CPUID.80000008H
  * ext4: fix warning in 'ext4_da_release_space'
      fs/ext4/migrate.c
    parisc: Avoid printing the hardware path twice
    parisc: Export iosapic_serial_irq() symbol for serial port driver
  * parisc: Make 8250_gsc driver dependend on CONFIG_PARISC
      drivers/tty/serial/8250/Kconfig
  * efi: random: reduce seed size to 32 bytes
      include/linux/efi.h
  * ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices
      sound/usb/quirks-table.h
      sound/usb/quirks.c
  * capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
      security/commoncap.c
    tracing/histogram: Update document for KEYS_MAX size
    kprobe: reverse kp->flags when arm_kprobe failed
  * tcp/udp: Make early_demux back namespacified.
      include/net/protocol.h
      include/net/tcp.h
      include/net/udp.h
      net/ipv4/af_inet.c
      net/ipv4/ip_input.c
      net/ipv4/sysctl_net_ipv4.c
      net/ipv6/ip6_input.c
      net/ipv6/tcp_ipv6.c
      net/ipv6/udp.c
    btrfs: fix type of parameter generation in btrfs_get_dentry
    block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
  * Bluetooth: L2CAP: Fix attempting to access uninitialized memory
      net/bluetooth/l2cap_core.c
    i2c: xiic: Add platform module alias
  * HID: saitek: add madcatz variant of MMO7 mouse device ID
      drivers/hid/hid-ids.h
      drivers/hid/hid-quirks.c
    media: dvb-frontends/drxk: initialize err to 0
    media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE
    media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
  * ipv6: fix WARNING in ip6_route_net_exit_late()
      net/ipv6/route.c
  * net, neigh: Fix null-ptr-deref in neigh_table_clear()
      net/core/neighbour.c
  * net: mdio: fix undefined behavior in bit shift for __mdiobus_register
      drivers/net/phy/mdio_bus.c
  * Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()
      net/bluetooth/l2cap_core.c
  * Bluetooth: L2CAP: Fix use-after-free caused by l2cap_reassemble_sdu
      net/bluetooth/l2cap_core.c
    btrfs: fix ulist leaks in error paths of qgroup self tests
    btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
    isdn: mISDN: netjet: fix wrong check of device registration
    mISDN: fix possible memory leak in mISDN_register_device()
    rose: Fix NULL pointer dereference in rose_send_frame()
    ipvs: fix WARNING in ip_vs_app_net_cleanup()
    ipvs: fix WARNING in __ip_vs_cleanup_batch()
    ipvs: use explicitly signed chars
  * net: tun: fix bugs for oversize packet when napi frags enabled
      drivers/net/tun.c
    net: sched: Fix use after free in red_enqueue()
    ata: pata_legacy: fix pdc20230_set_piomode()
    net: fec: fix improper use of NETDEV_TX_BUSY
    nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
    nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
    RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
    net: dsa: Fix possible memory leaks in dsa_loop_init()
    nfs4: Fix kmemleak when allocate slot failed
    NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
    NFSv4.1: Handle RECLAIM_COMPLETE trunking errors
    BACKPORT: ARM: 9039/1: assembler: generalize byte swapping macro into rev_l
    BACKPORT: ARM: 9035/1: uncompress: Add be32tocpu macro
    Merge 4.19.264 into android-4.19-stable
Linux 4.19.264
    can: rcar_canfd: rcar_canfd_handle_global_receive(): fix IRQ storm on global FIFO receive
    net/mlx5e: Do not increment ESN when updating IPsec ESN state
    net: ehea: fix possible memory leak in ehea_register_port()
    openvswitch: switch from WARN to pr_warn
    ALSA: aoa: Fix I2S device accounting
    ALSA: aoa: i2sbus: fix possible memory leak in i2sbus_add_dev()
  * PM: domains: Fix handling of unavailable/disabled idle states
      drivers/base/power/domain.c
    net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
    i40e: Fix flow-type by setting GL_HASH_INSET registers
    i40e: Fix VF hang when reset is triggered on another VF
    i40e: Fix ethtool rx-flow-hash setting for X722
  * media: videodev2.h: V4L2_DV_BT_BLANKING_HEIGHT should check 'interlaced'
      include/uapi/linux/videodev2.h
  * media: v4l2-dv-timings: add sanity checks for blanking values
      drivers/media/v4l2-core/v4l2-dv-timings.c
    media: vivid: dev->bitmap_cap wasn't freed in all cases
    media: vivid: s_fbuf: add more sanity checks
    PM: hibernate: Allow hybrid sleep to work with s2idle
    can: mscan: mpc5xxx: mpc5xxx_can_probe(): add missing put_clock() in error path
  * tcp: fix indefinite deferral of RTO with SACK reneging
      net/ipv4/tcp_input.c
    net: lantiq_etop: don't free skb when returning NETDEV_TX_BUSY
  * net: fix UAF issue in nfqnl_nf_hook_drop() when ops_init() failed
      net/core/net_namespace.c
    kcm: annotate data-races around kcm->rx_wait
    kcm: annotate data-races around kcm->rx_psock
    amd-xgbe: add the bit rate quirk for Molex cables
    amd-xgbe: fix the SFP compliance codes check for DAC cables
    x86/unwind/orc: Fix unreliable stack dump with gcov
    net: netsec: fix error handling in netsec_register_mdio()
  * tipc: fix a null-ptr-deref in tipc_topsrv_accept
      net/tipc/topsrv.c
    ALSA: ac97: fix possible memory leak in snd_ac97_dev_register()
    arc: iounmap() arg is volatile
    drm/msm: Fix return type of mdp4_lvds_connector_mode_valid
    net: ieee802154: fix error return code in dgram_bind()
    mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
    xen/gntdev: Prevent leaking grants
    Xen/gntdev: don't ignore kernel unmapping error
    s390/futex: add missing EX_TABLE entry to __futex_atomic_op()
    perf auxtrace: Fix address filter symbol name match for modules
  * kernfs: fix use-after-free in __kernfs_remove
      fs/kernfs/dir.c
    mmc: core: Fix kernel panic when remove non-standard SDIO card
    drm/msm/hdmi: fix memory corruption with too many bridges
    drm/msm/dsi: fix memory corruption with too many bridges
    mac802154: Fix LQI recording
    fbdev: smscufx: Fix several use-after-free bugs
    iio: light: tsl2583: Fix module unloading
    tools: iio: iio_utils: fix digit calculation
  * xhci: Remove device endpoints from bandwidth list when freeing the device
      drivers/usb/host/xhci-mem.c
  * usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
      drivers/usb/host/xhci-pci.c
    usb: bdc: change state when port disconnected
  * usb: dwc3: gadget: Don't set IMI for no_interrupt
      drivers/usb/dwc3/gadget.c
  * usb: dwc3: gadget: Stop processing more requests on IMI
      drivers/usb/dwc3/gadget.c
  * USB: add RESET_RESUME quirk for NVIDIA Jetson devices in RCM
      drivers/usb/core/quirks.c
    ALSA: au88x0: use explicitly signed char
    ALSA: Use del_timer_sync() before freeing timer
    can: kvaser_usb: Fix possible completions during init_completion
  * mm: /proc/pid/smaps_rollup: fix no vma's null-deref
      fs/proc/task_mmu.c
    hv_netvsc: Fix race between VF offering and VF association message from host
  * Makefile.debug: re-enable debug info for .S files
      Makefile
    ACPI: video: Force backlight native for more TongFang devices
  * media: v4l2-mem2mem: Apply DST_QUEUE_OFF_BASE on MMAP buffers across ioctls
      drivers/media/v4l2-core/v4l2-mem2mem.c
    iommu/vt-d: Clean up si_domain in the init_dmars() error path
    net: hns: fix possible memory leak in hnae_ae_register()
    net: sched: cake: fix null pointer access issue when cake_init() fails
    net/atm: fix proc_mpc_write incorrect return value
  * HID: magicmouse: Do not set BTN_MOUSE on double report
      drivers/hid/hid-magicmouse.c
  * tipc: fix an information leak in tipc_topsrv_kern_subscr
      net/tipc/topsrv.c
  * tipc: Fix recognition of trial period
      net/tipc/discover.c
    ACPI: extlog: Handle multiple records
    btrfs: fix processing of delayed tree block refs during backref walking
    btrfs: fix processing of delayed data refs during backref walking
  * r8152: add PID for the Lenovo OneLink+ Dock
      drivers/net/usb/cdc_ether.c
      drivers/net/usb/r8152.c
  * arm64: errata: Remove AES hwcap for COMPAT tasks
      arch/arm64/Kconfig
      arch/arm64/include/asm/cpucaps.h
      arch/arm64/kernel/cpu_errata.c
      arch/arm64/kernel/cpufeature.c
    media: venus: dec: Handle the case where find_format fails
    KVM: arm64: vgic: Fix exit condition in scan_its_table()
    ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
    ata: ahci-imx: Fix MODULE_ALIAS
    hwmon/coretemp: Handle large core ID value
    x86/microcode/AMD: Apply the patch early on every logical thread
    ocfs2: fix BUG when iput after ocfs2_mknod fails
    ocfs2: clear dinode links count in case of error
    Merge 4.19.263 into android-4.19-stable
  * UPSTREAM: once: fix section mismatch on clang builds
      include/linux/once.h
    Revert "serial: 8250: Fix restoring termios speed after suspend"
    UPSTREAM: ARM: 8788/1: ftrace: remove old mcount support
Linux 4.19.263
  * once: fix section mismatch on clang builds
      include/linux/once.h
    Merge 4.19.262 into android-4.19-stable
Linux 4.19.262
    gcov: support GCC 12.1 and newer compilers
    thermal: intel_powerclamp: Use first online CPU as control_cpu
  * inet: fully convert sk->sk_rx_dst to RCU rules
      include/net/sock.h
      net/ipv4/af_inet.c
      net/ipv4/tcp.c
      net/ipv4/tcp_input.c
      net/ipv4/tcp_ipv4.c
      net/ipv4/udp.c
      net/ipv6/tcp_ipv6.c
      net/ipv6/udp.c
    efi: libstub: drop pointless get_memory_map() call
    md: Replace snprintf with scnprintf
  * ext4: continue to expand file system when the target size doesn't reach
      fs/ext4/resize.c
    net/ieee802154: don't warn zero-sized raw_sendmsg()
  * net: ieee802154: return -EINVAL for unknown addr type
      include/net/ieee802154_netdev.h
    perf intel-pt: Fix segfault in intel_pt_print_info() with uClibc
    clk: bcm2835: Make peripheral PLLC critical
    usb: idmouse: fix an uninit-value in idmouse_open
    nvme: copy firmware_rev on each init
  * Revert "usb: storage: Add quirk for Samsung Fit flash"
      drivers/usb/storage/unusual_devs.h
    usb: musb: Fix musb_gadget.c rxstate overflow bug
  * usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info()
      drivers/usb/host/xhci-mem.c
    md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d
    HID: roccat: Fix use-after-free in roccat_read()
    ata: libahci_platform: Sanity check the DT child nodes number
    staging: vt6655: fix potential memory leak
    power: supply: adp5061: fix out-of-bounds read in adp5061_get_chg_type()
    nbd: Fix hung when signal interrupts nbd_start_device_ioctl()
    scsi: 3w-9xxx: Avoid disabling device if failing to enable it
    media: cx88: Fix a null-ptr-deref bug in buffer_prepare()
    ARM: dts: imx6sx: add missing properties for sram
    ARM: dts: imx6sll: add missing properties for sram
    ARM: dts: imx6sl: add missing properties for sram
    ARM: dts: imx6qp: add missing properties for sram
    ARM: dts: imx6dl: add missing properties for sram
    ARM: dts: imx6q: add missing properties for sram
    ARM: dts: imx7d-sdb: config the max pressure for tsc2046
    drm/amdgpu: fix initial connector audio value
    platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
  * drm: panel-orientation-quirks: Add quirk for Anbernic Win600
      drivers/gpu/drm/drm_panel_orientation_quirks.c
    drm/vc4: vec: Fix timings for VEC modes
    drm/amd/display: fix overflow on MIN_I64 definition
  * drm: Prevent drm_copy_field() to attempt copying a NULL pointer
      drivers/gpu/drm/drm_ioctl.c
  * drm: Use size_t type for len variable in drm_copy_field()
      drivers/gpu/drm/drm_ioctl.c
  * r8152: Rate limit overflow messages
      drivers/net/usb/r8152.c
  * Bluetooth: L2CAP: Fix user-after-free
      net/bluetooth/l2cap_core.c
  * net: If sock is dead don't access sock's sk_wq in sk_stream_wait_memory
      net/core/stream.c
    wifi: rt2x00: correctly set BBP register 86 for MT7620
    wifi: rt2x00: set SoC wmac clock register
    wifi: rt2x00: set correct TX_SW_CFG1 MAC register for MT7620
    wifi: rt2x00: don't run Rt5592 IQ calibration on MT7620
    can: bcm: check the result of can_send() in bcm_can_tx()
  * Bluetooth: hci_sysfs: Fix attempting to call device_add multiple times
      net/bluetooth/hci_sysfs.c
  * Bluetooth: L2CAP: initialize delayed works at l2cap_chan_create()
      net/bluetooth/l2cap_core.c
    wifi: brcmfmac: fix use-after-free bug in brcmf_netdev_start_xmit()
  * xfrm: Update ipcomp_scratches with NULL when freed
      net/xfrm/xfrm_ipcomp.c
    wifi: ath9k: avoid uninit memory read in ath9k_htc_rx_msg()
  * tcp: annotate data-race around tcp_md5sig_pool_populated
      net/ipv4/tcp.c
    openvswitch: Fix overreporting of drops in dropwatch
    openvswitch: Fix double reporting of drops in dropwatch
    wifi: brcmfmac: fix invalid address access when enabling SCAN log level
    NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
    thermal: intel_powerclamp: Use get_cpu() instead of smp_processor_id() to avoid crash
    powercap: intel_rapl: fix UBSAN shift-out-of-bounds issue
    MIPS: BCM47XX: Cast memcmp() of function to (void *)
    ACPI: video: Add Toshiba Satellite/Portege Z830 quirk
  * f2fs: fix race condition on setting FI_NO_EXTENT flag
      fs/f2fs/extent_cache.c
    crypto: cavium - prevent integer overflow loading firmware
  * iommu/iova: Fix module config properly
      include/linux/iova.h
    iommu/omap: Fix buffer overflow in debugfs
    powerpc: Fix SPE Power ISA properties for e500v1 platforms
    powerpc/64s: Fix GENERIC_CPU build flags for PPC970 / G5
    x86/hyperv: Fix 'struct hv_enlightened_vmcs' definition
    powerpc/powernv: add missing of_node_put() in opal_export_attrs()
    powerpc/pci_dn: Add missing of_node_put()
    powerpc/sysdev/fsl_msi: Add missing of_node_put()
    powerpc/math_emu/efp: Include module.h
    mailbox: bcm-ferxrm-mailbox: Fix error check for dma_map_sg
    clk: ti: dra7-atl: Fix reference leak in of_dra7_atl_clk_probe
    clk: bcm2835: fix bcm2835_clock_rate_from_divisor declaration
  * spmi: pmic-arb: correct duplicate APID to PPID mapping logic
      drivers/spmi/spmi-pmic-arb.c
    dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup()
    mfd: sm501: Add check for platform_driver_register()
    mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init()
    mfd: lp8788: Fix an error handling path in lp8788_probe()
    mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
    mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
    fsi: core: Check error number after calling ida_simple_get
    serial: 8250: Fix restoring termios speed after suspend
    firmware: google: Test spinlock on panic path to avoid lockups
    staging: vt6655: fix some erroneous memory clean-up loops
    phy: qualcomm: call clk_disable_unprepare in the error handling
    drivers: serial: jsm: fix some leaks in probe
    usb: gadget: function: fix dangling pnp_string in f_printer.c
  * xhci: Don't show warning for reinit on known broken suspend
      drivers/usb/host/xhci.c
    md/raid5: Ensure stripe_fill happens on non-read IO with journal
  * ata: fix ata_id_has_dipm()
      include/linux/ata.h
  * ata: fix ata_id_has_ncq_autosense()
      include/linux/ata.h
  * ata: fix ata_id_has_devslp()
      include/linux/ata.h
  * ata: fix ata_id_sense_reporting_enabled() and ata_id_has_sense_reporting()
      include/linux/ata.h
    mtd: devices: docg3: check the return value of devm_ioremap() in the probe
    dyndbg: let query-modname override actual module name
  * dyndbg: fix module.dyndbg handling
      include/linux/dynamic_debug.h
    RDMA/rxe: Fix the error caused by qp->sk
    RDMA/rxe: Fix "kernel NULL pointer dereference" error
    media: xilinx: vipp: Fix refcount leak in xvip_graph_dma_init
    tty: xilinx_uartps: Fix the ignore_status
    media: exynos4-is: fimc-is: Add of_node_put() when breaking out of loop
    HSI: omap_ssi_port: Fix dma_map_sg error check
    HSI: omap_ssi: Fix refcount leak in ssi_probe
    clk: tegra20: Fix refcount leak in tegra20_clock_init
    clk: tegra: Fix refcount leak in tegra114_clock_init
    clk: tegra: Fix refcount leak in tegra210_clock_init
    clk: berlin: Add of_node_put() for of_get_parent()
    clk: oxnas: Hold reference returned by of_get_parent()
    iio: ABI: Fix wrong format of differential capacitance channel ABI.
  * iio: inkern: only release the device node when done with it
      drivers/iio/inkern.c
    iio: adc: at91-sama5d2_adc: check return status for pressure and touch
    iio: adc: at91-sama5d2_adc: fix AT91_SAMA5D2_MR_TRACKTIM_MAX
    ARM: dts: exynos: fix polarity of VBUS GPIO of Origen
    ARM: Drop CMDLINE_* dependency on ATAGS
    ARM: dts: exynos: correct s5k6a3 reset polarity on Midas family
    ARM: dts: kirkwood: lsxl: remove first ethernet port
    ARM: dts: kirkwood: lsxl: fix serial line
    ARM: dts: turris-omnia: Fix mpp26 pin name and comment
  * soc: qcom: smem_state: Add refcounting for the 'state->of_node'
      drivers/soc/qcom/smem_state.c
    soc: qcom: smsm: Fix refcount leak bugs in qcom_smsm_probe()
    memory: of: Fix refcount leak bug in of_get_ddr_timings()
    ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
    ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
    ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
    mmc: wmt-sdmmc: Fix an error handling path in wmt_mci_probe()
    ALSA: dmaengine: increment buffer pointer atomically
    drm/msm/dpu: index dpu_kms->hw_vbif using vbif_idx
    ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API
    mmc: au1xmmc: Fix an error handling path in au1xmmc_probe()
    drm/bridge: megachips: Fix a null pointer dereference bug
    platform/x86: msi-laptop: Fix resource cleanup
    platform/x86: msi-laptop: Fix old-ec check for backlight registering
    platform/chrome: fix double-free in chromeos_laptop_prepare()
  * drm/mipi-dsi: Detach devices when removing the host
      drivers/gpu/drm/drm_mipi_dsi.c
    drm: bridge: adv7511: fix CEC power down control register offset
    net: mvpp2: fix mvpp2 debugfs leak
  * once: add DO_ONCE_SLOW() for sleepable contexts
      include/linux/once.h
      lib/once.c
      net/ipv4/inet_hashtables.c
    bnx2x: fix potential memory leak in bnx2x_tpa_stop()
    net: rds: don't hold sock lock when cancelling work from rds_tcp_reset_callbacks()
  * tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
      include/linux/tcp.h
      include/net/tcp.h
      net/ipv4/tcp.c
      net/ipv4/tcp_output.c
  * sctp: handle the error returned from sctp_auth_asoc_init_active_key
      net/sctp/auth.c
    mISDN: fix use-after-free bugs in l1oip timer handlers
    vhost/vsock: Use kvmalloc/kvfree for larger packets.
    spi: s3c64xx: Fix large transfers with DMA
    netfilter: nft_fib: Fix for rpath check with VRF devices
    spi/omap100k:Fix PM disable depth imbalance in omap1_spi100k_probe
  * bpf: Ensure correct locking around vulnerable function find_vpid()
      kernel/bpf/syscall.c
    net: fs_enet: Fix wrong check in do_pd_setup
    wifi: rtl8xxxu: gen2: Fix mistake in path B IQ calibration
  * bpf: btf: fix truncated last_member_type_id in btf_struct_resolve
      kernel/bpf/btf.c
    wifi: rtl8xxxu: Fix skb misuse in TX queue selection
    spi: qup: add missing clk_disable_unprepare on error in spi_qup_pm_resume_runtime()
    spi: qup: add missing clk_disable_unprepare on error in spi_qup_resume()
    wifi: rtl8xxxu: tighten bounds checking in rtl8xxxu_read_efuse()
    spi: mt7621: Fix an error message in mt7621_spi_probe()
    bpftool: Fix a wrong type cast in btf_dumper_int
    wifi: mac80211: allow bw change during channel switch in mesh
    wifi: ath10k: add peer map clean up for peer delete in ath10k_sta_state()
    sh: machvec: Use char[] for section boundaries
    selinux: use "grep -E" instead of "egrep"
    KVM: nVMX: Unconditionally purge queued/injected events on nested "exit"
    KVM: x86/emulator: Fix handing of POP SS to correctly set interruptibility
  * ring-buffer: Fix race between reset page and reading page
      kernel/trace/ring_buffer.c
  * ring-buffer: Check pending waiters when doing wake ups as well
      kernel/trace/ring_buffer.c
  * ring-buffer: Allow splice to read previous partially read pages
      kernel/trace/ring_buffer.c
    ftrace: Properly unset FTRACE_HASH_FL_MOD
    livepatch: fix race between fork and KLP transition
  * ext4: place buffer head allocation before handle start
      fs/ext4/inode.c
  * ext4: make ext4_lazyinit_thread freezable
      fs/ext4/super.c
  * ext4: fix null-ptr-deref in ext4_write_info
      fs/ext4/super.c
  * ext4: avoid crash when inline data creation follows DIO write
      fs/ext4/file.c
    nilfs2: fix use-after-free bug of struct nilfs_root
    riscv: fix build with binutils 2.38
    btrfs: fix race between quota enable and quota rescan ioctl
    fbdev: smscufx: Fix use-after-free in ufx_ops_open()
  * PCI: Sanitise firmware BAR assignments behind a PCI-PCI bridge
      drivers/pci/setup-res.c
    UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
    riscv: Allow PROT_WRITE-only mmap()
    parisc: fbdev/stifb: Align graphics memory size to 4MB
  * Revert "fs: check FMODE_LSEEK to control internal pipe splicing"
      fs/splice.c
    regulator: qcom_rpm: Fix circular deferral regression
  * quota: Check next/prev free block number after reading from quota file
      fs/quota/quota_tree.c
  * HID: multitouch: Add memory barriers
      drivers/hid/hid-multitouch.c
    fs: dlm: handle -EBUSY first in lock arg validation
    fs: dlm: fix race between test_bit() and queue_work()
    can: kvaser_usb_leaf: Fix CAN state after restart
    can: kvaser_usb_leaf: Fix TX queue out of sync after restart
    can: kvaser_usb_leaf: Fix overread with an invalid command
    can: kvaser_usb: Fix use of uninitialized completion
  * usb: add quirks for Lenovo OneLink+ Dock
      drivers/usb/core/quirks.c
    iio: dac: ad5593r: Fix i2c read protocol requirements
    mtd: rawnand: atmel: Unmap streaming DMA mappings
    ALSA: hda/realtek: remove ALC289_FIXUP_DUAL_SPK for Dell 5530
  * ALSA: usb-audio: Fix NULL dererence at error path
      sound/usb/endpoint.c
  * ALSA: usb-audio: Fix potential memory leaks
      sound/usb/endpoint.c
  * ALSA: rawmidi: Drop register_mutex in snd_rawmidi_free()
      sound/core/rawmidi.c
    ALSA: oss: Fix potential deadlock at unregistration
  * Input: xpad - fix wireless 360 controller breaking after suspend
      drivers/input/joystick/xpad.c
  * Input: xpad - add supported devices as contributed on github
      drivers/input/joystick/xpad.c
    wifi: mac80211_hwsim: avoid mac80211 warning on bad rate
  * random: use expired timer rather than wq for mixing fast pool
      drivers/char/random.c
  * random: avoid reading two cache lines on irq randomness
      drivers/char/random.c
  * random: restore O_NONBLOCK support
      drivers/char/mem.c
      drivers/char/random.c
    USB: serial: qcserial: add new usb-id for Dell branded EM7455
  * scsi: stex: Properly zero out the passthrough command structure
      include/scsi/scsi_cmnd.h
    ALSA: hda: Fix position reporting on Poulsbo
  * random: clamp credited irq bits to maximum mixed
      drivers/char/random.c
    ceph: don't truncate file in atomic_open
    nilfs2: replace WARN_ONs by nilfs_error for checkpoint acquisition failure
    nilfs2: fix leak of nilfs_root in case of writer thread creation failure
    nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
  * rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
      drivers/rpmsg/qcom_glink_native.c
    mmc: core: Terminate infinite loop in SD-UHS voltage switch
    mmc: core: Replace with already defined values for readability
    USB: serial: ftdi_sio: fix 300 bps rate for SIO
    usb: mon: make mmapped memory read only
    um: Cleanup compiler warning in arch/x86/um/tls_32.c
    um: Cleanup syscall_handler_t cast in syscalls_32.h
  * net/ieee802154: fix uninit value bug in dgram_sendmsg
      include/net/ieee802154_netdev.h
    scsi: qedf: Fix a UAF bug in __qedf_probe()
    ARM: dts: fix Moxa SDIO 'compatible', remove 'sdhci' misnomer
    dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure
    dmaengine: xilinx_dma: cleanup for fetching xlnx,num-fstores property
    firmware: arm_scmi: Add SCMI PM driver remove routine
  * fs: fix UAF/GPF bug in nilfs_mdt_destroy
      fs/inode.c
    ARM: fix function graph tracer and unwinder dependencies
    docs: update mediator information in CoC docs
  * Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
      scripts/Makefile.extrawarn
  * BACKPORT: arm64: compat: vdso: Use legacy syscalls as fallback
      arch/arm64/include/asm/vdso/compat_gettimeofday.h
    ANDROID: Drop explicit 'CONFIG_INIT_STACK_ALL_ZERO=y' from gki_defconfig
  * UPSTREAM: hardening: Remove Clang's enable flag for -ftrivial-auto-var-init=zero
      Makefile
      security/Kconfig.hardening
  * UPSTREAM: hardening: Avoid harmless Clang option under CONFIG_INIT_STACK_ALL_ZERO
      Makefile
      security/Kconfig.hardening
  * UPSTREAM: hardening: Clarify Kconfig text for auto-var-init
      security/Kconfig.hardening
  * ANDROID: Fix kenelci build-break for !CONFIG_PERF_EVENTS
      kernel/cpu.c
  * UPSTREAM: f2fs: guarantee to write dirty data when enabling checkpoint back
      fs/f2fs/file.c
      fs/f2fs/super.c

Bug: 260299968
Change-Id: I609eaa63e46c0600536923fa7da78ef66f5db237
Signed-off-by: Wilson Sung <wilsonsung@google.com>
Signed-off-by: JohnnLee <johnnlee@google.com>
2022-12-14 02:48:01 +00:00
Neal Cardwell
a434d10e7a tcp: fix tcp_cwnd_validate() to not forget is_cwnd_limited
[ Upstream commit f4ce91ce12a7c6ead19b128ffa8cff6e3ded2a14 ]

This commit fixes a bug in the tracking of max_packets_out and
is_cwnd_limited. This bug can cause the connection to fail to remember
that is_cwnd_limited is true, causing the connection to fail to grow
cwnd when it should, causing throughput to be lower than it should be.

The following event sequence is an example that triggers the bug:

 (a) The connection is cwnd_limited, but packets_out is not at its
     peak due to TSO deferral deciding not to send another skb yet.
     In such cases the connection can advance max_packets_seq and set
     tp->is_cwnd_limited to true and max_packets_out to a small
     number.

(b) Then later in the round trip the connection is pacing-limited (not
     cwnd-limited), and packets_out is larger. In such cases the
     connection would raise max_packets_out to a bigger number but
     (unexpectedly) flip tp->is_cwnd_limited from true to false.

This commit fixes that bug.

One straightforward fix would be to separately track (a) the next
window after max_packets_out reaches a maximum, and (b) the next
window after tp->is_cwnd_limited is set to true. But this would
require consuming an extra u32 sequence number.

Instead, to save space we track only the most important
information. Specifically, we track the strongest available signal of
the degree to which the cwnd is fully utilized:

(1) If the connection is cwnd-limited then we remember that fact for
the current window.

(2) If the connection not cwnd-limited then we track the maximum
number of outstanding packets in the current window.

In particular, note that the new logic cannot trigger the buggy
(a)/(b) sequence above because with the new logic a condition where
tp->packets_out > tp->max_packets_out can only trigger an update of
tp->is_cwnd_limited if tp->is_cwnd_limited is false.

This first showed up in a testing of a BBRv2 dev branch, but this
buggy behavior highlighted a general issue with the
tcp_cwnd_validate() logic that can cause cwnd to fail to increase at
the proper rate for any TCP congestion control, including Reno or
CUBIC.

Fixes: ca8a226343 ("tcp: make cwnd-limited checks measurement-based, and gentler")
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Kevin(Yudong) Yang <yyd@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:19:26 +02:00
lucaswei
93b7e2f852 Merge android-4.19-stable (4.19.145) into android-msm-pixel-4.19-lts
Merge 4.19.145 into android-4.19-stable
Linux 4.19.145
    net/mlx5e: Don't support phys switch id if not in switchdev mode
  * net: disable netpoll on fresh napis
      net/core/dev.c
  * tipc: fix shutdown() of connectionless socket
      net/tipc/socket.c
  * sctp: not disable bh in the whole sctp_get_port_local()
      net/sctp/socket.c
    net: usb: dm9601: Add USB ID of Keenetic Plus DSL
  * netlabel: fix problems with mapping removal
      net/netlabel/netlabel_domainhash.c
  * block: ensure bdi->io_pages is always initialized
      block/blk-core.c
    ALSA; firewire-tascam: exclude Tascam FE-8 from detection
  * FROMGIT: binder: print warnings when detecting oneway spamming.
      drivers/android/binder.c
      drivers/android/binder_alloc.c
      drivers/android/binder_alloc.h
    Merge 4.19.144 into android-4.19-stable
Linux 4.19.144
  * net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()
      drivers/net/usb/asix_common.c
  * cfg80211: regulatory: reject invalid hints
      net/wireless/reg.c
    mm/hugetlb: fix a race between hugetlb sysctl handlers
    checkpatch: fix the usage of capture group ( ... )
    vfio/pci: Fix SR-IOV VF handling with MMIO blocking
  * KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception
      arch/arm64/include/asm/kvm_arm.h
  * KVM: arm64: Survive synchronous exceptions caused by AT instructions
      arch/arm64/include/asm/kvm_asm.h
    KVM: arm64: Defer guest entry when an asynchronous exception is pending
  * KVM: arm64: Add kvm_extable for vaxorcism code
      arch/arm64/include/asm/kvm_asm.h
      arch/arm64/kernel/vmlinux.lds.S
  * mm: slub: fix conversion of freelist_corrupted()
      mm/slub.c
    dm thin metadata: Avoid returning cmd->bm wild pointer on error
    dm cache metadata: Avoid returning cmd->bm wild pointer on error
    dm writecache: handle DAX to partitions on persistent memory correctly
  * libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks
      include/linux/libata.h
  * block: allow for_each_bvec to support zero len bvec
      include/linux/bvec.h
    affs: fix basic permission bits to actually work
    media: rc: uevent sysfs file races with rc_unregister_device()
    media: rc: do not access device via sysfs after rc_unregister_device()
    ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO
    ALSA: firewire-digi00x: exclude Avid Adrenaline from detection
    ALSA: hda/hdmi: always check pin power status in i915 pin fixup
    ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
    ALSA: ca0106: fix error code handling
    usb: qmi_wwan: add D-Link DWM-222 A2 device ID
    net: usb: qmi_wwan: add Telit 0x1050 composition
    btrfs: fix potential deadlock in the search ioctl
  * uaccess: Add non-pagefault user-space write function
      include/linux/uaccess.h
      mm/maccess.c
  * uaccess: Add non-pagefault user-space read functions
      include/linux/uaccess.h
      mm/maccess.c
    btrfs: set the lockdep class for log tree extent buffers
    btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
    btrfs: Remove redundant extent_buffer_get in get_old_root
    vfio-pci: Invalidate mmaps and block MMIO access on disabled memory
    vfio-pci: Fault mmaps to enable vma tracking
    vfio/type1: Support faulting PFNMAP vmas
    btrfs: drop path before adding new uuid tree entry
    xfs: don't update mtime on COW faults
    ext2: don't update mtime on COW faults
  * include/linux/log2.h: add missing () around n in roundup_pow_of_two()
      include/linux/log2.h
    thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430
    iommu/vt-d: Serialize IOMMU GCMD register modifications
    x86, fakenuma: Fix invalid starting node ID
    tg3: Fix soft lockup when tg3_reset_task() fails.
    perf jevents: Fix suspicious code in fixregex()
    xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files
    net: gemini: Fix another missing clk_disable_unprepare() in probe
  * fix regression in "epoll: Keep a reference on files added to the check list"
      fs/eventpoll.c
    net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
    perf tools: Correct SNOOPX field offset
    nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()'
  * netfilter: nfnetlink: nfnetlink_unicast() reports EAGAIN instead of ENOBUFS
      include/linux/netfilter/nfnetlink.h
      net/netfilter/nfnetlink.c
      net/netfilter/nfnetlink_log.c
      net/netfilter/nfnetlink_queue.c
    selftests/bpf: Fix massive output from test_maps
    bnxt: don't enable NAPI until rings are ready
    xfs: fix boundary test in xfs_attr_shortform_verify
    bnxt_en: fix HWRM error when querying VF temperature
    bnxt_en: Fix PCI AER error recovery flow
    bnxt_en: Check for zero dir entries in NVRAM.
    bnxt_en: Don't query FW when netif_running() is false.
    gtp: add GTPA_LINK info to msg sent to userspace
    dmaengine: pl330: Fix burst length if burst size is smaller than bus width
    net: arc_emac: Fix memleak in arc_mdio_probe
    ravb: Fixed to be able to unload modules
    net: systemport: Fix memleak in bcm_sysport_probe
    net: hns: Fix memleak in hns_nic_dev_probe
  * netfilter: nf_tables: fix destination register zeroing
      include/net/netfilter/nf_tables.h
  * netfilter: nf_tables: incorrect enum nft_list_attributes definition
      include/uapi/linux/netfilter/nf_tables.h
    netfilter: nf_tables: add NFTA_SET_USERDATA if not null
    MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores
    MIPS: mm: BMIPS5000 has inclusive physical caches
    dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
    batman-adv: bla: use netif_rx_ni when not in interrupt context
    batman-adv: Fix own OGM check in aggregated OGMs
    batman-adv: Avoid uninitialized chaddr when handling DHCP
  * dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling
      drivers/dma/of-dma.c
    xen/xenbus: Fix granting of vmalloc'd memory
    s390: don't trace preemption in percpu macros
  * cpuidle: Fixup IRQ state
      drivers/cpuidle/cpuidle.c
    ceph: don't allow setlease on cephfs
    drm/msm/a6xx: fix gmu start on newer firmware
    nvmet: Disable keep-alive timer when kato is cleared to 0h
    hwmon: (applesmc) check status earlier.
    drm/msm: add shutdown support for display platform_driver
    tty: serial: qcom_geni_serial: Drop __init from qcom_geni_console_setup
    scsi: target: tcmu: Optimize use of flush_dcache_page
    scsi: target: tcmu: Fix size in calls to tcmu_flush_dcache_range
    perf record/stat: Explicitly call out event modifiers in the documentation
  * HID: core: Sanitize event code and type when mapping input
      drivers/hid/hid-input.c
      drivers/hid/hid-multitouch.c
      include/linux/hid.h
  * HID: core: Correctly handle ReportSize being zero
      drivers/hid/hid-core.c
    Merge 4.19.143 into android-4.19-stable
Linux 4.19.143
  * ALSA: usb-audio: Update documentation comment for MS2109 quirk
      sound/usb/quirks-table.h
  * HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage()
      drivers/hid/usbhid/hiddev.c
    tpm: Unify the mismatching TPM space buffer sizes
  * usb: dwc3: gadget: Handle ZLP for sg requests
      drivers/usb/dwc3/gadget.c
  * usb: dwc3: gadget: Fix handling ZLP
      drivers/usb/dwc3/gadget.c
  * usb: dwc3: gadget: Don't setup more than requested
      drivers/usb/dwc3/gadget.c
    btrfs: check the right error variable in btrfs_del_dir_entries_in_log
    usb: storage: Add unusual_uas entry for Sony PSZ drives
    USB: cdc-acm: rework notification_buffer resizing
  * USB: gadget: u_f: Unbreak offset calculation in VLAs
      drivers/usb/gadget/u_f.h
  * USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()
      drivers/usb/gadget/function/f_ncm.c
  * USB: gadget: u_f: add overflow checks to VLA macros
      drivers/usb/gadget/u_f.h
    usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe()
  * USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge
      drivers/usb/storage/unusual_devs.h
  * USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D
      drivers/usb/core/quirks.c
  * USB: quirks: Add no-lpm quirk for another Raydium touchscreen
      drivers/usb/core/quirks.c
    usb: uas: Add quirk for PNY Pro Elite
    USB: yurex: Fix bad gfp argument
    drm/amd/pm: correct Vega12 swctf limit setting
    drm/amd/pm: correct Vega10 swctf limit setting
    drm/amdgpu: Fix buffer overflow in INFO ioctl
    irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake
    genirq/matrix: Deal with the sillyness of for_each_cpu() on UP
  * device property: Fix the secondary firmware node handling in set_primary_fwnode()
      drivers/base/core.c
  * PM: sleep: core: Fix the handling of pending runtime resume requests
      drivers/base/power/main.c
  * xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed
      drivers/usb/host/xhci.c
  * xhci: Do warm-reset when both CAS and XDEV_RESUME are set
      drivers/usb/host/xhci-hub.c
  * usb: host: xhci: fix ep context print mismatch in debugfs
      drivers/usb/host/xhci-debugfs.c
    XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information.
  * writeback: Fix sync livelock due to b_dirty_time processing
      fs/fs-writeback.c
      include/trace/events/writeback.h
  * writeback: Avoid skipping inode writeback
      fs/fs-writeback.c
      include/linux/fs.h
  * writeback: Protect inode->i_io_list with inode->i_lock
      fs/fs-writeback.c
    serial: 8250: change lock order in serial8250_do_startup()
    serial: 8250_exar: Fix number of ports for Commtech PCIe cards
    serial: pl011: Don't leak amba_ports entry on driver register error
    serial: pl011: Fix oops on -EPROBE_DEFER
    serial: samsung: Removes the IRQ not found warning
    vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize()
    vt: defer kfree() of vc_screenbuf in vc_do_resize()
  * USB: lvtest: return proper error code in probe
      drivers/usb/misc/lvstest.c
    fbcon: prevent user font height or width change from causing potential out-of-bounds access
    btrfs: fix space cache memory leak after transaction abort
    btrfs: reset compression level for lzo on remount
  * blk-mq: order adding requests to hctx->dispatch and checking SCHED_RESTART
      block/blk-mq-sched.c
      block/blk-mq.c
    HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands
  * block: loop: set discard granularity and alignment for block device backed loop
      drivers/block/loop.c
    powerpc/perf: Fix soft lockups due to missed interrupt accounting
    net: gianfar: Add of_node_put() before goto statement
    macvlan: validate setting of multiple remote source MAC addresses
    Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command"
    scsi: qla2xxx: Fix null pointer access during disconnect from subsystem
    scsi: qla2xxx: Check if FW supports MQ before enabling
  * scsi: ufs: Clean up completed request without interrupt notification
      drivers/scsi/ufs/ufshcd.c
  * scsi: ufs: Improve interrupt handling for shared interrupts
      drivers/scsi/ufs/ufshcd.c
  * scsi: ufs: Fix possible infinite loop in ufshcd_hold
      drivers/scsi/ufs/ufshcd.c
    scsi: fcoe: Fix I/O path allocation
    ASoC: wm8994: Avoid attempts to read unreadable registers
    s390/cio: add cond_resched() in the slow_eval_known_fn() loop
    spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate
  * fs: prevent BUG_ON in submit_bh_wbc()
      fs/buffer.c
      fs/ext4/super.c
  * ext4: correctly restore system zone info when remount fails
      fs/ext4/block_validity.c
      fs/ext4/super.c
  * ext4: handle error of ext4_setup_system_zone() on remount
      fs/ext4/super.c
  * ext4: handle option set by mount flags correctly
      fs/ext4/super.c
  * jbd2: abort journal if free a async write error metadata buffer
      fs/jbd2/transaction.c
  * ext4: handle read only external journal device
      fs/ext4/super.c
  * ext4: don't BUG on inconsistent journal feature
      fs/ext4/super.c
  * jbd2: make sure jh have b_transaction set in refile/unfile_buffer
      fs/jbd2/transaction.c
    usb: gadget: f_tcm: Fix some resource leaks in some error paths
    i2c: rcar: in slave mode, clear NACK earlier
    null_blk: fix passing of REQ_FUA flag in null_handle_rq
    nvme-fc: Fix wrong return value in __nvme_fc_init_request()
    drm/msm/adreno: fix updating ring fence
    media: gpio-ir-tx: improve precision of transmitted signal due to scheduling
    Revert "ath10k: fix DMA related firmware crashes on multiple devices"
  * efi: provide empty efi_enter_virtual_mode implementation
      include/linux/efi.h
    USB: sisusbvga: Fix a potential UB casued by left shifting a negative value
    powerpc/spufs: add CONFIG_COREDUMP dependency
    KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe
    EDAC/ie31200: Fallback if host bridge device is already initialized
    scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del()
    ceph: fix potential mdsc use-after-free crash
    scsi: iscsi: Do not put host in iscsi_set_flashnode_param()
    btrfs: file: reserve qgroup space after the hole punch range is locked
    locking/lockdep: Fix overflow in presentation of average lock-time
    drm/nouveau: Fix reference count leak in nouveau_connector_detect
    drm/nouveau: fix reference count leak in nv50_disp_atomic_commit
    drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open
  * f2fs: fix use-after-free issue
      fs/f2fs/super.c
  * HID: quirks: add NOGET quirk for Logitech GROUP
      drivers/hid/hid-ids.h
      drivers/hid/hid-quirks.c
    cec-api: prevent leaking memory through hole in structure
    mips/vdso: Fix resource leaks in genvdso.c
    rtlwifi: rtl8192cu: Prevent leaking urb
    ARM: dts: ls1021a: output PPS signal on FIPER2
  * PCI: Fix pci_create_slot() reference count leak
      drivers/pci/slot.c
    omapfb: fix multiple reference count leaks due to pm_runtime_get_sync
  * f2fs: fix error path in do_recover_data()
      fs/f2fs/f2fs.h
      fs/f2fs/inline.c
      fs/f2fs/node.c
      fs/f2fs/recovery.c
    selftests/powerpc: Purge extra count_pmc() calls of ebb selftests
    xfs: Don't allow logging of XFS_ISTALE inodes
    scsi: lpfc: Fix shost refcount mismatch when deleting vport
    drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails
    drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config
    drm/amd/display: fix ref count leak in amdgpu_drm_ioctl
    drm/amdgpu: fix ref count leak in amdgpu_driver_open_kms
    drm/radeon: fix multiple reference count leak
    drm/amdkfd: Fix reference count leaks.
  * iommu/iova: Don't BUG on invalid PFNs
      drivers/iommu/iova.c
    scsi: target: tcmu: Fix crash on ARM during cmd completion
  * blktrace: ensure our debugfs dir exists
      kernel/trace/blktrace.c
    media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq()
    powerpc/xive: Ignore kmemleak false positives
    arm64: dts: qcom: msm8916: Pull down PDM GPIOs during sleep
    mfd: intel-lpss: Add Intel Emmitsburg PCH PCI IDs
    ASoC: tegra: Fix reference count leaks.
    ASoC: img-parallel-out: Fix a reference count leak
    ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt
    ALSA: pci: delete repeated words in comments
    ipvlan: fix device features
    net: ena: Make missed_tx stat incremental
  * tipc: fix uninit skb->data in tipc_nl_compat_dumpit()
      net/tipc/netlink_compat.c
    net/smc: Prevent kernel-infoleak in __smc_diag_dump()
  * net: qrtr: fix usage of idr in port assignment to socket
      net/qrtr/qrtr.c
  * net: Fix potential wrong skb->protocol in skb_vlan_untag()
      net/core/skbuff.c
  * gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY
      net/ipv6/ip6_tunnel.c
    powerpc/64s: Don't init FSCR_DSCR in __init_FSCR()
    ANDROID: gki_defconfig: initialize locals with zeroes
  * UPSTREAM: security: allow using Clang's zero initialization for stack variables
      Makefile
      init/main.c
      security/Kconfig.hardening
  * Revert "binder: Prevent context manager from incrementing ref 0"
      drivers/android/binder.c
    ANDROID: GKI: update the ABI xml
    BACKPORT: recordmcount: support >64k sections
  * UPSTREAM: arm64: vdso: Build vDSO with -ffixed-x18
      arch/arm64/kernel/vdso/Makefile
  * UPSTREAM: cgroup: Remove unused cgrp variable
      kernel/cgroup/cgroup.c
  * UPSTREAM: cgroup: freezer: call cgroup_enter_frozen() with preemption disabled in ptrace_stop()
      kernel/signal.c
  * UPSTREAM: cgroup: freezer: fix frozen state inheritance
      kernel/cgroup/cgroup.c
  * UPSTREAM: signal: unconditionally leave the frozen state in ptrace_stop()
      kernel/signal.c
  * BACKPORT: cgroup: cgroup v2 freezer
      include/linux/cgroup-defs.h
      include/linux/cgroup.h
      include/linux/sched/jobctl.h
      kernel/cgroup/Makefile
      kernel/cgroup/cgroup.c
      kernel/cgroup/freezer.c
      kernel/fork.c
      kernel/signal.c
  * UPSTREAM: cgroup: implement __cgroup_task_count() helper
      kernel/cgroup/cgroup-internal.h
      kernel/cgroup/cgroup-v1.c
      kernel/cgroup/cgroup.c
  * UPSTREAM: cgroup: rename freezer.c into legacy_freezer.c
      kernel/cgroup/Makefile
  * UPSTREAM: cgroup: remove extra cgroup_migrate_finish() call
      kernel/cgroup/cgroup.c
  * UPSTREAM: cgroup: saner refcounting for cgroup_root
      kernel/cgroup/cgroup-internal.h
      kernel/cgroup/cgroup-v1.c
      kernel/cgroup/cgroup.c
  * UPSTREAM: cgroup: Add named hierarchy disabling to cgroup_no_v1 boot param
      kernel/cgroup/cgroup-v1.c
  * UPSTREAM: cgroup: remove unnecessary unlikely()
      kernel/cgroup/cgroup.c
  * UPSTREAM: cgroup: Simplify cgroup_ancestor
      include/linux/cgroup.h
    Merge 4.19.142 into android-4.19-stable
Linux 4.19.142
    KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set
  * KVM: Pass MMU notifier range flags to kvm_unmap_hva_range()
      arch/arm64/include/asm/kvm_host.h
  * clk: Evict unregistered clks from parent caches
      drivers/clk/clk.c
    xen: don't reschedule in preemption off sections
    mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible
  * do_epoll_ctl(): clean the failure exits up a bit
      fs/eventpoll.c
  * epoll: Keep a reference on files added to the check list
      fs/eventpoll.c
    efi: add missed destroy_workqueue when efisubsys_init fails
    powerpc/pseries: Do not initiate shutdown when system is running on UPS
    net: dsa: b53: check for timeout
    hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit()
    net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe()
    net: ena: Prevent reset after device destruction
  * bonding: fix active-backup failover for current ARP slave
      drivers/net/bonding/bond_main.c
    afs: Fix NULL deref in afs_dynroot_depopulate()
    RDMA/bnxt_re: Do not add user qps to flushlist
    Fix build error when CONFIG_ACPI is not set/enabled:
    efi: avoid error message when booting under Xen
    kconfig: qconf: fix signal connection to invalid slots
    kconfig: qconf: do not limit the pop-up menu to the first row
    kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode
    kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode
    vfio/type1: Add proper error unwind for vfio_iommu_replay()
    ASoC: intel: Fix memleak in sst_media_open
    ASoC: msm8916-wcd-analog: fix register Interrupt offset
    s390/ptrace: fix storage key handling
    s390/runtime_instrumentation: fix storage key handling
  * bonding: fix a potential double-unregister
      drivers/net/bonding/bond_main.c
  * bonding: show saner speed for broadcast mode
      drivers/net/bonding/bond_main.c
    net: fec: correct the error path for regulator disable in probe
    i40e: Fix crash during removing i40e driver
    i40e: Set RX_ONLY mode for unicast promiscuous on VLAN
    ASoC: q6routing: add dummy register read/write function
  * ext4: don't allow overlapping system zones
      fs/ext4/block_validity.c
  * ext4: fix potential negative array index in do_split()
      fs/ext4/namei.c
  * fs/signalfd.c: fix inconsistent return codes for signalfd4
      fs/signalfd.c
    alpha: fix annotation of io{read,write}{16,32}be()
    xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init
    tools/testing/selftests/cgroup/cgroup_util.c: cg_read_strcmp: fix null pointer dereference
    virtio_ring: Avoid loop when vq is broken in virtqueue_poll
    scsi: libfc: Free skb in fc_disc_gpn_id_resp() for valid cases
    cpufreq: intel_pstate: Fix cpuinfo_max_freq when MSR_TURBO_RATIO_LIMIT is 0
    ceph: fix use-after-free for fsc->mdsc
    jffs2: fix UAF problem
    xfs: fix inode quota reservation checks
    svcrdma: Fix another Receive buffer leak
    m68knommu: fix overwriting of bits in ColdFire V3 cache control
    Input: psmouse - add a newline when printing 'proto' by sysfs
    media: vpss: clean up resources in init
    rtc: goldfish: Enable interrupt in set_alarm() when necessary
    media: budget-core: Improve exception handling in budget_register()
    scsi: target: tcmu: Fix crash in tcmu_flush_dcache_range on ARM
  * scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices
      drivers/scsi/ufs/ufs_quirks.h
      drivers/scsi/ufs/ufshcd.c
  * spi: Prevent adding devices below an unregistering controller
      drivers/spi/Kconfig
      drivers/spi/spi.c
  * kthread: Do not preempt current task if it is going to call schedule()
      kernel/kthread.c
    drm/amd/display: fix pow() crashing when given base 0
    scsi: zfcp: Fix use-after-free in request timeout handlers
  * jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock()
      fs/jbd2/journal.c
  * ext4: fix checking of directory entry validity for inline directories
      fs/ext4/namei.c
  * mm, page_alloc: fix core hung in free_pcppages_bulk()
      mm/page_alloc.c
  * mm: include CMA pages in lowmem_reserve at boot
      mm/page_alloc.c
    kernel/relay.c: fix memleak on destroy relay channel
    romfs: fix uninitialized memory leak in romfs_dev_read()
    btrfs: sysfs: use NOFS for device creation
    btrfs: inode: fix NULL pointer dereference if inode doesn't need compression
    btrfs: Move free_pages_out label in inline extent handling branch in compress_file_range
    btrfs: don't show full path of bind mounts in subvol=
    btrfs: export helpers for subvolume name/id resolution
    khugepaged: adjust VM_BUG_ON_MM() in __khugepaged_enter()
    khugepaged: khugepaged_test_exit() check mmget_still_valid()
    perf probe: Fix memory leakage when the probe point is not found
    drm/vgem: Replace opencoded version of drm_gem_dumb_map_offset()
  * ANDROID: tty: fix tty name overflow
      drivers/tty/serdev/serdev-ttyport.c
  * ANDROID: Revert "PCI: Probe bridge window attributes once at enumeration-time"
      drivers/pci/probe.c
      drivers/pci/setup-bus.c
      include/linux/pci.h
    Merge 4.19.141 into android-4.19-stable
Linux 4.19.141
    drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume
  * drm: Added orientation quirk for ASUS tablet model T103HAF
      drivers/gpu/drm/drm_panel_orientation_quirks.c
    arm64: dts: marvell: espressobin: add ethernet alias
    khugepaged: retract_page_tables() remember to test exit
    sh: landisk: Add missing initialization of sh_io_port_base
    tools build feature: Quote CC and CXX for their arguments
    perf bench mem: Always memset source before memcpy
    ALSA: echoaudio: Fix potential Oops in snd_echo_resume()
    mfd: dln2: Run event handler loop under spinlock
    test_kmod: avoid potential double free in trigger_config_run_type()
    fs/ufs: avoid potential u32 multiplication overflow
    fs/minix: remove expected error message in block_to_path()
    fs/minix: fix block limit check for V1 filesystems
    fs/minix: set s_maxbytes correctly
    nfs: Fix getxattr kernel panic and memory overflow
    net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init
    drm/vmwgfx: Fix two list_for_each loop exit tests
    drm/vmwgfx: Use correct vmw_legacy_display_unit pointer
    Input: sentelic - fix error return when fsp_reg_write fails
  * watchdog: initialize device before misc_register
      drivers/watchdog/watchdog_dev.c
    scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport
    openrisc: Fix oops caused when dumping stack
    i2c: rcar: avoid race when unregistering slave
    tools build feature: Use CC and CXX from parent
    pwm: bcm-iproc: handle clk_get_rate() return
    clk: clk-atlas6: fix return value check in atlas6_clk_init()
    i2c: rcar: slave: only send STOP event when we have been addressed
  * iommu/vt-d: Enforce PASID devTLB field mask
      include/linux/intel-iommu.h
    iommu/omap: Check for failure of a call to omap_iommu_dump_ctx
    selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value
    selftests/powerpc: ptrace-pkey: Update the test to mark an invalid pkey correctly
    selftests/powerpc: ptrace-pkey: Rename variables to make it easier to follow code
  * dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue()
      drivers/md/dm-rq.c
    gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers
    mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete
    USB: serial: ftdi_sio: clean up receive processing
    USB: serial: ftdi_sio: make process-packet buffer unsigned
    media: rockchip: rga: Only set output CSC mode for RGB input
    media: rockchip: rga: Introduce color fmt macros and refactor CSC mode logic
    RDMA/ipoib: Fix ABBA deadlock with ipoib_reap_ah()
    RDMA/ipoib: Return void from ipoib_ib_dev_stop()
    mfd: arizona: Ensure 32k clock is put on driver unbind and error
    drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()
    remoteproc: qcom: q6v5: Update running state before requesting stop
    perf intel-pt: Fix FUP packet state
  * module: Correctly truncate sysfs sections output
      kernel/module.c
    pseries: Fix 64 bit logical memory block panic
    watchdog: f71808e_wdt: clear watchdog timeout occurred flag
    watchdog: f71808e_wdt: remove use of wrong watchdog_info option
    watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options
  * tracing: Use trace_sched_process_free() instead of exit() for pid tracing
      kernel/trace/trace_events.c
    tracing/hwlat: Honor the tracing_cpumask
    kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler
    ftrace: Setup correct FTRACE_FL_REGS flags for module
  * mm/page_counter.c: fix protection usage propagation
      mm/page_counter.c
    ocfs2: change slot number type s16 to u16
    ext2: fix missing percpu_counter_inc
    MIPS: CPU#0 is not hotpluggable
  * driver core: Avoid binding drivers to dead devices
      drivers/base/dd.c
    mac80211: fix misplaced while instead of if
    bcache: fix overflow in offset_to_stripe()
    bcache: allocate meta data pages as compound pages
    md/raid5: Fix Force reconstruct-write io stuck in degraded raid5
  * net/compat: Add missing sock updates for SCM_RIGHTS
      include/net/sock.h
      net/compat.c
      net/core/sock.c
    net: stmmac: dwmac1000: provide multicast filter fallback
    net: ethernet: stmmac: Disable hardware multicast filter
    media: vsp1: dl: Fix NULL pointer dereference on unbind
    powerpc: Fix circular dependency between percpu.h and mmu.h
    powerpc: Allow 4224 bytes of stack expansion for the signal frame
    cifs: Fix leak when handling lease break for cached root fid
    xtensa: fix xtensa_pmu_setup prototype
    iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw()
    dt-bindings: iio: io-channel-mux: Fix compatible string in example code
    btrfs: fix return value mixup in btrfs_get_extent
    btrfs: fix memory leaks after failure to lookup checksums during inode logging
    btrfs: only search for left_info if there is no right_info in try_merge_free_space
    btrfs: fix messages after changing compression level by remount
    btrfs: open device without device_list_mutex
    btrfs: don't traverse into the seed devices in show_devname
    btrfs: ref-verify: fix memory leak in add_block_entry
    btrfs: don't allocate anonymous block device for user invisible roots
    btrfs: free anon block device right after subvolume deletion
  * PCI: Probe bridge window attributes once at enumeration-time
      drivers/pci/probe.c
      drivers/pci/setup-bus.c
      include/linux/pci.h
    PCI: qcom: Add support for tx term offset for rev 2.1.0
    PCI: qcom: Define some PARF params needed for ipq8064 SoC
  * PCI: Add device even if driver attach failed
      drivers/pci/bus.c
  * PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken
      drivers/pci/quirks.c
    PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context()
  * genirq/affinity: Make affinity setting if activated opt-in
      drivers/irqchip/irq-gic-v3-its.c
      include/linux/irq.h
      kernel/irq/manage.c
    smb3: warn on confusing error scenario with sec=krb5
    ANDROID: ABI: update the ABI xml representation
  * Revert "ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109"
      sound/usb/card.h
      sound/usb/pcm.c
      sound/usb/quirks.c
      sound/usb/stream.c
    Merge 4.19.140 into android-4.19-stable
Linux 4.19.140
    xen/gntdev: Fix dmabuf import with non-zero sgt offset
    xen/balloon: make the balloon wait interruptible
    xen/balloon: fix accounting in alloc_xenballooned_pages error path
    irqdomain/treewide: Free firmware node after domain removal
    ARM: 8992/1: Fix unwind_frame for clang-built kernels
    parisc: mask out enable and reserved bits from sba imask
    parisc: Implement __smp_store_release and __smp_load_acquire barriers
    mtd: rawnand: qcom: avoid write to unavailable register
  * spi: spidev: Align buffers for DMA
      drivers/spi/spidev.c
  * include/asm-generic/vmlinux.lds.h: align ro_after_init
      include/asm-generic/vmlinux.lds.h
    cpufreq: dt: fix oops on armada37xx
    NFS: Don't return layout segments that are in use
    NFS: Don't move layouts to plh_return_segs list while in use
    drm/ttm/nouveau: don't call tt destroy callback on alloc failure.
    9p: Fix memory leak in v9fs_mount
  * ALSA: usb-audio: add quirk for Pioneer DDJ-RB
      sound/usb/quirks-table.h
    fs/minix: reject too-large maximum file size
    fs/minix: don't allow getting deleted inodes
    fs/minix: check return value of sb_getblk()
  * bitfield.h: don't compile-time validate _val in FIELD_FIT
      include/linux/bitfield.h
    crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
    crypto: ccp - Fix use of merged scatterlists
    crypto: qat - fix double free in qat_uclo_create_batch_init_list
    crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified
  * pstore: Fix linking when crypto API disabled
      fs/pstore/platform.c
  * ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109
      sound/usb/card.h
      sound/usb/pcm.c
      sound/usb/quirks.c
      sound/usb/stream.c
  * ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109
      sound/usb/quirks-table.h
  * ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support
      sound/usb/mixer_quirks.c
    ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO
    USB: serial: cp210x: enable usb generic throttle/unthrottle
    USB: serial: cp210x: re-enable auto-RTS on open
  * net: initialize fastreuse on inet_inherit_port
      net/ipv4/inet_hashtables.c
  * net: refactor bind_bucket fastreuse into helper
      include/net/inet_connection_sock.h
      net/ipv4/inet_connection_sock.c
    net/tls: Fix kmap usage
  * net: Set fput_needed iff FDPUT_FPUT is set
      net/socket.c
    net/nfc/rawsock.c: add CAP_NET_RAW check.
    drivers/net/wan/lapbether: Added needed_headroom and a skb->len check
  * af_packet: TPACKET_V3: fix fill status rwlock imbalance
      net/packet/af_packet.c
    crypto: aesni - add compatibility with IAS
    x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task
    svcrdma: Fix page leak in svc_rdma_recv_read_chunk()
    pinctrl-single: fix pcs_parse_pinconf() return value
    ocfs2: fix unbalanced locking
    dlm: Fix kobject memleak
    fsl/fman: fix eth hash table allocation
    fsl/fman: check dereferencing null pointer
    fsl/fman: fix unreachable code
    fsl/fman: fix dereference null return value
    fsl/fman: use 32-bit unsigned integer
    net: spider_net: Fix the size used in a 'dma_free_coherent()' call
    liquidio: Fix wrong return value in cn23xx_get_pf_num()
    net: ethernet: aquantia: Fix wrong return value
    tools, build: Propagate build failures from tools/build/Makefile.build
    wl1251: fix always return 0 error
    s390/qeth: don't process empty bridge port events
    ASoC: meson: axg-tdm-interface: fix link fmt setup
    selftests/powerpc: Fix online CPU selection
  * PCI: Release IVRS table in AMD ACS quirk
      drivers/pci/quirks.c
    selftests/powerpc: Fix CPU affinity for child process
    powerpc/boot: Fix CONFIG_PPC_MPC52XX references
    net: dsa: rtl8366: Fix VLAN set-up
    net: dsa: rtl8366: Fix VLAN semantics
    Bluetooth: hci_serdev: Only unregister device if it was registered
    Bluetooth: hci_h5: Set HCI_UART_RESET_ON_INIT to correct flags
    power: supply: check if calc_soc succeeded in pm860x_init_battery
  * Smack: prevent underflow in smk_set_cipso()
      security/smack/smackfs.c
  * Smack: fix another vsscanf out of bounds
      security/smack/smackfs.c
    RDMA/core: Fix return error value in _ib_modify_qp() to negative
    PCI: cadence: Fix updating Vendor ID and Subsystem Vendor ID register
    net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration
    scsi: mesh: Fix panic after host or bus reset
    usb: dwc2: Fix error path in gadget registration
    MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init()
    coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb()
    thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor()
  * usb: core: fix quirks_param_set() writing to a const pointer
      drivers/usb/core/quirks.c
    USB: serial: iuu_phoenix: fix led-activity helpers
    drm/imx: tve: fix regulator_disable error path
    powerpc/book3s64/pkeys: Use PVR check instead of cpu feature
    PCI/ASPM: Add missing newline in sysfs 'policy'
    staging: rtl8192u: fix a dubious looking mask before a shift
    RDMA/rxe: Prevent access to wr->next ptr afrer wr is posted to send queue
    RDMA/qedr: SRQ's bug fixes
    powerpc/vdso: Fix vdso cpu truncation
    mwifiex: Prevent memory corruption handling keys
    scsi: scsi_debug: Add check for sdebug_max_queue during module init
    drm/bridge: sil_sii8620: initialize return of sii8620_readb
    phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY
    drm: panel: simple: Fix bpc for LG LB070WV8 panel
  * leds: core: Flush scheduled work for system suspend
      drivers/leds/led-class.c
  * PCI: Fix pci_cfg_wait queue locking problem
      drivers/pci/access.c
    RDMA/rxe: Skip dgid check in loopback mode
    xfs: fix reflink quota reservation accounting error
    xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork
    media: exynos4-is: Add missed check for pinctrl_lookup_state()
    media: firewire: Using uninitialized values in node_probe()
  * ipvs: allow connection reuse for unconfirmed conntrack
      include/net/ip_vs.h
    scsi: eesox: Fix different dev_id between request_irq() and free_irq()
    scsi: powertec: Fix different dev_id between request_irq() and free_irq()
    drm/radeon: fix array out-of-bounds read and write issues
    cxl: Fix kobject memleak
  * drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline
      drivers/gpu/drm/drm_mipi_dsi.c
    scsi: cumana_2: Fix different dev_id between request_irq() and free_irq()
    ASoC: Intel: bxt_rt298: add missing .owner field
    media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities()
    leds: lm355x: avoid enum conversion warning
    drm/arm: fix unintentional integer overflow on left shift
    drm/etnaviv: Fix error path on failure to enable bus clk
    iio: improve IIO_CONCENTRATION channel type description
    ath10k: Acquire tx_lock in tx error paths
    video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call
    console: newport_con: fix an issue about leak related system resources
    video: fbdev: sm712fb: fix an issue about iounmap for a wrong address
    agp/intel: Fix a memory leak on module initialisation failure
    drm/msm: ratelimit crtc event overflow error
    ACPICA: Do not increment operation_region reference counts for field units
    bcache: fix super block seq numbers comparision in register_cache_set()
    dyndbg: fix a BUG_ON in ddebug_describe_flags
    usb: bdc: Halt controller on suspend
    bdc: Fix bug causing crash after multiple disconnects
    usb: gadget: net2280: fix memory leak on probe error handling paths
    gpu: host1x: debug: Fix multiple channels emitting messages simultaneously
    iwlegacy: Check the return value of pcie_capability_read_*()
    brcmfmac: set state of hanger slot to FREE when flushing PSQ
    brcmfmac: To fix Bss Info flag definition Bug
    brcmfmac: keep SDIO watchdog running when console_interval is non-zero
  * mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls
      mm/mmap.c
    irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock
    drm/radeon: disable AGP by default
  * drm/debugfs: fix plain echo to connector "force" attribute
      drivers/gpu/drm/drm_debugfs.c
    usb: mtu3: clear dual mode of u3port when disable device
    drm/nouveau: fix multiple instances of reference count leaks
    drm/etnaviv: fix ref count leak via pm_runtime_get_sync
    arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding
    md-cluster: fix wild pointer of unlock_all_bitmaps()
    video: fbdev: neofb: fix memory leak in neo_scan_monitor()
    crypto: aesni - Fix build with LLVM_IAS=1
    drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync
    drm/amdgpu: avoid dereferencing a NULL pointer
    fs/btrfs: Add cond_resched() for try_release_extent_mapping() stalls
  * loop: be paranoid on exit and prevent new additions / removals
      drivers/block/loop.c
    Bluetooth: add a mutex lock to avoid UAF in do_enale_set
  * soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag
      drivers/soc/qcom/rpmh-rsc.c
    drm/tilcdc: fix leak & null ref in panel_connector_get_modes
    ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh()
    spi: lantiq: fix: Rx overflow error in full duplex mode
    ARM: at91: pm: add missing put_device() call in at91_pm_sram_init()
    ARM: dts: gose: Fix ports node name for adv7612
    ARM: dts: gose: Fix ports node name for adv7180
    platform/x86: intel-vbtn: Fix return value check in check_acpi_dev()
    platform/x86: intel-hid: Fix return value check in check_acpi_dev()
    m68k: mac: Fix IOP status/control register writes
    m68k: mac: Don't send IOP message until channel is idle
    clk: scmi: Fix min and max rate when registering clocks with discrete rates
    arm64: dts: exynos: Fix silent hang after boot on Espresso
    firmware: arm_scmi: Fix SCMI genpd domain probing
    crypto: ccree - fix resource leak on error path
    arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property
  * EDAC: Fix reference count leaks
      drivers/edac/edac_device_sysfs.c
      drivers/edac/edac_pci_sysfs.c
    arm64: dts: rockchip: fix rk3399-puma gmac reset gpio
    arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio
    arm64: dts: rockchip: fix rk3368-lion gmac reset gpio
  * sched: correct SD_flags returned by tl->sd_flags()
      kernel/sched/topology.c
  * sched/fair: Fix NOHZ next idle balance
      kernel/sched/fair.c
    x86/mce/inject: Fix a wrong assignment of i_mce.status
  * cgroup: add missing skcd->no_refcnt check in cgroup_sk_clone()
      kernel/cgroup/cgroup.c
  * HID: input: Fix devices that return multiple bytes in battery report
      drivers/hid/hid-input.c
  * tracepoint: Mark __tracepoint_string's __used
      include/linux/tracepoint.h
  * ANDROID: fix a bug in quota2
      net/netfilter/xt_quota2.c
    ANDROID: Update the ABI xml based on the new driver core padding
  * ANDROID: GKI: add some padding to some driver core structures
      include/linux/device.h
      include/linux/fwnode.h
    ANDROID: GKI: Update the ABI xml representation
  * ANDROID: sched: add "frozen" field to task_struct
      include/linux/sched.h
  * ANDROID: cgroups: add v2 freezer ABI changes
      include/linux/cgroup-defs.h
  * ANDROID: cgroups: ABI padding
      include/linux/cgroup-defs.h
    Merge 4.19.139 into android-4.19-stable
Linux 4.19.139
  * Smack: fix use-after-free in smk_write_relabel_self()
      security/smack/smackfs.c
    i40e: Memory leak in i40e_config_iwarp_qvlist
    i40e: Fix of memory leak and integer truncation in i40e_virtchnl.c
    i40e: Wrong truncation from u16 to u8
    i40e: add num_vectors checker in iwarp handler
    rxrpc: Fix race between recvmsg and sendmsg on immediate call failure
    selftests/net: relax cpu affinity requirement in msg_zerocopy test
    Revert "vxlan: fix tos value before xmit"
    openvswitch: Prevent kernel-infoleak in ovs_ct_put_key()
    net: thunderx: use spin_lock_bh in nicvf_set_rx_mode_task()
  * net: gre: recompute gre csum for sctp over gre tunnels
      net/ipv4/gre_offload.c
    hv_netvsc: do not use VF device if link is down
    net: lan78xx: replace bogus endpoint lookup
    vxlan: Ensure FDB dump is performed under RCU
    net: ethernet: mtk_eth_soc: fix MTU warnings
  * ipv6: fix memory leaks on IPV6_ADDRFORM path
      include/net/addrconf.h
      net/ipv6/anycast.c
      net/ipv6/ipv6_sockglue.c
  * ipv4: Silence suspicious RCU usage warning
      net/ipv4/fib_trie.c
  * xattr: break delegations in {set,remove}xattr
      fs/xattr.c
      include/linux/xattr.h
  * Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23)
      include/linux/hyperv.h
    tools lib traceevent: Fix memory leak in process_dynamic_array_len
    atm: fix atm_dev refcnt leaks in atmtcp_remove_persistent
    igb: reinit_locked() should be called with rtnl_lock
  * cfg80211: check vendor command doit pointer before use
      net/wireless/nl80211.c
    firmware: Fix a reference count leak.
    usb: hso: check for return value in hso_serial_common_create()
    i2c: slave: add sanity check when unregistering
    i2c: slave: improve sanity check when registering
    drm/nouveau/fbcon: zero-initialise the mode_cmd2 structure
    drm/nouveau/fbcon: fix module unload when fbcon init has failed for some reason
    net/9p: validate fds in p9_fd_open
    leds: 88pm860x: fix use-after-free on unbind
    leds: lm3533: fix use-after-free on unbind
    leds: da903x: fix use-after-free on unbind
    leds: wm831x-status: fix use-after-free on unbind
    mtd: properly check all write ioctls for permissions
    vgacon: Fix for missing check in scrollback handling
  * binder: Prevent context manager from incrementing ref 0
      drivers/android/binder.c
    omapfb: dss: Fix max fclk divider for omap36xx
  * Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt()
      net/bluetooth/hci_event.c
  * Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt()
      net/bluetooth/hci_event.c
  * Bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt()
      net/bluetooth/hci_event.c
  * staging: android: ashmem: Fix lockdep warning for write operation
      drivers/staging/android/ashmem.c
    ALSA: seq: oss: Serialize ioctls
    Revert "ALSA: hda: call runtime_allow() for all hda controllers"
  * usb: xhci: Fix ASMedia ASM1142 DMA addressing
      drivers/usb/host/xhci-pci.c
  * usb: xhci: define IDs for various ASMedia host controllers
      drivers/usb/host/xhci-pci.c
    USB: iowarrior: fix up report size handling for some devices
    USB: serial: qcserial: add EM7305 QDL product ID
  * BACKPORT: loop: Fix wrong masking of status flags
      drivers/block/loop.c
  * BACKPORT: loop: Add LOOP_CONFIGURE ioctl
      drivers/block/loop.c
      include/uapi/linux/loop.h
  * BACKPORT: loop: Clean up LOOP_SET_STATUS lo_flags handling
      drivers/block/loop.c
      include/uapi/linux/loop.h
  * BACKPORT: loop: Rework lo_ioctl() __user argument casting
      drivers/block/loop.c
  * BACKPORT: loop: Move loop_set_status_from_info() and friends up
      drivers/block/loop.c
  * BACKPORT: loop: Factor out configuring loop from status
      drivers/block/loop.c
  * BACKPORT: loop: Remove figure_loop_size()
      drivers/block/loop.c
  * BACKPORT: loop: Refactor loop_set_status() size calculation
      drivers/block/loop.c
  * BACKPORT: loop: Factor out setting loop device size
      drivers/block/loop.c
  * BACKPORT: loop: Remove sector_t truncation checks
      drivers/block/loop.c
  * BACKPORT: loop: Call loop_config_discard() only after new config is applied
      drivers/block/loop.c
    Merge 4.19.138 into android-4.19-stable
Linux 4.19.138
  * ext4: fix direct I/O read error
      fs/ext4/inode.c
  * random32: move the pseudo-random 32-bit definitions to prandom.h
      include/linux/prandom.h
      include/linux/random.h
  * random32: remove net_rand_state from the latent entropy gcc plugin
      include/linux/random.h
      lib/random32.c
  * random: fix circular include dependency on arm64 after addition of percpu.h
      include/linux/random.h
    ARM: percpu.h: fix build error
  * random32: update the net random state on interrupt and activity
      drivers/char/random.c
      include/linux/random.h
      kernel/time/timer.c
      lib/random32.c
    ANDROID: GKI: update the ABI xml
  * ANDROID: GKI: power: Add property to enable/disable cc toggle
      drivers/power/supply/power_supply_sysfs.c
      include/linux/power_supply.h
    ANDROID: Enforce KMI stability
    Merge 4.19.137 into android-4.19-stable
Linux 4.19.137
    x86/i8259: Use printk_deferred() to prevent deadlock
    KVM: LAPIC: Prevent setting the tscdeadline timer if the lapic is hw disabled
    xen-netfront: fix potential deadlock in xennet_remove()
    cxgb4: add missing release on skb in uld_send()
    x86/unwind/orc: Fix ORC for newly forked tasks
    Revert "i2c: cadence: Fix the hold bit setting"
    net: ethernet: ravb: exit if re-initialization fails in tx timeout
    parisc: add support for cmpxchg on u8 pointers
    nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame
    qed: Disable "MFW indication via attention" SPAM every 5 minutes
    usb: hso: Fix debug compile warning on sparc32
    net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq
    net: gemini: Fix missing clk_disable_unprepare() in error path of gemini_ethernet_port_probe()
  * Bluetooth: fix kernel oops in store_pending_adv_report
      net/bluetooth/hci_event.c
  * arm64: csum: Fix handling of bad packets
      arch/arm64/include/asm/checksum.h
  * arm64/alternatives: move length validation inside the subsection
      arch/arm64/include/asm/alternative.h
    mac80211: mesh: Free pending skb when destroying a mpath
    mac80211: mesh: Free ie data when leaving mesh
  * bpf: Fix map leak in HASH_OF_MAPS map
      kernel/bpf/hashtab.c
    ibmvnic: Fix IRQ mapping disposal in error path
    mlxsw: core: Free EMAD transactions using kfree_rcu()
    mlxsw: core: Increase scope of RCU read-side critical section
    mlx4: disable device on shutdown
    net: lan78xx: fix transfer-buffer memory leak
    net: lan78xx: add missing endpoint sanity check
    net/mlx5: Verify Hardware supports requested ptp function on a given pin
    sh: Fix validation of system call number
    selftests/net: psock_fanout: fix clang issues for target arch PowerPC
    selftests/net: rxtimestamp: fix clang issues for target arch PowerPC
  * xfrm: Fix crash when the hold queue is used.
      include/net/xfrm.h
    net/x25: Fix null-ptr-deref in x25_disconnect
    net/x25: Fix x25_neigh refcnt leak when x25 disconnect
    xfs: fix missed wakeup on l_flush_wait
    rds: Prevent kernel-infoleak in rds_notify_queue_get()
  * drm: hold gem reference until object is no longer accessed
      drivers/gpu/drm/drm_gem.c
    drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl()
    Revert "drm/amdgpu: Fix NULL dereference in dpm sysfs handlers"
    ARM: 8986/1: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
  * wireless: Use offsetof instead of custom macro.
      include/uapi/linux/wireless.h
    9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work
  * PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge
      drivers/pci/quirks.c
    Btrfs: fix selftests failure due to uninitialized i_mode in test inodes
  * sctp: implement memory accounting on tx path
      net/sctp/socket.c
    btrfs: inode: Verify inode mode to avoid NULL pointer dereference
    drm/amd/display: prevent memory leak
    ath9k: release allocated buffer if timed out
    ath9k_htc: release allocated buffer if timed out
  * tracing: Have error path in predicate_parse() free its allocated memory
      kernel/trace/trace_events_filter.c
    drm/amdgpu: fix multiple memory leaks in acp_hw_init
    iio: imu: adis16400: fix memory leak
    media: rc: prevent memory leak in cx23888_ir_probe
    crypto: ccp - Release all allocated memory if sha type is invalid
  * ANDROID: GKI: kernel: tick-sched: Move wake callback registration code
      kernel/time/tick-sched.c
    Merge 4.19.136 into android-4.19-stable
Linux 4.19.136
  * regmap: debugfs: check count when read regmap file
      drivers/base/regmap/regmap-debugfs.c
  * rtnetlink: Fix memory(net_device) leak when ->newlink fails
      net/core/rtnetlink.c
  * udp: Improve load balancing for SO_REUSEPORT.
      net/ipv4/udp.c
      net/ipv6/udp.c
  * udp: Copy has_conns in reuseport_grow().
      net/core/sock_reuseport.c
  * sctp: shrink stream outq when fails to do addstream reconf
      net/sctp/stream.c
  * sctp: shrink stream outq only when new outcnt < old outcnt
      net/sctp/stream.c
    AX.25: Prevent integer overflows in connect and sendmsg
  * tcp: allow at most one TLP probe per flight
      include/linux/tcp.h
      net/ipv4/tcp_input.c
      net/ipv4/tcp_output.c
    rxrpc: Fix sendmsg() returning EPIPE due to recvmsg() returning ENODATA
  * qrtr: orphan socket in qrtr_release()
      net/qrtr/qrtr.c
  * net: udp: Fix wrong clean up for IS_UDPLITE macro
      net/ipv4/udp.c
      net/ipv6/udp.c
  * net-sysfs: add a newline when printing 'tx_timeout' by sysfs
      net/core/net-sysfs.c
    ip6_gre: fix null-ptr-deref in ip6gre_init_net()
    drivers/net/wan/x25_asy: Fix to make it work
  * dev: Defer free of skbs in flush_backlog
      net/core/dev.c
    AX.25: Prevent out-of-bounds read in ax25_sendmsg()
    AX.25: Fix out-of-bounds read in ax25_connect()

Change-Id: Icec947c4e82f9b19199b4507b521f7a9285c6e03
Signed-off-by: lucaswei <lucaswei@google.com>
2020-12-03 21:29:38 +08:00
Yuchung Cheng
55c73db299 tcp: allow at most one TLP probe per flight
[ Upstream commit 76be93fc0702322179bb0ea87295d820ee46ad14 ]

Previously TLP may send multiple probes of new data in one
flight. This happens when the sender is cwnd limited. After the
initial TLP containing new data is sent, the sender receives another
ACK that acks partial inflight.  It may re-arm another TLP timer
to send more, if no further ACK returns before the next TLP timeout
(PTO) expires. The sender may send in theory a large amount of TLP
until send queue is depleted. This only happens if the sender sees
such irregular uncommon ACK pattern. But it is generally undesirable
behavior during congestion especially.

The original TLP design restrict only one TLP probe per inflight as
published in "Reducing Web Latency: the Virtue of Gentle Aggression",
SIGCOMM 2013. This patch changes TLP to send at most one probe
per inflight.

Note that if the sender is app-limited, TLP retransmits old data
and did not have this issue.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-31 18:37:48 +02:00
Subash Abhinov Kasiviswanathan
ff8ce51863 tcp: Clear sack info on purge
This ensures that the sack information is cleared when TCP is in
FIN-WAIT1 state.

This also tracks whenever tcp queue purge is called which resets
all the transmit queue information and ensures there are no
outstanding packets.

This addresses the following -

 16496.596106:   <6> Unable to handle kernel paging request at virtual
		     address fffffff2cd81a368
 16496.730771:   <2> pc : tcp_ack+0x174/0x11e8
 16496.734536:   <2> lr : tcp_rcv_state_process+0x318/0x1300
 16497.183109:   <2> Call trace:
 16497.183114:   <2>  tcp_ack+0x174/0x11e8
 16497.183115:   <2>  tcp_rcv_state_process+0x318/0x1300
 16497.183117:   <2>  tcp_v4_do_rcv+0x1a8/0x1f0
 16497.183118:   <2>  tcp_v4_rcv+0xe90/0xec8
 16497.183120:   <2>  ip_protocol_deliver_rcu+0x150/0x298
 16497.183121:   <2>  ip_local_deliver+0x21c/0x2a8
 16497.183122:   <2>  ip_rcv+0x1c4/0x210
 16497.183124:   <2>  __netif_receive_skb_core+0xab0/0xd90
 16497.183125:   <2>  netif_receive_skb_internal+0x12c/0x368
 16497.183126:   <2>  napi_gro_receive+0x1e0/0x290

No outstanding data is expected on a socket after write queue purge
is called.

CRs-Fixed: 2541019
Change-Id: I586c43931969eae48fe1bf9799ef38267401fdc6
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2019-10-22 07:53:57 -07:00
Eric Dumazet
c09be31461 tcp: limit payload size of sacked skbs
commit 3b4929f65b0d8249f19a50245cd88ed1a2f78cff upstream.

Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :

	BUG_ON(tcp_skb_pcount(skb) < pcount);

This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48

An skb can hold 17 fragments, and each fragment can hold 32KB
on x86, or 64KB on PowerPC.

This means that the 16bit witdh of TCP_SKB_CB(skb)->tcp_gso_segs
can overflow.

Note that tcp_sendmsg() builds skbs with less than 64KB
of payload, so this problem needs SACK to be enabled.
SACK blocks allow TCP to coalesce multiple skbs in the retransmit
queue, thus filling the 17 fragments to maximal capacity.

CVE-2019-11477 -- u16 overflow of TCP_SKB_CB(skb)->tcp_gso_segs

Fixes: 832d11c5cd ("tcp: Try to restore large SKBs while SACK processing")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Jonathan Looney <jtl@netflix.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Tyler Hicks <tyhicks@canonical.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Bruce Curtis <brucec@netflix.com>
Cc: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-17 19:51:56 +02:00
Eric Dumazet
aaa7e45c00 tcp: defer SACK compression after DupThresh
[ Upstream commit 86de5921a3d5dd246df661e09bdd0a6131b39ae3 ]

Jean-Louis reported a TCP regression and bisected to recent SACK
compression.

After a loss episode (receiver not able to keep up and dropping
packets because its backlog is full), linux TCP stack is sending
a single SACK (DUPACK).

Sender waits a full RTO timer before recovering losses.

While RFC 6675 says in section 5, "Algorithm Details",

   (2) If DupAcks < DupThresh but IsLost (HighACK + 1) returns true --
       indicating at least three segments have arrived above the current
       cumulative acknowledgment point, which is taken to indicate loss
       -- go to step (4).
...
   (4) Invoke fast retransmit and enter loss recovery as follows:

there are old TCP stacks not implementing this strategy, and
still counting the dupacks before starting fast retransmit.

While these stacks probably perform poorly when receivers implement
LRO/GRO, we should be a little more gentle to them.

This patch makes sure we do not enable SACK compression unless
3 dupacks have been sent since last rcv_nxt update.

Ideally we should even rearm the timer to send one or two
more DUPACK if no more packets are coming, but that will
be work aiming for linux-4.21.

Many thanks to Jean-Louis for bisecting the issue, providing
packet captures and testing this patch.

Fixes: 5d9f4262b7 ("tcp: add SACK compression")
Reported-by: Jean-Louis Dupond <jean-louis@dupond.be>
Tested-by: Jean-Louis Dupond <jean-louis@dupond.be>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:32:00 +01:00
Wei Wang
7ec65372ca tcp: add stat of data packet reordering events
Introduce a new TCP stats to record the number of reordering events seen
and expose it in both tcp_info (TCP_INFO) and opt_stats
(SOF_TIMESTAMPING_OPT_STATS).
Application can use this stats to track the frequency of the reordering
events in addition to the existing reordering stats which tracks the
magnitude of the latest reordering event.

Note: this new stats tracks reordering events triggered by ACKs, which
could often be fewer than the actual number of packets being delivered
out-of-order.

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-01 09:56:10 -07:00
Wei Wang
7e10b6554f tcp: add dsack blocks received stats
Introduce a new TCP stat to record the number of DSACK blocks received
(RFC4989 tcpEStatsStackDSACKDups) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-01 09:56:10 -07:00
Wei Wang
fb31c9b9f6 tcp: add data bytes retransmitted stats
Introduce a new TCP stat to record the number of bytes retransmitted
(RFC4898 tcpEStatsPerfOctetsRetrans) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-01 09:56:10 -07:00
Wei Wang
ba113c3aa7 tcp: add data bytes sent stats
Introduce a new TCP stat to record the number of bytes sent
(RFC4898 tcpEStatsPerfHCDataOctetsOut) and expose it in both tcp_info
(TCP_INFO) and opt_stats (SOF_TIMESTAMPING_OPT_STATS).

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-08-01 09:56:10 -07:00
Arnd Bergmann
cca9bab1b7 tcp: use monotonic timestamps for PAWS
Using get_seconds() for timestamps is deprecated since it can lead
to overflows on 32-bit systems. While the interface generally doesn't
overflow until year 2106, the specific implementation of the TCP PAWS
algorithm breaks in 2038 when the intermediate signed 32-bit timestamps
overflow.

A related problem is that the local timestamps in CLOCK_REALTIME form
lead to unexpected behavior when settimeofday is called to set the system
clock backwards or forwards by more than 24 days.

While the first problem could be solved by using an overflow-safe method
of comparing the timestamps, a nicer solution is to use a monotonic
clocksource with ktime_get_seconds() that simply doesn't overflow (at
least not until 136 years after boot) and that doesn't change during
settimeofday().

To make 32-bit and 64-bit architectures behave the same way here, and
also save a few bytes in the tcp_options_received structure, I'm changing
the type to a 32-bit integer, which is now safe on all architectures.

Finally, the ts_recent_stamp field also (confusingly) gets used to store
a jiffies value in tcp_synq_overflow()/tcp_synq_no_recent_overflow().
This is currently safe, but changing the type to 32-bit requires
some small changes there to keep it working.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-12 14:50:40 -07:00
Wei Wang
3f6c65d625 tcp: ignore rcv_rtt sample with old ts ecr value
When receiving multiple packets with the same ts ecr value, only try
to compute rcv_rtt sample with the earliest received packet.
This is because the rcv_rtt calculated by later received packets
could possibly include long idle time or other types of delay.
For example:
(1) server sends last packet of reply with TS val V1
(2) client ACKs last packet of reply with TS ecr V1
(3) long idle time passes
(4) client sends next request data packet with TS ecr V1 (again!)
At this time, the rcv_rtt computed on server with TS ecr V1 will be
inflated with the idle time and should get ignored.

Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-22 13:45:01 +09:00
Eric Dumazet
5d9f4262b7 tcp: add SACK compression
When TCP receives an out-of-order packet, it immediately sends
a SACK packet, generating network load but also forcing the
receiver to send 1-MSS pathological packets, increasing its
RTX queue length/depth, and thus processing time.

Wifi networks suffer from this aggressive behavior, but generally
speaking, all these SACK packets add fuel to the fire when networks
are under congestion.

This patch adds a high resolution timer and tp->compressed_ack counter.

Instead of sending a SACK, we program this timer with a small delay,
based on RTT and capped to 1 ms :

	delay = min ( 5 % of RTT, 1 ms)

If subsequent SACKs need to be sent while the timer has not yet
expired, we simply increment tp->compressed_ack.

When timer expires, a SACK is sent with the latest information.
Whenever an ACK is sent (if data is sent, or if in-order
data is received) timer is canceled.

Note that tcp_sack_new_ofo_skb() is able to force a SACK to be sent
if the sack blocks need to be shuffled, even if the timer has not
expired.

A new SNMP counter is added in the following patch.

Two other patches add sysctls to allow changing the 1,000,000 and 44
values that this commit hard-coded.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-18 11:40:27 -04:00
Soheil Hassas Yeganeh
b75eba76d3 tcp: send in-queue bytes in cmsg upon read
Applications with many concurrent connections, high variance
in receive queue length and tight memory bounds cannot
allocate worst-case buffer size to drain sockets. Knowing
the size of receive queue length, applications can optimize
how they allocate buffers to read from the socket.

The number of bytes pending on the socket is directly
available through ioctl(FIONREAD/SIOCINQ) and can be
approximated using getsockopt(MEMINFO) (rmem_alloc includes
skb overheads in addition to application data). But, both of
these options add an extra syscall per recvmsg. Moreover,
ioctl(FIONREAD/SIOCINQ) takes the socket lock.

Add the TCP_INQ socket option to TCP. When this socket
option is set, recvmsg() relays the number of bytes available
on the socket for reading to the application via the
TCP_CM_INQ control message.

Calculate the number of bytes after releasing the socket lock
to include the processed backlog, if any. To avoid an extra
branch in the hot path of recvmsg() for this new control
message, move all cmsg processing inside an existing branch for
processing receive timestamps. Since the socket lock is not held
when calculating the size of receive queue, TCP_INQ is a hint.
For example, it can overestimate the queue size by one byte,
if FIN is received.

With this method, applications can start reading from the socket
using a small buffer, and then use larger buffers based on the
remaining data when needed.

V3 change-log:
	As suggested by David Miller, added loads with barrier
	to check whether we have multiple threads calling recvmsg
	in parallel. When that happens we lock the socket to
	calculate inq.
V4 change-log:
	Removed inline from a static function.

Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-01 18:56:29 -04:00
Yuchung Cheng
e21db6f69a tcp: track total bytes delivered with ECN CE marks
Introduce a new delivered_ce stat in tcp socket to estimate
number of packets being marked with CE bits. The estimation is
done via ACKs with ECE bit. Depending on the actual receiver
behavior, the estimation could have biases.

Since the TCP sender can't really see the CE bit in the data path,
so the sender is technically counting packets marked delivered with
the "ECE / ECN-Echo" flag set.

With RFC3168 ECN, because the ECE bit is sticky, this count can
drastically overestimate the nummber of CE-marked data packets

With DCTCP-style ECN this should be reasonably precise unless there
is loss in the ACK path, in which case it's not precise.

With AccECN proposal this can be made still more precise, even in
the case some degree of ACK loss.

However this is sender's best estimate of CE information.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-19 13:05:16 -04:00
Lawrence Brakmo
b13d880721 bpf: Adds field bpf_sock_ops_cb_flags to tcp_sock
Adds field bpf_sock_ops_cb_flags to tcp_sock and bpf_sock_ops. Its primary
use is to determine if there should be calls to sock_ops bpf program at
various points in the TCP code. The field is initialized to zero,
disabling the calls. A sock_ops BPF program can set it, per connection and
as necessary, when the connection is established.

It also adds support for reading and writting the field within a
sock_ops BPF program. Reading is done by accessing the field directly.
However, writing is done through the helper function
bpf_sock_ops_cb_flags_set, in order to return an error if a BPF program
is trying to set a callback that is not supported in the current kernel
(i.e. running an older kernel). The helper function returns 0 if it was
able to set all of the bits set in the argument, a positive number
containing the bits that could not be set, or -EINVAL if the socket is
not a full TCP socket.

Examples of where one could call the bpf program:

1) When RTO fires
2) When a packet is retransmitted
3) When the connection terminates
4) When a packet is sent
5) When a packet is received

Signed-off-by: Lawrence Brakmo <brakmo@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-01-25 16:41:14 -08:00
Eric Dumazet
607065bad9 tcp: avoid integer overflows in tcp_rcv_space_adjust()
When using large tcp_rmem[2] values (I did tests with 500 MB),
I noticed overflows while computing rcvwin.

Lets fix this before the following patch.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Wei Wang <weiwan@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-12 10:53:04 -05:00
Yousuk Seung
d4761754b4 tcp: invalidate rate samples during SACK reneging
Mark tcp_sock during a SACK reneging event and invalidate rate samples
while marked. Such rate samples may overestimate bw by including packets
that were SACKed before reneging.

< ack 6001 win 10000 sack 7001:38001
< ack 7001 win 0 sack 8001:38001 // Reneg detected
> seq 7001:8001 // RTO, SACK cleared.
< ack 38001 win 10000

In above example the rate sample taken after the last ack will count
7001-38001 as delivered while the actual delivery rate likely could
be much lower i.e. 7001-8001.

This patch adds a new field tcp_sock.sack_reneg and marks it when we
declare SACK reneging and entering TCP_CA_Loss, and unmarks it after
the last rate sample was taken before moving back to TCP_CA_Open. This
patch also invalidates rate samples taken while tcp_sock.is_sack_reneg
is set.

Fixes: b9f64820fb ("tcp: track data delivery rate for a TCP connection")
Signed-off-by: Yousuk Seung <ysseung@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-08 10:07:02 -05:00
Yuchung Cheng
737ff31456 tcp: use sequence distance to detect reordering
Replace the reordering distance measurement in packet unit with
sequence based approach. Previously it trackes the number of "packets"
toward the forward ACK (i.e.  highest sacked sequence)in a state
variable "fackets_out".

Precisely measuring reordering degree on packet distance has not much
benefit, as the degree constantly changes by factors like path, load,
and congestion window. It is also complicated and prone to arcane bugs.
This patch replaces with sequence-based approach that's much simpler.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-11 18:53:16 +09:00
Yuchung Cheng
713bafea92 tcp: retire FACK loss detection
FACK loss detection has been disabled by default and the
successor RACK subsumed FACK and can handle reordering better.
This patch removes FACK to simplify TCP loss recovery.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-11 18:53:16 +09:00
Priyaranjan Jha
1f2556916d tcp: higher throughput under reordering with adaptive RACK reordering wnd
Currently TCP RACK loss detection does not work well if packets are
being reordered beyond its static reordering window (min_rtt/4).Under
such reordering it may falsely trigger loss recoveries and reduce TCP
throughput significantly.

This patch improves that by increasing and reducing the reordering
window based on DSACK, which is now supported in major TCP implementations.
It makes RACK's reo_wnd adaptive based on DSACK and no. of recoveries.

- If DSACK is received, increment reo_wnd by min_rtt/4 (upper bounded
  by srtt), since there is possibility that spurious retransmission was
  due to reordering delay longer than reo_wnd.

- Persist the current reo_wnd value for TCP_RACK_RECOVERY_THRESH (16)
  no. of successful recoveries (accounts for full DSACK-based loss
  recovery undo). After that, reset it to default (min_rtt/4).

- At max, reo_wnd is incremented only once per rtt. So that the new
  DSACK on which we are reacting, is due to the spurious retx (approx)
  after the reo_wnd has been updated last time.

- reo_wnd is tracked in terms of steps (of min_rtt/4), rather than
  absolute value to account for change in rtt.

In our internal testing, we observed significant increase in throughput,
in scenarios where reordering exceeds min_rtt/4 (previous static value).

Signed-off-by: Priyaranjan Jha <priyarjha@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-05 23:15:42 +09:00
Ursula Braun
60e2a77807 tcp: TCP experimental option for SMC
The SMC protocol [1] relies on the use of a new TCP experimental
option [2, 3]. With this option, SMC capabilities are exchanged
between peers during the TCP three way handshake. This patch adds
support for this experimental option to TCP.

References:
[1] SMC-R Informational RFC: http://www.rfc-editor.org/info/rfc7609
[2] Shared Use of TCP Experimental Options RFC 6994:
    https://tools.ietf.org/rfc/rfc6994.txt
[3] IANA ExID SMCR:
http://www.iana.org/assignments/tcp-parameters/tcp-parameters.xhtml#tcp-exids

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-26 18:00:29 +09:00
Christoph Paasch
71c02379c7 tcp: Configure TFO without cookie per socket and/or per route
We already allow to enable TFO without a cookie by using the
fastopen-sysctl and setting it to TFO_SERVER_COOKIE_NOT_REQD (or
TFO_CLIENT_NO_COOKIE).
This is safe to do in certain environments where we know that there
isn't a malicous host (aka., data-centers) or when the
application-protocol already provides an authentication mechanism in the
first flight of data.

A server however might be providing multiple services or talking to both
sides (public Internet and data-center). So, this server would want to
enable cookie-less TFO for certain services and/or for connections that
go to the data-center.

This patch exposes a socket-option and a per-route attribute to enable such
fine-grained configurations.

Signed-off-by: Christoph Paasch <cpaasch@apple.com>
Reviewed-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-24 18:48:08 +09:00
Eric Dumazet
e2080072ed tcp: new list for sent but unacked skbs for RACK recovery
This patch adds a new queue (list) that tracks the sent but not yet
acked or SACKed skbs for a TCP connection. The list is chronologically
ordered by skb->skb_mstamp (the head is the oldest sent skb).

This list will be used to optimize TCP Rack recovery, which checks
an skb's timestamp to judge if it has been lost and needs to be
retransmitted. Since TCP write queue is ordered by sequence instead
of sent time, RACK has to scan over the write queue to catch all
eligible packets to detect lost retransmission, and iterates through
SACKed skbs repeatedly.

Special cares for rare events:
1. TCP repair fakes skb transmission so the send queue needs adjusted
2. SACK reneging would require re-inserting SACKed skbs into the
   send queue. For now I believe it's not worth the complexity to
   make RACK work perfectly on SACK reneging, so we do nothing here.
3. Fast Open: currently for non-TFO, send-queue correctly queues
   the pure SYN packet. For TFO which queues a pure SYN and
   then a data packet, send-queue only queues the data packet but
   not the pure SYN due to the structure of TFO code. This is okay
   because the SYN receiver would never respond with a SACK on a
   missing SYN (i.e. SYN is never fast-retransmitted by SACK/RACK).

In order to not grow sk_buff, we use an union for the new list and
_skb_refdst/destructor fields. This is a bit complicated because
we need to make sure _skb_refdst and destructor are properly zeroed
before skb is cloned/copied at transmit, and before being freed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-05 21:24:47 -07:00
Florian Westphal
31770e34e4 tcp: Revert "tcp: remove header prediction"
This reverts commit 45f119bf93.

Eric Dumazet says:
  We found at Google a significant regression caused by
  45f119bf93 tcp: remove header prediction

  In typical RPC  (TCP_RR), when a TCP socket receives data, we now call
  tcp_ack() while we used to not call it.

  This touches enough cache lines to cause a slowdown.

so problem does not seem to be HP removal itself but the tcp_ack()
call.  Therefore, it might be possible to remove HP after all, provided
one finds a way to elide tcp_ack for most cases.

Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-30 11:20:09 -07:00
Yuchung Cheng
4faf783998 tcp: fix cwnd undo in Reno and HTCP congestion controls
Using ssthresh to revert cwnd is less reliable when ssthresh is
bounded to 2 packets. This patch uses an existing variable in TCP
"prior_cwnd" that snapshots the cwnd right before entering fast
recovery and RTO recovery in Reno.  This fixes the issue discussed
in netdev thread: "A buggy behavior for Linux TCP Reno and HTCP"
https://www.spinics.net/lists/netdev/msg444955.html

Suggested-by: Neal Cardwell <ncardwell@google.com>
Reported-by: Wei Sun <unlcsewsun@gmail.com>
Signed-off-by: Yuchung Cheng <ncardwell@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-08-06 21:25:10 -07:00
Florian Westphal
45f119bf93 tcp: remove header prediction
Like prequeue, I am not sure this is overly useful nowadays.

If we receive a train of packets, GRO will aggregate them if the
headers are the same (HP predates GRO by several years) so we don't
get a per-packet benefit, only a per-aggregated-packet one.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-31 14:37:49 -07:00
Florian Westphal
e7942d0633 tcp: remove prequeue support
prequeue is a tcp receive optimization that moves part of rx processing
from bh to process context.

This only works if the socket being processed belongs to a process that
is blocked in recv on that socket.

In practice, this doesn't happen anymore that often because nowadays
servers tend to use an event driven (epoll) model.

Even normal client applications (web browsers) commonly use many tcp
connections in parallel.

This has measureable impact only in netperf (which uses plain recv and
thus allows prequeue use) from host to locally running vm (~4%), however,
there were no changes when using netperf between two physical hosts with
ixgbe interfaces.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-31 14:37:49 -07:00
Eric Dumazet
9a568de481 tcp: switch TCP TS option (RFC 7323) to 1ms clock
TCP Timestamps option is defined in RFC 7323

Traditionally on linux, it has been tied to the internal
'jiffies' variable, because it had been a cheap and good enough
generator.

For TCP flows on the Internet, 1 ms resolution would be much better
than 4ms or 10ms (HZ=250 or HZ=100 respectively)

For TCP flows in the DC, Google has used usec resolution for more
than two years with great success [1]

Receive size autotuning (DRS) is indeed more precise and converges
faster to optimal window size.

This patch converts tp->tcp_mstamp to a plain u64 value storing
a 1 usec TCP clock.

This choice will allow us to upstream the 1 usec TS option as
discussed in IETF 97.

[1] https://www.ietf.org/proceedings/97/slides/slides-97-tcpm-tcp-options-for-low-latency-00.pdf

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-17 16:06:01 -04:00
Eric Dumazet
218af599fa tcp: internal implementation for pacing
BBR congestion control depends on pacing, and pacing is
currently handled by sch_fq packet scheduler for performance reasons,
and also because implemening pacing with FQ was convenient to truly
avoid bursts.

However there are many cases where this packet scheduler constraint
is not practical.
- Many linux hosts are not focusing on handling thousands of TCP
  flows in the most efficient way.
- Some routers use fq_codel or other AQM, but still would like
  to use BBR for the few TCP flows they initiate/terminate.

This patch implements an automatic fallback to internal pacing.

Pacing is requested either by BBR or use of SO_MAX_PACING_RATE option.

If sch_fq happens to be in the egress path, pacing is delegated to
the qdisc, otherwise pacing is done by TCP itself.

One advantage of pacing from TCP stack is to get more precise rtt
estimations, and less work done from TX completion, since TCP Small
queue limits are not generally hit. Setups with single TX queue but
many cpus might even benefit from this.

Note that unlike sch_fq, we do not take into account header sizes.
Taking care of these headers would add additional complexity for
no practical differences in behavior.

Some performance numbers using 800 TCP_STREAM flows rate limited to
~48 Mbit per second on 40Gbit NIC.

If MQ+pfifo_fast is used on the NIC :

$ sar -n DEV 1 5 | grep eth
14:48:44         eth0 725743.00 2932134.00  46776.76 4335184.68      0.00      0.00      1.00
14:48:45         eth0 725349.00 2932112.00  46751.86 4335158.90      0.00      0.00      0.00
14:48:46         eth0 725101.00 2931153.00  46735.07 4333748.63      0.00      0.00      0.00
14:48:47         eth0 725099.00 2931161.00  46735.11 4333760.44      0.00      0.00      1.00
14:48:48         eth0 725160.00 2931731.00  46738.88 4334606.07      0.00      0.00      0.00
Average:         eth0 725290.40 2931658.20  46747.54 4334491.74      0.00      0.00      0.40
$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 4  0      0 259825920  45644 2708324    0    0    21     2  247   98  0  0 100  0  0
 4  0      0 259823744  45644 2708356    0    0     0     0 2400825 159843  0 19 81  0  0
 0  0      0 259824208  45644 2708072    0    0     0     0 2407351 159929  0 19 81  0  0
 1  0      0 259824592  45644 2708128    0    0     0     0 2405183 160386  0 19 80  0  0
 1  0      0 259824272  45644 2707868    0    0     0    32 2396361 158037  0 19 81  0  0

Now use MQ+FQ :

lpaa23:~# echo fq >/proc/sys/net/core/default_qdisc
lpaa23:~# tc qdisc replace dev eth0 root mq

$ sar -n DEV 1 5 | grep eth
14:49:57         eth0 678614.00 2727930.00  43739.13 4033279.14      0.00      0.00      0.00
14:49:58         eth0 677620.00 2723971.00  43674.69 4027429.62      0.00      0.00      1.00
14:49:59         eth0 676396.00 2719050.00  43596.83 4020125.02      0.00      0.00      0.00
14:50:00         eth0 675197.00 2714173.00  43518.62 4012938.90      0.00      0.00      1.00
14:50:01         eth0 676388.00 2719063.00  43595.47 4020171.64      0.00      0.00      0.00
Average:         eth0 676843.00 2720837.40  43624.95 4022788.86      0.00      0.00      0.40
$ vmstat 1 5
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 2  0      0 259832240  46008 2710912    0    0    21     2  223  192  0  1 99  0  0
 1  0      0 259832896  46008 2710744    0    0     0     0 1702206 198078  0 17 82  0  0
 0  0      0 259830272  46008 2710596    0    0     0     0 1696340 197756  1 17 83  0  0
 4  0      0 259829168  46024 2710584    0    0    16     0 1688472 197158  1 17 82  0  0
 3  0      0 259830224  46024 2710408    0    0     0     0 1692450 197212  0 18 82  0  0

As expected, number of interrupts per second is very different.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Van Jacobson <vanj@google.com>
Cc: Jerry Chu <hkchu@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-05-16 15:43:31 -04:00
Eric Dumazet
645f4c6f2e tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps
Some devices or distributions use HZ=100 or HZ=250

TCP receive buffer autotuning has poor behavior caused by this choice.
Since autotuning happens after 4 ms or 10 ms, short distance flows
get their receive buffer tuned to a very high value, but after an initial
period where it was frozen to (too small) initial value.

With tp->tcp_mstamp introduction, we can switch to high resolution
timestamps almost for free (at the expense of 8 additional bytes per
TCP structure)

Note that some TCP stacks use usec TCP timestamps where this
patch makes even more sense : Many TCP flows have < 500 usec RTT.
Hopefully this finer TS option can be standardized soon.

Tested:
 HZ=100 kernel
 ./netperf -H lpaa24 -t TCP_RR -l 1000 -- -r 10000,10000 &

 Peer without patch :
 lpaa24:~# ss -tmi dst lpaa23
 ...
 skmem:(r0,rb8388608,...)
 rcv_rtt:10 rcv_space:3210000 minrtt:0.017

 Peer with the patch :
 lpaa23:~# ss -tmi dst lpaa24
 ...
 skmem:(r0,rb428800,...)
 rcv_rtt:0.069 rcv_space:30000 minrtt:0.017

We can see saner RCVBUF, and more precise rcv_rtt information.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-26 14:44:39 -04:00
Eric Dumazet
69e996c58a tcp: add tp->tcp_mstamp field
We want to use precise timestamps in TCP stack, but we do not
want to call possibly expensive kernel time services too often.

tp->tcp_mstamp is guaranteed to be updated once per incoming packet.

We will use it in the following patches, removing specific
skb_mstamp_get() calls, and removing ack_time from
struct tcp_sacktag_state.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-26 14:44:36 -04:00
Wei Wang
cf1ef3f071 net/tcp_fastopen: Disable active side TFO in certain scenarios
Middlebox firewall issues can potentially cause server's data being
blackholed after a successful 3WHS using TFO. Following are the related
reports from Apple:
https://www.nanog.org/sites/default/files/Paasch_Network_Support.pdf
Slide 31 identifies an issue where the client ACK to the server's data
sent during a TFO'd handshake is dropped.
C ---> syn-data ---> S
C <--- syn/ack ----- S
C (accept & write)
C <---- data ------- S
C ----- ACK -> X     S
		[retry and timeout]

https://www.ietf.org/proceedings/94/slides/slides-94-tcpm-13.pdf
Slide 5 shows a similar situation that the server's data gets dropped
after 3WHS.
C ---- syn-data ---> S
C <--- syn/ack ----- S
C ---- ack --------> S
S (accept & write)
C?  X <- data ------ S
		[retry and timeout]

This is the worst failure b/c the client can not detect such behavior to
mitigate the situation (such as disabling TFO). Failing to proceed, the
application (e.g., SSL library) may simply timeout and retry with TFO
again, and the process repeats indefinitely.

The proposed solution is to disable active TFO globally under the
following circumstances:
1. client side TFO socket detects out of order FIN
2. client side TFO socket receives out of order RST

We disable active side TFO globally for 1hr at first. Then if it
happens again, we disable it for 2h, then 4h, 8h, ...
And we reset the timeout to 1hr if a client side TFO sockets not opened
on loopback has successfully received data segs from server.
And we examine this condition during close().

The rational behind it is that when such firewall issue happens,
application running on the client should eventually close the socket as
it is not able to get the data it is expecting. Or application running
on the server should close the socket as it is not able to receive any
response from client.
In both cases, out of order FIN or RST will get received on the client
given that the firewall will not block them as no data are in those
frames.
And we want to disable active TFO globally as it helps if the middle box
is very close to the client and most of the connections are likely to
fail.

Also, add a debug sysctl:
  tcp_fastopen_blackhole_detect_timeout_sec:
    the initial timeout to use when firewall blackhole issue happens.
    This can be set and read.
    When setting it to 0, it means to disable the active disable logic.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-04-24 14:27:17 -04:00
Eric Dumazet
3541f9e8bd tcp: add tcp_mss_clamp() helper
Small cleanup factorizing code doing the TCP_MAXSEG clamping.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-03 11:19:34 -05:00
Wei Wang
19f6d3f3c8 net/tcp-fastopen: Add new API support
This patch adds a new socket option, TCP_FASTOPEN_CONNECT, as an
alternative way to perform Fast Open on the active side (client). Prior
to this patch, a client needs to replace the connect() call with
sendto(MSG_FASTOPEN). This can be cumbersome for applications who want
to use Fast Open: these socket operations are often done in lower layer
libraries used by many other applications. Changing these libraries
and/or the socket call sequences are not trivial. A more convenient
approach is to perform Fast Open by simply enabling a socket option when
the socket is created w/o changing other socket calls sequence:
  s = socket()
    create a new socket
  setsockopt(s, IPPROTO_TCP, TCP_FASTOPEN_CONNECT …);
    newly introduced sockopt
    If set, new functionality described below will be used.
    Return ENOTSUPP if TFO is not supported or not enabled in the
    kernel.

  connect()
    With cookie present, return 0 immediately.
    With no cookie, initiate 3WHS with TFO cookie-request option and
    return -1 with errno = EINPROGRESS.

  write()/sendmsg()
    With cookie present, send out SYN with data and return the number of
    bytes buffered.
    With no cookie, and 3WHS not yet completed, return -1 with errno =
    EINPROGRESS.
    No MSG_FASTOPEN flag is needed.

  read()
    Return -1 with errno = EWOULDBLOCK/EAGAIN if connect() is called but
    write() is not called yet.
    Return -1 with errno = EWOULDBLOCK/EAGAIN if connection is
    established but no msg is received yet.
    Return number of bytes read if socket is established and there is
    msg received.

The new API simplifies life for applications that always perform a write()
immediately after a successful connect(). Such applications can now take
advantage of Fast Open by merely making one new setsockopt() call at the time
of creating the socket. Nothing else about the application's socket call
sequence needs to change.

Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-25 14:04:38 -05:00
David S. Miller
580bdf5650 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-01-17 15:19:37 -05:00
Yuchung Cheng
4a7f600944 tcp: remove thin_dupack feature
Thin stream DUPACK is to start fast recovery on only one DUPACK
provided the connection is a thin stream (i.e., low inflight).  But
this older feature is now subsumed with RACK. If a connection
receives only a single DUPACK, RACK would arm a reordering timer
and soon starts fast recovery instead of timeout if no further
ACKs are received.

The socket option (THIN_DUPACK) is kept as a nop for compatibility.
Note that this patch does not change another thin-stream feature
which enables linear RTO. Although it might be good to generalize
that in the future (i.e., linear RTO for the first say 3 retries).

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-13 22:37:16 -05:00
Yuchung Cheng
bec41a11dd tcp: remove early retransmit
This patch removes the support of RFC5827 early retransmit (i.e.,
fast recovery on small inflight with <3 dupacks) because it is
subsumed by the new RACK loss detection. More specifically when
RACK receives DUPACKs, it'll arm a reordering timer to start fast
recovery after a quarter of (min)RTT, hence it covers the early
retransmit except RACK does not limit itself to specific inflight
or dupack numbers.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-13 22:37:16 -05:00
Yuchung Cheng
840a3cbe89 tcp: remove forward retransmit feature
Forward retransmit is an esoteric feature in RFC3517 (condition(3)
in the NextSeg()). Basically if a packet is not considered lost by
the current criteria (# of dupacks etc), but the congestion window
has room for more packets, then retransmit this packet.

However it actually conflicts with the rest of recovery design. For
example, when reordering is detected we want to be conservative
in retransmitting packets but forward-retransmit feature would
break that to force more retransmission. Also the implementation is
fairly complicated inside the retransmission logic inducing extra
iterations in the write queue. With RACK losses are being detected
timely and this heuristic is no longer necessary. There this patch
removes the feature.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-01-13 22:37:16 -05:00