From: Greg Kroah-Hartman Date: Fri, 1 Mar 2013 17:11:13 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.8.2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2fc77a8a8876fb41399bf2d77614341dc2b7417f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: unbreak-automounter-support-on-64-bit-kernel-with-32-bit-userspace-v2.patch --- diff --git a/queue-3.4/series b/queue-3.4/series index 03c262ed3b4..15fc5f3f6ed 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -29,3 +29,4 @@ nfsd-fix-memleak.patch svcrpc-make-svc_age_temp_xprts-enqueue-under-sv_lock.patch vhost-fix-length-for-cross-region-descriptor.patch fuse-don-t-warn-when-nlink-is-zero.patch +unbreak-automounter-support-on-64-bit-kernel-with-32-bit-userspace-v2.patch diff --git a/queue-3.4/unbreak-automounter-support-on-64-bit-kernel-with-32-bit-userspace-v2.patch b/queue-3.4/unbreak-automounter-support-on-64-bit-kernel-with-32-bit-userspace-v2.patch new file mode 100644 index 00000000000..260ec4b781a --- /dev/null +++ b/queue-3.4/unbreak-automounter-support-on-64-bit-kernel-with-32-bit-userspace-v2.patch @@ -0,0 +1,73 @@ +From 4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf Mon Sep 17 00:00:00 2001 +From: Helge Deller +Date: Mon, 4 Feb 2013 19:39:52 +0000 +Subject: unbreak automounter support on 64-bit kernel with 32-bit userspace (v2) + +From: Helge Deller + +commit 4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf upstream. + +automount-support is broken on the parisc architecture, because the existing +#if list does not include a check for defined(__hppa__). The HPPA (parisc) +architecture is similiar to other 64bit Linux targets where we have to define +autofs_wqt_t (which is passed back and forth to user space) as int type which +has a size of 32bit across 32 and 64bit kernels. + +During the discussion on the mailing list, H. Peter Anvin suggested to invert +the #if list since only specific platforms (specifically those who do not have +a 32bit userspace, like IA64 and Alpha) should have autofs_wqt_t as unsigned +long type. + +This suggestion is probably the best way to go, since Arm64 (and maybe others?) +seems to have a non-working automounter. So in the long run even for other new +upcoming architectures this inverted check seem to be the best solution, since +it will not require them to change this #if again (unless they are 64bit only). + +Signed-off-by: Helge Deller +Acked-by: H. Peter Anvin +Acked-by: Ian Kent +Acked-by: Catalin Marinas +CC: James Bottomley +CC: Rolf Eike Beer +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/auto_fs.h | 25 ++++++++----------------- + 1 file changed, 8 insertions(+), 17 deletions(-) + +--- a/include/linux/auto_fs.h ++++ b/include/linux/auto_fs.h +@@ -31,25 +31,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 */