linux-uconsole/include/uapi/linux
Li Li 8de633b735 FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn
When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Acked-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Li Li <dualli@google.com>
Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 231624308
Test: manually check async binder buffer size of frozen apps
Test: stress test with kernel 4.14/4.19/5.10/5.15
(cherry picked from commit 9864bb4801
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  char-misc-next)
Change-Id: I1c4bff1eda1ca15aaaad5bf696c8fc00be743176
2022-07-08 17:44:53 +00:00
..
android FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn 2022-07-08 17:44:53 +00:00
byteorder
caif
can can: isotp: add SF_BROADCAST support for functional addressing 2022-02-23 12:00:56 +01:00
cifs
dvb
genwqe
hdlc
hsi
iio
isdn
mmc
netfilter This is the 5.10.101 stable release 2022-02-16 15:16:06 +01:00
netfilter_arp
netfilter_bridge
netfilter_ipv4
netfilter_ipv6
nfsd
raid
sched BACKPORT: sched/uclamp: Allow to reset a task uclamp constraint value 2021-05-17 11:17:56 +08:00
spi
sunrpc
tc_act
tc_ematch
usb Merge 5.10.36 into android12-5.10 2021-05-13 14:22:11 +02:00
wimax
a.out.h
acct.h
adb.h
adfs_fs.h
affs_hardblocks.h
agpgart.h
aio_abi.h
am437x-vpfe.h
apm_bios.h
arcfb.h
arm_sdei.h
aspeed-lpc-ctrl.h
aspeed-p2a-ctrl.h
atalk.h
atm.h
atm_eni.h
atm_he.h
atm_idt77105.h
atm_nicstar.h
atm_tcp.h
atm_zatm.h
atmapi.h
atmarp.h
atmbr2684.h
atmclip.h
atmdev.h
atmioc.h
atmlec.h
atmmpc.h
atmppp.h
atmsap.h
atmsvc.h
audit.h
auto_dev-ioctl.h
auto_fs.h
auto_fs4.h
auxvec.h
ax25.h
batadv_packet.h
batman_adv.h
baycom.h
bcache.h bcache: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket 2021-01-12 20:18:25 +01:00
bcm933xx_hcs.h
bfs_fs.h
binfmts.h
blkpg.h
blktrace_api.h
blkzoned.h
bpf.h bpf: Fix comment for helper bpf_current_task_under_cgroup() 2022-04-08 14:40:43 +02:00
bpf_common.h
bpf_perf_event.h
bpfilter.h
bpqether.h
bsg.h
bt-bmc.h
btf.h
btrfs.h
btrfs_tree.h
can.h
capability.h Revert "Revert "capabilities: require CAP_SETFCAP to map uid 0"" 2021-05-21 13:17:04 -07:00
capi.h
cciss_defs.h
cciss_ioctl.h
cdrom.h
cec-funcs.h
cec.h
cgroupstats.h
chio.h
close_range.h
cm4000_cs.h
cn_proc.h
coda.h
coff.h
connector.h
const.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
coresight-stm.h
cramfs_fs.h
cryptouser.h
cuda.h
cyclades.h
cycx_cfm.h
dcbnl.h
dccp.h
devlink.h devlink: use _BITUL() macro instead of BIT() in the UAPI header 2020-12-30 11:53:58 +01:00
dlm.h
dlm_device.h
dlm_netlink.h
dlm_plock.h
dlmconstants.h
dm-ioctl.h ANDROID: dm: sync inline crypto support with patches going upstream 2021-02-19 10:48:51 +00:00
dm-log-userspace.h
dm-user.h ANDROID: uapi: Add dm-user structure definition 2020-12-10 15:24:57 -08:00
dma-buf.h
dma-heap.h
dn.h
dns_resolver.h
dqblk_xfs.h
edd.h
efs_fs_sb.h
elf-em.h
elf-fdpic.h
elf.h BACKPORT: arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) 2021-07-14 20:52:05 -07:00
errno.h
errqueue.h
erspan.h
ethtool.h net: fix mistake path for netdev_features_strings 2021-07-19 09:44:51 +02:00
ethtool_netlink.h ethtool: fix ethtool msg len calculation for pause stats 2021-11-18 14:04:25 +01:00
eventpoll.h
f2fs.h f2fs: move ioctl interface definitions to separated file 2021-05-19 10:13:00 +02:00
fadvise.h
falloc.h
fanotify.h
fb.h
fcntl.h
fd.h
fdreg.h
fib_rules.h
fiemap.h
filter.h
firewire-cdev.h
firewire-constants.h
fou.h
fpga-dfl.h
fs.h
fscrypt.h fscrypt: remove kernel-internal constants from UAPI header 2020-12-28 14:49:38 -08:00
fsi.h
fsl_hypervisor.h
fsmap.h
fsverity.h fs-verity: support reading signature with ioctl 2021-02-22 09:32:56 -08:00
fuse.h ANDROID: fuse/passthrough: API V2 with __u32 open argument 2021-05-31 09:48:43 +01:00
futex.h
gameport.h
gen_stats.h
genetlink.h
gfs2_ondisk.h
gpio.h gpio: uapi: clarify the meaning of 'empty' char arrays 2020-10-28 15:46:47 +01:00
gsmmux.h
gtp.h
hash_info.h
hdlc.h
hdlcdrv.h
hdreg.h
hid.h
hiddev.h
hidraw.h
hpet.h
hsr_netlink.h
hw_breakpoint.h
hyperv.h
i2c-dev.h
i2c.h
i2o-dev.h
i8k.h
icmp.h
icmpv6.h ICMPv6: Add ICMPv6 Parameter Problem, code 3 definition 2020-10-31 13:16:02 -07:00
idxd.h dmaengine: idxd: fix delta_rec and crc size field for completion record 2021-04-21 13:00:50 +02:00
if.h
if_addr.h
if_addrlabel.h
if_alg.h crypto: af_alg - avoid undefined behavior accessing salg_name 2020-12-26 16:02:45 +01:00
if_arcnet.h
if_arp.h
if_bonding.h
if_bridge.h
if_cablemodem.h
if_eql.h
if_ether.h
if_fc.h
if_fddi.h
if_frad.h
if_hippi.h
if_infiniband.h
if_link.h
if_ltalk.h
if_macsec.h
if_packet.h net/packet: make packet_fanout.arr size configurable up to 64K 2021-05-14 09:50:38 +02:00
if_phonet.h
if_plip.h
if_ppp.h
if_pppol2tp.h
if_pppox.h
if_slip.h
if_team.h
if_tun.h
if_tunnel.h
if_vlan.h
if_x25.h
if_xdp.h
ife.h
igmp.h
ila.h
in.h icmp: don't send out ICMP messages with a source address of 0.0.0.0 2021-06-23 14:42:47 +02:00
in6.h
in_route.h
incrementalfs.h ANDROID: Incremental fs: Add uid to INCFS_IOC_GET_LAST_READ_ERROR 2021-05-17 20:08:43 +00:00
inet_diag.h
inotify.h
input-event-codes.h HID: add mapping for KEY_ALL_APPLICATIONS 2022-03-08 19:09:38 +01:00
input.h
io_uring.h
ioctl.h
iommu.h
ion.h
ip.h
ip6_tunnel.h
ip_vs.h
ipc.h
ipmi.h
ipmi_bmc.h
ipmi_msgdefs.h
ipsec.h
ipv6.h
ipv6_route.h
ipx.h
irqnr.h
iso_fs.h
isst_if.h
ivtv.h
ivtvfb.h
jffs2.h
joystick.h
kcm.h
kcmp.h
kcov.h
kd.h
kdev_t.h
kernel-page-flags.h
kernel.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
kernelcapi.h
kexec.h
keyboard.h
keyctl.h
kfd_ioctl.h
kvm.h
kvm_para.h
l2tp.h net: l2tp: reduce log level of messages in receive path, add counter instead 2021-03-17 17:06:11 +01:00
libc-compat.h
lightnvm.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
limits.h
lirc.h
llc.h
loop.h
lp.h
lwtunnel.h
magic.h
major.h
map_to_7segment.h
matroxfb.h
max2175.h
mdio.h
media-bus-format.h
media.h
mei.h
membarrier.h
memfd.h
mempolicy.h
meye.h
mii.h
minix_fs.h
mman.h
mmtimer.h
module.h
mount.h
mpls.h
mpls_iptunnel.h
mptcp.h
mqueue.h
mroute.h
mroute6.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
mrp_bridge.h
msdos_fs.h
msg.h
mtio.h
n_r3964.h
nbd-netlink.h
nbd.h
ncsi.h
ndctl.h
neighbour.h net: bridge: fix flags interpretation for extern learn fdb entries 2021-08-18 08:59:13 +02:00
net.h
net_dropmon.h
net_namespace.h
net_tstamp.h
netconf.h
netdevice.h
netfilter.h
netfilter_arp.h
netfilter_bridge.h
netfilter_decnet.h
netfilter_ipv4.h
netfilter_ipv6.h
netlink.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
netlink_diag.h
netrom.h
nexthop.h
nfc.h uapi: fix linux/nfc.h userspace compilation errors 2022-01-05 12:40:32 +01:00
nfs.h
nfs2.h
nfs3.h
nfs4.h
nfs4_mount.h
nfs_fs.h
nfs_idmap.h
nfs_mount.h
nfsacl.h
nilfs2_api.h
nilfs2_ondisk.h
nitro_enclaves.h
nl80211.h UPSTREAM: cfg80211: Add support to configure SAE PWE value to drivers 2021-02-05 10:54:25 +00:00
nsfs.h
nubus.h
nvme_ioctl.h
nvram.h
omap3isp.h
omapfb.h
oom.h
openat2.h
openvswitch.h net: openvswitch: fix TTL decrement action netlink message format 2020-11-27 11:03:06 -08:00
packet_diag.h
param.h
parport.h
patchkey.h
pci.h
pci_regs.h PCI: Add PCI_EXP_DEVCTL_PAYLOAD_* macros 2021-11-18 14:04:32 +01:00
pcitest.h
perf_event.h FROMLIST: perf: aux: Add CoreSight PMU buffer formats 2021-03-01 12:52:13 -08:00
personality.h
pfkeyv2.h
pg.h
phantom.h
phonet.h
pidfd.h
pkt_cls.h net/sched: cls_flower: Reject invalid ct_state flags rules 2021-03-07 12:34:07 +01:00
pkt_sched.h fq_codel: reject silly quantum parameters 2021-09-22 12:28:05 +02:00
pktcdvd.h
pmu.h
poll.h
posix_acl.h
posix_acl_xattr.h
posix_types.h
ppdev.h
ppp-comp.h
ppp-ioctl.h
ppp_defs.h
pps.h
pr.h
prctl.h FROMLIST: arm64: mte: change ASYNC and SYNC TCF settings into bitfields 2021-07-14 20:52:05 -07:00
psample.h psample: Fix user API breakage 2021-03-30 14:31:53 +02:00
psci.h
psp-sev.h
ptp_clock.h
ptrace.h ptrace: Prevent kernel-infoleak in ptrace_get_syscall_info() 2020-12-21 13:30:06 +01:00
qemu_fw_cfg.h
qnx4_fs.h
qnxtypes.h
qrtr.h
quota.h
radeonfb.h
random.h
raw.h
rds.h
reboot.h
reiserfs_fs.h
reiserfs_xattr.h
remoteproc_cdev.h
resource.h
rfkill.h
rio_cm_cdev.h
rio_mport_cdev.h
romfs_fs.h
rose.h
route.h
rpl.h uapi: fix big endian definition of ipv6_rpl_sr_hdr 2021-02-03 23:28:43 +01:00
rpl_iptunnel.h
rpmsg.h
rseq.h rseq: Remove broken uapi field layout on 32-bit little endian 2022-04-08 14:40:03 +02:00
rtc.h
rtnetlink.h
rxrpc.h
scc.h
sched.h
scif_ioctl.h
screen_info.h
sctp.h
sdla.h
seccomp.h
securebits.h
sed-opal.h
seg6.h
seg6_genl.h
seg6_hmac.h
seg6_iptunnel.h
seg6_local.h
selinux_netlink.h
sem.h
serial.h
serial_core.h
serial_reg.h serial: 8250: Define RX trigger levels for OxSemi 950 devices 2021-09-18 13:40:22 +02:00
serio.h
shm.h
signal.h
signalfd.h
smc.h
smc_diag.h
smiapp.h
snmp.h
sock_diag.h
socket.h
sockios.h
sonet.h
sonypi.h
sound.h
soundcard.h
stat.h uapi: fix statx attribute value overlap for DAX & MOUNT_ROOT 2020-12-03 10:03:14 -08:00
stddef.h
stm.h
string.h
suspend_ioctls.h
swab.h
switchtec_ioctl.h
sync_file.h
synclink.h
sysctl.h uapi: move constants from <linux/kernel.h> to <linux/const.h> 2021-01-06 14:56:51 +01:00
sysinfo.h
target_core_user.h
taskstats.h
tcp.h net-zerocopy: Copy straggler unaligned data for TCP Rx. zerocopy. 2021-11-26 10:39:14 +01:00
tcp_metrics.h
tee.h
termios.h Revert "tty: drop termiox user definitions" 2021-09-12 11:00:56 +02:00
thermal.h
time.h
time_types.h
timerfd.h
times.h
timex.h
tiocl.h
tipc.h
tipc_config.h
tipc_netlink.h
tipc_sockets_diag.h
tls.h
toshiba.h
tty.h
tty_flags.h tty: actually undefine superseded ASYNC flags 2021-05-14 09:50:18 +02:00
types.h
udf_fs_i.h
udmabuf.h
udp.h
uhid.h
uinput.h
uio.h
uleds.h
ultrasound.h
um_timetravel.h
un.h
unistd.h
unix_diag.h
usbdevice_fs.h
usbip.h
userfaultfd.h FROMGIT: userfaultfd: fix UFFDIO_CONTINUE ioctl request definition 2021-06-04 19:13:43 +00:00
userio.h
utime.h
utsname.h
uuid.h
uvcvideo.h
v4l2-common.h
v4l2-controls.h UPSTREAM: media: v4l: Add HDR10 static metadata controls 2021-06-04 11:15:19 -07:00
v4l2-dv-timings.h
v4l2-mediabus.h
v4l2-subdev.h media: v4l2-subdev.h: BIT() is not available in userspace 2021-01-30 13:55:18 +01:00
vbox_err.h
vbox_vmmdev_types.h
vboxguest.h
veth.h
vfio.h
vfio_ccw.h
vfio_zdev.h
vhost.h vhost: vdpa: report iova range 2020-10-23 11:55:28 -04:00
vhost_types.h vhost: vdpa: report iova range 2020-10-23 11:55:28 -04:00
videodev2.h UPSTREAM: media: v4l: Add HDR10 static metadata controls 2021-06-04 11:15:19 -07:00
virtio_9p.h
virtio_balloon.h
virtio_blk.h
virtio_config.h
virtio_console.h
virtio_crypto.h
virtio_fs.h
virtio_gpu.h
virtio_ids.h BACKPORT: uapi: virtio_ids: add a sound device type ID from OASIS spec 2021-11-17 21:09:54 +00:00
virtio_input.h
virtio_iommu.h
virtio_mem.h
virtio_mmio.h
virtio_net.h
virtio_pci.h
virtio_pmem.h
virtio_ring.h
virtio_rng.h
virtio_scsi.h
virtio_types.h
virtio_vsock.h
vm_sockets.h
vm_sockets_diag.h
vmcore.h
vsockmon.h
vt.h
vtpm_proxy.h
wait.h
watch_queue.h
watchdog.h
wimax.h
wireguard.h
wireless.h
wmi.h
x25.h
xattr.h
xdp_diag.h
xfrm.h This is the 5.10.104 stable release 2022-03-12 13:57:09 +01:00
xilinx-v4l2-controls.h
zorro.h
zorro_ids.h