Linux-NFS Archive on lore.kernel.org
 help / color / Atom feed
* Re: ANNOUNCE: nfs-utils-2.4.2 released.
@ 2019-11-17 17:47 Doug Nazar
  2019-11-17 19:40 ` Steve Dickson
  0 siblings, 1 reply; 4+ messages in thread
From: Doug Nazar @ 2019-11-17 17:47 UTC (permalink / raw)
  To: linux-nfs, Steve Dickson

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

This still causes crashes in mountd on 32bit systems without 
https://marc.info/?l=linux-nfs&m=157250894818731&w=2

mountd: Version 2.4.2 starting
mountd: auth_unix_ip: inbuf 'nfsd fde2:2b6c:2d24:0021:0000:0000:0000:0050'
mountd: auth_unix_ip: client 0x13cd900 '*'
mountd: nfsd_fh: inbuf '* 6 \xd1fb45ab77b345d99b09b3217dcdf2ec'
*** stack smashing detected ***: <unknown> terminated
Aborted

Call chain looks like:

get_rootfh                    utils/mountd/mountd.c
     check_is_mountpoint       support/misc/mountpoint.c
         nfsd_path_lstat       support/misc/nfsd_path.c    *
             xlstat            support/misc/xstat.c        *

where two struct stats are declared on the stack in mountpoint.c without 
including config.h and getting the __USE_FILE_OFFSET64 define, however 
the following two files in the call chain include config.h and get a 
different size struct stat.

Also attached are a few printf formating fixes for 32 bit.

Doug


[-- Attachment #2: 0001-nfsdcld-Fix-printf-format-strings-on-32bit.patch --]
[-- Type: text/plain, Size: 4117 bytes --]

From c36ce1a2a5df0bb6a50139c1ae246c4bab6e9184 Mon Sep 17 00:00:00 2001
From: Doug Nazar <nazard@nazar.ca>
Date: Sun, 17 Nov 2019 12:42:21 -0500
Subject: [PATCH] nfsdcld: Fix printf format strings on 32bit

Signed-off-by: Doug Nazar <nazard@nazar.ca>
---
 utils/nfsdcld/nfsdcld.c | 14 +++++++-------
 utils/nfsdcld/sqlite.c  |  6 +++---
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c
index b064336d..9297df51 100644
--- a/utils/nfsdcld/nfsdcld.c
+++ b/utils/nfsdcld/nfsdcld.c
@@ -378,7 +378,7 @@ cld_not_implemented(struct cld_client *clnt)
 	bsize = cld_message_size(cmsg);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize)
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 
 	/* reopen pipe, just to be sure */
@@ -409,7 +409,7 @@ cld_get_version(struct cld_client *clnt)
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -459,7 +459,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -498,7 +498,7 @@ reply:
 			cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -548,7 +548,7 @@ reply:
 			cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -607,7 +607,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
@@ -667,7 +667,7 @@ reply:
 	xlog(D_GENERAL, "Doing downcall with status %d", cmsg->cm_status);
 	wsize = atomicio((void *)write, clnt->cl_fd, cmsg, bsize);
 	if (wsize != bsize) {
-		xlog(L_ERROR, "%s: problem writing to cld pipe (%ld): %m",
+		xlog(L_ERROR, "%s: problem writing to cld pipe (%zd): %m",
 			 __func__, wsize);
 		ret = cld_pipe_open(clnt);
 		if (ret) {
diff --git a/utils/nfsdcld/sqlite.c b/utils/nfsdcld/sqlite.c
index 23be7971..09518e22 100644
--- a/utils/nfsdcld/sqlite.c
+++ b/utils/nfsdcld/sqlite.c
@@ -512,7 +512,7 @@ sqlite_startup_query_grace(void)
 	current_epoch = tcur;
 	recovery_epoch = trec;
 	ret = 0;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 out:
 	sqlite3_finalize(stmt);
@@ -1223,7 +1223,7 @@ sqlite_grace_start(void)
 
 	current_epoch = tcur;
 	recovery_epoch = trec;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 
 out:
@@ -1282,7 +1282,7 @@ sqlite_grace_done(void)
 	}
 
 	recovery_epoch = 0;
-	xlog(D_GENERAL, "%s: current_epoch=%lu recovery_epoch=%lu",
+	xlog(D_GENERAL, "%s: current_epoch=%"PRIu64" recovery_epoch=%"PRIu64,
 		__func__, current_epoch, recovery_epoch);
 
 out:
-- 
2.23.0


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

* Re: ANNOUNCE: nfs-utils-2.4.2 released.
  2019-11-17 17:47 ANNOUNCE: nfs-utils-2.4.2 released Doug Nazar
@ 2019-11-17 19:40 ` Steve Dickson
  2019-11-19 20:54   ` Doug Nazar
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Dickson @ 2019-11-17 19:40 UTC (permalink / raw)
  To: Doug Nazar, linux-nfs

Hey,

On 11/17/19 12:47 PM, Doug Nazar wrote:
> This still causes crashes in mountd on 32bit systems without https://marc.info/?l=linux-nfs&m=157250894818731&w=2
> 
> mountd: Version 2.4.2 starting
> mountd: auth_unix_ip: inbuf 'nfsd fde2:2b6c:2d24:0021:0000:0000:0000:0050'
> mountd: auth_unix_ip: client 0x13cd900 '*'
> mountd: nfsd_fh: inbuf '* 6 \xd1fb45ab77b345d99b09b3217dcdf2ec'
> *** stack smashing detected ***: <unknown> terminated
> Aborted
> 
> Call chain looks like:
> 
> get_rootfh                    utils/mountd/mountd.c
>     check_is_mountpoint       support/misc/mountpoint.c
>         nfsd_path_lstat       support/misc/nfsd_path.c    *
>             xlstat            support/misc/xstat.c        *
> 
> where two struct stats are declared on the stack in mountpoint.c without including config.h and getting the __USE_FILE_OFFSET64 define, however the following two files in the call chain include config.h and get a different size struct stat.
> 
> Also attached are a few printf formating fixes for 32 bit.
My apologies... I did miss this patch in the last release, but the
patch is now committed... 

I blame the American Halloween... the day the patch was posted! :-) 
Those darn spooks and goblins of getting in the way!! 8-) 

steved.


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

* Re: ANNOUNCE: nfs-utils-2.4.2 released.
  2019-11-17 19:40 ` Steve Dickson
@ 2019-11-19 20:54   ` Doug Nazar
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Nazar @ 2019-11-19 20:54 UTC (permalink / raw)
  To: Steve Dickson, linux-nfs

On 2019-11-17 14:40, Steve Dickson wrote:
>> Also attached are a few printf formating fixes for 32 bit.
> My apologies... I did miss this patch in the last release, but the
> patch is now committed...
>
> I blame the American Halloween... the day the patch was posted! :-)
> Those darn spooks and goblins of getting in the way!! 8-)

I'm sure they're to blame... they always are getting into things... ;-)

My fault for not sending it separately, but there was another patch 
attached to the last email to fix some printf formatting strings for 32 
bit clients. Let me know if you'd prefer if I send it as a separate email.

Doug


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

* ANNOUNCE: nfs-utils-2.4.2 released.
@ 2019-11-15 16:14 Steve Dickson
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Dickson @ 2019-11-15 16:14 UTC (permalink / raw)
  To: Linux NFS Mailing list; +Cc: linux-fsdevel

Hello,

This is a maintenance release to fix some issues internal to the git tree...  

This release does include the update nfsdcld support 
as well as the updated mountstats and iostats commands.


The tarballs can be found in
  https://www.kernel.org/pub/linux/utils/nfs-utils/2.4.2/
or
  http://sourceforge.net/projects/nfs/files/nfs-utils/2.4.2

The change log is in
   https://www.kernel.org/pub/linux/utils/nfs-utils/2.4.2/2.4.2-Changelog
or
   http://sourceforge.net/projects/nfs/files/nfs-utils/2.4.2/

The git tree is at:
   git://linux-nfs.org/~steved/nfs-utils

Please send comments/bugs to linux-nfs@vger.kernel.org

steved.


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 17:47 ANNOUNCE: nfs-utils-2.4.2 released Doug Nazar
2019-11-17 19:40 ` Steve Dickson
2019-11-19 20:54   ` Doug Nazar
  -- strict thread matches above, loose matches on Subject: below --
2019-11-15 16:14 Steve Dickson

Linux-NFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nfs/0 linux-nfs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nfs linux-nfs/ https://lore.kernel.org/linux-nfs \
		linux-nfs@vger.kernel.org
	public-inbox-index linux-nfs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-nfs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git