linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines
@ 2021-08-03 10:59 Thomas Huth
  2021-08-03 10:59 ` [PATCH 1/2] sysctl: introduce new proc handler proc_dobool Thomas Huth
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Thomas Huth @ 2021-08-03 10:59 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-nfs
  Cc: J. Bruce Fields, Chuck Lever, Trond Myklebust, Anna Schumaker,
	Luis Chamberlain, Kees Cook, Iurii Zaikin, linux-s390, Jia He,
	Pan Xinhui

There is an endianess problem with /proc/sys/fs/nfs/nsm_use_hostnames
(which can e.g. be seen on an s390x host) :

 # modprobe lockd nsm_use_hostnames=1
 # cat /proc/sys/fs/nfs/nsm_use_hostnames
 16777216

The nsm_use_hostnames variable is declared as "bool" which is required
for the correct type for the module parameter. However, this does not
work correctly with the entry in the /proc filesystem since this
currently requires "int".

Jia He already provided patches for this problem a couple of years ago,
but apparently they felt through the cracks and never got merged. So
here's a rebased version to finally fix this issue.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1764075

Jia He (2):
  sysctl: introduce new proc handler proc_dobool
  lockd: change the proc_handler for nsm_use_hostnames

 fs/lockd/svc.c         |  2 +-
 include/linux/sysctl.h |  2 ++
 kernel/sysctl.c        | 42 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)

-- 
2.27.0


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

end of thread, other threads:[~2021-09-16 22:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 10:59 [PATCH 0/2] Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines Thomas Huth
2021-08-03 10:59 ` [PATCH 1/2] sysctl: introduce new proc handler proc_dobool Thomas Huth
2021-08-18  9:38   ` Thomas Huth
2021-09-16  5:16     ` Thomas Huth
2021-09-16 22:03   ` Kees Cook
2021-08-03 10:59 ` [PATCH 2/2] lockd: change the proc_handler for nsm_use_hostnames Thomas Huth
2021-09-16 22:05   ` Kees Cook
2021-08-03 14:08 ` [PATCH 0/2] Fix /proc/sys/fs/nfs/nsm_use_hostnames on big endian machines J. Bruce Fields
2021-08-03 14:24   ` Chuck Lever III
2021-08-04  2:12 ` Jia He
2021-08-09 17:50 ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).