[PATCH] autofs-5.0.7 - fix automounter support on parisc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



with 64-bit kernel and 32-bit userspace
Reply-To: 

This patch fixes automounter support on the parisc architecture with
64-bit kernel and 32-bit userspace.

The patch consists of two parts: Part 1 adds code to detect a 64bit
parisc kernel (uname reports "parisc64"). This is similiar to how x86_64
and ppc64 is already detected.

Part 2 patches the auto_fs.h Linux kernel header file to bring
it in sync again with the upstream Linux kernel header file.
Linux kernel upstream commit 4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf
(https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf)
simplified the #if defined() statements to define autofs_wqt_t as
"unsigned long" only for pure 64bit architectures. This change makes the
kernel source code more robust for new upcoming architectures as well.
A backport of this patch has already been accepted for various stable
linux kernels during the last few weeks.

It would be nice, if you could apply this patch for the next upcoming
release of the autofs package.

Signed-off-by: Helge Deller <deller@xxxxxx>


diff -up ./daemon/automount.c.org ./daemon/automount.c
--- ./daemon/automount.c.org	2013-03-06 18:09:10.000000000 +0100
+++ ./daemon/automount.c	2013-03-06 18:09:31.000000000 +0100
@@ -610,6 +610,7 @@ static size_t get_kpkt_len(void)
 		if (strcmp(un.machine, "alpha") == 0 ||
 		    strcmp(un.machine, "ia64") == 0 ||
 		    strcmp(un.machine, "x86_64") == 0 ||
+		    strcmp(un.machine, "parisc64") == 0 ||
 		    strcmp(un.machine, "ppc64") == 0)
 			pkt_len += 4;
 
diff -up ./include/linux/auto_fs.h.org ./include/linux/auto_fs.h
--- ./include/linux/auto_fs.h.org	2013-03-06 18:18:02.000000000 +0100
+++ ./include/linux/auto_fs.h	2013-03-06 18:18:35.000000000 +0100
@@ -32,25 +32,16 @@
 #define AUTOFS_MIN_PROTO_VERSION	AUTOFS_PROTO_VERSION
 
 /*
- * Architectures where both 32- and 64-bit binaries can be executed
- * on 64-bit kernels need this.  This keeps the structure format
- * uniform, and makes sure the wait_queue_token isn't too big to be
- * passed back down to the kernel.
- *
- * This assumes that on these architectures:
- * mode     32 bit    64 bit
- * -------------------------
- * int      32 bit    32 bit
- * long     32 bit    64 bit
- *
- * If so, 32-bit user-space code should be backwards compatible.
+ * The wait_queue_token (autofs_wqt_t) is part of a structure which is passed
+ * back to the kernel via ioctl from userspace. On architectures where 32- and
+ * 64-bit userspace binaries can be executed it's important that the size of
+ * autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we
+ * do not break the binary ABI interface by changing the structure size.
  */
-
-#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \
- || defined(__powerpc__) || defined(__s390__)
-typedef unsigned int autofs_wqt_t;
-#else
+#if defined(__ia64__) || defined(__alpha__) /* pure 64bit architectures */
 typedef unsigned long autofs_wqt_t;
+#else
+typedef unsigned int autofs_wqt_t;
 #endif
 
 /* Packet types */
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux