From: David Mosberger <davidm@napali.hpl.hp.com>
To: neilb@cse.unsw.edu.au
Cc: linux-kernel@vger.kernel.org
Subject: NFSD binary compatibility breakage
Date: Tue, 8 Apr 2003 22:42:17 -0700 [thread overview]
Message-ID: <200304090542.h395gHF5004000@napali.hpl.hp.com> (raw)
Neil,
The removal of "struct nfsctl_uidmap" from "nfsctl_fdparm" broke
binary compatiblity on 64-bit platforms (strictly speaking: on all
platforms with alignof(void *) > alignof(int)). The problem is that
nfsctl_uidmap contained a "char *", which forced the alignment of the
entire union to be 64 bits. With the removal of the uidmap, the
required alignment drops to 32 bits. Since the first member is only
32 bits in size, this breaks compatibility with user-space. Patch
below fixes the problem.
Thanks,
--david
===== include/linux/nfsd/syscall.h 1.4 vs edited =====
--- 1.4/include/linux/nfsd/syscall.h Sun Mar 23 14:35:20 2003
+++ edited/include/linux/nfsd/syscall.h Tue Apr 8 22:36:59 2003
@@ -91,6 +91,13 @@
struct nfsctl_export u_export;
struct nfsctl_fdparm u_getfd;
struct nfsctl_fsparm u_getfs;
+ /*
+ * The following dummy member is needed to preserve binary compatibility
+ * on platforms where alignof(void*)>alignof(int). It's needed because
+ * this union used to contain a member (u_umap) which contained a
+ * pointer.
+ */
+ void *u_ptr;
} u;
#define ca_svc u.u_svc
#define ca_client u.u_client
next reply other threads:[~2003-04-09 5:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-09 5:42 David Mosberger [this message]
2003-04-09 23:48 ` Neil Brown
2003-04-10 0:49 ` David Mosberger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304090542.h395gHF5004000@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®