From: Greg Kroah-Hartman Date: Tue, 17 Jan 2012 20:02:32 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.1.10~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=628cc73d853eb7b1d9ad0ae7195d568038e1119e;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: ah-correctly-pass-error-codes-in-ahash-output-callback.patch ah-read-nexthdr-value-before-overwriting-it-in-ahash-input-callback.patch block-add-and-use-scsi_blk_cmd_ioctl.patch block-fail-scsi-passthrough-ioctls-on-partition-devices.patch dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch fix-cputime-overflow-in-uptime_proc_show.patch hid-hid-multitouch-add-another-egalax-id.patch hid-multitouch-add-egalax-id-for-acer-iconia-w500.patch hid-multitouch-add-support-for-3m-32.patch hid-multitouch-add-support-for-the-msi-windpad-110w.patch hid-multitouch-cleanup-with-egalax-pid-definitions.patch --- diff --git a/queue-3.0/ah-correctly-pass-error-codes-in-ahash-output-callback.patch b/queue-3.0/ah-correctly-pass-error-codes-in-ahash-output-callback.patch new file mode 100644 index 00000000000..4c7cbf1656a --- /dev/null +++ b/queue-3.0/ah-correctly-pass-error-codes-in-ahash-output-callback.patch @@ -0,0 +1,49 @@ +From 069294e813ed5f27f82613b027609bcda5f1b914 Mon Sep 17 00:00:00 2001 +From: Nick Bowler +Date: Tue, 8 Nov 2011 12:12:44 +0000 +Subject: ah: Correctly pass error codes in ahash output callback. + +From: Nick Bowler + +commit 069294e813ed5f27f82613b027609bcda5f1b914 upstream. + +The AH4/6 ahash output callbacks pass nexthdr to xfrm_output_resume +instead of the error code. This appears to be a copy+paste error from +the input case, where nexthdr is expected. This causes the driver to +continuously add AH headers to the datagram until either an allocation +fails and the packet is dropped or the ahash driver hits a synchronous +fallback and the resulting monstrosity is transmitted. + +Correct this issue by simply passing the error code unadulterated. + +Signed-off-by: Nick Bowler +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/ah4.c | 2 -- + net/ipv6/ah6.c | 2 -- + 2 files changed, 4 deletions(-) + +--- a/net/ipv4/ah4.c ++++ b/net/ipv4/ah4.c +@@ -136,8 +136,6 @@ static void ah_output_done(struct crypto + memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); + } + +- err = ah->nexthdr; +- + kfree(AH_SKB_CB(skb)->tmp); + xfrm_output_resume(skb, err); + } +--- a/net/ipv6/ah6.c ++++ b/net/ipv6/ah6.c +@@ -324,8 +324,6 @@ static void ah6_output_done(struct crypt + #endif + } + +- err = ah->nexthdr; +- + kfree(AH_SKB_CB(skb)->tmp); + xfrm_output_resume(skb, err); + } diff --git a/queue-3.0/ah-read-nexthdr-value-before-overwriting-it-in-ahash-input-callback.patch b/queue-3.0/ah-read-nexthdr-value-before-overwriting-it-in-ahash-input-callback.patch new file mode 100644 index 00000000000..079fdc26148 --- /dev/null +++ b/queue-3.0/ah-read-nexthdr-value-before-overwriting-it-in-ahash-input-callback.patch @@ -0,0 +1,56 @@ +From b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 Mon Sep 17 00:00:00 2001 +From: Nick Bowler +Date: Tue, 8 Nov 2011 12:12:45 +0000 +Subject: ah: Read nexthdr value before overwriting it in ahash input callback. + +From: Nick Bowler + +commit b7ea81a58adc123a4e980cb0eff9eb5c144b5dc7 upstream. + +The AH4/6 ahash input callbacks read out the nexthdr field from the AH +header *after* they overwrite that header. This is obviously not going +to end well. Fix it up. + +Signed-off-by: Nick Bowler +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + net/ipv4/ah4.c | 4 ++-- + net/ipv6/ah6.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +--- a/net/ipv4/ah4.c ++++ b/net/ipv4/ah4.c +@@ -262,12 +262,12 @@ static void ah_input_done(struct crypto_ + if (err) + goto out; + ++ err = ah->nexthdr; ++ + skb->network_header += ah_hlen; + memcpy(skb_network_header(skb), work_iph, ihl); + __skb_pull(skb, ah_hlen + ihl); + skb_set_transport_header(skb, -ihl); +- +- err = ah->nexthdr; + out: + kfree(AH_SKB_CB(skb)->tmp); + xfrm_input_resume(skb, err); +--- a/net/ipv6/ah6.c ++++ b/net/ipv6/ah6.c +@@ -464,12 +464,12 @@ static void ah6_input_done(struct crypto + if (err) + goto out; + ++ err = ah->nexthdr; ++ + skb->network_header += ah_hlen; + memcpy(skb_network_header(skb), work_iph, hdr_len); + __skb_pull(skb, ah_hlen + hdr_len); + skb_set_transport_header(skb, -hdr_len); +- +- err = ah->nexthdr; + out: + kfree(AH_SKB_CB(skb)->tmp); + xfrm_input_resume(skb, err); diff --git a/queue-3.0/block-add-and-use-scsi_blk_cmd_ioctl.patch b/queue-3.0/block-add-and-use-scsi_blk_cmd_ioctl.patch new file mode 100644 index 00000000000..2cd89cc87a3 --- /dev/null +++ b/queue-3.0/block-add-and-use-scsi_blk_cmd_ioctl.patch @@ -0,0 +1,150 @@ +From 577ebb374c78314ac4617242f509e2f5e7156649 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 12 Jan 2012 16:01:27 +0100 +Subject: block: add and use scsi_blk_cmd_ioctl + +From: Paolo Bonzini + +commit 577ebb374c78314ac4617242f509e2f5e7156649 upstream. + +Introduce a wrapper around scsi_cmd_ioctl that takes a block device. + +The function will then be enhanced to detect partition block devices +and, in that case, subject the ioctls to whitelisting. + +Cc: linux-scsi@vger.kernel.org +Cc: Jens Axboe +Cc: James Bottomley +Signed-off-by: Paolo Bonzini +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + block/scsi_ioctl.c | 7 +++++++ + drivers/block/cciss.c | 6 +++--- + drivers/block/ub.c | 3 +-- + drivers/block/virtio_blk.c | 4 ++-- + drivers/cdrom/cdrom.c | 3 +-- + drivers/ide/ide-floppy_ioctl.c | 3 +-- + drivers/scsi/sd.c | 2 +- + include/linux/blkdev.h | 2 ++ + 8 files changed, 18 insertions(+), 12 deletions(-) + +--- a/block/scsi_ioctl.c ++++ b/block/scsi_ioctl.c +@@ -691,6 +691,13 @@ int scsi_cmd_ioctl(struct request_queue + } + EXPORT_SYMBOL(scsi_cmd_ioctl); + ++int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode, ++ unsigned int cmd, void __user *arg) ++{ ++ return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg); ++} ++EXPORT_SYMBOL(scsi_cmd_blk_ioctl); ++ + static int __init blk_scsi_ioctl_init(void) + { + blk_set_cmd_filter_defaults(&blk_default_cmd_filter); +--- a/drivers/block/cciss.c ++++ b/drivers/block/cciss.c +@@ -1716,7 +1716,7 @@ static int cciss_ioctl(struct block_devi + case CCISS_BIG_PASSTHRU: + return cciss_bigpassthru(h, argp); + +- /* scsi_cmd_ioctl handles these, below, though some are not */ ++ /* scsi_cmd_blk_ioctl handles these, below, though some are not */ + /* very meaningful for cciss. SG_IO is the main one people want. */ + + case SG_GET_VERSION_NUM: +@@ -1727,9 +1727,9 @@ static int cciss_ioctl(struct block_devi + case SG_EMULATED_HOST: + case SG_IO: + case SCSI_IOCTL_SEND_COMMAND: +- return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); ++ return scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); + +- /* scsi_cmd_ioctl would normally handle these, below, but */ ++ /* scsi_cmd_blk_ioctl would normally handle these, below, but */ + /* they aren't a good fit for cciss, as CD-ROMs are */ + /* not supported, and we don't have any bus/target/lun */ + /* which we present to the kernel. */ +--- a/drivers/block/ub.c ++++ b/drivers/block/ub.c +@@ -1744,12 +1744,11 @@ static int ub_bd_release(struct gendisk + static int ub_bd_ioctl(struct block_device *bdev, fmode_t mode, + unsigned int cmd, unsigned long arg) + { +- struct gendisk *disk = bdev->bd_disk; + void __user *usermem = (void __user *) arg; + int ret; + + mutex_lock(&ub_mutex); +- ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, usermem); ++ ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, usermem); + mutex_unlock(&ub_mutex); + + return ret; +--- a/drivers/block/virtio_blk.c ++++ b/drivers/block/virtio_blk.c +@@ -236,8 +236,8 @@ static int virtblk_ioctl(struct block_de + if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI)) + return -ENOTTY; + +- return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, +- (void __user *)data); ++ return scsi_cmd_blk_ioctl(bdev, mode, cmd, ++ (void __user *)data); + } + + /* We provide getgeo only to please some old bootloader/partitioning tools */ +--- a/drivers/cdrom/cdrom.c ++++ b/drivers/cdrom/cdrom.c +@@ -2741,12 +2741,11 @@ int cdrom_ioctl(struct cdrom_device_info + { + void __user *argp = (void __user *)arg; + int ret; +- struct gendisk *disk = bdev->bd_disk; + + /* + * Try the generic SCSI command ioctl's first. + */ +- ret = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp); ++ ret = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); + if (ret != -ENOTTY) + return ret; + +--- a/drivers/ide/ide-floppy_ioctl.c ++++ b/drivers/ide/ide-floppy_ioctl.c +@@ -292,8 +292,7 @@ int ide_floppy_ioctl(ide_drive_t *drive, + * and CDROM_SEND_PACKET (legacy) ioctls + */ + if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND) +- err = scsi_cmd_ioctl(bdev->bd_disk->queue, bdev->bd_disk, +- mode, cmd, argp); ++ err = scsi_cmd_blk_ioctl(bdev, mode, cmd, argp); + + if (err == -ENOTTY) + err = generic_ide_ioctl(drive, bdev, cmd, arg); +--- a/drivers/scsi/sd.c ++++ b/drivers/scsi/sd.c +@@ -1095,7 +1095,7 @@ static int sd_ioctl(struct block_device + error = scsi_ioctl(sdp, cmd, p); + break; + default: +- error = scsi_cmd_ioctl(disk->queue, disk, mode, cmd, p); ++ error = scsi_cmd_blk_ioctl(bdev, mode, cmd, p); + if (error != -ENOTTY) + break; + error = scsi_ioctl(sdp, cmd, p); +--- a/include/linux/blkdev.h ++++ b/include/linux/blkdev.h +@@ -670,6 +670,8 @@ extern int blk_insert_cloned_request(str + struct request *rq); + extern void blk_delay_queue(struct request_queue *, unsigned long); + extern void blk_recount_segments(struct request_queue *, struct bio *); ++extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t, ++ unsigned int, void __user *); + extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, + unsigned int, void __user *); + extern int sg_scsi_ioctl(struct request_queue *, struct gendisk *, fmode_t, diff --git a/queue-3.0/block-fail-scsi-passthrough-ioctls-on-partition-devices.patch b/queue-3.0/block-fail-scsi-passthrough-ioctls-on-partition-devices.patch new file mode 100644 index 00000000000..09c46bb64b3 --- /dev/null +++ b/queue-3.0/block-fail-scsi-passthrough-ioctls-on-partition-devices.patch @@ -0,0 +1,156 @@ +From 0bfc96cb77224736dfa35c3c555d37b3646ef35e Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 12 Jan 2012 16:01:28 +0100 +Subject: block: fail SCSI passthrough ioctls on partition devices + +From: Paolo Bonzini + +commit 0bfc96cb77224736dfa35c3c555d37b3646ef35e upstream. + +Linux allows executing the SG_IO ioctl on a partition or LVM volume, and +will pass the command to the underlying block device. This is +well-known, but it is also a large security problem when (via Unix +permissions, ACLs, SELinux or a combination thereof) a program or user +needs to be granted access only to part of the disk. + +This patch lets partitions forward a small set of harmless ioctls; +others are logged with printk so that we can see which ioctls are +actually sent. In my tests only CDROM_GET_CAPABILITY actually occurred. +Of course it was being sent to a (partition on a) hard disk, so it would +have failed with ENOTTY and the patch isn't changing anything in +practice. Still, I'm treating it specially to avoid spamming the logs. + +In principle, this restriction should include programs running with +CAP_SYS_RAWIO. If for example I let a program access /dev/sda2 and +/dev/sdb, it still should not be able to read/write outside the +boundaries of /dev/sda2 independent of the capabilities. However, for +now programs with CAP_SYS_RAWIO will still be allowed to send the +ioctls. Their actions will still be logged. + +This patch does not affect the non-libata IDE driver. That driver +however already tests for bd != bd->bd_contains before issuing some +ioctl; it could be restricted further to forbid these ioctls even for +programs running with CAP_SYS_ADMIN/CAP_SYS_RAWIO. + +Cc: linux-scsi@vger.kernel.org +Cc: Jens Axboe +Cc: James Bottomley +Signed-off-by: Paolo Bonzini +[ Make it also print the command name when warning - Linus ] +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + block/scsi_ioctl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ + drivers/scsi/sd.c | 11 +++++++++-- + include/linux/blkdev.h | 1 + + 3 files changed, 55 insertions(+), 2 deletions(-) + +--- a/block/scsi_ioctl.c ++++ b/block/scsi_ioctl.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -691,9 +692,53 @@ int scsi_cmd_ioctl(struct request_queue + } + EXPORT_SYMBOL(scsi_cmd_ioctl); + ++int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd) ++{ ++ if (bd && bd == bd->bd_contains) ++ return 0; ++ ++ /* Actually none of these is particularly useful on a partition, ++ * but they are safe. ++ */ ++ switch (cmd) { ++ case SCSI_IOCTL_GET_IDLUN: ++ case SCSI_IOCTL_GET_BUS_NUMBER: ++ case SCSI_IOCTL_GET_PCI: ++ case SCSI_IOCTL_PROBE_HOST: ++ case SG_GET_VERSION_NUM: ++ case SG_SET_TIMEOUT: ++ case SG_GET_TIMEOUT: ++ case SG_GET_RESERVED_SIZE: ++ case SG_SET_RESERVED_SIZE: ++ case SG_EMULATED_HOST: ++ return 0; ++ case CDROM_GET_CAPABILITY: ++ /* Keep this until we remove the printk below. udev sends it ++ * and we do not want to spam dmesg about it. CD-ROMs do ++ * not have partitions, so we get here only for disks. ++ */ ++ return -ENOIOCTLCMD; ++ default: ++ break; ++ } ++ ++ /* In particular, rule out all resets and host-specific ioctls. */ ++ printk_ratelimited(KERN_WARNING ++ "%s: sending ioctl %x to a partition!\n", current->comm, cmd); ++ ++ return capable(CAP_SYS_RAWIO) ? 0 : -ENOIOCTLCMD; ++} ++EXPORT_SYMBOL(scsi_verify_blk_ioctl); ++ + int scsi_cmd_blk_ioctl(struct block_device *bd, fmode_t mode, + unsigned int cmd, void __user *arg) + { ++ int ret; ++ ++ ret = scsi_verify_blk_ioctl(bd, cmd); ++ if (ret < 0) ++ return ret; ++ + return scsi_cmd_ioctl(bd->bd_disk->queue, bd->bd_disk, mode, cmd, arg); + } + EXPORT_SYMBOL(scsi_cmd_blk_ioctl); +--- a/drivers/scsi/sd.c ++++ b/drivers/scsi/sd.c +@@ -1073,6 +1073,10 @@ static int sd_ioctl(struct block_device + SCSI_LOG_IOCTL(1, printk("sd_ioctl: disk=%s, cmd=0x%x\n", + disk->disk_name, cmd)); + ++ error = scsi_verify_blk_ioctl(bdev, cmd); ++ if (error < 0) ++ return error; ++ + /* + * If we are in the middle of error recovery, don't let anyone + * else try and use this device. Also, if error recovery fails, it +@@ -1265,6 +1269,11 @@ static int sd_compat_ioctl(struct block_ + unsigned int cmd, unsigned long arg) + { + struct scsi_device *sdev = scsi_disk(bdev->bd_disk)->device; ++ int ret; ++ ++ ret = scsi_verify_blk_ioctl(bdev, cmd); ++ if (ret < 0) ++ return ret; + + /* + * If we are in the middle of error recovery, don't let anyone +@@ -1276,8 +1285,6 @@ static int sd_compat_ioctl(struct block_ + return -ENODEV; + + if (sdev->host->hostt->compat_ioctl) { +- int ret; +- + ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg); + + return ret; +--- a/include/linux/blkdev.h ++++ b/include/linux/blkdev.h +@@ -670,6 +670,7 @@ extern int blk_insert_cloned_request(str + struct request *rq); + extern void blk_delay_queue(struct request_queue *, unsigned long); + extern void blk_recount_segments(struct request_queue *, struct bio *); ++extern int scsi_verify_blk_ioctl(struct block_device *, unsigned int); + extern int scsi_cmd_blk_ioctl(struct block_device *, fmode_t, + unsigned int, void __user *); + extern int scsi_cmd_ioctl(struct request_queue *, struct gendisk *, fmode_t, diff --git a/queue-3.0/dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch b/queue-3.0/dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch new file mode 100644 index 00000000000..5e7d0f2ae58 --- /dev/null +++ b/queue-3.0/dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch @@ -0,0 +1,84 @@ +From ec8013beddd717d1740cfefb1a9b900deef85462 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Thu, 12 Jan 2012 16:01:29 +0100 +Subject: dm: do not forward ioctls from logical volumes to the + underlying device + +From: Paolo Bonzini + +commit ec8013beddd717d1740cfefb1a9b900deef85462 upstream. + +A logical volume can map to just part of underlying physical volume. +In this case, it must be treated like a partition. + +Based on a patch from Alasdair G Kergon. + +Cc: Alasdair G Kergon +Cc: dm-devel@redhat.com +Signed-off-by: Paolo Bonzini +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm-flakey.c | 11 ++++++++++- + drivers/md/dm-linear.c | 12 +++++++++++- + drivers/md/dm-mpath.c | 6 ++++++ + 3 files changed, 27 insertions(+), 2 deletions(-) + +--- a/drivers/md/dm-flakey.c ++++ b/drivers/md/dm-flakey.c +@@ -149,8 +149,17 @@ static int flakey_status(struct dm_targe + static int flakey_ioctl(struct dm_target *ti, unsigned int cmd, unsigned long arg) + { + struct flakey_c *fc = ti->private; ++ struct dm_dev *dev = fc->dev; ++ int r = 0; + +- return __blkdev_driver_ioctl(fc->dev->bdev, fc->dev->mode, cmd, arg); ++ /* ++ * Only pass ioctls through if the device sizes match exactly. ++ */ ++ if (fc->start || ++ ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT) ++ r = scsi_verify_blk_ioctl(NULL, cmd); ++ ++ return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg); + } + + static int flakey_merge(struct dm_target *ti, struct bvec_merge_data *bvm, +--- a/drivers/md/dm-linear.c ++++ b/drivers/md/dm-linear.c +@@ -116,7 +116,17 @@ static int linear_ioctl(struct dm_target + unsigned long arg) + { + struct linear_c *lc = (struct linear_c *) ti->private; +- return __blkdev_driver_ioctl(lc->dev->bdev, lc->dev->mode, cmd, arg); ++ struct dm_dev *dev = lc->dev; ++ int r = 0; ++ ++ /* ++ * Only pass ioctls through if the device sizes match exactly. ++ */ ++ if (lc->start || ++ ti->len != i_size_read(dev->bdev->bd_inode) >> SECTOR_SHIFT) ++ r = scsi_verify_blk_ioctl(NULL, cmd); ++ ++ return r ? : __blkdev_driver_ioctl(dev->bdev, dev->mode, cmd, arg); + } + + static int linear_merge(struct dm_target *ti, struct bvec_merge_data *bvm, +--- a/drivers/md/dm-mpath.c ++++ b/drivers/md/dm-mpath.c +@@ -1584,6 +1584,12 @@ static int multipath_ioctl(struct dm_tar + + spin_unlock_irqrestore(&m->lock, flags); + ++ /* ++ * Only pass ioctls through if the device sizes match exactly. ++ */ ++ if (!r && ti->len != i_size_read(bdev->bd_inode) >> SECTOR_SHIFT) ++ r = scsi_verify_blk_ioctl(NULL, cmd); ++ + return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg); + } + diff --git a/queue-3.0/fix-cputime-overflow-in-uptime_proc_show.patch b/queue-3.0/fix-cputime-overflow-in-uptime_proc_show.patch new file mode 100644 index 00000000000..463a83226be --- /dev/null +++ b/queue-3.0/fix-cputime-overflow-in-uptime_proc_show.patch @@ -0,0 +1,47 @@ +From c3e0ef9a298e028a82ada28101ccd5cf64d209ee Mon Sep 17 00:00:00 2001 +From: Martin Schwidefsky +Date: Thu, 15 Dec 2011 14:56:10 +0100 +Subject: [S390] fix cputime overflow in uptime_proc_show + +From: Martin Schwidefsky + +commit c3e0ef9a298e028a82ada28101ccd5cf64d209ee upstream. + +For 32-bit architectures using standard jiffies the idletime calculation +in uptime_proc_show will quickly overflow. It takes (2^32 / HZ) seconds +of idle-time, or e.g. 12.45 days with no load on a quad-core with HZ=1000. +Switch to 64-bit calculations. + +Cc: Michael Abbott +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + fs/proc/uptime.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- a/fs/proc/uptime.c ++++ b/fs/proc/uptime.c +@@ -11,15 +11,20 @@ static int uptime_proc_show(struct seq_f + { + struct timespec uptime; + struct timespec idle; ++ cputime64_t idletime; ++ u64 nsec; ++ u32 rem; + int i; +- cputime_t idletime = cputime_zero; + ++ idletime = 0; + for_each_possible_cpu(i) + idletime = cputime64_add(idletime, kstat_cpu(i).cpustat.idle); + + do_posix_clock_monotonic_gettime(&uptime); + monotonic_to_bootbased(&uptime); +- cputime_to_timespec(idletime, &idle); ++ nsec = cputime64_to_jiffies64(idletime) * TICK_NSEC; ++ idle.tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); ++ idle.tv_nsec = rem; + seq_printf(m, "%lu.%02lu %lu.%02lu\n", + (unsigned long) uptime.tv_sec, + (uptime.tv_nsec / (NSEC_PER_SEC / 100)), diff --git a/queue-3.0/hid-hid-multitouch-add-another-egalax-id.patch b/queue-3.0/hid-hid-multitouch-add-another-egalax-id.patch new file mode 100644 index 00000000000..021349a2374 --- /dev/null +++ b/queue-3.0/hid-hid-multitouch-add-another-egalax-id.patch @@ -0,0 +1,54 @@ +From 1fd8f047490dd0ec4e4db710fcbc1bd4798d944c Mon Sep 17 00:00:00 2001 +From: Chris Bagwell +Date: Wed, 23 Nov 2011 10:54:27 +0100 +Subject: HID: hid-multitouch - add another eGalax id + +From: Chris Bagwell + +commit 1fd8f047490dd0ec4e4db710fcbc1bd4798d944c upstream. + +This allows ASUS Eee Slate touchscreens to work. + +Signed-off-by: Chris Bagwell +Reviewed-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 1 + + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-multitouch.c | 3 +++ + 3 files changed, 5 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1387,6 +1387,7 @@ static const struct hid_device_id hid_ha + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -235,6 +235,7 @@ + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001 + + #define USB_VENDOR_ID_ELECOM 0x056e + #define USB_DEVICE_ID_ELECOM_BM084 0x0061 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -646,6 +646,9 @@ static const struct hid_device_id mt_dev + { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, ++ { .driver_data = MT_CLS_EGALAX, ++ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, + + /* Elo TouchSystems IntelliTouch Plus panel */ + { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, diff --git a/queue-3.0/hid-multitouch-add-egalax-id-for-acer-iconia-w500.patch b/queue-3.0/hid-multitouch-add-egalax-id-for-acer-iconia-w500.patch new file mode 100644 index 00000000000..9985408a09d --- /dev/null +++ b/queue-3.0/hid-multitouch-add-egalax-id-for-acer-iconia-w500.patch @@ -0,0 +1,56 @@ +From bb9ff21072043634f147c05ac65dbf8185d4af6d Mon Sep 17 00:00:00 2001 +From: Marek Vasut +Date: Wed, 23 Nov 2011 10:54:32 +0100 +Subject: HID: multitouch: Add egalax ID for Acer Iconia W500 + +From: Marek Vasut + +commit bb9ff21072043634f147c05ac65dbf8185d4af6d upstream. + +This patch adds USB ID for the touchpanel in Acer Iconia W500. The panel +supports up to five fingers, therefore the need for a new addition of panel +types. + +Signed-off-by: Marek Vasut +Signed-off-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 1 + + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-multitouch.c | 3 +++ + 3 files changed, 5 insertions(+) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1387,6 +1387,7 @@ static const struct hid_device_id hid_ha + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -235,6 +235,7 @@ + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 + + #define USB_VENDOR_ID_ELECOM 0x056e +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -648,6 +648,9 @@ static const struct hid_device_id mt_dev + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, + { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, ++ { .driver_data = MT_CLS_EGALAX, ++ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + + /* Elo TouchSystems IntelliTouch Plus panel */ diff --git a/queue-3.0/hid-multitouch-add-support-for-3m-32.patch b/queue-3.0/hid-multitouch-add-support-for-3m-32.patch new file mode 100644 index 00000000000..93b80525483 --- /dev/null +++ b/queue-3.0/hid-multitouch-add-support-for-3m-32.patch @@ -0,0 +1,41 @@ +From c4fad877cd0efb51d8180ae2eaa791c99c92051c Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Fri, 23 Dec 2011 15:41:00 +0100 +Subject: HID: multitouch: add support for 3M 32" + +From: Benjamin Tissoires + +commit c4fad877cd0efb51d8180ae2eaa791c99c92051c upstream. + +Signed-off-by: Benjamin Tissoires +Acked-by: Henrik Rydberg +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-multitouch.c | 3 +++ + 2 files changed, 4 insertions(+) + +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -21,6 +21,7 @@ + #define USB_VENDOR_ID_3M 0x0596 + #define USB_DEVICE_ID_3M1968 0x0500 + #define USB_DEVICE_ID_3M2256 0x0502 ++#define USB_DEVICE_ID_3M3266 0x0506 + + #define USB_VENDOR_ID_A4TECH 0x09da + #define USB_DEVICE_ID_A4TECH_WCP32PU 0x0006 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -593,6 +593,9 @@ static const struct hid_device_id mt_dev + { .driver_data = MT_CLS_3M, + HID_USB_DEVICE(USB_VENDOR_ID_3M, + USB_DEVICE_ID_3M2256) }, ++ { .driver_data = MT_CLS_3M, ++ HID_USB_DEVICE(USB_VENDOR_ID_3M, ++ USB_DEVICE_ID_3M3266) }, + + /* ActionStar panels */ + { .driver_data = MT_CLS_DEFAULT, diff --git a/queue-3.0/hid-multitouch-add-support-for-the-msi-windpad-110w.patch b/queue-3.0/hid-multitouch-add-support-for-the-msi-windpad-110w.patch new file mode 100644 index 00000000000..f0bf81c0eb5 --- /dev/null +++ b/queue-3.0/hid-multitouch-add-support-for-the-msi-windpad-110w.patch @@ -0,0 +1,44 @@ +From 66f06127f34ad6e8a1b24a2c03144b694d19f99f Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Wed, 23 Nov 2011 10:54:33 +0100 +Subject: HID: multitouch: add support for the MSI Windpad 110W + +From: Benjamin Tissoires + +commit 66f06127f34ad6e8a1b24a2c03144b694d19f99f upstream. + +Just another eGalax device. +Please note that adding this device to have_special_driver +in hid-core.c is not required anymore. + +Signed-off-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-multitouch.c | 3 +++ + 2 files changed, 4 insertions(+) + +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -235,6 +235,7 @@ + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA 0x72fa + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302 0x7302 + #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 + +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -648,6 +648,9 @@ static const struct hid_device_id mt_dev + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, + { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA) }, ++ { .driver_data = MT_CLS_EGALAX, ++ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302) }, + { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, diff --git a/queue-3.0/hid-multitouch-cleanup-with-egalax-pid-definitions.patch b/queue-3.0/hid-multitouch-cleanup-with-egalax-pid-definitions.patch new file mode 100644 index 00000000000..c655696f36d --- /dev/null +++ b/queue-3.0/hid-multitouch-cleanup-with-egalax-pid-definitions.patch @@ -0,0 +1,106 @@ +From e36f690b37945e0a9bb1554e1546eeec93f7d1f6 Mon Sep 17 00:00:00 2001 +From: Benjamin Tissoires +Date: Wed, 23 Nov 2011 10:54:31 +0100 +Subject: HID: multitouch: cleanup with eGalax PID definitions + +From: Benjamin Tissoires + +commit e36f690b37945e0a9bb1554e1546eeec93f7d1f6 upstream. + +This is just a renaming of USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH{N} +to USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_{PID} to handle more eGalax +devices. + +Signed-off-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/hid-core.c | 12 ++++++------ + drivers/hid/hid-ids.h | 12 ++++++------ + drivers/hid/hid-multitouch.c | 24 ++++++++++++------------ + 3 files changed, 24 insertions(+), 24 deletions(-) + +--- a/drivers/hid/hid-core.c ++++ b/drivers/hid/hid-core.c +@@ -1382,12 +1382,12 @@ static const struct hid_device_id hid_ha + { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) }, + { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, +- { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) }, + { HID_USB_DEVICE(USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2515) }, + { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) }, +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -230,12 +230,12 @@ + + #define USB_VENDOR_ID_DWAV 0x0eef + #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001 +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH 0x480d +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1 0x720c +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2 0x72a1 +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3 0x480e +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4 0x726b +-#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5 0xa001 ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C 0x720c ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B 0x726b ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1 0x72a1 ++#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 + + #define USB_VENDOR_ID_ELECOM 0x056e + #define USB_DEVICE_ID_ELECOM_BM084 0x0061 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -629,26 +629,26 @@ static const struct hid_device_id mt_dev + USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, + + /* eGalax devices (resistive) */ +- { .driver_data = MT_CLS_EGALAX, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) }, +- { .driver_data = MT_CLS_EGALAX, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D) }, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH3) }, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E) }, + + /* eGalax devices (capacitive) */ +- { .driver_data = MT_CLS_EGALAX, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) }, +- { .driver_data = MT_CLS_EGALAX, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_720C) }, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH2) }, +- { .driver_data = MT_CLS_EGALAX, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B) }, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH4) }, +- { .driver_data = MT_CLS_EGALAX, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1) }, ++ { .driver_data = MT_CLS_EGALAX, + HID_USB_DEVICE(USB_VENDOR_ID_DWAV, +- USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH5) }, ++ USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + + /* Elo TouchSystems IntelliTouch Plus panel */ + { .driver_data = MT_CLS_DUAL_NSMU_CONTACTID, diff --git a/queue-3.0/series b/queue-3.0/series index 8f09a1bc3c0..e59883acf6d 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -50,3 +50,14 @@ x86-uv-update-boot-messages-for-sgi-uv2-platform.patch recordmcount-fix-handling-of-elf64-big-endian-objects.patch uvcvideo-fix-integer-overflow-in-uvc_ioctl_ctrl_map.patch fix-shrink_dcache_parent-livelock.patch +ah-correctly-pass-error-codes-in-ahash-output-callback.patch +ah-read-nexthdr-value-before-overwriting-it-in-ahash-input-callback.patch +hid-hid-multitouch-add-another-egalax-id.patch +hid-multitouch-cleanup-with-egalax-pid-definitions.patch +hid-multitouch-add-egalax-id-for-acer-iconia-w500.patch +hid-multitouch-add-support-for-the-msi-windpad-110w.patch +hid-multitouch-add-support-for-3m-32.patch +fix-cputime-overflow-in-uptime_proc_show.patch +block-add-and-use-scsi_blk_cmd_ioctl.patch +block-fail-scsi-passthrough-ioctls-on-partition-devices.patch +dm-do-not-forward-ioctls-from-logical-volumes-to-the.patch