Skip to contentSkip to conversation

Linux 2.6.32.58

DISCUSSION Greg KH 5 participants 17 messages Mar 4, 2012 – Mar 9, 2012

Subsystems (28)
lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 2.6.32.58 kernel.

All users of the 2.6.32 kernel series must upgrade.

************************************************************************
Note:
This is the last 2.6.32 kernel I will be releasing. The 2.6.32 kernel is now in "extended-longterm" maintenance, with no set release schedule from now on. I STRONGLY encourage any users of the 2.6.32 kernel series to move to the 3.0 series at this point in time.
************************************************************************

The updated 2.6.32.y git tree can be found at:

        git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-2.6.32.y
and can be browsed at the normal kernel.org git web browser:
	http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=shortlog;h=refs/heads/linux-2.6.32.y

thanks,

greg k-h

------------

 Makefile                                |    2 
 arch/arm/include/asm/assembler.h        |    5 +
 arch/arm/mm/cache-v7.S                  |    6 +
 arch/s390/include/asm/compat.h          |    7 --
 arch/s390/kernel/process.c              |    1 
 arch/s390/kernel/ptrace.c               |    2 
 arch/s390/kernel/setup.c                |    2 
 arch/s390/mm/mmap.c                     |    2 
 crypto/sha512_generic.c                 |   83 +++++++++++--------------
 drivers/base/firmware_class.c           |   12 +++
 drivers/cdrom/cdrom.c                   |    8 --
 drivers/gpu/drm/i915/intel_lvds.c       |    8 ++
 drivers/gpu/drm/radeon/r100.c           |    4 -
 drivers/gpu/drm/radeon/rs600.c          |    4 -
 drivers/hwmon/f75375s.c                 |    4 -
 drivers/media/video/hdpvr/hdpvr-video.c |    3 
 drivers/s390/block/dasd_eckd.c          |    1 
 drivers/s390/block/dasd_ioctl.c         |    1 
 drivers/s390/char/fs3270.c              |    1 
 drivers/s390/char/vmcp.c                |    1 
 drivers/s390/cio/chsc_sch.c             |    1 
 drivers/s390/scsi/zfcp_cfdc.c           |    1 
 drivers/scsi/3w-9xxx.c                  |   11 ++-
 drivers/usb/host/pci-quirks.c           |   11 +++
 drivers/usb/host/xhci-mem.c             |   32 +++++++--
 drivers/usb/serial/cp210x.c             |    2 
 fs/autofs4/autofs_i.h                   |    1 
 fs/autofs4/dev-ioctl.c                  |    1 
 fs/autofs4/inode.c                      |    2 
 fs/autofs4/waitq.c                      |   22 +++++-
 fs/ecryptfs/file.c                      |    2 
 fs/ecryptfs/inode.c                     |  103 +++++++++++++++++++++-----------
 fs/ecryptfs/main.c                      |   38 ++++++++++-
 include/linux/bitops.h                  |   20 ++++++
 include/linux/compat.h                  |    4 +
 include/linux/kernel.h                  |   15 ++--
 include/linux/kmod.h                    |    9 ++
 include/linux/proportions.h             |    4 +
 kernel/kmod.c                           |   33 +++++++++-
 kernel/relay.c                          |   10 ++-
 net/mac80211/rx.c                       |    2 
 41 files changed, 338 insertions(+), 143 deletions(-)

Adam Radford (1):
SCSI: 3w-9xxx fix bug in sgl loading

Al Viro (1):
Ban ecryptfs over ecryptfs

Alex Deucher (1):
drm/radeon/kms: fix MSI re-arm on rv370+

Alexey Dobriyan (1):
crypto: sha512 - use standard ror64()

Andy Whitcroft (1):
ecryptfs: read on a directory should return EISDIR if not supported

Bruno Thomsen (1):

      USB: Added Kamstrup VID/PIDs to cp210x serial driver.

Dan Carpenter (2):
relay: prevent integer overflow in relay_open()
cdrom: use copy_to_user() without the underscores

Daniel Vetter (1):
drm/i915: no lvds quirk for AOpen MP45

Eliad Peller (1):
mac80211: timeout a single frame in the rx reorder buffer

Greg Kroah-Hartman (1):

      Linux 2.6.32.58

Heiko Carstens (1):
compat: fix compile breakage on s390

Herbert Xu (2):
crypto: sha512 - Use binary and instead of modulus
crypto: sha512 - Avoid stack bloat on i386

Ian Kent (1):
autofs: work around unhappy compat problem on x86-64

Janne Grunau (1):
hdpvr: fix race conditon during start of streaming

John Johansen (1):
Add mount option to check uid of device being mounted = expect uid, CVE-2011-1833

Linus Torvalds (2):
Fix autofs compile without CONFIG_COMPAT
firmware loader: allow builtin firmware load even if usermodehelper is disabled

Nikolaus Schulz (2):

      hwmon: (f75375s) Fix bit shifting in f75375_write16
      hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375

OGAWA Hirofumi (1):
printk_ratelimited(): fix uninitialized spinlock

Rabin Vincent (1):
ARM: 7325/1: fix v7 boot with lockdep enabled

Rafael J. Wysocki (1):
PM: Print a warning if firmware is requested when tasks are frozen

Sarah Sharp (2):
USB: Fix handoff when BIOS disables host PCI device.
xhci: Fix encoding for HS bulk/control NAK rate.

Srivatsa S. Bhat (1):
PM / Sleep: Fix freezer failures due to racy usermodehelper_is_disabled()

Stephen Boyd (1):
ARM: 7321/1: cache-v7: Disable preemption when reading CCSIDR

Tetsuo Handa (1):
PM / Sleep: Fix read_unlock_usermodehelper() call.

Tyler Hicks (4):
eCryptfs: Remove mmap from directory operations
eCryptfs: Use notify_change for truncating lower inodes
eCryptfs: Remove extra d_delete in ecryptfs_rmdir
eCryptfs: Clear i_nlink in rmdir

Wu Fengguang (1):
lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel

Yong Zhang (1):
kernel.h: fix wrong usage of __ratelimit()

author maintainer
#1 lore raw
Makefile +1 -1
index 3377650..ed78982 100644
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 32
-EXTRAVERSION = .57
+EXTRAVERSION = .58
 NAME = Man-Eating Seals of Antiquity
 
 # *DOCUMENTATION*
arch/arm/include/asm/assembler.h +5 -0
index eea4947..9cc3fe5 100644
@@ -133,6 +133,11 @@
 	disable_irq
 	.endm
 
+	.macro	save_and_disable_irqs_notrace, oldcpsr
+	mrs	\oldcpsr, cpsr
+	disable_irq_notrace
+	.endm
+
 /*
  * Restore interrupt state previously stored in a register.  We don't
  * guarantee that this will preserve the flags.
arch/arm/mm/cache-v7.S +6 -0
index e1bd975..632b626 100644
@@ -39,9 +39,15 @@ loop1:
 	and	r1, r1, #7			@ mask of the bits for current cache only
 	cmp	r1, #2				@ see what cache we have at this level
 	blt	skip				@ skip if no cache, or just i-cache
+#ifdef CONFIG_PREEMPT
+	save_and_disable_irqs_notrace r9	@ make cssr&csidr read atomic
+#endif
 	mcr	p15, 2, r10, c0, c0, 0		@ select current cache level in cssr
 	isb					@ isb to sych the new cssr&csidr
 	mrc	p15, 1, r1, c0, c0, 0		@ read the new csidr
+#ifdef CONFIG_PREEMPT
+	restore_irqs_notrace r9
+#endif
 	and	r2, r1, #7			@ extract the length of the cache lines
 	add	r2, r2, #4			@ add 4 (line length offset)
 	ldr	r4, =0x3ff
arch/s390/include/asm/compat.h +0 -7
index 0c940d3..82c882c 100644
@@ -171,13 +171,6 @@ static inline int is_compat_task(void)
 	return test_thread_flag(TIF_31BIT);
 }
 
-#else
-
-static inline int is_compat_task(void)
-{
-	return 0;
-}
-
 #endif
 
 static inline void __user *arch_compat_alloc_user_space(long len)
arch/s390/kernel/process.c +0 -1
index 5417eb5..cea2855 100644
@@ -32,7 +32,6 @@
 #include <linux/kernel_stat.h>
 #include <linux/syscalls.h>
 #include <linux/compat.h>
-#include <asm/compat.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
arch/s390/kernel/ptrace.c +1 -1
index 08f8838..170e7af 100644
@@ -36,8 +36,8 @@
 #include <linux/regset.h>
 #include <linux/tracehook.h>
 #include <linux/seccomp.h>
+#include <linux/compat.h>
 #include <trace/syscall.h>
-#include <asm/compat.h>
 #include <asm/segment.h>
 #include <asm/page.h>
 #include <asm/pgtable.h>
arch/s390/kernel/setup.c +1 -1
index 061479f..0b2573a 100644
@@ -43,6 +43,7 @@
 #include <linux/reboot.h>
 #include <linux/topology.h>
 #include <linux/ftrace.h>
+#include <linux/compat.h>
 
 #include <asm/ipl.h>
 #include <asm/uaccess.h>
@@ -56,7 +57,6 @@
 #include <asm/ptrace.h>
 #include <asm/sections.h>
 #include <asm/ebcdic.h>
-#include <asm/compat.h>
 #include <asm/kvm_virtio.h>
 
 long psw_kernel_bits	= (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY |
arch/s390/mm/mmap.c +1 -1
index f4558cc..0ab74ae 100644
@@ -27,8 +27,8 @@
 #include <linux/personality.h>
 #include <linux/mm.h>
 #include <linux/module.h>
+#include <linux/compat.h>
 #include <asm/pgalloc.h>
-#include <asm/compat.h>
 
 /*
  * Top of mmap area (just below the process stack).
crypto/sha512_generic.c +37 -46

111 lines not on this page · raw message

drivers/base/firmware_class.c +10 -2
index f6872f9..9589b7f 100644
@@ -493,8 +493,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
 	if (!firmware) {
 		dev_err(device, "%s: kmalloc(struct firmware) failed\n",
 			__func__);
-		retval = -ENOMEM;
-		goto out;
+		return -ENOMEM;
 	}
 
 	for (builtin = __start_builtin_fw; builtin != __end_builtin_fw;
@@ -508,6 +507,14 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
 		return 0;
 	}
 
+	read_lock_usermodehelper();
+
+	if (WARN_ON(usermodehelper_is_disabled())) {
+		dev_err(device, "firmware: %s will not be loaded\n", name);
+		retval = -EBUSY;
+		goto out;
+	}
+
 	if (uevent)
 		dev_info(device, "firmware: requesting %s\n", name);
 
@@ -545,6 +552,7 @@ error_kfree_fw:
 	kfree(firmware);
 	*firmware_p = NULL;
 out:
+	read_unlock_usermodehelper();
 	return retval;
 }
 
drivers/cdrom/cdrom.c +1 -7
index 59cccc9..a4592ec 100644
@@ -2057,11 +2057,6 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 	if (!nr)
 		return -ENOMEM;
 
-	if (!access_ok(VERIFY_WRITE, ubuf, nframes * CD_FRAMESIZE_RAW)) {
-		ret = -EFAULT;
-		goto out;
-	}
-
 	cgc.data_direction = CGC_DATA_READ;
 	while (nframes > 0) {
 		if (nr > nframes)
@@ -2070,7 +2065,7 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 		ret = cdrom_read_block(cdi, &cgc, lba, nr, 1, CD_FRAMESIZE_RAW);
 		if (ret)
 			break;
-		if (__copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) {
+		if (copy_to_user(ubuf, cgc.buffer, CD_FRAMESIZE_RAW * nr)) {
 			ret = -EFAULT;
 			break;
 		}
@@ -2078,7 +2073,6 @@ static int cdrom_read_cdda_old(struct cdrom_device_info *cdi, __u8 __user *ubuf,
 		nframes -= nr;
 		lba += nr;
 	}
-out:
 	kfree(cgc.buffer);
 	return ret;
 }
drivers/gpu/drm/i915/intel_lvds.c +8 -0
index 96b39fc..6476022 100644
@@ -892,6 +892,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
 	},
 	{
 		.callback = intel_no_lvds_dmi_callback,
+                .ident = "AOpen i45GMx-I",
+                .matches = {
+                        DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+                        DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"),
+                },
+        },
+	{
+		.callback = intel_no_lvds_dmi_callback,
 		.ident = "Aopen i945GTt-VFA",
 		.matches = {
 			DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"),
drivers/gpu/drm/radeon/r100.c +1 -3
index c9e93ea..a2ae151 100644
@@ -218,9 +218,7 @@ int r100_irq_process(struct radeon_device *rdev)
 			WREG32(RADEON_AIC_CNTL, msi_rearm | RS400_MSI_REARM);
 			break;
 		default:
-			msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN;
-			WREG32(RADEON_MSI_REARM_EN, msi_rearm);
-			WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN);
+			WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN);
 			break;
 		}
 	}
drivers/gpu/drm/radeon/rs600.c +1 -3
index 1700297..52b7799 100644
@@ -270,9 +270,7 @@ int rs600_irq_process(struct radeon_device *rdev)
 			WREG32(RADEON_BUS_CNTL, msi_rearm | RS600_MSI_REARM);
 			break;
 		default:
-			msi_rearm = RREG32(RADEON_MSI_REARM_EN) & ~RV370_MSI_REARM_EN;
-			WREG32(RADEON_MSI_REARM_EN, msi_rearm);
-			WREG32(RADEON_MSI_REARM_EN, msi_rearm | RV370_MSI_REARM_EN);
+			WREG32(RADEON_MSI_REARM_EN, RV370_MSI_REARM_EN);
 			break;
 		}
 	}
drivers/hwmon/f75375s.c +2 -2
index afebc34..9ae1bae 100644
@@ -159,7 +159,7 @@ static inline void f75375_write8(struct i2c_client *client, u8 reg,
 static inline void f75375_write16(struct i2c_client *client, u8 reg,
 		u16 value)
 {
-	int err = i2c_smbus_write_byte_data(client, reg, (value << 8));
+	int err = i2c_smbus_write_byte_data(client, reg, (value >> 8));
 	if (err)
 		return;
 	i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));
@@ -311,7 +311,7 @@ static int set_pwm_enable_direct(struct i2c_client *client, int nr, int val)
 		fanmode  |= (3 << FAN_CTRL_MODE(nr));
 		break;
 	case 2: /* AUTOMATIC*/
-		fanmode  |= (2 << FAN_CTRL_MODE(nr));
+		fanmode  |= (1 << FAN_CTRL_MODE(nr));
 		break;
 	case 3: /* fan speed */
 		break;
drivers/media/video/hdpvr/hdpvr-video.c +2 -1
index 2eb9dc2..09f0ee0 100644
@@ -279,12 +279,13 @@ static int hdpvr_start_streaming(struct hdpvr_device *dev)
 
 		hdpvr_config_call(dev, CTRL_START_STREAMING_VALUE, 0x00);
 
+		dev->status = STATUS_STREAMING;
+
 		INIT_WORK(&dev->worker, hdpvr_transmit_buffers);
 		queue_work(dev->workqueue, &dev->worker);
 
 		v4l2_dbg(MSG_BUFFER, hdpvr_debug, &dev->v4l2_dev,
 			 "streaming started\n");
-		dev->status = STATUS_STREAMING;
 
 		return 0;
 	}
drivers/s390/block/dasd_eckd.c +1 -0
index 4460e00..ee23d4e 100644
@@ -19,6 +19,7 @@
 #include <linux/bio.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/compat.h>
 
 #include <asm/debug.h>
 #include <asm/idals.h>
drivers/s390/block/dasd_ioctl.c +1 -0
index a5354b8..0400e7c 100644
@@ -13,6 +13,7 @@
 #define KMSG_COMPONENT "dasd"
 
 #include <linux/interrupt.h>
+#include <linux/compat.h>
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/blkpg.h>
drivers/s390/char/fs3270.c +1 -0
index 097d384..8d1d18c 100644
@@ -14,6 +14,7 @@
 #include <linux/list.h>
 #include <linux/types.h>
 #include <linux/smp_lock.h>
+#include <linux/compat.h>
 
 #include <asm/ccwdev.h>
 #include <asm/cio.h>
drivers/s390/char/vmcp.c +1 -0
index a6087ce..99cc483 100644
@@ -16,6 +16,7 @@
 
 #include <linux/fs.h>
 #include <linux/init.h>
+#include <linux/compat.h>
 #include <linux/kernel.h>
 #include <linux/miscdevice.h>
 #include <linux/module.h>
drivers/s390/cio/chsc_sch.c +1 -0
index cc5144b..d0b03bc 100644
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/uaccess.h>
 #include <linux/miscdevice.h>
+#include <linux/compat.h>
 
 #include <asm/cio.h>
 #include <asm/chsc.h>
drivers/s390/scsi/zfcp_cfdc.c +1 -0
index ef681df..2e37ac9 100644
@@ -12,6 +12,7 @@
 
 #include <linux/types.h>
 #include <linux/miscdevice.h>
+#include <linux/compat.h>
 #include <asm/ccwdev.h>
 #include "zfcp_def.h"
 #include "zfcp_ext.h"
drivers/scsi/3w-9xxx.c +7 -4
index 3e250ca..1549eea 100644
@@ -76,6 +76,7 @@
                  Fix bug in twa_get_param() on 4GB+.
                  Use pci_resource_len() for ioremap().
    2.26.02.012 - Add power management support.
+   2.26.02.013 - Fix bug in twa_load_sgl().
 */
 
 #include <linux/module.h>
@@ -100,7 +101,7 @@
 #include "3w-9xxx.h"
 
 /* Globals */
-#define TW_DRIVER_VERSION "2.26.02.012"
+#define TW_DRIVER_VERSION "2.26.02.013"
 static TW_Device_Extension *twa_device_extension_list[TW_MAX_SLOT];
 static unsigned int twa_device_extension_count;
 static int twa_major = -1;
@@ -1378,10 +1379,12 @@ static void twa_load_sgl(TW_Device_Extension *tw_dev, TW_Command_Full *full_comm
 		newcommand = &full_command_packet->command.newcommand;
 		newcommand->request_id__lunl =
 			cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->request_id__lunl), request_id));
-		newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
-		newcommand->sg_list[0].length = cpu_to_le32(length);
+		if (length) {
+			newcommand->sg_list[0].address = TW_CPU_TO_SGL(dma_handle + sizeof(TW_Ioctl_Buf_Apache) - 1);
+			newcommand->sg_list[0].length = cpu_to_le32(length);
+		}
 		newcommand->sgl_entries__lunh =
-			cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), 1));
+			cpu_to_le16(TW_REQ_LUN_IN(TW_LUN_OUT(newcommand->sgl_entries__lunh), length ? 1 : 0));
 	} else {
 		oldcommand = &full_command_packet->command.oldcommand;
 		oldcommand->request_id = request_id;
drivers/usb/host/pci-quirks.c +11 -0
index 8213f79..0ff157a 100644
@@ -503,7 +503,17 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
 	 */
 	if (pdev->vendor == 0x184e)	/* vendor Netlogic */
 		return;
+	if (pdev->class != PCI_CLASS_SERIAL_USB_UHCI &&
+			pdev->class != PCI_CLASS_SERIAL_USB_OHCI &&
+			pdev->class != PCI_CLASS_SERIAL_USB_EHCI &&
+			pdev->class != PCI_CLASS_SERIAL_USB_XHCI)
+		return;
 
+	if (pci_enable_device(pdev) < 0) {
+		dev_warn(&pdev->dev, "Can't enable PCI device, "
+				"BIOS handoff failed.\n");
+		return;
+	}
 	if (pdev->class == PCI_CLASS_SERIAL_USB_UHCI)
 		quirk_usb_handoff_uhci(pdev);
 	else if (pdev->class == PCI_CLASS_SERIAL_USB_OHCI)
@@ -512,5 +522,6 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
 		quirk_usb_disable_ehci(pdev);
 	else if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI)
 		quirk_usb_handoff_xhci(pdev);
+	pci_disable_device(pdev);
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
drivers/usb/host/xhci-mem.c +24 -8
index a2f2f79..8c29073 100644
@@ -472,26 +472,42 @@ static unsigned int xhci_parse_exponent_interval(struct usb_device *udev,
 }
 
 /*
- * Convert bInterval expressed in frames (in 1-255 range) to exponent of
+ * Convert bInterval expressed in microframes (in 1-255 range) to exponent of
  * microframes, rounded down to nearest power of 2.
  */
-static unsigned int xhci_parse_frame_interval(struct usb_device *udev,
-		struct usb_host_endpoint *ep)
+static unsigned int xhci_microframes_to_exponent(struct usb_device *udev,
+		struct usb_host_endpoint *ep, unsigned int desc_interval,
+		unsigned int min_exponent, unsigned int max_exponent)
 {
 	unsigned int interval;
 
-	interval = fls(8 * ep->desc.bInterval) - 1;
-	interval = clamp_val(interval, 3, 10);
-	if ((1 << interval) != 8 * ep->desc.bInterval)
+	interval = fls(desc_interval) - 1;
+	interval = clamp_val(interval, min_exponent, max_exponent);
+	if ((1 << interval) != desc_interval)
 		dev_warn(&udev->dev,
 			 "ep %#x - rounding interval to %d microframes, ep desc says %d microframes\n",
 			 ep->desc.bEndpointAddress,
 			 1 << interval,
-			 8 * ep->desc.bInterval);
+			 desc_interval);
 
 	return interval;
 }
 
+static unsigned int xhci_parse_microframe_interval(struct usb_device *udev,
+		struct usb_host_endpoint *ep)
+{
+	return xhci_microframes_to_exponent(udev, ep,
+			ep->desc.bInterval, 0, 15);
+}
+
+
+static unsigned int xhci_parse_frame_interval(struct usb_device *udev,
+		struct usb_host_endpoint *ep)
+{
+	return xhci_microframes_to_exponent(udev, ep,
+			ep->desc.bInterval * 8, 3, 10);
+}
+
 /* Return the polling or NAK interval.
  *
  * The polling interval is expressed in "microframes".  If xHCI's Interval field
@@ -510,7 +526,7 @@ static inline unsigned int xhci_get_endpoint_interval(struct usb_device *udev,
 		/* Max NAK rate */
 		if (usb_endpoint_xfer_control(&ep->desc) ||
 		    usb_endpoint_xfer_bulk(&ep->desc)) {
-			interval = ep->desc.bInterval;
+			interval = xhci_parse_microframe_interval(udev, ep);
 			break;
 		}
 		/* Fall through - SS and HS isoc/int have same decoding */
drivers/usb/serial/cp210x.c +2 -0
index bb16725..feb96e9 100644
@@ -136,6 +136,8 @@ static struct usb_device_id id_table [] = {
 	{ USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
 	{ USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */
 	{ USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
+	{ USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
+	{ USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
 	{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
 	{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
 	{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
fs/autofs4/autofs_i.h +1 -0
index 8f7cdde..5d8d9a0 100644
@@ -125,6 +125,7 @@ struct autofs_sb_info {
 	int sub_version;
 	int min_proto;
 	int max_proto;
+	int compat_daemon;
 	unsigned long exp_timeout;
 	unsigned int type;
 	int reghost_enabled;
fs/autofs4/dev-ioctl.c +1 -0
index 00bf8fc..5bb5a2a 100644
@@ -389,6 +389,7 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
 		sbi->pipefd = pipefd;
 		sbi->pipe = pipe;
 		sbi->catatonic = 0;
+		sbi->compat_daemon = is_compat_task();
 	}
 out:
 	mutex_unlock(&sbi->wq_mutex);
fs/autofs4/inode.c +2 -0
index 69c8142..0ca145a 100644
@@ -19,6 +19,7 @@
 #include <linux/parser.h>
 #include <linux/bitops.h>
 #include <linux/magic.h>
+#include <linux/compat.h>
 #include "autofs_i.h"
 #include <linux/module.h>
 
@@ -341,6 +342,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
 	set_autofs_type_indirect(&sbi->type);
 	sbi->min_proto = 0;
 	sbi->max_proto = 0;
+	sbi->compat_daemon = is_compat_task();
 	mutex_init(&sbi->wq_mutex);
 	spin_lock_init(&sbi->fs_lock);
 	sbi->queues = NULL;
fs/autofs4/waitq.c +19 -3
index 2341375..136a0d6 100644
@@ -90,7 +90,24 @@ static int autofs4_write(struct file *file, const void *addr, int bytes)
 
 	return (bytes > 0);
 }
-	
+
+/*
+ * The autofs_v5 packet was misdesigned.
+ *
+ * The packets are identical on x86-32 and x86-64, but have different
+ * alignment. Which means that 'sizeof()' will give different results.
+ * Fix it up for the case of running 32-bit user mode on a 64-bit kernel.
+ */
+static noinline size_t autofs_v5_packet_size(struct autofs_sb_info *sbi)
+{
+	size_t pktsz = sizeof(struct autofs_v5_packet);
+#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)
+	if (sbi->compat_daemon > 0)
+		pktsz -= 4;
+#endif
+	return pktsz;
+}
+
 static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 				 struct autofs_wait_queue *wq,
 				 int type)
@@ -147,8 +164,7 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
 	{
 		struct autofs_v5_packet *packet = &pkt.v5_pkt.v5_packet;
 
-		pktsz = sizeof(*packet);
-
+		pktsz = autofs_v5_packet_size(sbi);
 		packet->wait_queue_token = wq->wait_queue_token;
 		packet->len = wq->name.len;
 		memcpy(packet->name, wq->name.name, wq->name.len);
fs/ecryptfs/file.c +1 -1
index 4e25328..3015389 100644
@@ -323,11 +323,11 @@ ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 const struct file_operations ecryptfs_dir_fops = {
 	.readdir = ecryptfs_readdir,
+	.read = generic_read_dir,
 	.unlocked_ioctl = ecryptfs_unlocked_ioctl,
 #ifdef CONFIG_COMPAT
 	.compat_ioctl = ecryptfs_compat_ioctl,
 #endif
-	.mmap = generic_file_mmap,
 	.open = ecryptfs_open,
 	.flush = ecryptfs_flush,
 	.release = ecryptfs_release,
fs/ecryptfs/inode.c +69 -34

193 lines not on this page · raw message

fs/ecryptfs/main.c +33 -5
index c6ac85d..e2f18ad 100644
@@ -212,7 +212,8 @@ enum { ecryptfs_opt_sig, ecryptfs_opt_ecryptfs_sig,
        ecryptfs_opt_passthrough, ecryptfs_opt_xattr_metadata,
        ecryptfs_opt_encrypted_view, ecryptfs_opt_fnek_sig,
        ecryptfs_opt_fn_cipher, ecryptfs_opt_fn_cipher_key_bytes,
-       ecryptfs_opt_unlink_sigs, ecryptfs_opt_err };
+       ecryptfs_opt_unlink_sigs, ecryptfs_opt_check_dev_ruid,
+       ecryptfs_opt_err };
 
 static const match_table_t tokens = {
 	{ecryptfs_opt_sig, "sig=%s"},
@@ -227,6 +228,7 @@ static const match_table_t tokens = {
 	{ecryptfs_opt_fn_cipher, "ecryptfs_fn_cipher=%s"},
 	{ecryptfs_opt_fn_cipher_key_bytes, "ecryptfs_fn_key_bytes=%u"},
 	{ecryptfs_opt_unlink_sigs, "ecryptfs_unlink_sigs"},
+	{ecryptfs_opt_check_dev_ruid, "ecryptfs_check_dev_ruid"},
 	{ecryptfs_opt_err, NULL}
 };
 
@@ -270,6 +272,7 @@ static void ecryptfs_init_mount_crypt_stat(
  * ecryptfs_parse_options
  * @sb: The ecryptfs super block
  * @options: The options pased to the kernel
+ * @check_ruid: set to 1 if device uid should be checked against the ruid
  *
  * Parse mount options:
  * debug=N 	   - ecryptfs_verbosity level for debug output
@@ -285,7 +288,8 @@ static void ecryptfs_init_mount_crypt_stat(
  *
  * Returns zero on success; non-zero on error
  */
-static int ecryptfs_parse_options(struct super_block *sb, char *options)
+static int ecryptfs_parse_options(struct super_block *sb, char *options,
+					uid_t *check_ruid)
 {
 	char *p;
 	int rc = 0;
@@ -310,6 +314,8 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
 	char *cipher_key_bytes_src;
 	char *fn_cipher_key_bytes_src;
 
+	*check_ruid = 0;
+
 	if (!options) {
 		rc = -EINVAL;
 		goto out;
@@ -410,6 +416,9 @@ static int ecryptfs_parse_options(struct super_block *sb, char *options)
 		case ecryptfs_opt_unlink_sigs:
 			mount_crypt_stat->flags |= ECRYPTFS_UNLINK_SIGS;
 			break;
+		case ecryptfs_opt_check_dev_ruid:
+			*check_ruid = 1;
+			break;
 		case ecryptfs_opt_err:
 		default:
 			printk(KERN_WARNING
@@ -487,6 +496,7 @@ out:
 }
 
 struct kmem_cache *ecryptfs_sb_info_cache;
+static struct file_system_type ecryptfs_fs_type;
 
 /**
  * ecryptfs_fill_super
@@ -551,7 +561,8 @@ out:
  * ecryptfs_interpose to create our initial inode and super block
  * struct.
  */
-static int ecryptfs_read_super(struct super_block *sb, const char *dev_name)
+static int ecryptfs_read_super(struct super_block *sb, const char *dev_name,
+				uid_t check_ruid)
 {
 	struct path path;
 	int rc;
@@ -561,6 +572,22 @@ static int ecryptfs_read_super(struct super_block *sb, const char *dev_name)
 		ecryptfs_printk(KERN_WARNING, "path_lookup() failed\n");
 		goto out;
 	}
+	if (path.dentry->d_sb->s_type == &ecryptfs_fs_type) {
+		rc = -EINVAL;
+		printk(KERN_ERR "Mount on filesystem of type "
+			"eCryptfs explicitly disallowed due to "
+			"known incompatibilities\n");
+		goto out_free;
+	}
+
+	if (check_ruid && path.dentry->d_inode->i_uid != current_uid()) {
+		rc = -EPERM;
+		printk(KERN_ERR "Mount of device (uid: %d) not owned by "
+		       "requested user (uid: %d)\n",
+		       path.dentry->d_inode->i_uid, current_uid());
+		goto out_free;
+	}
+
 	ecryptfs_set_superblock_lower(sb, path.dentry->d_sb);
 	sb->s_maxbytes = path.dentry->d_sb->s_maxbytes;
 	sb->s_blocksize = path.dentry->d_sb->s_blocksize;
@@ -599,6 +626,7 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
 {
 	int rc;
 	struct super_block *sb;
+	uid_t check_ruid;
 
 	rc = get_sb_nodev(fs_type, flags, raw_data, ecryptfs_fill_super, mnt);
 	if (rc < 0) {
@@ -606,12 +634,12 @@ static int ecryptfs_get_sb(struct file_system_type *fs_type, int flags,
 		goto out;
 	}
 	sb = mnt->mnt_sb;
-	rc = ecryptfs_parse_options(sb, raw_data);
+	rc = ecryptfs_parse_options(sb, raw_data, &check_ruid);
 	if (rc) {
 		printk(KERN_ERR "Error parsing options; rc = [%d]\n", rc);
 		goto out_abort;
 	}
-	rc = ecryptfs_read_super(sb, dev_name);
+	rc = ecryptfs_read_super(sb, dev_name, check_ruid);
 	if (rc) {
 		printk(KERN_ERR "Reading sb failed; rc = [%d]\n", rc);
 		goto out_abort;
include/linux/bitops.h +20 -0
index c05a29c..56835a7 100644
@@ -46,6 +46,26 @@ static inline unsigned long hweight_long(unsigned long w)
 }
 
 /**
+ * rol64 - rotate a 64-bit value left
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline __u64 rol64(__u64 word, unsigned int shift)
+{
+	return (word << shift) | (word >> (64 - shift));
+}
+
+/**
+ * ror64 - rotate a 64-bit value right
+ * @word: value to rotate
+ * @shift: bits to roll
+ */
+static inline __u64 ror64(__u64 word, unsigned int shift)
+{
+	return (word >> shift) | (word << (64 - shift));
+}
+
+/**
  * rol32 - rotate a 32-bit value left
  * @word: value to rotate
  * @shift: bits to roll
include/linux/compat.h +4 -0
index cab23f2..510266f 100644
@@ -311,5 +311,9 @@ asmlinkage long compat_sys_openat(unsigned int dfd, const char __user *filename,
 
 extern void __user *compat_alloc_user_space(unsigned long len);
 
+#else
+
+#define is_compat_task() (0)
+
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
include/linux/kernel.h +7 -8
index 1221fe4..9acb92d 100644
@@ -411,14 +411,13 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
  * no local ratelimit_state used in the !PRINTK case
  */
 #ifdef CONFIG_PRINTK
-#define printk_ratelimited(fmt, ...)  ({		\
-	static struct ratelimit_state _rs = {		\
-		.interval = DEFAULT_RATELIMIT_INTERVAL, \
-		.burst = DEFAULT_RATELIMIT_BURST,       \
-	};                                              \
-							\
-	if (!__ratelimit(&_rs))                         \
-		printk(fmt, ##__VA_ARGS__);		\
+#define printk_ratelimited(fmt, ...)  ({				\
+	static DEFINE_RATELIMIT_STATE(_rs,				\
+				      DEFAULT_RATELIMIT_INTERVAL,	\
+				      DEFAULT_RATELIMIT_BURST);		\
+									\
+	if (__ratelimit(&_rs))						\
+		printk(fmt, ##__VA_ARGS__);				\
 })
 #else
 /* No effect, but we still get type checking even in the !PRINTK case: */
include/linux/kmod.h +9 -0
index 384ca8b..0546fe7 100644
@@ -104,7 +104,16 @@ struct file;
 extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
 				    struct file **filp);
 
+#ifdef CONFIG_PM_SLEEP
 extern int usermodehelper_disable(void);
 extern void usermodehelper_enable(void);
+extern bool usermodehelper_is_disabled(void);
+extern void read_lock_usermodehelper(void);
+extern void read_unlock_usermodehelper(void);
+#else
+static inline bool usermodehelper_is_disabled(void) { return false; }
+static inline void read_lock_usermodehelper(void) {}
+static inline void read_unlock_usermodehelper(void) {}
+#endif
 
 #endif /* __LINUX_KMOD_H__ */
include/linux/proportions.h +4 -0
index cf793bb..22653d7 100644
@@ -81,7 +81,11 @@ void prop_inc_percpu(struct prop_descriptor *pd, struct prop_local_percpu *pl)
  * Limit the time part in order to ensure there are some bits left for the
  * cycle counter and fraction multiply.
  */
+#if BITS_PER_LONG == 32
 #define PROP_MAX_SHIFT (3*BITS_PER_LONG/4)
+#else
+#define PROP_MAX_SHIFT (BITS_PER_LONG/2)
+#endif
 
 #define PROP_FRAC_SHIFT		(BITS_PER_LONG - PROP_MAX_SHIFT - 1)
 #define PROP_FRAC_BASE		(1UL << PROP_FRAC_SHIFT)
kernel/kmod.c +32 -1
index d206078..a061472 100644
@@ -35,6 +35,7 @@
 #include <linux/resource.h>
 #include <linux/notifier.h>
 #include <linux/suspend.h>
+#include <linux/rwsem.h>
 #include <asm/uaccess.h>
 
 #include <trace/events/module.h>
@@ -43,6 +44,8 @@ extern int max_threads;
 
 static struct workqueue_struct *khelper_wq;
 
+static DECLARE_RWSEM(umhelper_sem);
+
 #ifdef CONFIG_MODULES
 
 /*
@@ -286,6 +289,7 @@ static void __call_usermodehelper(struct work_struct *work)
  * If set, call_usermodehelper_exec() will exit immediately returning -EBUSY
  * (used for preventing user land processes from being created after the user
  * land has been frozen during a system-wide hibernation or suspend operation).
+ * Should always be manipulated under umhelper_sem acquired for write.
  */
 static int usermodehelper_disabled;
 
@@ -304,6 +308,18 @@ static DECLARE_WAIT_QUEUE_HEAD(running_helpers_waitq);
  */
 #define RUNNING_HELPERS_TIMEOUT	(5 * HZ)
 
+void read_lock_usermodehelper(void)
+{
+	down_read(&umhelper_sem);
+}
+EXPORT_SYMBOL_GPL(read_lock_usermodehelper);
+
+void read_unlock_usermodehelper(void)
+{
+	up_read(&umhelper_sem);
+}
+EXPORT_SYMBOL_GPL(read_unlock_usermodehelper);
+
 /**
  * usermodehelper_disable - prevent new helpers from being started
  */
@@ -311,8 +327,10 @@ int usermodehelper_disable(void)
 {
 	long retval;
 
+	down_write(&umhelper_sem);
 	usermodehelper_disabled = 1;
-	smp_mb();
+	up_write(&umhelper_sem);
+
 	/*
 	 * From now on call_usermodehelper_exec() won't start any new
 	 * helpers, so it is sufficient if running_helpers turns out to
@@ -325,7 +343,9 @@ int usermodehelper_disable(void)
 	if (retval)
 		return 0;
 
+	down_write(&umhelper_sem);
 	usermodehelper_disabled = 0;
+	up_write(&umhelper_sem);
 	return -EAGAIN;
 }
 
@@ -334,8 +354,19 @@ int usermodehelper_disable(void)
  */
 void usermodehelper_enable(void)
 {
+	down_write(&umhelper_sem);
 	usermodehelper_disabled = 0;
+	up_write(&umhelper_sem);
+}
+
+/**
+ * usermodehelper_is_disabled - check if new helpers are allowed to be started
+ */
+bool usermodehelper_is_disabled(void)
+{
+	return usermodehelper_disabled;
 }
+EXPORT_SYMBOL_GPL(usermodehelper_is_disabled);
 
 static void helper_lock(void)
 {
kernel/relay.c +8 -2
index 760c262..bf343f5 100644
@@ -171,10 +171,14 @@ depopulate:
  */
 static struct rchan_buf *relay_create_buf(struct rchan *chan)
 {
-	struct rchan_buf *buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
-	if (!buf)
+	struct rchan_buf *buf;
+
+	if (chan->n_subbufs > UINT_MAX / sizeof(size_t *))
 		return NULL;
 
+	buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
+	if (!buf)
+		return NULL;
 	buf->padding = kmalloc(chan->n_subbufs * sizeof(size_t *), GFP_KERNEL);
 	if (!buf->padding)
 		goto free_buf;
@@ -581,6 +585,8 @@ struct rchan *relay_open(const char *base_filename,
 
 	if (!(subbuf_size && n_subbufs))
 		return NULL;
+	if (subbuf_size > UINT_MAX / n_subbufs)
+		return NULL;
 
 	chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
 	if (!chan)
net/mac80211/rx.c +1 -1
index 38499c4..759f96f 100644
@@ -2363,7 +2363,7 @@ static u8 ieee80211_sta_manage_reorder_buf(struct ieee80211_hw *hw,
 	index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn)
 						% tid_agg_rx->buf_size;
 	if (!tid_agg_rx->reorder_buf[index] &&
-	    tid_agg_rx->stored_mpdu_num > 1) {
+	    tid_agg_rx->stored_mpdu_num) {
 		/*
 		 * No buffers ready to be released, but check whether any
 		 * frames in the reorder buffer have timed out.
#2 lore raw
In reply to Greg KH
Quoted 4 lines · Greg KH

I'm announcing the release of the 2.6.32.58 kernel.

All users of the 2.6.32 kernel series must upgrade.

Quoted 8 lines

************************************************************************
Note:
This is the last 2.6.32 kernel I will be releasing. The 2.6.32 kernel is now in "extended-longterm" maintenance, with no set release schedule from now on. I STRONGLY encourage any users of the 2.6.32 kernel series to move to the 3.0 series at this point in time.
************************************************************************

In order to second this statement, I'm (re-)announcing that I'm going to take over 2.6.32 maintenance at a much slower pace, similar to the 2.6.27 branch (which also continues). In short, this means that while critical fixes might cause a quick release, non-critical ones will wait longer before being backported.

If you need quick fixes, you need 3.0. If you can't reboot your servers often enough to be concerned by delayed fixes, you might support sticking to 2.6.32 for a while.

Willy

#3 lore raw

Build broken on s390 and ia64 [was: Linux 2.6.32.58]

In reply to Greg KH
Quoted 1 line · Greg KH

I'm announcing the release of the 2.6.32.58 kernel.

...

Quoted 1 line

Heiko Carstens (1): compat: fix compile breakage on s390

It's not that minimal it suggests. It removed asm/compat.h inclusion from arch/s390/kernel/setup.c. This causes build failures on !CONFIG_COMPAT:
arch/s390/kernel/setup.c: In function 'setup_addressing_mode':
arch/s390/kernel/setup.c:382: error: 'PSW32_ASC_SECONDARY' undeclared (first use in this function)
arch/s390/kernel/setup.c:382: error: (Each undeclared identifier is reported only once
arch/s390/kernel/setup.c:382: error: for each function it appears in.) arch/s390/kernel/setup.c:389: error: 'PSW32_ASC_PRIMARY' undeclared (first use in this function)

Perhaps asm/compat.h should be included from linux/compat.h unconditionally...

Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

thanks,

Signature · 2 lines
js
suse labs
#4 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 5 lines · Jiri Slaby
Quoted 1 line · Greg KH

I'm announcing the release of the 2.6.32.58 kernel.

...

Quoted 1 line

Heiko Carstens (1): compat: fix compile breakage on s390

Quoted 11 lines

It's not that minimal it suggests. It removed asm/compat.h inclusion from arch/s390/kernel/setup.c. This causes build failures on !CONFIG_COMPAT:
arch/s390/kernel/setup.c: In function 'setup_addressing_mode':
arch/s390/kernel/setup.c:382: error: 'PSW32_ASC_SECONDARY' undeclared (first use in this function)
arch/s390/kernel/setup.c:382: error: (Each undeclared identifier is reported only once
arch/s390/kernel/setup.c:382: error: for each function it appears in.) arch/s390/kernel/setup.c:389: error: 'PSW32_ASC_PRIMARY' undeclared (first use in this function)

Ah, right. For kernels < 3.0 it is indeed necessary to include asm/compat.h in arch/s390/kernel/setup.c.

The need for that got eliminated with 043d07084b5347a26eab0a07aa13a4a929ad9e71 "[S390] Remove data execution protection".

Quoted 2 lines

Perhaps asm/compat.h should be included from linux/compat.h unconditionally...

If you do that you need to add #ifdef wrappers around the is_compat_task() definitions in each arch that supports CONFIG_COMPAT. If that's all that's needed that would be great!

Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

The ia64 compat code got entirely removed, since it was broken:

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

#5 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 7 lines · Heiko Carstens
Quoted 2 lines · Jiri Slaby

Perhaps asm/compat.h should be included from linux/compat.h unconditionally...

If you do that you need to add #ifdef wrappers around the is_compat_task() definitions in each arch that supports CONFIG_COMPAT. If that's all that's needed that would be great!

I don't know, I haven't checked. It was just a shot in the dark. Maybe it's easier to revert the removal of asm/compat.h from s390 files. Could you bake a patch?

Quoted 11 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

The ia64 compat code got entirely removed, since it was broken:

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

thanks,

Signature · 2 lines
js
suse labs
#6 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 21 lines · Jiri Slaby
Quoted 7 lines · Heiko Carstens
Quoted 2 lines · Jiri Slaby

Perhaps asm/compat.h should be included from linux/compat.h unconditionally...

If you do that you need to add #ifdef wrappers around the is_compat_task() definitions in each arch that supports CONFIG_COMPAT. If that's all that's needed that would be great!

I don't know, I haven't checked. It was just a shot in the dark. Maybe it's easier to revert the removal of asm/compat.h from s390 files. Could you bake a patch?

Quoted 8 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

Quoted 6 lines
Quoted 3 lines

The ia64 compat code got entirely removed, since it was broken:

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

I'm open to releasing .59 to fix these two issues once patches are ready or identified. Does anybody know if other archs were broken ?

Thanks,
Willy

#7 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 1 line · Willy Tarreau

Does anybody know if other archs were broken ?

PPC looks fine so far (not all builds here have finished already). I don't know about others.

thanks,

Signature · 2 lines
js
suse labs
#8 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

In reply to Jiri Slaby
Quoted 5 lines · Jiri Slaby
Quoted 4 lines · Heiko Carstens
Quoted 2 lines · Jiri Slaby

Perhaps asm/compat.h should be included from linux/compat.h unconditionally...

Quoted 7 lines
Quoted 3 lines

If you do that you need to add #ifdef wrappers around the is_compat_task() definitions in each arch that supports CONFIG_COMPAT. If that's all that's needed that would be great!

I don't know, I haven't checked. It was just a shot in the dark. Maybe it's easier to revert the removal of asm/compat.h from s390 files. Could you bake a patch?

Sure:

Quoted 1 line

From f88668aaee256a331ea03c852c672d3ef7704208 Mon Sep 17 00:00:00 2001

From: Heiko Carstens <[email protected]>
Date: Mon, 5 Mar 2012 14:06:38 +0100
Subject: [PATCH] compat: Re-add missing asm/compat.h include to fix compile
breakage on s390

For kernels < 3.0 the backport of 048cd4e51d24ebf7f3552226d03c769d6ad91658 "compat: fix compile breakage on s390" will break compilation...

Re-add a single #include <asm/compat.h> in order to fix this.

This patch is _not_ necessary for upstream, only for stable kernels which include the "build fix" mentioned above.

---
 arch/s390/kernel/setup.c |    1 +
 1 file changed, 1 insertion(+)
arch/s390/kernel/setup.c +1 -0
index 0b2573a..358e545 100644
@@ -57,6 +57,7 @@
 #include <asm/ptrace.h>
 #include <asm/sections.h>
 #include <asm/ebcdic.h>
+#include <asm/compat.h>
 #include <asm/kvm_virtio.h>
 
 long psw_kernel_bits	= (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY |
Signature · 1 line
1.7.9.2
#9 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 7 lines · Heiko Carstens
Quoted 3 lines

I don't know, I haven't checked. It was just a shot in the dark. Maybe it's easier to revert the removal of asm/compat.h from s390 files. Could you bake a patch?

Sure:

From f88668aaee256a331ea03c852c672d3ef7704208 Mon Sep 17 00:00:00 2001

(...)

Patch queued, thanks Heiko !

Willy

#10 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

In reply to Jiri Slaby

Hi,

Quoted 8 lines · Jiri Slaby
Quoted 8 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

Quoted 6 lines
Quoted 3 lines

The ia64 compat code got entirely removed, since it was broken:

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

So in the end, does anybody have an idea what is missing from this patch ? I'm not sure that reverting the autofs fix is a right solution either :-/

Thanks,
Willy

#11 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 13 lines · Willy Tarreau

Hi,

Quoted 10 lines · Jiri Slaby
Quoted 10 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

The ia64 compat code got entirely removed, since it was broken:

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

So in the end, does anybody have an idea what is missing from this patch ? I'm not sure that reverting the autofs fix is a right solution either :-/

Nobody relevant? Hmm... I use the attached patch. If there are no objections, I will add a header there and send to Willy.

thanks,

Signature · 2 lines
js
suse labs
---
 arch/ia64/include/asm/compat.h |    5 +++++
 1 file changed, 5 insertions(+)
arch/ia64/include/asm/compat.h +5 -0
@@ -204,4 +204,9 @@ arch_compat_alloc_user_space (long len)
 	return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len);
 }
 
+/* for !COMPAT this is defined in linux/compat.h */
+#ifdef CONFIG_COMPAT
+#define is_compat_task() (0)
+#endif
+
 #endif /* _ASM_IA64_COMPAT_H */
#12 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 5 lines · Jiri Slaby
Quoted 2 lines

So in the end, does anybody have an idea what is missing from this patch ? I'm not sure that reverting the autofs fix is a right solution either :-/

Nobody relevant? Hmm... I use the attached patch. If there are no objections, I will add a header there and send to Willy.

Thanks Jiri !
I will probably publish a new review this week-end.

Willy

#13 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

In reply to Willy Tarreau
Quoted 13 lines · Willy Tarreau

Hi,

Quoted 10 lines · Jiri Slaby
Quoted 10 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

The ia64 compat code got entirely removed, since it was broken:

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

So in the end, does anybody have an idea what is missing from this patch ? I'm not sure that reverting the autofs fix is a right solution either :-/

Either cherry-pick commit 32974ad4907cdde6c9de612cd1b2ee0568fb9409 or use this reduced version.

Ben.

---
From: Ben Hutchings <[email protected]>
Date: Fri, 9 Mar 2012 04:21:03 +0000
Subject: [PATCH] [IA64] Remove COMPAT_IA32 support

commit 32974ad4907cdde6c9de612cd1b2ee0568fb9409 upstream

This just changes Kconfig rather than touching all the other files the original commit did.

---
 arch/ia64/Kconfig |   17 -----------------
 1 files changed, 0 insertions(+), 17 deletions(-)
arch/ia64/Kconfig +0 -17
index 1ee596c..20fc9c5 100644
@@ -502,23 +502,6 @@ config ARCH_PROC_KCORE_TEXT
 	def_bool y
 	depends on PROC_KCORE
 
-config IA32_SUPPORT
-	bool "Support for Linux/x86 binaries"
-	help
-	  IA-64 processors can execute IA-32 (X86) instructions.  By
-	  saying Y here, the kernel will include IA-32 system call
-	  emulation support which makes it possible to transparently
-	  run IA-32 Linux binaries on an IA-64 Linux system.
-	  If in doubt, say Y.
-
-config COMPAT
-	bool
-	depends on IA32_SUPPORT
-	default y
-
-config COMPAT_FOR_U64_ALIGNMENT
-	def_bool COMPAT
-
 config IA64_MCA_RECOVERY
 	tristate "MCA recovery from errors other than TLB."
 
Signature · 7 lines
1.7.9.1



-- 
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
#14 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Hi Ben,

Quoted 16 lines · Ben Hutchings
Quoted 15 lines · Willy Tarreau

Hi,

Quoted 12 lines · Jiri Slaby
Quoted 11 lines
Quoted 7 lines
Quoted 1 line

Linus Torvalds (2): Fix autofs compile without CONFIG_COMPAT

But who defines is_compat_task *with* CONFIG_COMPAT on ia64?

fs/autofs4/inode.c: In function 'autofs4_fill_super':
fs/autofs4/inode.c:345: error: implicit declaration of function 'is_compat_task'

The ia64 compat code got entirely removed, since it was broken:

32974ad4907cdde6c9de612cd1b2ee0568fb9409 "[IA64] Remove COMPAT_IA32 support"

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

Yes, but that is even in 2.6.34. So the fix for autofs is incomplete in .32 as it breaks build on configs which used to work.

So in the end, does anybody have an idea what is missing from this patch ? I'm not sure that reverting the autofs fix is a right solution either :-/

Either cherry-pick commit 32974ad4907cdde6c9de612cd1b2ee0568fb9409 or use this reduced version.

Thanks but now I have a doubt, maybe Jiri and Tony can help. In the commit above, Tony says that CONFIG_COMPAT has been broken for a long time (2008) and nobody apparently uses it. Still, Jiri got a build failure because he used CONFIG_COMPAT. So either there are some valid uses and we should not remove the feature that late in a stable branch, or Jiri only encountered it upon a make allyesconfig then it might be safe to remove it.

You see, I wouldn't want to have to issue .60 with a revert of this patch because someone complains about CONFIG_COMPAT disappearing on IA64.

I'm fine with either patch (#define is_compat_task 0 or remove COMPAT) but I want to ensure we're not breaking working setups which are currently stuck to .57 due to the recent breakage.

Regards,
Willy

#15 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 7 lines · Willy Tarreau

Thanks but now I have a doubt, maybe Jiri and Tony can help. In the commit above, Tony says that CONFIG_COMPAT has been broken for a long time (2008) and nobody apparently uses it. Still, Jiri got a build failure because he used CONFIG_COMPAT. So either there are some valid uses and we should not remove the feature that late in a stable branch, or Jiri only encountered it upon a make allyesconfig then it might be safe to remove it.

It's a SLE11-SP1 that is using the kernel and has COMPAT on ia64 enabled. I don't know if it is broken or if we provide support for that.

If you are sure COMPAT is broken on ia64 even in 2.6.32, feel free to ban COMPAT completely.

thanks,

Signature · 2 lines
js
suse labs
#16 lore raw

Re: Build broken on s390 and ia64 [was: Linux 2.6.32.58]

Quoted 11 lines · Jiri Slaby
Quoted 7 lines · Willy Tarreau

Thanks but now I have a doubt, maybe Jiri and Tony can help. In the commit above, Tony says that CONFIG_COMPAT has been broken for a long time (2008) and nobody apparently uses it. Still, Jiri got a build failure because he used CONFIG_COMPAT. So either there are some valid uses and we should not remove the feature that late in a stable branch, or Jiri only encountered it upon a make allyesconfig then it might be safe to remove it.

It's a SLE11-SP1 that is using the kernel and has COMPAT on ia64 enabled. I don't know if it is broken or if we provide support for that.

Thanks for the quick feedback Jiri.

Quoted 2 lines

If you are sure COMPAT is broken on ia64 even in 2.6.32, feel free to ban COMPAT completely.

Just checked on the net, it looks like Tony's comment is right as SLE11 apparently provides ia32el.

So that's OK, I'll apply Ben's patch.

Thanks guys,
Willy