freebsd-src/sys/netinet
Kyle Evans 47ad4f2d45 ktrace: log genio events on failed write
Visibility into the contents of the buffer when a write(2) has failed
can be immensely useful in debugging IPC issues -- pushing this to
discuss the idea, or maybe an alternative where we can set a flag like
KTRFAC_ERRIO to enable it.

When a genio event is potentially raised after an error, currently we'll
just free the uio and return.  However, such data can be useful when
debugging communication between processes to, e.g., understand what the
remote side should have grabbed before closing a pipe.  Tap out the
entire buffer on failure rather than simply discarding it.

Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D43799
2024-03-04 23:44:09 -06:00
..
cc tcp: need default in switch statement for enum. 2024-02-25 08:24:13 +01:00
khelp sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
libalias sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
netdump netdump: Check the return value of ifunit_ref() 2023-10-02 08:09:26 -04:00
tcp_stacks RACK, BBR: handle EACCES like EPERM for IP output handling 2024-02-16 12:19:24 +01:00
accf_data.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
accf_dns.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
accf_http.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
dccp.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
icmp6.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
icmp_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_ether.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
if_ether.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
igmp.c netinet: Remove stale references to Giant from comments 2024-01-27 13:51:13 -05:00
igmp.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
igmp_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in_cksum.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
in_debug.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_fib.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_fib.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
in_fib_algo.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_fib_dxr.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_gif.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_jail.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
in_kdtrace.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
in_kdtrace.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
in_mcast.c netinet: Remove stale references to Giant from comments 2024-01-27 13:51:13 -05:00
in_pcb.c tcpsso: fix when used without -i option 2024-01-10 08:33:09 +01:00
in_pcb.h inpcb: reoder inpcb destruction 2023-12-27 08:34:37 -08:00
in_pcb_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in_prot.c Fix 'security.bsd.see_jail_proc' by using cr_bsd_visible() 2023-09-28 11:59:08 -03:00
in_proto.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in_rmx.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
in_rss.c sys: Remove $FreeBSD$: two-line .c pattern 2023-08-16 11:54:30 -06:00
in_rss.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
in_systm.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
in_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip6.h netinet: Define IPv6 ECN mask 2024-01-03 12:56:28 -05:00
ip_carp.c carp(4): Fix a typo in a source code comment 2024-02-27 17:39:57 +01:00
ip_carp.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ip_carp_nl.h carp: allow commands to use interface name rather than index 2023-03-31 11:29:58 +02:00
ip_divert.c divert: just return EOPNOTSUPP on shutdown(2) 2024-01-12 02:04:04 -08:00
ip_divert.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ip_dummynet.h dummynet: add simple gilbert-elliott channel model 2023-12-17 13:20:45 +01:00
ip_ecn.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_ecn.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ip_encap.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_encap.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ip_fastfwd.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_fw.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ip_gre.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_icmp.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip_icmp.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip_id.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_input.c pfil: PFIL_PASS never frees the mbuf 2024-01-29 14:10:19 +01:00
ip_mroute.c ip_mroute: allow MRT_DEL_MFC even if there are pending upcalls 2023-12-14 22:04:43 +01:00
ip_mroute.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip_options.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_options.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ip_output.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
ip_reass.c vnet: (read) lock the vnet list while iterating it 2023-12-07 13:34:47 +01:00
ip_var.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
pim.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
pim_var.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
raw_ip.c Revert "sockets: retire sorflush()" 2024-02-03 13:08:41 -08:00
sctp.h sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
sctp_asconf.c sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_asconf.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_auth.c sctp: cleanup locking for notifications 2023-09-08 16:20:51 +02:00
sctp_auth.h sctp: cleanup SCTP AUTH related notification 2023-09-08 13:13:43 +02:00
sctp_bsd_addr.c sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_bsd_addr.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_cc_functions.c sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_constants.h sctp: make sure all SCTP RESET notifications use sctp_ulp_notify() 2023-09-08 14:19:56 +02:00
sctp_crc32.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
sctp_crc32.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_header.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_indata.c sctp(4): Fix a typo in a source code comment 2024-02-18 13:01:04 +01:00
sctp_indata.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_input.c sctp: improve sending of packets containing an INIT ACK chunk 2024-02-24 19:16:36 +01:00
sctp_input.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_kdtrace.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
sctp_kdtrace.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_lock_bsd.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_module.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
sctp_os.h sockets: don't malloc/free sockaddr memory on getpeername/getsockname 2023-11-30 08:31:10 -08:00
sctp_os_bsd.h sockets: don't malloc/free sockaddr memory on getpeername/getsockname 2023-11-30 08:31:10 -08:00
sctp_output.c sctp: improve sending of packets containing an INIT ACK chunk 2024-02-24 19:16:36 +01:00
sctp_output.h sctp: improve sending of packets containing an INIT ACK chunk 2024-02-24 19:16:36 +01:00
sctp_pcb.c sockets: garbage collect SS_ISCONFIRMING 2024-01-30 10:38:33 -08:00
sctp_pcb.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_peeloff.c sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_peeloff.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_ss_functions.c sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_structs.h sctp: cleanup handling of graceful shutdown of the peer 2023-08-19 12:35:49 +02:00
sctp_syscalls.c ktrace: log genio events on failed write 2024-03-04 23:44:09 -06:00
sctp_sysctl.c sctp: minor clean 2023-11-06 11:04:15 +01:00
sctp_sysctl.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_timer.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
sctp_timer.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_uio.h sctp: cleanup cdefs.h include 2023-08-18 15:25:34 +02:00
sctp_usrreq.c sockets: repair wakeup of accept(2) by shutdown(2) 2024-02-15 10:48:44 -08:00
sctp_var.h sockets: make pr_shutdown fully protocol specific method 2024-01-16 10:30:37 -08:00
sctputil.c sockets: garbage collect SS_ISCONFIRMING 2024-01-30 10:38:33 -08:00
sctputil.h sctp: make sure all SCTP RESET notifications use sctp_ulp_notify() 2023-09-08 14:19:56 +02:00
siftr.c siftr: refactor batch log processing 2023-12-07 14:48:44 +01:00
tcp.h tcp: limit visibility of symbols 2024-01-06 12:00:38 +01:00
tcp_accounting.h Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities. 2023-03-16 11:43:16 -04:00
tcp_ecn.c tcp: commonize check for more data to send, style changes 2024-01-26 01:20:35 +01:00
tcp_ecn.h tcp: AccECN access ACE field by shifting bits 2024-01-26 00:16:22 +01:00
tcp_fastopen.c tcp_fastopen: Fix a typo in a source code comment 2024-01-22 21:49:47 +01:00
tcp_fastopen.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
tcp_fsm.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
tcp_hostcache.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
tcp_hpts.c HTPS has actually three states not two so the macro needs to account for that. 2024-03-01 15:21:15 -05:00
tcp_hpts.h HTPS has actually three states not two so the macro needs to account for that. 2024-03-01 15:21:15 -05:00
tcp_input.c tcp: provide correct snd_fack on post_recovery 2024-02-24 16:55:31 +01:00
tcp_log_buf.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
tcp_log_buf.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
tcp_lro.c kern/subr_trap.c: repair the HPTS performance hack in userret() 2023-12-04 10:19:46 -08:00
tcp_lro.h hpts/lro: make tcp_lro_flush_tcphpts() and tcp_run_hpts() pointers 2023-12-04 10:19:46 -08:00
tcp_lro_hpts.c TCP LRO: convert TCP header fields to host byte order earlier 2024-01-29 18:52:17 +01:00
tcp_offload.c tcp_fill_info(): Change lock assertion on INPCB to locked only 2023-08-22 20:33:49 +02:00
tcp_offload.h tcp_fill_info(): Change lock assertion on INPCB to locked only 2023-08-22 20:33:49 +02:00
tcp_output.c tcp: stop doing superfluous work after sending RST 2024-02-10 10:25:02 +01:00
tcp_pcap.c sys: Style fix for M_EXT | M_EXTPG 2023-12-28 11:17:59 -08:00
tcp_pcap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
tcp_ratelimit.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
tcp_ratelimit.h tcp: Silence a -Wunused-function warning in tcp_ratelimit.h 2023-10-25 10:03:58 -04:00
tcp_reass.c sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
tcp_sack.c tcp: ensure tcp_sack_partialack does not inflate cwnd after RTO 2024-02-08 20:40:25 +01:00
tcp_seq.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
tcp_stats.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
tcp_subr.c tcp: partially undo D43792 2024-02-12 22:38:11 +01:00
tcp_syncache.c inpcb: reoder inpcb destruction 2023-12-27 08:34:37 -08:00
tcp_syncache.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
tcp_timer.c tcp: stop timers and clean scoreboard in tcp_close() 2024-02-10 10:30:00 +01:00
tcp_timer.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
tcp_timewait.c tcp: clean scoreboard when releasing the socket buffer 2024-02-10 10:20:00 +01:00
tcp_usrreq.c sockets: repair wakeup of accept(2) by shutdown(2) 2024-02-15 10:48:44 -08:00
tcp_var.h tcp: pass maxseg around instead of calculating locally 2024-01-24 16:43:29 +01:00
tcpip.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
toecore.c tcp_fill_info(): Change lock assertion on INPCB to locked only 2023-08-22 20:33:49 +02:00
toecore.h tcp_fill_info(): Change lock assertion on INPCB to locked only 2023-08-22 20:33:49 +02:00
udp.h sys: Remove ancient SCCS tags. 2023-11-26 22:23:30 -07:00
udp_usrreq.c Revert "sockets: retire sorflush()" 2024-02-03 13:08:41 -08:00
udp_var.h sockets: make pr_shutdown fully protocol specific method 2024-01-16 10:30:37 -08:00
udplite.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00