<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/vhost, branch v3.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/vhost?h=v3.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/vhost?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-28T20:10:35Z</updated>
<entry>
<title>vhost: validate vhost_get_vq_desc return value</title>
<updated>2014-03-28T20:10:35Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-03-27T10:53:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a39ee449f96a2cd44ce056d8a0a112211a9b1a1f'/>
<id>urn:sha1:a39ee449f96a2cd44ce056d8a0a112211a9b1a1f</id>
<content type='text'>
vhost fails to validate negative error code
from vhost_get_vq_desc causing
a crash: we are using -EFAULT which is 0xfffffff2
as vector size, which exceeds the allocated size.

The code in question was introduced in commit
8dd014adfea6f173c1ef6378f7e5e7924866c923
    vhost-net: mergeable buffers support

CVE-2014-0055

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vhost: fix total length when packets are too short</title>
<updated>2014-03-28T20:07:31Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-03-27T10:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8316f3991d207fe32881a9ac20241be8fa2bad0'/>
<id>urn:sha1:d8316f3991d207fe32881a9ac20241be8fa2bad0</id>
<content type='text'>
When mergeable buffers are disabled, and the
incoming packet is too large for the rx buffer,
get_rx_bufs returns success.

This was intentional in order for make recvmsg
truncate the packet and then handle_rx would
detect err != sock_len and drop it.

Unfortunately we pass the original sock_len to
recvmsg - which means we use parts of iov not fully
validated.

Fix this up by detecting this overrun and doing packet drop
immediately.

CVE-2014-0077

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2014-03-02T03:33:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-03-02T03:33:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=702256e604ec143f69b391485ab32b2948772838'/>
<id>urn:sha1:702256e604ec143f69b391485ab32b2948772838</id>
<content type='text'>
Pull SCSI target fixes from Nicholas Bellinger:
 "The bulk of the series are bugfixes for qla2xxx target NPIV support
  that went in for v3.14-rc1.  Also included are a few DIF related
  fixes, a qla2xxx fix (Cc'ed to stable) from Greg W., and vhost/scsi
  protocol version related fix from Venkatesh.

  Also just a heads up that a series to address a number of issues with
  iser-target active I/O reset/shutdown is still being tested, and will
  be included in a separate -rc6 PULL request"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  vhost/scsi: Check LUN structure byte 0 is set to 1, per spec
  qla2xxx: Fix kernel panic on selective retransmission request
  Target/sbc: Don't use sg as iterator in sbc_verify_read
  target: Add DIF sense codes in transport_generic_request_failure
  target/sbc: Fix sbc_dif_copy_prot addr offset bug
  tcm_qla2xxx: Fix NAA formatted name for NPIV WWPNs
  tcm_qla2xxx: Perform configfs depend/undepend for base_tpg
  tcm_qla2xxx: Add NPIV specific enable/disable attribute logic
  qla2xxx: Check + fail when npiv_vports_inuse exists in shutdown
  qla2xxx: Fix qlt_lport_register base_vha callback race
</content>
</entry>
<entry>
<title>vhost/scsi: Check LUN structure byte 0 is set to 1, per spec</title>
<updated>2014-02-25T00:19:43Z</updated>
<author>
<name>Venkatesh Srinivas</name>
<email>venkateshs@google.com</email>
</author>
<published>2014-02-24T22:13:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7fe412d07d881020022a188b95c63a19b651a391'/>
<id>urn:sha1:7fe412d07d881020022a188b95c63a19b651a391</id>
<content type='text'>
The virtio spec requires byte 0 of the virtio-scsi LUN structure
to be '1'.

Signed-off-by: Venkatesh Srinivas &lt;venkateshs@google.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost: fix a theoretical race in device cleanup</title>
<updated>2014-02-13T23:47:30Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-02-13T09:45:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b0c057ca7e835b36c6050c7627634b664796c1d6'/>
<id>urn:sha1:b0c057ca7e835b36c6050c7627634b664796c1d6</id>
<content type='text'>
vhost_zerocopy_callback accesses VQ right after it drops a ubuf
reference.  In theory, this could race with device removal which waits
on the ubuf kref, and crash on use after free.

Do all accesses within rcu read side critical section, and synchronize
on release.

Since callbacks are always invoked from bh, synchronize_rcu_bh seems
enough and will help release complete a bit faster.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>vhost: fix ref cnt checking deadlock</title>
<updated>2014-02-13T23:47:30Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2014-02-13T09:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0ad8b480d6ee916aa84324f69acf690142aecd0e'/>
<id>urn:sha1:0ad8b480d6ee916aa84324f69acf690142aecd0e</id>
<content type='text'>
vhost checked the counter within the refcnt before decrementing.  It
really wanted to know that it is the one that has the last reference, as
a way to batch freeing resources a bit more efficiently.

Note: we only let refcount go to 0 on device release.

This works well but we now access the ref counter twice so there's a
race: all users might see a high count and decide to defer freeing
resources.
In the end no one initiates freeing resources until the last reference
is gone (which is on VM shotdown so might happen after a looooong time).

Let's do what we probably should have done straight away:
switch from kref to plain atomic, documenting the
semantics, return the refcount value atomically after decrement,
then use that to avoid the deadlock.

Reported-by: Qin Chuanyu &lt;qinchuanyu@huawei.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Acked-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2014-01-31T23:31:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-01-31T23:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e13c5d0212f25d69a97606b9d5a85edb52a7737'/>
<id>urn:sha1:4e13c5d0212f25d69a97606b9d5a85edb52a7737</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "The highlights this round include:

  - add support for SCSI Referrals (Hannes)
  - add support for T10 DIF into target core (nab + mkp)
  - add support for T10 DIF emulation in FILEIO + RAMDISK backends (Sagi + nab)
  - add support for T10 DIF -&gt; bio_integrity passthrough in IBLOCK backend (nab)
  - prep changes to iser-target for &gt;= v3.15 T10 DIF support (Sagi)
  - add support for qla2xxx N_Port ID Virtualization - NPIV (Saurav + Quinn)
  - allow percpu_ida_alloc() to receive task state bitmask (Kent)
  - fix &gt;= v3.12 iscsi-target session reset hung task regression (nab)
  - fix &gt;= v3.13 percpu_ref se_lun-&gt;lun_ref_active race (nab)
  - fix a long-standing network portal creation race (Andy)"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
  target: Fix percpu_ref_put race in transport_lun_remove_cmd
  target/iscsi: Fix network portal creation race
  target: Report bad sector in sense data for DIF errors
  iscsi-target: Convert gfp_t parameter to task state bitmask
  iscsi-target: Fix connection reset hang with percpu_ida_alloc
  percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
  iscsi-target: Pre-allocate more tags to avoid ack starvation
  qla2xxx: Configure NPIV fc_vport via tcm_qla2xxx_npiv_make_lport
  qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.
  qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
  IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine
  IB/isert: Move fastreg descriptor creation to a function
  IB/isert: Avoid frwr notation, user fastreg
  IB/isert: seperate connection protection domains and dma MRs
  tcm_loop: Enable DIF/DIX modes in SCSI host LLD
  target/rd: Add DIF protection into rd_execute_rw
  target/rd: Add support for protection SGL setup + release
  target/rd: Refactor rd_build_device_space + rd_release_device_space
  target/file: Add DIF protection support to fd_execute_rw
  target/file: Add DIF protection init/format support
  ...
</content>
</entry>
<entry>
<title>percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask</title>
<updated>2014-01-23T20:17:18Z</updated>
<author>
<name>Kent Overstreet</name>
<email>kmo@daterainc.com</email>
</author>
<published>2014-01-19T08:26:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6f6b5d1ec56acdeab0503d2b823f6f88a0af493e'/>
<id>urn:sha1:6f6b5d1ec56acdeab0503d2b823f6f88a0af493e</id>
<content type='text'>
This patch changes percpu_ida_alloc() + callers to accept task state
bitmask for prepare_to_wait() for code like target/iscsi that needs
it for interruptible sleep, that is provided in a subsequent patch.

It now expects TASK_UNINTERRUPTIBLE when the caller is able to sleep
waiting for a new tag, or TASK_RUNNING when the caller cannot sleep,
and is forced to return a negative value when no tags are available.

v2 changes:
  - Include blk-mq + tcm_fc + vhost/scsi + target/iscsi changes
  - Drop signal_pending_state() call
v3 changes:
  - Only call prepare_to_wait() + finish_wait() when != TASK_RUNNING
    (PeterZ)

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Kent Overstreet &lt;kmo@daterainc.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.12+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add protection SGLs to target_submit_cmd_map_sgls</title>
<updated>2014-01-18T09:58:09Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-12-23T20:38:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=def2b339b422070ecb99298a80e4b15033adc0ce'/>
<id>urn:sha1:def2b339b422070ecb99298a80e4b15033adc0ce</id>
<content type='text'>
This patch adds support to target_submit_cmd_map_sgls() for
accepting 'sgl_prot' + 'sgl_prot_count' parameters for
DIF protection information.

Note the passed parameters are stored at se_cmd-&gt;t_prot_sg
and se_cmd-&gt;t_prot_nents respectively.

Also, update tcm_loop and vhost-scsi fabrics usage of
target_submit_cmd_map_sgls() to take into account the
new parameters.

Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>vhost: remove the dead branch</title>
<updated>2013-12-06T20:22:05Z</updated>
<author>
<name>Zhi Yong Wu</name>
<email>wuzhy@linux.vnet.ibm.com</email>
</author>
<published>2013-12-06T20:13:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59566b6e8cc8f8a05022e0f01a1b90974003f092'/>
<id>urn:sha1:59566b6e8cc8f8a05022e0f01a1b90974003f092</id>
<content type='text'>
Since vhost_dev_init() forever return 0, some branches are never run,
therefore need to be removed.

Signed-off-by: Zhi Yong Wu &lt;wuzhy@linux.vnet.ibm.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
