<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers, branch v2.6.27.60</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers?h=v2.6.27.60</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers?h=v2.6.27.60'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-11T14:40:56Z</updated>
<entry>
<title>dm: do not forward ioctls from logical volumes to the underlying device</title>
<updated>2012-02-11T14:40:56Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-01-17T04:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8eca6dc41431c18b75ccdc2f04df589ddca4e0dc'/>
<id>urn:sha1:8eca6dc41431c18b75ccdc2f04df589ddca4e0dc</id>
<content type='text'>
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 &lt;agk@redhat.com&gt;
Cc: dm-devel@redhat.com
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[bwh: Backport to 2.6.32 - drop change to drivers/md/dm-flakey.c]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>block: fail SCSI passthrough ioctls on partition devices</title>
<updated>2012-02-11T14:40:55Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-01-17T04:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d6fe88a64e3bbaf5df110044af3046a41c3f37b'/>
<id>urn:sha1:4d6fe88a64e3bbaf5df110044af3046a41c3f37b</id>
<content type='text'>
commit 0bfc96cb77224736dfa35c3c555d37b3646ef35e upstream.

[ Changes with respect to 3.3: return -ENOTTY from scsi_verify_blk_ioctl
  and -ENOIOCTLCMD from sd_compat_ioctl. ]

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-&gt;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 &lt;axboe@kernel.dk&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
[ Make it also print the command name when warning - Linus ]
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
[bwh: Backport to 2.6.32 - ENOIOCTLCMD does not get converted to
 ENOTTY, so we must return ENOTTY directly]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>block: add and use scsi_blk_cmd_ioctl</title>
<updated>2012-02-11T14:40:54Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-01-12T15:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d064959836f6ab504b80a6ad858ed14aa0bb7a0'/>
<id>urn:sha1:7d064959836f6ab504b80a6ad858ed14aa0bb7a0</id>
<content type='text'>
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 &lt;axboe@kernel.dk&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
[bwh: Backport to 2.6.32 - adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
[wt: slightly changed the interface to match 2.6.27's scsi_cmd_ioctl()
     which still needs the file pointer but has no mode parameter].

Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>i8k: Avoid lahf in 64-bit code</title>
<updated>2012-02-11T14:40:53Z</updated>
<author>
<name>Luca Tettamanti</name>
<email>kronos.it@gmail.com</email>
</author>
<published>2011-05-25T18:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d172827c67001f409b59264cf2dd87e090681d7d'/>
<id>urn:sha1:d172827c67001f409b59264cf2dd87e090681d7d</id>
<content type='text'>
commit bc1f419c76a2d6450413ce4349f4e4a07be011d5 upstream.

i8k uses lahf to read the flag register in 64-bit code; early x86-64
CPUs, however, lack this instruction and we get an invalid opcode
exception at runtime.
Use pushf to load the flag register into the stack instead.

Signed-off-by: Luca Tettamanti &lt;kronos.it@gmail.com&gt;
Reported-by: Jeff Rickman &lt;jrickman@myamigos.us&gt;
Tested-by: Jeff Rickman &lt;jrickman@myamigos.us&gt;
Tested-by: Harry G McGavran Jr &lt;w5pny@arrl.net&gt;
Cc: Massimo Dal Zotto &lt;dz@debian.org&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>Fix gcc 4.5.1 miscompiling drivers/char/i8k.c (again)</title>
<updated>2012-02-11T14:40:51Z</updated>
<author>
<name>Jim Bos</name>
<email>jim876@xs4all.nl</email>
</author>
<published>2010-11-15T20:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=89a58f0b97d2fbd038d1ee0f7779c413d75ef28d'/>
<id>urn:sha1:89a58f0b97d2fbd038d1ee0f7779c413d75ef28d</id>
<content type='text'>
commit 22d3243de86bc92d874abb7c5b185d5c47aba323 upstream.

The fix in commit 6b4e81db2552 ("i8k: Tell gcc that *regs gets
clobbered") to work around the gcc miscompiling i8k.c to add "+m
(*regs)" caused register pressure problems and a build failure.

Changing the 'asm' statement to 'asm volatile' instead should prevent
that and works around the gcc bug as well, so we can remove the "+m".

[ Background on the gcc bug: a memory clobber fails to mark the function
  the asm resides in as non-pure (aka "__attribute__((const))"), so if
  the function does nothing else that triggers the non-pure logic, gcc
  will think that that function has no side effects at all. As a result,
  callers will be mis-compiled.

  Adding the "+m" made gcc see that it's not a pure function, and so
  does "asm volatile". The problem was never really the need to mark
  "*regs" as changed, since the memory clobber did that part - the
  problem was just a bug in the gcc "pure" function analysis  - Linus ]

Signed-off-by: Jim Bos &lt;jim876@xs4all.nl&gt;
Acked-by: Jakub Jelinek &lt;jakub@redhat.com&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>i8k: Tell gcc that *regs gets clobbered</title>
<updated>2012-02-11T14:40:50Z</updated>
<author>
<name>Jim Bos</name>
<email>jim876@xs4all.nl</email>
</author>
<published>2010-11-13T11:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ac7024a240022c51fb1f184d59f366c092212d0f'/>
<id>urn:sha1:ac7024a240022c51fb1f184d59f366c092212d0f</id>
<content type='text'>
commit 6b4e81db2552bad04100e7d5ddeed7e848f53b48 upstream.

More recent GCC caused the i8k driver to stop working, on Slackware
compiler was upgraded from gcc-4.4.4 to gcc-4.5.1 after which it didn't
work anymore, meaning the driver didn't load or gave total nonsensical
output.

As it turned out the asm(..) statement forgot to mention it modifies the
*regs variable.

Credits to Andi Kleen and Andreas Schwab for providing the fix.

Signed-off-by: Jim Bos &lt;jim876@xs4all.nl&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Cc: Andreas Schwab &lt;schwab@linux-m68k.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>SCSI: scsi_lib: fix potential NULL dereference</title>
<updated>2012-02-11T14:40:46Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jirislaby@gmail.com</email>
</author>
<published>2009-09-23T14:15:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65d2e9804a7ccd7e52321c9f1803afdfbbecad8e'/>
<id>urn:sha1:65d2e9804a7ccd7e52321c9f1803afdfbbecad8e</id>
<content type='text'>
commit 03b147083a2f9a2a3fbbd2505fa88ffa3c6ab194 upstream.

Stanse found a potential NULL dereference in scsi_kill_request.

Instead of triggering BUG() in 'if (unlikely(cmd == NULL))' branch,
the kernel will Oops earlier on cmd dereference.

Move the dereferences after the if.

[ WT: starget is not set in 2.6.27 ]

Signed-off-by: Jiri Slaby &lt;jirislaby@gmail.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>bonding: Ensure that we unshare skbs prior to calling pskb_may_pull</title>
<updated>2012-02-11T14:38:36Z</updated>
<author>
<name>Neil Horman</name>
<email>nhorman@tuxdriver.com</email>
</author>
<published>2011-01-20T09:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3870ae183ae5b0eee768fd0daa07047e751403eb'/>
<id>urn:sha1:3870ae183ae5b0eee768fd0daa07047e751403eb</id>
<content type='text'>
commit b30532515f0a62bfe17207ab00883dd262497006 upstream.

Recently reported oops:

kernel BUG at net/core/skbuff.c:813!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/bond0/broadcast
CPU 8
Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]

Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]
Pid: 0, comm: swapper Not tainted 2.6.32-71.el6.x86_64 #1 BladeCenter HS22
-[7870AC1]-
RIP: 0010:[&lt;ffffffff81405b16&gt;]  [&lt;ffffffff81405b16&gt;]
pskb_expand_head+0x36/0x1e0
RSP: 0018:ffff880028303b70  EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff880c6458ec80 RCX: 0000000000000020
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880c6458ec80
RBP: ffff880028303bc0 R08: ffffffff818a6180 R09: ffff880c6458ed64
R10: ffff880c622b36c0 R11: 0000000000000400 R12: 0000000000000000
R13: 0000000000000180 R14: ffff880c622b3000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff880028300000(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000038653452a4 CR3: 0000000001001000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8806649c2000, task ffff880c64f16ab0)
Stack:
 ffff880028303bc0 ffffffff8104fff9 000000000000001c 0000000100000000
&lt;0&gt; ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
&lt;0&gt; ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
Call Trace:
&lt;IRQ&gt;
 [&lt;ffffffff8104fff9&gt;] ? __wake_up_common+0x59/0x90
 [&lt;ffffffff81407f7a&gt;] __pskb_pull_tail+0x2aa/0x360
 [&lt;ffffffffa0244530&gt;] bond_arp_rcv+0x2c0/0x2e0 [bonding]
 [&lt;ffffffff814a0857&gt;] ? packet_rcv+0x377/0x440
 [&lt;ffffffff8140f21b&gt;] netif_receive_skb+0x2db/0x670
 [&lt;ffffffff8140f788&gt;] napi_skb_finish+0x58/0x70
 [&lt;ffffffff8140fc89&gt;] napi_gro_receive+0x39/0x50
 [&lt;ffffffffa01286eb&gt;] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
 [&lt;ffffffffa01290f6&gt;] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
 [&lt;ffffffff8140fe53&gt;] net_rx_action+0x103/0x210
 [&lt;ffffffff81073bd7&gt;] __do_softirq+0xb7/0x1e0
 [&lt;ffffffff810d8740&gt;] ? handle_IRQ_event+0x60/0x170
 [&lt;ffffffff810142cc&gt;] call_softirq+0x1c/0x30
 [&lt;ffffffff81015f35&gt;] do_softirq+0x65/0xa0
 [&lt;ffffffff810739d5&gt;] irq_exit+0x85/0x90
 [&lt;ffffffff814cf915&gt;] do_IRQ+0x75/0xf0
 [&lt;ffffffff81013ad3&gt;] ret_from_intr+0x0/0x11
 &lt;EOI&gt;
 [&lt;ffffffff8101bc01&gt;] ? mwait_idle+0x71/0xd0
 [&lt;ffffffff814cd80a&gt;] ? atomic_notifier_call_chain+0x1a/0x20
 [&lt;ffffffff81011e96&gt;] cpu_idle+0xb6/0x110
 [&lt;ffffffff814c17c8&gt;] start_secondary+0x1fc/0x23f

Resulted from bonding driver registering packet handlers via dev_add_pack and
then trying to call pskb_may_pull. If another packet handler (like for AF_PACKET
sockets) gets called first, the delivered skb will have a user count &gt; 1, which
causes pskb_may_pull to BUG halt when it does its skb_shared check.  Fix this by
calling skb_share_check prior to the may_pull call sites in the bonding driver
to clone the skb when needed.  Tested by myself and the reported successfully.

Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
CC: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>bonding: correctly process non-linear skbs</title>
<updated>2012-02-11T14:38:34Z</updated>
<author>
<name>Andy Gospodarek</name>
<email>andy@greyhouse.net</email>
</author>
<published>2010-09-10T11:43:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1ec33da41cf07f6cc9a2f6886bf41f396e74c9cf'/>
<id>urn:sha1:1ec33da41cf07f6cc9a2f6886bf41f396e74c9cf</id>
<content type='text'>
commit ab12811c89e88f2e66746790b1fe4469ccb7bdd9 upstream.

It was recently brought to my attention that 802.3ad mode bonds would no
longer form when using some network hardware after a driver update.
After snooping around I realized that the particular hardware was using
page-based skbs and found that skb-&gt;data did not contain a valid LACPDU
as it was not stored there.  That explained the inability to form an
802.3ad-based bond.  For balance-alb mode bonds this was also an issue
as ARPs would not be properly processed.

This patch fixes the issue in my tests and should be applied to 2.6.36
and as far back as anyone cares to add it to stable.

Thanks to Alexander Duyck &lt;alexander.h.duyck@intel.com&gt; and Jesse
Brandeburg &lt;jesse.brandeburg@intel.com&gt; for the suggestions on this one.

Signed-off-by: Andy Gospodarek &lt;andy@greyhouse.net&gt;
CC: Alexander Duyck &lt;alexander.h.duyck@intel.com&gt;
CC: Jesse Brandeburg &lt;jesse.brandeburg@intel.com&gt;
Signed-off-by: Jay Vosburgh &lt;fubar@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>sym53c8xx: Fix NULL pointer dereference in slave_destroy</title>
<updated>2012-02-11T14:38:32Z</updated>
<author>
<name>Stratos Psomadakis</name>
<email>psomas@gentoo.org</email>
</author>
<published>2011-12-04T00:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=64494d9f150b905efc2a9112e1cb3777f7fcabba'/>
<id>urn:sha1:64494d9f150b905efc2a9112e1cb3777f7fcabba</id>
<content type='text'>
commit cced5041ed5a2d1352186510944b0ddfbdbe4c0b upstream.

sym53c8xx_slave_destroy unconditionally assumes that sym53c8xx_slave_alloc has
succesesfully allocated a sym_lcb. This can lead to a NULL pointer dereference
(exposed by commit 4e6c82b).

Signed-off-by: Stratos Psomadakis &lt;psomas@gentoo.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
</feed>
