mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the nfsd tree with the nfs-anna tree
@ 2026-09-22  8:42 Mark Brown
  2026-09-22 13:09 ` Chuck Lever
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2026-09-22  8:42 UTC (permalink / raw)
  To: Chuck Lever
  Cc: Anna Schumaker, Chuck Lever, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 24271 bytes --]

Hi all,

Today's linux-next merge of the nfsd tree got a conflict in:

  net/sunrpc/svcsock.c

between commits:

  2ecf0d2af5da8 ("SUNRPC: resume receiving after a TLS control record")
  1a485d8e93a92 ("SUNRPC: treat every TLS error alert as fatal")
  d3b4fb1d30749 ("SUNRPC: reject a TLS alert record that is not two octets")
  f547743e6b51f ("SUNRPC: do not credit control-record octets to the RPC stream")

from the nfs-anna tree and commits:

  a76d52a01792f ("SUNRPC: Do not credit control-record octets to the RPC stream")
  e263b5d674fcf ("SUNRPC: Reject a TLS alert record that is not two octets")
  ebcbe4a9a7779 ("SUNRPC: Treat every TLS error alert as fatal")
  8f765d820c590 ("SUNRPC: Resume receiving after a TLS control record")
  7f757c41a8beb ("SUNRPC: Reject a socket that already has an svc_sock attached")
  35ab7140c7bfa ("SUNRPC: Separate the TLS control-record receive from its policy")
  9a4ef884d00cd ("SUNRPC: Close the transport on an unhandled TLS record type")
  eaef7075c6a48 ("SUNRPC: Flush a received record's pages once it is complete")
  1517c61f247f3 ("SUNRPC: Receive RPC records with ->read_sock")
  23bec0f9631c2 ("SUNRPC: Bypass sock_recvmsg() for the TLS control-record receive")
  0fce57f554fa6 ("SUNRPC: Skip xpt_reserved accounting for non-UDP transports")

from the nfsd tree.  This looks like different versions of patches being
applied with extra stuff then stacked on top.  I've taken the nfsd
version but it's possible that's gone wrong, I'm not *super* confident
in this.  It feels like there's a coordination issue here.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --combined net/sunrpc/svcsock.c
index 6fee54f4290c4,e5459d504b6a9..0000000000000
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@@ -8,15 -8,6 +8,6 @@@
   * evenly when servicing a single client. May need to modify the
   * svc_xprt_enqueue procedure...
   *
-  * TCP support is largely untested and may be a little slow. The problem
-  * is that we currently do two separate recvfrom's, one for the 4-byte
-  * record length, and the second for the actual record. This could possibly
-  * be improved by always reading a minimum size of around 100 bytes and
-  * tucking any superfluous bytes away in a temporary store. Still, that
-  * leaves write requests out in the rain. An alternative may be to peek at
-  * the first skb in the queue, and if it matches the next TCP sequence
-  * number, to extract the record marker. Yuck.
-  *
   * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
   */
  
@@@ -239,209 -230,107 +230,107 @@@ static int svc_one_sock_name(struct svc
  }
  
  /*
-  * kTLS delivers a record only up to the caller's buffer and keeps
-  * the remainder on its receive list, where no further data_ready
-  * announces it. Consume the whole record.
+  * The ->read_sock data path invokes neither security_socket_recvmsg()
+  * nor the sock:sock_recv_length tracepoint. Dispatch ->recvmsg
+  * directly so the whole receive path behaves one way.
   */
- static void
- svc_tcp_sock_drain_record(struct socket *sock)
+ static int svc_tcp_recv_cmsg(struct socket *sock, int flags,
+ 			     struct kvec *payload, u8 *type,
+ 			     unsigned int *msg_flags)
  {
+ 	const struct proto_ops *ops = READ_ONCE(sock->ops);
  	union {
  		struct cmsghdr	cmsg;
  		u8		buf[CMSG_SPACE(sizeof(u8))];
- 	} u;
- 	u8 discard[64];
- 	struct kvec discard_kvec = {
- 		.iov_base = discard,
- 		.iov_len = sizeof(discard),
- 	};
- 
- 	for (;;) {
- 		struct msghdr msg = {
- 			.msg_control = &u,
- 			.msg_controllen = sizeof(u),
- 		};
- 
- 		iov_iter_kvec(&msg.msg_iter, ITER_DEST, &discard_kvec, 1,
- 			      discard_kvec.iov_len);
- 		if (sock_recvmsg(sock, &msg, MSG_DONTWAIT) <= 0)
- 			break;
- 		if (msg.msg_flags & MSG_EOR)
- 			break;
- 	}
- }
- 
- static int
- svc_tcp_sock_process_cmsg(struct socket *sock, struct msghdr *msg,
- 			  struct cmsghdr *cmsg, int ret)
- {
- 	u8 content_type = tls_get_record_type(sock->sk, cmsg);
- 	u8 level, description;
- 
- 	switch (content_type) {
- 	case 0:
- 		break;
- 	case TLS_RECORD_TYPE_DATA:
- 		/* TLS sets EOR at the end of each application data
- 		 * record, even though there might be more frames
- 		 * waiting to be decrypted.
- 		 */
- 		msg->msg_flags &= ~MSG_EOR;
- 		break;
- 	case TLS_RECORD_TYPE_ALERT:
- 		tls_alert_recv(sock->sk, msg, &level, &description);
- 		/* RFC 8446 Section 6: every alert but a closure alert is
- 		 * an error alert, whatever the legacy AlertLevel octet
- 		 * says.
- 		 */
- 		switch (description) {
- 		case TLS_ALERT_DESC_CLOSE_NOTIFY:
- 		case TLS_ALERT_DESC_USER_CANCELED:
- 			ret = -EAGAIN;
- 			break;
- 		default:
- 			ret = -ENOTCONN;
- 		}
- 		break;
- 	default:
- 		/* discard this record type */
- 		ret = -EAGAIN;
- 	}
- 	return ret;
- }
- 
- static int
- svc_tcp_sock_recv_cmsg(struct socket *sock, unsigned int *msg_flags)
- {
- 	union {
- 		struct cmsghdr	cmsg;
- 		u8		buf[CMSG_SPACE(sizeof(u8))];
- 	} u;
- 	u8 alert[2];
- 	struct kvec alert_kvec = {
- 		.iov_base = alert,
- 		.iov_len = sizeof(alert),
- 	};
+ 	} u = {};
  	struct msghdr msg = {
- 		.msg_flags = *msg_flags,
- 		.msg_control = &u,
- 		.msg_controllen = sizeof(u),
+ 		.msg_control	= &u,
+ 		.msg_controllen	= sizeof(u),
  	};
  	int ret;
  
- 	iov_iter_kvec(&msg.msg_iter, ITER_DEST, &alert_kvec, 1,
- 		      alert_kvec.iov_len);
- 	ret = sock_recvmsg(sock, &msg, MSG_DONTWAIT);
- 	/* put_cmsg() shrinks msg_controllen, so a short one means
- 	 * kTLS filled in u.cmsg.
- 	 */
- 	if (ret >= 0 && msg.msg_controllen < sizeof(u)) {
- 		u8 content_type = tls_get_record_type(sock->sk, &u.cmsg);
- 
- 		/* Returning the count would credit the RPC stream with
- 		 * octets that never reached the caller's buffer.
- 		 */
- 		if (content_type != TLS_RECORD_TYPE_ALERT) {
- 			/* Draining an application data record would
- 			 * discard the RPC stream.
- 			 */
- 			if (content_type != TLS_RECORD_TYPE_DATA &&
- 			    !(msg.msg_flags & MSG_EOR))
- 				svc_tcp_sock_drain_record(sock);
- 			return -EAGAIN;
- 		}
- 		/* An Alert record carries exactly one two-octet message
- 		 * (RFC 8446 Section 5.1). alert_kvec caps the receive at two,
- 		 * so a longer record produces the same count. MSG_EOR appears
- 		 * only once kTLS has drained the whole record.
- 		 */
- 		if (ret != sizeof(alert) || !(msg.msg_flags & MSG_EOR))
- 			return -EBADMSG;
- 		iov_iter_revert(&msg.msg_iter, ret);
- 		ret = svc_tcp_sock_process_cmsg(sock, &msg, &u.cmsg, -EAGAIN);
- 	}
+ 	iov_iter_kvec(&msg.msg_iter, ITER_DEST, payload, 1, payload->iov_len);
+ 	ret = ops->recvmsg(sock, &msg, msg_data_left(&msg), flags);
+ 	if (ret < 0)
+ 		return ret;
+ 	*msg_flags = msg.msg_flags;
+ 	*type = tls_get_record_type(sock->sk, &u.cmsg);
+ 	if (!*type && ret)
+ 		return -EBADMSG;
  	return ret;
  }
  
- static int
- svc_tcp_sock_recvmsg(struct svc_sock *svsk, struct msghdr *msg)
+ static int svc_tcp_recv_ctrl_record(struct svc_sock *svsk)
  {
- 	int ret;
+ 	u8 alert[2], type, level, description;
  	struct socket *sock = svsk->sk_sock;
- 
- 	ret = sock_recvmsg(sock, msg, MSG_DONTWAIT);
- 	if (msg->msg_flags & MSG_CTRUNC) {
- 		msg->msg_flags &= ~(MSG_CTRUNC | MSG_EOR);
- 		if (ret == 0 || ret == -EIO) {
- 			ret = svc_tcp_sock_recv_cmsg(sock, &msg->msg_flags);
- 			/* A control record delivers nothing to the caller,
- 			 * and kTLS announces no data_ready for records it
- 			 * already holds. Mark the transport ready so that
- 			 * the records behind this one can be received.
- 			 */
- 			if (ret == -EAGAIN)
- 				set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
- 		}
- 	}
- 	return ret;
- }
- 
- #if ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE
- static void svc_flush_bvec(const struct bio_vec *bvec, size_t size, size_t seek)
- {
- 	struct bvec_iter bi = {
- 		.bi_size	= size + seek,
+ 	struct kvec recv_kvec = {
+ 		.iov_base	= alert,
+ 		.iov_len	= sizeof(alert),
  	};
- 	struct bio_vec bv;
+ 	unsigned int msg_flags;
+ 	struct msghdr msg = {};
+ 	int ret;
  
- 	bvec_iter_advance(bvec, &bi, seek & PAGE_MASK);
- 	for_each_bvec(bv, bvec, bi, bi)
- 		flush_dcache_page(bv.bv_page);
- }
- #else
- static inline void svc_flush_bvec(const struct bio_vec *bvec, size_t size,
- 				  size_t seek)
- {
- }
- #endif
+ 	if (!test_bit(XPT_TLS_SESSION, &svsk->sk_xprt.xpt_flags))
+ 		return 0;
  
- /*
-  * Read from @rqstp's transport socket. The incoming message fills whole
-  * pages in @rqstp's rq_pages array until the last page of the message
-  * has been received into a partial page.
-  */
- static ssize_t svc_tcp_read_msg(struct svc_rqst *rqstp, size_t buflen,
- 				size_t seek)
- {
- 	struct svc_sock *svsk =
- 		container_of(rqstp->rq_xprt, struct svc_sock, sk_xprt);
- 	struct bio_vec *bvec = rqstp->rq_bvec;
- 	struct msghdr msg = { NULL };
- 	unsigned int i;
- 	ssize_t len;
- 	size_t t;
- 
- 	clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
- 
- 	for (i = 0, t = 0; t < buflen; i++, t += PAGE_SIZE)
- 		bvec_set_page(&bvec[i], rqstp->rq_pages[i], PAGE_SIZE, 0);
- 
- 	iov_iter_bvec(&msg.msg_iter, ITER_DEST, bvec, i, buflen);
- 	if (seek) {
- 		iov_iter_advance(&msg.msg_iter, seek);
- 		buflen -= seek;
- 	}
- 	len = svc_tcp_sock_recvmsg(svsk, &msg);
- 	if (len > 0)
- 		svc_flush_bvec(bvec, len, seek);
- 
- 	/* If we read a full record, then assume there may be more
- 	 * data to read (stream based sockets only!)
+ 	/* A data record can become ready between ->read_sock returning
+ 	 * and this probe. A plain receive would take two octets of it
+ 	 * as RPC payload, so peek.
  	 */
- 	if (len == buflen)
+ 	ret = svc_tcp_recv_cmsg(sock, MSG_DONTWAIT | MSG_PEEK,
+ 				&recv_kvec, &type, &msg_flags);
+ 	if (ret == -EAGAIN || (!ret && !type))
+ 		return 0;
+ 	if (ret < 0)
+ 		return ret;
+ 	if (type == TLS_RECORD_TYPE_DATA) {
+ 		/* The peek parks the decrypted record on ctx->rx_list,
+ 		 * where it draws no further data_ready. Re-arm or the
+ 		 * RPC hangs until the client times out.
+ 		 */
  		set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
+ 		return 0;
+ 	}
+ 	if (type != TLS_RECORD_TYPE_ALERT)
+ 		return -EPROTO;
  
- 	return len;
+ 	ret = svc_tcp_recv_cmsg(sock, MSG_DONTWAIT, &recv_kvec, &type,
+ 				&msg_flags);
+ 	/* The peek found a record at the head, so an -EAGAIN here is
+ 	 * spurious. Propagating it strands the record with no later
+ 	 * announcement, so return -EBADMSG, which closes the transport.
+ 	 */
+ 	if (ret == -EAGAIN)
+ 		return -EBADMSG;
+ 	if (ret < 0)
+ 		return ret;
+ 
+ 	/* An Alert record carries exactly one two-octet message (RFC
+ 	 * 8446 Section 5.1). recv_kvec caps the receive at two, so a
+ 	 * longer record produces the same count. MSG_EOR appears only
+ 	 * once kTLS has drained the whole record.
+ 	 */
+ 	if (ret != sizeof(alert) || !(msg_flags & MSG_EOR))
+ 		return -EBADMSG;
+ 
+ 	iov_iter_kvec(&msg.msg_iter, ITER_DEST, &recv_kvec, 1,
+ 		      recv_kvec.iov_len);
+ 	tls_alert_recv(sock->sk, &msg, &level, &description);
+ 
+ 	/* RFC 8446 Section 6: every alert but a closure alert is
+ 	 * an error alert. kTLS raises no data_ready for records it
+ 	 * already holds, so re-arm for what sits behind the alert.
+ 	 */
+ 	switch (description) {
+ 	case TLS_ALERT_DESC_CLOSE_NOTIFY:
+ 	case TLS_ALERT_DESC_USER_CANCELED:
+ 		set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
+ 		return -EAGAIN;
+ 	default:
+ 		return -ENOTCONN;
+ 	}
  }
  
  /*
@@@ -911,6 -800,7 +800,7 @@@ static struct svc_xprt_class svc_udp_cl
  	.xcl_ops = &svc_udp_ops,
  	.xcl_max_payload = RPCSVC_MAXPAYLOAD_UDP,
  	.xcl_ident = XPRT_TRANSPORT_UDP,
+ 	.xcl_flags = SVC_XPRT_FLAG_WSPACE_RESERVE,
  };
  
  static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv)
@@@ -1066,14 -956,14 +956,14 @@@ failed
  	return NULL;
  }
  
- static size_t svc_tcp_restore_pages(struct svc_sock *svsk,
- 				    struct svc_rqst *rqstp)
+ static void svc_tcp_restore_pages(struct svc_sock *svsk,
+ 				  struct svc_rqst *rqstp)
  {
  	size_t len = svsk->sk_datalen;
  	unsigned int i, npages;
  
  	if (!len)
- 		return 0;
+ 		return;
  	npages = (len + PAGE_SIZE - 1) >> PAGE_SHIFT;
  	for (i = 0; i < npages; i++) {
  		if (rqstp->rq_pages[i] != NULL)
@@@ -1083,7 -973,6 +973,6 @@@
  		svsk->sk_pages[i] = NULL;
  	}
  	rqstp->rq_arg.head[0].iov_base = page_address(rqstp->rq_pages[0]);
- 	return len;
  }
  
  static void svc_tcp_save_pages(struct svc_sock *svsk, struct svc_rqst *rqstp)
@@@ -1122,50 -1011,6 +1011,6 @@@ out
  	svsk->sk_datalen = 0;
  }
  
- /*
-  * Receive fragment record header into sk_marker.
-  */
- static ssize_t svc_tcp_read_marker(struct svc_sock *svsk,
- 				   struct svc_rqst *rqstp)
- {
- 	ssize_t want, len;
- 
- 	/* If we haven't gotten the record length yet,
- 	 * get the next four bytes.
- 	 */
- 	if (svsk->sk_tcplen < sizeof(rpc_fraghdr)) {
- 		struct msghdr	msg = { NULL };
- 		struct kvec	iov;
- 
- 		want = sizeof(rpc_fraghdr) - svsk->sk_tcplen;
- 		iov.iov_base = ((char *)&svsk->sk_marker) + svsk->sk_tcplen;
- 		iov.iov_len  = want;
- 		iov_iter_kvec(&msg.msg_iter, ITER_DEST, &iov, 1, want);
- 		len = svc_tcp_sock_recvmsg(svsk, &msg);
- 		if (len < 0)
- 			return len;
- 		svsk->sk_tcplen += len;
- 		if (len < want) {
- 			/* call again to read the remaining bytes */
- 			goto err_short;
- 		}
- 		trace_svcsock_marker(&svsk->sk_xprt, svsk->sk_marker);
- 		if (svc_sock_reclen(svsk) + svsk->sk_datalen >
- 		    svsk->sk_xprt.xpt_server->sv_max_mesg)
- 			goto err_too_large;
- 	}
- 	return svc_sock_reclen(svsk);
- 
- err_too_large:
- 	net_notice_ratelimited("svc: %s oversized RPC fragment (%u octets) from %pISpc\n",
- 			       svsk->sk_xprt.xpt_server->sv_name,
- 			       svc_sock_reclen(svsk),
- 			       (struct sockaddr *)&svsk->sk_xprt.xpt_remote);
- 	svc_xprt_deferred_close(&svsk->sk_xprt);
- err_short:
- 	return -EAGAIN;
- }
- 
  static int receive_cb_reply(struct svc_sock *svsk, struct svc_rqst *rqstp)
  {
  	struct rpc_xprt *bc_xprt = svsk->sk_xprt.xpt_bc_xprt;
@@@ -1203,20 -1048,162 +1048,162 @@@ unlock_eagain
  
  static void svc_tcp_fragment_received(struct svc_sock *svsk)
  {
- 	/* If we have more data, signal svc_xprt_enqueue() to try again */
  	svsk->sk_tcplen = 0;
  	svsk->sk_marker = xdr_zero;
  }
  
+ /*
+  * A non-final fragment carries four octets of marker and may carry
+  * no payload at all. sk_datalen advances only by the payload, so a
+  * run of tiny fragments exhausts ->read_sock's byte budget before
+  * the sv_max_mesg check trips, and a run of empty ones never trips
+  * it. Cap the fragments per socket-lock hold. The cap leaves the
+  * record incomplete, and svc_tcp_recvfrom() resumes it on the next
+  * call.
+  */
+ #define SVC_TCP_MAX_FRAGS		256
+ 
+ struct svc_tcp_recv_ctx {
+ 	struct svc_rqst		*rqstp;
+ 	unsigned int		frags;
+ 	bool			complete;
+ };
+ 
+ /*
+  * Nothing reads the message body before the message is complete, and
+  * partial receives refill the same pages. Flush once here, after the
+  * socket lock is released, rather than once per copy in the actor.
+  */
+ static void svc_tcp_flush_pages(struct svc_sock *svsk,
+ 				struct svc_rqst *rqstp)
+ {
+ 	unsigned int pg, pages = DIV_ROUND_UP(svsk->sk_datalen, PAGE_SIZE);
+ 
+ 	for (pg = 0; pg < pages; pg++)
+ 		flush_dcache_page(rqstp->rq_pages[pg]);
+ }
+ 
+ /*
+  * Mapping the message's unfilled remainder would re-map untouched
+  * pages on every call, at a cost that grows with the message rather
+  * than with the octets copied.
+  */
+ static void svc_tcp_recv_iter_init(struct svc_rqst *rqstp,
+ 				   struct iov_iter *iter, size_t body_off,
+ 				   size_t len)
+ {
+ 	unsigned int first = body_off >> PAGE_SHIFT;
+ 	size_t seek = offset_in_page(body_off);
+ 	unsigned int i, pages = DIV_ROUND_UP(seek + len, PAGE_SIZE);
+ 
+ 	for (i = 0; i < pages; i++)
+ 		bvec_set_page(&rqstp->rq_bvec[i], rqstp->rq_pages[first + i],
+ 			      PAGE_SIZE, 0);
+ 
+ 	iov_iter_bvec(iter, ITER_DEST, rqstp->rq_bvec, pages, seek + len);
+ 	iov_iter_advance(iter, seek);
+ }
+ 
+ /*
+  * ->read_sock actor, called under the socket lock. sk_datalen is both
+  * the count of body octets received so far and their write offset into
+  * rq_pages.
+  */
+ static int svc_tcp_recv_actor(read_descriptor_t *desc, struct sk_buff *skb,
+ 			      unsigned int offset, size_t len)
+ {
+ 	struct svc_tcp_recv_ctx *ctx = desc->arg.data;
+ 	struct svc_rqst *rqstp = ctx->rqstp;
+ 	struct svc_sock *svsk =
+ 		container_of(rqstp->rq_xprt, struct svc_sock, sk_xprt);
+ 	size_t reclen, received, want, take, n;
+ 	size_t consumed = 0;
+ 
+ 	if (!desc->count)
+ 		return 0;
+ 
+ 	len = min(len, desc->count);
+ 
+ 	if (svsk->sk_tcplen < sizeof(rpc_fraghdr)) {
+ 		want = sizeof(rpc_fraghdr) - svsk->sk_tcplen;
+ 		n = min(want, len);
+ 
+ 		if (skb_copy_bits(skb, offset,
+ 				  (char *)&svsk->sk_marker + svsk->sk_tcplen,
+ 				  n))
+ 			goto fault;
+ 		svsk->sk_tcplen += n;
+ 		offset += n;
+ 		len -= n;
+ 		consumed += n;
+ 		desc->count -= n;
+ 
+ 		if (svsk->sk_tcplen < sizeof(rpc_fraghdr))
+ 			return consumed;
+ 
+ 		trace_svcsock_marker(&svsk->sk_xprt, svsk->sk_marker);
+ 		if (svc_sock_reclen(svsk) + svsk->sk_datalen >
+ 		    svsk->sk_xprt.xpt_server->sv_max_mesg) {
+ 			net_notice_ratelimited("svc: %s oversized RPC fragment (%u octets) from %pISpc\n",
+ 					       svsk->sk_xprt.xpt_server->sv_name,
+ 					       svc_sock_reclen(svsk),
+ 					       (struct sockaddr *)&svsk->sk_xprt.xpt_remote);
+ 			desc->error = -EMSGSIZE;
+ 			desc->count = 0;
+ 			return consumed;
+ 		}
+ 	}
+ 
+ 	reclen = svc_sock_reclen(svsk);
+ 	received = svsk->sk_tcplen - sizeof(rpc_fraghdr);
+ 	want = reclen - received;
+ 	take = min(want, len);
+ 
+ 	if (take) {
+ 		struct iov_iter iter;
+ 
+ 		svc_tcp_recv_iter_init(rqstp, &iter, svsk->sk_datalen, take);
+ 		if (skb_copy_datagram_iter(skb, offset, &iter, take))
+ 			goto fault;
+ 		svsk->sk_datalen += take;
+ 		svsk->sk_tcplen += take;
+ 		consumed += take;
+ 		desc->count -= take;
+ 	}
+ 
+ 	if (take == want) {
+ 		if (svc_sock_final_rec(svsk)) {
+ 			ctx->complete = true;
+ 			desc->count = 0;
+ 		} else {
+ 			svc_tcp_fragment_received(svsk);
+ 			if (++ctx->frags >= SVC_TCP_MAX_FRAGS)
+ 				desc->count = 0;
+ 		}
+ 	}
+ 
+ 	return consumed;
+ 
+ fault:
+ 	desc->error = -EFAULT;
+ 	desc->count = 0;
+ 	return consumed;
+ }
+ 
+ static bool svc_tcp_at_urg_mark(struct sock *sk)
+ {
+ 	const struct tcp_sock *tp = tcp_sk(sk);
+ 
+ 	return tp->urg_data && tp->urg_seq == tp->copied_seq;
+ }
+ 
  /**
   * svc_tcp_recvfrom - Receive data from a TCP socket
   * @rqstp: request structure into which to receive an RPC Call
   *
   * Called in a loop when XPT_DATA has been set.
   *
-  * Read the 4-byte stream record marker, then use the record length
-  * in that marker to set up exactly the resources needed to receive
-  * the next RPC message into @rqstp.
+  * Context: Process context. Takes and releases the socket lock.
   *
   * Returns:
   *   On success, the number of bytes in a received RPC Call, or
@@@ -1231,29 -1218,69 +1218,69 @@@ static int svc_tcp_recvfrom(struct svc_
  	struct svc_sock	*svsk =
  		container_of(rqstp->rq_xprt, struct svc_sock, sk_xprt);
  	struct svc_serv	*serv = svsk->sk_xprt.xpt_server;
- 	size_t want, base;
+ 	struct svc_tcp_recv_ctx ctx = {
+ 		.rqstp		= rqstp,
+ 	};
+ 	read_descriptor_t desc = {
+ 		.arg.data	= &ctx,
+ 		.count		= serv->sv_max_mesg + sizeof(rpc_fraghdr),
+ 	};
+ 	struct socket *sock = svsk->sk_sock;
  	ssize_t len;
  	__be32 *p;
  	__be32 calldir;
  
  	clear_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
- 	len = svc_tcp_read_marker(svsk, rqstp);
- 	if (len < 0)
- 		goto error;
+ 	svc_tcp_restore_pages(svsk, rqstp);
  
- 	base = svc_tcp_restore_pages(svsk, rqstp);
- 	want = len - (svsk->sk_tcplen - sizeof(rpc_fraghdr));
- 	len = svc_tcp_read_msg(rqstp, base + want, base);
- 	if (len >= 0) {
- 		trace_svcsock_tcp_recv(&svsk->sk_xprt, len);
- 		svsk->sk_tcplen += len;
- 		svsk->sk_datalen += len;
+ 	lock_sock(sock->sk);
+ 	len = sock->ops->read_sock(sock->sk, &desc, svc_tcp_recv_actor);
+ 	/* ->read_sock stops at urgent data and consumes none of it.
+ 	 * Only recvmsg() clears the condition, and this path calls
+ 	 * none, so every later read stops at the same octet. An RPC
+ 	 * stream carries no urgent data, so close the connection.
+ 	 *
+ 	 * The read that first reaches the mark consumes the octets
+ 	 * ahead of it, so the stop does not show up as a zero len. A
+ 	 * record completed ahead of the mark is returned first. The
+ 	 * XPT_DATA set below brings the next call back here with
+ 	 * nothing left to consume.
+ 	 */
+ 	if (!ctx.complete && svc_tcp_at_urg_mark(sock->sk))
+ 		desc.error = -EPROTO;
+ 	release_sock(sock->sk);
+ 
+ 	/* ->read_sock returns the octets consumed before an actor
+ 	 * failure, so a positive len can accompany desc.error.
+ 	 */
+ 	if (desc.error < 0) {
+ 		len = desc.error;
+ 		goto err_nuts;
  	}
- 	if (len != want || !svc_sock_final_rec(svsk))
+ 	if (len >= 0)
+ 		trace_svcsock_tcp_recv(&svsk->sk_xprt, len);
+ 
+ 	if (!ctx.complete) {
+ 		if (!desc.count) {
+ 			set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
+ 			goto err_incomplete;
+ 		}
+ 		/* A zero return leaves no record at the head to classify.
+ 		 * -EINVAL means a control record sits there. Screen the
+ 		 * other errors out first, because a probe calls
+ 		 * sock_error(), whose xchg clears sk->sk_err as it reads.
+ 		 */
+ 		if (len <= 0 && len != -EINVAL)
+ 			goto err_incomplete;
+ 
+ 		len = svc_tcp_recv_ctrl_record(svsk);
  		goto err_incomplete;
+ 	}
  	if (svsk->sk_datalen < 8)
  		goto err_nuts;
  
+ 	svc_tcp_flush_pages(svsk, rqstp);
+ 
  	rqstp->rq_arg.len = svsk->sk_datalen;
  	rqstp->rq_arg.page_base = 0;
  	if (rqstp->rq_arg.len <= rqstp->rq_arg.head[0].iov_len) {
@@@ -1269,6 -1296,12 +1296,12 @@@
  	else
  		clear_bit(RQ_LOCAL, &rqstp->rq_flags);
  
+ 	/* Completing one message stops ->read_sock with whatever
+ 	 * follows still queued, and no path from here re-arms XPT_DATA.
+ 	 * The queued message would wait for unrelated traffic.
+ 	 */
+ 	set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags);
+ 
  	p = (__be32 *)rqstp->rq_arg.head[0].iov_base;
  	calldir = p[1];
  	if (calldir)
@@@ -1293,19 -1326,21 +1326,21 @@@ err_incomplete
  	svc_tcp_save_pages(svsk, rqstp);
  	if (len < 0 && len != -EAGAIN)
  		goto err_delete;
- 	if (len == want)
- 		svc_tcp_fragment_received(svsk);
- 	else
+ 	if (svsk->sk_tcplen >= sizeof(rpc_fraghdr))
  		trace_svcsock_tcp_recv_short(&svsk->sk_xprt,
  				svc_sock_reclen(svsk),
  				svsk->sk_tcplen - sizeof(rpc_fraghdr));
+ 	else
+ 		trace_svcsock_tcp_recv_eagain(&svsk->sk_xprt, 0);
  	goto err_noclose;
  error:
- 	if (len != -EAGAIN)
- 		goto err_delete;
  	trace_svcsock_tcp_recv_eagain(&svsk->sk_xprt, 0);
  	goto err_noclose;
  err_nuts:
+ 	/* svc_tcp_save_pages() has not run, so svsk->sk_pages[] is
+ 	 * empty. A non-zero sk_datalen makes the teardown-time
+ 	 * svc_tcp_clear_pages() walk empty slots and WARN.
+ 	 */
  	svsk->sk_datalen = 0;
  err_delete:
  	trace_svcsock_tcp_recv_err(&svsk->sk_xprt, len);
@@@ -1615,6 -1650,9 +1650,9 @@@ int svc_addsock(struct svc_serv *serv, 
  	err = -EISCONN;
  	if (so->state > SS_UNCONNECTED)
  		goto out;
+ 	err = -EBUSY;
+ 	if (so->sk->sk_user_data)
+ 		goto out;
  	err = -ENOENT;
  	if (!try_module_get(THIS_MODULE))
  		goto out;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the nfsd tree with the nfs-anna tree
  2026-09-22  8:42 linux-next: manual merge of the nfsd tree with the nfs-anna tree Mark Brown
@ 2026-09-22 13:09 ` Chuck Lever
  0 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2026-09-22 13:09 UTC (permalink / raw)
  To: Mark Brown, Chuck Lever
  Cc: Anna Schumaker, Linux Kernel Mailing List, Linux Next



On Tue, Sep 22, 2026, at 4:42 AM, Mark Brown wrote:
> Hi all,
>
> Today's linux-next merge of the nfsd tree got a conflict in:
>
>   net/sunrpc/svcsock.c
>
> between commits:
>
>   2ecf0d2af5da8 ("SUNRPC: resume receiving after a TLS control record")
>   1a485d8e93a92 ("SUNRPC: treat every TLS error alert as fatal")
>   d3b4fb1d30749 ("SUNRPC: reject a TLS alert record that is not two 
> octets")
>   f547743e6b51f ("SUNRPC: do not credit control-record octets to the 
> RPC stream")
>
> from the nfs-anna tree and commits:
>
>   a76d52a01792f ("SUNRPC: Do not credit control-record octets to the 
> RPC stream")
>   e263b5d674fcf ("SUNRPC: Reject a TLS alert record that is not two 
> octets")
>   ebcbe4a9a7779 ("SUNRPC: Treat every TLS error alert as fatal")
>   8f765d820c590 ("SUNRPC: Resume receiving after a TLS control record")
>   7f757c41a8beb ("SUNRPC: Reject a socket that already has an svc_sock 
> attached")
>   35ab7140c7bfa ("SUNRPC: Separate the TLS control-record receive from 
> its policy")
>   9a4ef884d00cd ("SUNRPC: Close the transport on an unhandled TLS 
> record type")
>   eaef7075c6a48 ("SUNRPC: Flush a received record's pages once it is 
> complete")
>   1517c61f247f3 ("SUNRPC: Receive RPC records with ->read_sock")
>   23bec0f9631c2 ("SUNRPC: Bypass sock_recvmsg() for the TLS 
> control-record receive")
>   0fce57f554fa6 ("SUNRPC: Skip xpt_reserved accounting for non-UDP 
> transports")
>
> from the nfsd tree.  This looks like different versions of patches being
> applied with extra stuff then stacked on top.  I've taken the nfsd
> version but it's possible that's gone wrong, I'm not *super* confident
> in this.  It feels like there's a coordination issue here.

I didn't realize Anna had picked up the TLS-related work. To resolve
these conflicts:

- I can drop the xprtsock.c three (91bdf2ae4a27, 6b91817001fb,
  21bcc6ccc6cd) from nfsd-next

- I need to keep the svcsock.c four, as there is follow-on work in
  the NFSD queue that depends on those

Anna, can you drop f547743e6b51, d3b4fb1d3074, 1a485d8e93a9,
2ecf0d2af5da from nfs-anna?


-- 
Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: manual merge of the nfsd tree with the nfs-anna tree
@ 2026-09-22  8:42 Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2026-09-22  8:42 UTC (permalink / raw)
  To: Chuck Lever
  Cc: Anna Schumaker, Chuck Lever, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]

Hi all,

Today's linux-next merge of the nfsd tree got a conflict in:

  net/sunrpc/xprtsock.c

between commits:

  ced837addad37 ("SUNRPC: fold xs_sock_process_cmsg() into its only caller")
  2e3f0f157f227 ("SUNRPC: treat every client-side TLS error alert as fatal")
  adc5399386f7b ("SUNRPC: reject a client-side TLS alert record that is not two octets")

from the nfs-anna tree and commits:

  21bcc6ccc6cd0 ("SUNRPC: Fold xs_sock_process_cmsg() into its only caller")
  6b91817001fb1 ("SUNRPC: Treat every client-side TLS error alert as fatal")
  91bdf2ae4a279 ("SUNRPC: Reject a client-side TLS alert record that is not two octets")

from the nfsd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

(The comments were different, I took nfs-anna's version)

diff --combined net/sunrpc/xprtsock.c
index f5a5136327ba8,ca22ca8f2fea7..0000000000000
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@@ -386,20 -386,17 +386,20 @@@ xs_sock_recv_cmsg(struct socket *sock, 
  		if (tls_get_record_type(sock->sk, &u.cmsg) !=
  		    TLS_RECORD_TYPE_ALERT)
  			return -EAGAIN;
 -		/* An Alert record carries exactly one two-octet message
 -		 * (RFC 8446 Section 5.1). alert_kvec caps the receive at
 -		 * two, so the count alone cannot reliably detect an
 -		 * oversized record.
 +		/* RFC 8446 Section 5.1: a record with an Alert type carries
 +		 * exactly one message, and an alert is two octets.
 +		 * tls_alert_recv() reads both without checking the length.
 +		 * alert_kvec caps the count at two, so a longer record
 +		 * fills it as well. kTLS sets MSG_EOR only once the
 +		 * record has been drained.
  		 */
  		if (ret != sizeof(alert) || !(msg.msg_flags & MSG_EOR))
  			return -EACCES;
  		iov_iter_revert(&msg.msg_iter, ret);
  		tls_alert_recv(sock->sk, &msg, &level, &description);
  		/* RFC 8446 Section 6: every alert but a closure alert is
 -		 * an error alert.
 +		 * an error alert, whatever the legacy AlertLevel octet
 +		 * says.
  		 */
  		switch (description) {
  		case TLS_ALERT_DESC_CLOSE_NOTIFY:

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: manual merge of the nfsd tree with the nfs-anna tree
@ 2025-10-02 11:08 Mark Brown
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2025-10-02 11:08 UTC (permalink / raw)
  To: Chuck Lever
  Cc: Anna Schumaker, Linux Kernel Mailing List,
	Linux Next Mailing List, Mike Snitzer

[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]

Hi all,

Today's linux-next merge of the nfsd tree got a conflict in:

  fs/nfsd/vfs.h

between commit:

  d11f6cd1bb4a4 ("NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support")

from the nfs-anna tree and commits:

  c926f0298d3cd ("NFSD: Relocate the fh_want_write() and fh_drop_write() helpers")
  c1f203e46c55a ("NFSD: Move the fh_getattr() helper")

from the nfsd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 3edccc38db42e..e70bc699e9a51 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -697,6 +697,10 @@ __be32 fh_getattr(const struct svc_fh *fhp, struct kstat *stat)
 		.dentry		= fhp->fh_dentry,
 	};
 	u32 request_mask = STATX_BASIC_STATS;
+	struct inode *inode = d_inode(p.dentry);
+
+	if (S_ISREG(inode->i_mode))
+		request_mask |= (STATX_DIOALIGN | STATX_DIO_READ_ALIGN);
 
 	if (fhp->fh_maxsize == NFS4_FHSIZE)
 		request_mask |= (STATX_BTIME | STATX_CHANGE_COOKIE);

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: linux-next: manual merge of the nfsd tree with the nfs-anna tree
  2020-05-29  0:59 Stephen Rothwell
@ 2020-05-29 19:27 ` Chuck Lever
  0 siblings, 0 replies; 7+ messages in thread
From: Chuck Lever @ 2020-05-29 19:27 UTC (permalink / raw)
  To: Stephen Rothwell, Bruce Fields
  Cc: Anna Schumaker, Trond Myklebust, Linux NFS Mailing List,
	Linux Next Mailing List, Linux Kernel Mailing List


> On May 28, 2020, at 8:59 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> Hi all,
> 
> Today's linux-next merge of the nfsd tree got a conflict in:
> 
>  include/trace/events/sunrpc.h
> 
> between commit:
> 
>  2baebf955125 ("SUNRPC: Split the xdr_buf event class")
> 
> from the nfs-anna tree and commit:
> 
>  998024dee197 ("SUNRPC: Add more svcsock tracepoints")
> 
> from the nfsd tree.

Alternately, I can provide a v4 nfsd-5.8 series for Bruce that
includes 2baebf955125 ("SUNRPC: Split the xdr_buf event class")
so that these merge conflicts are avoided.


> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc include/trace/events/sunrpc.h
> index 73193c79fcaa,852413cbb7d9..000000000000
> --- a/include/trace/events/sunrpc.h
> +++ b/include/trace/events/sunrpc.h
> @@@ -14,9 -14,41 +14,42 @@@
>  #include <linux/net.h>
>  #include <linux/tracepoint.h>
> 
> + TRACE_DEFINE_ENUM(SOCK_STREAM);
> + TRACE_DEFINE_ENUM(SOCK_DGRAM);
> + TRACE_DEFINE_ENUM(SOCK_RAW);
> + TRACE_DEFINE_ENUM(SOCK_RDM);
> + TRACE_DEFINE_ENUM(SOCK_SEQPACKET);
> + TRACE_DEFINE_ENUM(SOCK_DCCP);
> + TRACE_DEFINE_ENUM(SOCK_PACKET);
> + 
> + #define show_socket_type(type)					\
> + 	__print_symbolic(type,					\
> + 		{ SOCK_STREAM,		"STREAM" },		\
> + 		{ SOCK_DGRAM,		"DGRAM" },		\
> + 		{ SOCK_RAW,		"RAW" },		\
> + 		{ SOCK_RDM,		"RDM" },		\
> + 		{ SOCK_SEQPACKET,	"SEQPACKET" },		\
> + 		{ SOCK_DCCP,		"DCCP" },		\
> + 		{ SOCK_PACKET,		"PACKET" })
> + 
> + /* This list is known to be incomplete, add new enums as needed. */
> + TRACE_DEFINE_ENUM(AF_UNSPEC);
> + TRACE_DEFINE_ENUM(AF_UNIX);
> + TRACE_DEFINE_ENUM(AF_LOCAL);
> + TRACE_DEFINE_ENUM(AF_INET);
> + TRACE_DEFINE_ENUM(AF_INET6);
> + 
> + #define rpc_show_address_family(family)				\
> + 	__print_symbolic(family,				\
> + 		{ AF_UNSPEC,		"AF_UNSPEC" },		\
> + 		{ AF_UNIX,		"AF_UNIX" },		\
> + 		{ AF_LOCAL,		"AF_LOCAL" },		\
> + 		{ AF_INET,		"AF_INET" },		\
> + 		{ AF_INET6,		"AF_INET6" })
> + 
> -DECLARE_EVENT_CLASS(xdr_buf_class,
> +DECLARE_EVENT_CLASS(rpc_xdr_buf_class,
>  	TP_PROTO(
> +		const struct rpc_task *task,
>  		const struct xdr_buf *xdr
>  	),
> 

--
Chuck Lever




^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: manual merge of the nfsd tree with the nfs-anna tree
@ 2020-05-29  1:05 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2020-05-29  1:05 UTC (permalink / raw)
  To: J. Bruce Fields, Anna Schumaker, Trond Myklebust, NFS Mailing List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Chuck Lever

[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

Hi all,

Today's linux-next merge of the nfsd tree got a conflict in:

  net/sunrpc/svc_xprt.c

between commit:

  2baebf955125 ("SUNRPC: Split the xdr_buf event class")

from the nfs-anna tree and commit:

  ca4faf543a33 ("SUNRPC: Move xpt_mutex into socket xpo_sendto methods")

from the nfsd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/sunrpc/svc_xprt.c
index 8ef44275c255,c1ff8cdb5b2b..000000000000
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@@ -913,17 -906,11 +906,11 @@@ int svc_send(struct svc_rqst *rqstp
  	xb->len = xb->head[0].iov_len +
  		xb->page_len +
  		xb->tail[0].iov_len;
 -	trace_svc_sendto(xb);
 +	trace_svc_xdr_sendto(rqstp, xb);
- 
- 	/* Grab mutex to serialize outgoing data. */
- 	mutex_lock(&xprt->xpt_mutex);
  	trace_svc_stats_latency(rqstp);
- 	if (test_bit(XPT_DEAD, &xprt->xpt_flags)
- 			|| test_bit(XPT_CLOSE, &xprt->xpt_flags))
- 		len = -ENOTCONN;
- 	else
- 		len = xprt->xpt_ops->xpo_sendto(rqstp);
- 	mutex_unlock(&xprt->xpt_mutex);
+ 
+ 	len = xprt->xpt_ops->xpo_sendto(rqstp);
+ 
  	trace_svc_send(rqstp, len);
  	svc_xprt_release(rqstp);
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* linux-next: manual merge of the nfsd tree with the nfs-anna tree
@ 2020-05-29  0:59 Stephen Rothwell
  2020-05-29 19:27 ` Chuck Lever
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2020-05-29  0:59 UTC (permalink / raw)
  To: J. Bruce Fields, Anna Schumaker, Trond Myklebust, NFS Mailing List
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Chuck Lever

[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]

Hi all,

Today's linux-next merge of the nfsd tree got a conflict in:

  include/trace/events/sunrpc.h

between commit:

  2baebf955125 ("SUNRPC: Split the xdr_buf event class")

from the nfs-anna tree and commit:

  998024dee197 ("SUNRPC: Add more svcsock tracepoints")

from the nfsd tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/trace/events/sunrpc.h
index 73193c79fcaa,852413cbb7d9..000000000000
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@@ -14,9 -14,41 +14,42 @@@
  #include <linux/net.h>
  #include <linux/tracepoint.h>
  
+ TRACE_DEFINE_ENUM(SOCK_STREAM);
+ TRACE_DEFINE_ENUM(SOCK_DGRAM);
+ TRACE_DEFINE_ENUM(SOCK_RAW);
+ TRACE_DEFINE_ENUM(SOCK_RDM);
+ TRACE_DEFINE_ENUM(SOCK_SEQPACKET);
+ TRACE_DEFINE_ENUM(SOCK_DCCP);
+ TRACE_DEFINE_ENUM(SOCK_PACKET);
+ 
+ #define show_socket_type(type)					\
+ 	__print_symbolic(type,					\
+ 		{ SOCK_STREAM,		"STREAM" },		\
+ 		{ SOCK_DGRAM,		"DGRAM" },		\
+ 		{ SOCK_RAW,		"RAW" },		\
+ 		{ SOCK_RDM,		"RDM" },		\
+ 		{ SOCK_SEQPACKET,	"SEQPACKET" },		\
+ 		{ SOCK_DCCP,		"DCCP" },		\
+ 		{ SOCK_PACKET,		"PACKET" })
+ 
+ /* This list is known to be incomplete, add new enums as needed. */
+ TRACE_DEFINE_ENUM(AF_UNSPEC);
+ TRACE_DEFINE_ENUM(AF_UNIX);
+ TRACE_DEFINE_ENUM(AF_LOCAL);
+ TRACE_DEFINE_ENUM(AF_INET);
+ TRACE_DEFINE_ENUM(AF_INET6);
+ 
+ #define rpc_show_address_family(family)				\
+ 	__print_symbolic(family,				\
+ 		{ AF_UNSPEC,		"AF_UNSPEC" },		\
+ 		{ AF_UNIX,		"AF_UNIX" },		\
+ 		{ AF_LOCAL,		"AF_LOCAL" },		\
+ 		{ AF_INET,		"AF_INET" },		\
+ 		{ AF_INET6,		"AF_INET6" })
+ 
 -DECLARE_EVENT_CLASS(xdr_buf_class,
 +DECLARE_EVENT_CLASS(rpc_xdr_buf_class,
  	TP_PROTO(
 +		const struct rpc_task *task,
  		const struct xdr_buf *xdr
  	),
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-09-22 13:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22  8:42 linux-next: manual merge of the nfsd tree with the nfs-anna tree Mark Brown
2026-09-22 13:09 ` Chuck Lever
  -- strict thread matches above, loose matches on Subject: below --
2026-09-22  8:42 Mark Brown
2025-10-02 11:08 Mark Brown
2020-05-29  1:05 Stephen Rothwell
2020-05-29  0:59 Stephen Rothwell
2020-05-29 19:27 ` Chuck Lever

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®