Skip to contentSkip to conversation

Give containers a unique client id

PATCH Superseded [email protected] 5 participants 9 messages Oct 7, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

cover Give containers a unique client id

From: Trond Myklebust <[email protected]>

This series adds the missing patches to allow a container to set a unique client id using /sys/fs/nfs/net/nfs_client/identifier, and have NFS use that for any new NFS mounts that are initiated by that container.

Trond Myklebust (2):
NFSv4: Clean up initialisation of uniquified client id strings
NFSv4: Use the net namespace uniquifier if it is set

 fs/nfs/nfs4proc.c | 90 ++++++++++++++++++++++++++---------------------
 1 file changed, 49 insertions(+), 41 deletions(-)
Signature · 1 line
2.26.2
author maintainer
#1 lore raw

PATCH 1/2 NFSv4: Clean up initialisation of uniquified client id strings

From: Trond Myklebust <[email protected]>

When the user sets a uniquifier, then ensure we copy the string so that calls to strlen() etc are atomic with calls to snprintf().

---
 fs/nfs/nfs4proc.c | 73 +++++++++++++++++++++--------------------------
 1 file changed, 32 insertions(+), 41 deletions(-)
fs/nfs/nfs4proc.c +32 -41
index 6e95c85fe395..3a39887e0e6e 100644
@@ -6006,9 +6006,20 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp,
 	memcpy(bootverf->data, verf, sizeof(bootverf->data));
 }
 
+static size_t
+nfs4_get_uniquifier(char *buf, size_t buflen)
+{
+	buf[0] = '\0';
+	if (nfs4_client_id_uniquifier[0] != '\0')
+		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
+	return 0;
+}
+
 static int
 nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 {
+	char buf[NFS4_CLIENT_ID_UNIQ_LEN];
+	size_t buflen;
 	size_t len;
 	char *str;
 
@@ -6022,8 +6033,11 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 		strlen(rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR)) +
 		1;
 	rcu_read_unlock();
-	if (nfs4_client_id_uniquifier[0] != '\0')
-		len += strlen(nfs4_client_id_uniquifier) + 1;
+
+	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	if (buflen)
+		len += buflen + 1;
+
 	if (len > NFS4_OPAQUE_LIMIT + 1)
 		return -EINVAL;
 
@@ -6037,10 +6051,9 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 		return -ENOMEM;
 
 	rcu_read_lock();
-	if (nfs4_client_id_uniquifier[0] != '\0')
+	if (buflen)
 		scnprintf(str, len, "Linux NFSv4.0 %s/%s/%s",
-			  clp->cl_rpcclient->cl_nodename,
-			  nfs4_client_id_uniquifier,
+			  clp->cl_rpcclient->cl_nodename, buf,
 			  rpc_peeraddr2str(clp->cl_rpcclient,
 					   RPC_DISPLAY_ADDR));
 	else
@@ -6054,51 +6067,24 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 	return 0;
 }
 
-static int
-nfs4_init_uniquifier_client_string(struct nfs_client *clp)
-{
-	size_t len;
-	char *str;
-
-	len = 10 + 10 + 1 + 10 + 1 +
-		strlen(nfs4_client_id_uniquifier) + 1 +
-		strlen(clp->cl_rpcclient->cl_nodename) + 1;
-
-	if (len > NFS4_OPAQUE_LIMIT + 1)
-		return -EINVAL;
-
-	/*
-	 * Since this string is allocated at mount time, and held until the
-	 * nfs_client is destroyed, we can use GFP_KERNEL here w/o worrying
-	 * about a memory-reclaim deadlock.
-	 */
-	str = kmalloc(len, GFP_KERNEL);
-	if (!str)
-		return -ENOMEM;
-
-	scnprintf(str, len, "Linux NFSv%u.%u %s/%s",
-			clp->rpc_ops->version, clp->cl_minorversion,
-			nfs4_client_id_uniquifier,
-			clp->cl_rpcclient->cl_nodename);
-	clp->cl_owner_id = str;
-	return 0;
-}
-
 static int
 nfs4_init_uniform_client_string(struct nfs_client *clp)
 {
+	char buf[NFS4_CLIENT_ID_UNIQ_LEN];
+	size_t buflen;
 	size_t len;
 	char *str;
 
 	if (clp->cl_owner_id != NULL)
 		return 0;
 
-	if (nfs4_client_id_uniquifier[0] != '\0')
-		return nfs4_init_uniquifier_client_string(clp);
-
 	len = 10 + 10 + 1 + 10 + 1 +
 		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
+	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	if (buflen)
+		len += buflen + 1;
+
 	if (len > NFS4_OPAQUE_LIMIT + 1)
 		return -EINVAL;
 
@@ -6111,9 +6097,14 @@ nfs4_init_uniform_client_string(struct nfs_client *clp)
 	if (!str)
 		return -ENOMEM;
 
-	scnprintf(str, len, "Linux NFSv%u.%u %s",
-			clp->rpc_ops->version, clp->cl_minorversion,
-			clp->cl_rpcclient->cl_nodename);
+	if (buflen)
+		scnprintf(str, len, "Linux NFSv%u.%u %s/%s",
+			  clp->rpc_ops->version, clp->cl_minorversion,
+			  buf, clp->cl_rpcclient->cl_nodename);
+	else
+		scnprintf(str, len, "Linux NFSv%u.%u %s",
+			  clp->rpc_ops->version, clp->cl_minorversion,
+			  clp->cl_rpcclient->cl_nodename);
 	clp->cl_owner_id = str;
 	return 0;
 }
Signature · 1 line
2.26.2
author maintainer
#2 lore raw

PATCH 2/2 NFSv4: Use the net namespace uniquifier if it is set

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier, then use that in the setclientid/exchangeid process.

---
 fs/nfs/nfs4proc.c | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)
fs/nfs/nfs4proc.c +20 -3
index 3a39887e0e6e..a1dd46e7440b 100644
@@ -63,6 +63,7 @@
 #include "callback.h"
 #include "pnfs.h"
 #include "netns.h"
+#include "sysfs.h"
 #include "nfs4idmap.h"
 #include "nfs4session.h"
 #include "fscache.h"
@@ -6007,9 +6008,25 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp,
 }
 
 static size_t
-nfs4_get_uniquifier(char *buf, size_t buflen)
+nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen)
 {
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;
+
 	buf[0] = '\0';
+
+	if (nn_clp) {
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)
+			return len;
+	}
+
 	if (nfs4_client_id_uniquifier[0] != '\0')
 		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
 	return 0;
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 		1;
 	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
 
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct nfs_client *clp)
 	len = 10 + 10 + 1 + 10 + 1 +
 		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
 
Signature · 1 line
2.26.2
#3 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

Quoted 3 lines · On Wed, Oct 07, 2020 at 05:07:20PM -0400, [email protected] wrote:

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier,

What you're actually checking is if nn->nfs_client != NULL, and that's pretty much always true. (The only time it's NULL is an allocation failure in some initialization code, I think.)

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6020

Quoted 8 lines
fs/nfs/nfs4proc.c +7 -0
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;
+
 	buf[0] = '\0';
+
+	if (nn_clp) {

Are you sure you don't mean

	if (nn_clp->identifier)

?

I think that's how you tell if someone's set it.

--b.

Quoted 32 lines
fs/nfs/nfs4proc.c +11 -2
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)
+			return len;
+	}
+
 	if (nfs4_client_id_uniquifier[0] != '\0')
 		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
 	return 0;
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
 		1;
 	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
 
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct nfs_client *clp)
 	len = 10 + 10 + 1 + 10 + 1 +
 		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
 
Signature · 1 line
2.26.2
#4 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

Quoted 21 lines · J. Bruce Fields
Quoted 3 lines · On Wed, Oct 07, 2020 at 05:07:20PM -0400, [email protected] wrote:

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier,

What you're actually checking is if nn->nfs_client != NULL, and that's
pretty much always true. (The only time it's NULL is an allocation failure in some initialization code, I think.)

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6020

Quoted 8 lines
fs/nfs/nfs4proc.c +7 -0
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;
+
 	buf[0] = '\0';
+
+	if (nn_clp) {

Are you sure you don't mean

Quoted 5 lines
	if (nn_clp->identifier)

?

I think that's how you tell if someone's set it.

We're not holding the rcu_read_lock() here, so there is no point in dereferencing the identifier pointer. That would cause a toctou race...

Quoted 10 lines

--b.

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6027

Quoted 7 lines
fs/nfs/nfs4proc.c +7 -0
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)
+			return len;

Oops. However I do need to ensure that 'len' is always initialised here.

Quoted 27 lines
Quoted 27 lines
fs/nfs/nfs4proc.c +4 -2
+	}
+
 	if (nfs4_client_id_uniquifier[0] != '\0')
 		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
 	return 0;
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct
 nfs_client *clp)
 		1;
 	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct
 nfs_client *clp)
 	len = 10 + 10 + 1 + 10 + 1 +
 		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
Signature · 2 lines
-- 
2.26.2
Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
#5 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

Quoted 22 lines · Trond Myklebust
Quoted 21 lines · J. Bruce Fields
Quoted 3 lines · On Wed, Oct 07, 2020 at 05:07:20PM -0400, [email protected] wrote:

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier,

What you're actually checking is if nn->nfs_client != NULL, and that's
pretty much always true. (The only time it's NULL is an allocation failure in some initialization code, I think.)

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6020

Quoted 8 lines
fs/nfs/nfs4proc.c +7 -0
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;
+
 	buf[0] = '\0';
+
+	if (nn_clp) {

Are you sure you don't mean

Quoted 8 lines
Quoted 5 lines
	if (nn_clp->identifier)

?

I think that's how you tell if someone's set it.

We're not holding the rcu_read_lock() here, so there is no point in dereferencing the identifier pointer. That would cause a toctou race...

Oh, right:

Quoted 3 lines
Quoted 3 lines

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6023

Quoted 3 lines
fs/nfs/nfs4proc.c +3 -0
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')

My bad, I saw the first check and missed that one somehow.

Quoted 7 lines
Quoted 4 lines

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6027

Quoted 4 lines
fs/nfs/nfs4proc.c +4 -0
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)
+			return len;

Oops. However I do need to ensure that 'len' is always initialised here.

OK.--b.

Quoted 34 lines
Quoted 28 lines
Quoted 28 lines
fs/nfs/nfs4proc.c +4 -2
+	}
+
 	if (nfs4_client_id_uniquifier[0] != '\0')
 		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
 	return 0;
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct
 nfs_client *clp)
 		1;
 	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct
 nfs_client *clp)
 	len = 10 + 10 + 1 + 10 + 1 +
 		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
 	if (buflen)
 		len += buflen + 1;
Signature · 2 lines
-- 
2.26.2
Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
reviewer
#6 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

In reply to [email protected]
Quoted 33 lines · On 10/7/20 2:07 PM, [email protected] wrote:

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier, then use that in the setclientid/exchangeid process.

---
  fs/nfs/nfs4proc.c | 23 ++++++++++++++++++++---
  1 file changed, 20 insertions(+), 3 deletions(-)
fs/nfs/nfs4proc.c +6 -1
index 3a39887e0e6e..a1dd46e7440b 100644
@@ -63,6 +63,7 @@
  #include "callback.h"
  #include "pnfs.h"
  #include "netns.h"
+#include "sysfs.h"
  #include "nfs4idmap.h"
  #include "nfs4session.h"
  #include "fscache.h"
@@ -6007,9 +6008,25 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp,
  }
 
  static size_t
-nfs4_get_uniquifier(char *buf, size_t buflen)
+nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen)
  {
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6026

Quoted 10 lines
fs/nfs/nfs4proc.c +9 -0
+
  	buf[0] = '\0';
+
+	if (nn_clp) {
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)

I think 'len' can be uninitialized here.

-Dai

Quoted 24 lines
fs/nfs/nfs4proc.c +5 -2
+			return len;
+	}
+
  	if (nfs4_client_id_uniquifier[0] != '\0')
  		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
  	return 0;
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct nfs_client *clp)
  		1;
  	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
  	if (buflen)
  		len += buflen + 1;
 
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct nfs_client *clp)
  	len = 10 + 10 + 1 + 10 + 1 +
  		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
  	if (buflen)
  		len += buflen + 1;
 
#7 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

Quoted 41 lines · Dai Ngo
Quoted 40 lines · On 10/7/20 2:07 PM, [email protected] wrote:

From: Trond Myklebust <[email protected]>

If a container sets a net namespace specific uniquifier, then use that
in the setclientid/exchangeid process.

---
  fs/nfs/nfs4proc.c | 23 ++++++++++++++++++++---
  1 file changed, 20 insertions(+), 3 deletions(-)
fs/nfs/nfs4proc.c +9 -1
index 3a39887e0e6e..a1dd46e7440b 100644
@@ -63,6 +63,7 @@
  #include "callback.h"
  #include "pnfs.h"
  #include "netns.h"
+#include "sysfs.h"
  #include "nfs4idmap.h"
  #include "nfs4session.h"
  #include "fscache.h"
@@ -6007,9 +6008,25 @@ static void nfs4_init_boot_verifier(const
 struct nfs_client *clp,
  }
 
  static size_t
-nfs4_get_uniquifier(char *buf, size_t buflen)
+nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t
 buflen)
  {
+	struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
+	struct nfs_netns_client *nn_clp = nn->nfs_client;
+	const char *id;
+	size_t len;
+
  	buf[0] = '\0';
+
+	if (nn_clp) {
Quoted 8 lines

fs/nfs/nfs4proc.c static void nfs4_init_boot_verifier(const struct nfs_client *clp, · line 6026

Quoted 6 lines
fs/nfs/nfs4proc.c +6 -0
+		rcu_read_lock();
+		id = rcu_dereference(nn_clp->identifier);
+		if (id && *id != '\0')
+			len = strlcpy(buf, id, buflen);
+		rcu_read_unlock();
+		if (len)

I think 'len' can be uninitialized here.

Thanks. Yes, already noted and fixed in v2.

Quoted 29 lines

-Dai

Quoted 26 lines
fs/nfs/nfs4proc.c +3 -0
+			return len;
+	}
+
  	if (nfs4_client_id_uniquifier[0] != '\0')
  		return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
  	return 0;
fs/nfs/nfs4proc.c +2 -2
@@ -6034,7 +6051,7 @@ nfs4_init_nonuniform_client_string(struct
 nfs_client *clp)
  		1;
  	rcu_read_unlock();
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
  	if (buflen)
  		len += buflen + 1;
@@ -6081,7 +6098,7 @@ nfs4_init_uniform_client_string(struct
 nfs_client *clp)
  	len = 10 + 10 + 1 + 10 + 1 +
  		strlen(clp->cl_rpcclient->cl_nodename) + 1;
 
-	buflen = nfs4_get_uniquifier(buf, sizeof(buf));
+	buflen = nfs4_get_uniquifier(clp, buf, sizeof(buf));
  	if (buflen)
  		len += buflen + 1;
Signature · 3 lines
Trond Myklebust
Linux NFS client maintainer, Hammerspace
[email protected]
#8 lore raw

Re: [PATCH 2/2] NFSv4: Use the net namespace uniquifier if it is set

In reply to [email protected]
I love your patch! Perhaps something to improve:

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on nfs/linux-next]
[also build test WARNING on v5.9-rc8 next-20201007]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/trondmy-kernel-org/Give-containers-a-unique-client-id/20201008-050958
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: s390-randconfig-s032-20201008 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0

reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-218-gc0e96d6d-dirty
# https://github.com/0day-ci/linux/commit/440cb74f8b835271bd5e1f6574dc9cb002cec5be
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review trondmy-kernel-org/Give-containers-a-unique-client-id/20201008-050958 git checkout 440cb74f8b835271bd5e1f6574dc9cb002cec5be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390

If you fix the issue, kindly add following tag as appropriate

echo
echo "sparse warnings: (new ones prefixed by >>)"
echo

>> fs/nfs/nfs4proc.c:6022:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> fs/nfs/nfs4proc.c:6022:22: sparse:    char const [noderef] __rcu *
>> fs/nfs/nfs4proc.c:6022:22: sparse:    char const *

vim +6022 fs/nfs/nfs4proc.c

6009
6010 static size_t
6011 nfs4_get_uniquifier(struct nfs_client *clp, char *buf, size_t buflen)
6012 {
6013 struct nfs_net *nn = net_generic(clp->cl_net, nfs_net_id);
6014 struct nfs_netns_client *nn_clp = nn->nfs_client;
6015 const char *id;
6016 size_t len;
6017
6018 buf[0] = '\0';
6019
6020 if (nn_clp) {
6021 rcu_read_lock();

> 6022			id = rcu_dereference(nn_clp->identifier);

6023 if (id && *id != '\0')
6024 len = strlcpy(buf, id, buflen);
6025 rcu_read_unlock();
6026 if (len)
6027 return len;
6028 }
6029
6030 if (nfs4_client_id_uniquifier[0] != '\0')
6031 return strlcpy(buf, nfs4_client_id_uniquifier, buflen);
6032 return 0;
6033 }
6034

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org