* NFSD binary compatibility breakage
@ 2003-04-09 5:42 David Mosberger
2003-04-09 23:48 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: David Mosberger @ 2003-04-09 5:42 UTC (permalink / raw)
To: neilb; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFSD binary compatibility breakage
2003-04-09 5:42 NFSD binary compatibility breakage David Mosberger
@ 2003-04-09 23:48 ` Neil Brown
2003-04-10 0:49 ` David Mosberger
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2003-04-09 23:48 UTC (permalink / raw)
To: davidm; +Cc: linux-kernel
On Tuesday April 8, davidm@napali.hpl.hp.com wrote:
> 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.
Hmm... just another reason to get rid of these binary interfaces! I
plan to rip them all out in 2.7.1. But for now I'll try to keep them
going as best I can. Thanks for the patch.
NeilBrown
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: NFSD binary compatibility breakage
2003-04-09 23:48 ` Neil Brown
@ 2003-04-10 0:49 ` David Mosberger
0 siblings, 0 replies; 3+ messages in thread
From: David Mosberger @ 2003-04-10 0:49 UTC (permalink / raw)
To: Neil Brown; +Cc: linux-kernel
>>>>> On Thu, 10 Apr 2003 09:48:37 +1000, Neil Brown <neilb@cse.unsw.edu.au> said:
Neil> Hmm... just another reason to get rid of these binary
Neil> interfaces! I plan to rip them all out in 2.7.1.
Sounds good to me.
Neil> But for now I'll try to keep them going as best I can. Thanks
Neil> for the patch.
Thanks!
--david
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-04-10 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-09 5:42 NFSD binary compatibility breakage David Mosberger
2003-04-09 23:48 ` Neil Brown
2003-04-10 0:49 ` David Mosberger
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®