Eric W. Biederman
44b60b7791
UPSTREAM: umd: Track user space drivers with struct pid
...
Use struct pid instead of user space pid values that are prone to wrap
araound.
In addition track the entire thread group instead of just the first
thread that is started by exec. There are no multi-threaded user mode
drivers today but there is nothing preclucing user drivers from being
multi-threaded, so it is just a good idea to track the entire process.
Take a reference count on the tgid's in question to make it possible
to remove exit_umh in a future change.
As a struct pid is available directly use kill_pid_info.
The prior process signalling code was iffy in using a userspace pid
known to be in the initial pid namespace and then looking up it's task
in whatever the current pid namespace is. It worked only because
kernel threads always run in the initial pid namespace.
As the tgid is now refcounted verify the tgid is NULL at the start of
fork_usermode_driver to avoid the possibility of silent pid leaks.
v1: https://lkml.kernel.org/r/87mu4qdlv2.fsf_-_@x220.int.ebiederm.org
v2: https://lkml.kernel.org/r/a70l4oy8.fsf_-_@x220.int.ebiederm.org
Link: https://lkml.kernel.org/r/20200702164140.4468-12-ebiederm@xmission.com
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Tested-by: Alexei Starovoitov <ast@kernel.org>
Change-Id: Ie626e056191a897a5d3a68d9f37245cc5142aa28
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
2026-01-14 18:12:15 -08:00
..
bpfilter
UPSTREAM: umd: Track user space drivers with struct pid
2026-01-14 18:12:15 -08:00
netfilter
Revert "netfilter: Replace zero-length array with flexible-array member"
2025-01-14 17:17:17 +00:00
af_inet.c
UPSTREAM: bpf: Add BPF_CGROUP_INET_SOCK_RELEASE hook
2026-01-14 18:12:01 -08:00
ah4.c
arp.c
This is the 5.4.291 stable release
2025-03-13 14:53:52 +00:00
bpf_tcp_ca.c
UPSTREAM: bpf: Sanitize the bpf_struct_ops tcp-cc name
2025-12-23 13:36:07 -08:00
cipso_ipv4.c
cipso: fix total option length computation
2024-07-05 09:08:22 +02:00
datagram.c
devinet.c
BACKPORT: sysctl: pass kernel pointers to ->proc_handler
2025-12-23 13:36:15 -08:00
esp4.c
net: ipv4: fix return value check in esp_remove_trailer
2023-10-25 11:53:21 +02:00
esp4_offload.c
xfrm: Linearize the skb after offloading if needed.
2023-06-28 10:18:38 +02:00
fib_frontend.c
ipv4: Mask upper DSCP bits and ECN bits in NETLINK_FIB_LOOKUP family
2024-11-08 16:20:37 +01:00
fib_lookup.h
fib_notifier.c
fib_rules.c
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
2025-06-04 14:32:34 +02:00
fib_semantics.c
ipv4: fib: annotate races around nh->nh_saddr_genid and nh->nh_saddr
2023-10-25 11:53:21 +02:00
fib_trie.c
ipv4: annotate data-races around fi->fib_dead
2023-09-23 10:59:58 +02:00
fou.c
gre_demux.c
gre_offload.c
icmp.c
icmp: fix icmp_ndo_send address translation for reply direction
2025-09-09 18:43:57 +02:00
igmp.c
UPSTREAM: ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
2023-12-21 11:28:11 +00:00
inet_connection_sock.c
Merge tag 'android11-5.4.293_r00' into android11-5.4
2025-05-26 03:40:18 -07:00
inet_diag.c
inet_diag: Initialize pad field in struct inet_diag_req_v2
2024-07-18 11:40:50 +02:00
inet_fragment.c
Revert "inet: inet_defrag: prevent sk release while still in use"
2024-11-09 14:30:42 +00:00
inet_hashtables.c
net: set SOCK_RCU_FREE before inserting socket into hashtable
2024-09-12 11:03:50 +02:00
inet_timewait_sock.c
tcp: Fix NEW_SYN_RECV handling in inet_twsk_purge()
2024-05-02 16:18:37 +02:00
inetpeer.c
ip_forward.c
ip_fragment.c
Revert "inet: inet_defrag: prevent sk release while still in use"
2024-11-09 14:30:42 +00:00
ip_gre.c
ipv4: ip_gre: Fix drops of small packets in ipgre_xmit
2024-11-08 16:20:36 +01:00
ip_input.c
BACKPORT: bpf: Add socket assign support
2025-12-23 13:36:11 -08:00
ip_options.c
ip_output.c
net: ipv4: fix a memleak in ip_setup_cork
2024-02-23 08:25:05 +01:00
ip_sockglue.c
ipv{4,6}/raw: fix output xfrm lookup wrt protocol
2023-06-05 08:17:33 +02:00
ip_tunnel.c
This is the 5.4.301 stable release
2025-10-30 07:52:10 +00:00
ip_tunnel_core.c
UPSTREAM: net: ip_tunnel: add header_ops for layer 3 devices
2025-09-24 12:16:37 +02:00
ip_vti.c
ip_vti: fix potential slab-use-after-free in decode_session6
2023-08-30 16:27:16 +02:00
ipcomp.c
ipconfig.c
ipip.c
ipmr.c
ipmr: fix tables suspicious RCU usage
2024-12-14 19:44:34 +01:00
ipmr_base.c
ipmr: do not call mr_mfc_uses_dev() for unres entries
2025-03-13 12:42:59 +01:00
Kconfig
Makefile
BACKPORT: udp_tunnel: add central NIC RX port offload infrastructure
2026-01-14 18:12:10 -08:00
metrics.c
ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()
2023-02-06 07:52:45 +01:00
netfilter.c
netlink.c
nexthop.c
This is the 5.4.302 stable release
2025-12-03 14:36:44 +00:00
ping.c
proc.c
protocol.c
raw.c
ipv{4,6}/raw: fix output xfrm lookup wrt protocol
2023-06-05 08:17:33 +02:00
raw_diag.c
route.c
BACKPORT: sysctl: pass kernel pointers to ->proc_handler
2025-12-23 13:36:15 -08:00
syncookies.c
tcp: fix cookie_init_timestamp() overflows
2023-11-20 10:30:10 +01:00
sysctl_net_ipv4.c
BACKPORT: sysctl: pass kernel pointers to ->proc_handler
2025-12-23 13:36:15 -08:00
tcp.c
BACKPORT: tcp: Expose tcp_sock_set_keepidle_locked
2026-01-14 17:50:47 -08:00
tcp_bbr.c
tcp_bic.c
tcp_bpf.c
BACKPORT: bpf: sockmap: Move generic sockmap hooks from BPF TCP
2025-12-23 13:36:03 -08:00
tcp_cdg.c
tcp_cong.c
UPSTREAM: bpf: tcp: Support tcp_congestion_ops in bpf
2025-12-23 13:35:51 -08:00
tcp_cubic.c
tcp_dctcp.c
tcp: Fix shift-out-of-bounds in dctcp_update_alpha().
2024-06-16 13:28:45 +02:00
tcp_dctcp.h
tcp_diag.c
net: annotate lockless accesses to sk->sk_max_ack_backlog
2024-11-08 16:20:46 +01:00
tcp_fastopen.c
tcp: add TCP_INFO status for failed client TFO
2024-07-18 11:40:53 +02:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c
Merge tag 'ASB-2025-12-01_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2025-12-04 19:21:35 +02:00
tcp_ipv4.c
UPSTREAM: bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t
2026-01-14 18:12:07 -08:00
tcp_lp.c
tcp_metrics.c
tcp_metrics: validate source addr length
2024-07-18 11:40:50 +02:00
tcp_minisocks.c
UPSTREAM: tcp_bpf: Don't let child socket inherit parent protocol ops on copy
2025-12-23 13:36:03 -08:00
tcp_nv.c
tcp_offload.c
net-timestamp: support TCP GSO case for a few missing flags
2025-03-13 12:43:30 +01:00
tcp_output.c
UPSTREAM: bpf: tcp: Support tcp_congestion_ops in bpf
2025-12-23 13:35:51 -08:00
tcp_rate.c
tcp_recovery.c
tcp: fix excessive TLP and RACK timeouts from HZ rounding
2023-10-25 11:53:21 +02:00
tcp_scalable.c
tcp_timer.c
Merge branch 'android11-5.4-lts' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
2024-08-05 21:50:23 +03:00
tcp_ulp.c
UPSTREAM: net, sk_msg: Annotate lockless access to sk_prot on clone
2025-12-23 13:36:03 -08:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c
UPSTREAM: bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t
2026-01-14 18:12:07 -08:00
udp_diag.c
udp_impl.h
udp_offload.c
This is the 5.4.297 stable release
2025-09-02 10:52:40 +00:00
udp_tunnel_core.c
BACKPORT: udp_tunnel: add central NIC RX port offload infrastructure
2026-01-14 18:12:10 -08:00
udp_tunnel_nic.c
BACKPORT: udp_tunnel: add central NIC RX port offload infrastructure
2026-01-14 18:12:10 -08:00
udp_tunnel_stub.c
BACKPORT: udp_tunnel: add central NIC RX port offload infrastructure
2026-01-14 18:12:10 -08:00
udplite.c
udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
2023-05-30 12:44:09 +01:00
xfrm4_input.c
xfrm: Preserve vlan tags for transport mode software GRO
2024-05-17 11:43:53 +02:00
xfrm4_output.c
xfrm4_policy.c
xfrm4_protocol.c
xfrm4_state.c
xfrm4_tunnel.c