<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/target/target_core_rd.c, branch linux-3.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-07-01T03:01:33Z</updated>
<entry>
<title>target: Explicitly clear ramdisk_mcp backend pages</title>
<updated>2014-07-01T03:01:33Z</updated>
<author>
<name>Nicholas A. Bellinger</name>
</author>
<published>2014-06-16T20:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e802a11d29bed1e9ea4dad092d745baae3290947'/>
<id>urn:sha1:e802a11d29bed1e9ea4dad092d745baae3290947</id>
<content type='text'>
[Note that a different patch to address the same issue went in during
v3.15-rc1 (commit 4442dc8a), but includes a bunch of other changes that
don't strictly apply to fixing the bug]

This patch changes rd_allocate_sgl_table() to explicitly clear
ramdisk_mcp backend memory pages by passing __GFP_ZERO into
alloc_pages().

This addresses a potential security issue where reading from a
ramdisk_mcp could return sensitive information, and follows what
&gt;= v3.15 does to explicitly clear ramdisk_mcp memory at backend
device initialization time.

Reported-by: Jorge Daniel Sequeira Matias &lt;jdsm@tecnico.ulisboa.pt&gt;
Cc: Jorge Daniel Sequeira Matias &lt;jdsm@tecnico.ulisboa.pt&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: use \n as a separator for configuration</title>
<updated>2011-12-14T11:27:23Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-23T19:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90c161b643d9531d271110876a14e68b49172d8a'/>
<id>urn:sha1:90c161b643d9531d271110876a14e68b49172d8a</id>
<content type='text'>
The command
| echo rd_pages=32768 &gt; ramdisk/control

Does not work because it writes "rd_pages=32768\n" and the parser which
matches for "rd_pages=%d" does not recognize it due to the \n. One way
of fixing this would be using "echo -n" instead.
This patch adds \n to the list of separators so we don't have to use the
-n argument which I find is more convinient.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: header reshuffle, part2</title>
<updated>2011-12-14T11:26:05Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-11-16T14:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4795fb20edf2fe2c862c8fe9f8b681edeb79ac1'/>
<id>urn:sha1:c4795fb20edf2fe2c862c8fe9f8b681edeb79ac1</id>
<content type='text'>
This reorganized the headers under include/target into:

 - target_core_base.h stays as is with all target-wide data stuctures and defines
 - target_core_backend.h contains the whole interface to I/O backends
 - target_core_fabric.h contains the whole interface to fabric modules

Except for those only the various configfs macro headers stay around.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/rd: fix or rewrite the copy routine</title>
<updated>2011-12-06T06:00:58Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-30T09:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=65b0c78d5a0ca2cb82b7b9f54f855896e0d7fc10'/>
<id>urn:sha1:65b0c78d5a0ca2cb82b7b9f54f855896e0d7fc10</id>
<content type='text'>
So the code assumes that the sg list is only a array while in reality
loopback SGL memory via scsi_cmnd into target-core may be already
chained.  This patch converts ramdisk code to use sg_miter logic from
scatterlist.h in order to properly support passthrough SGL usage with
transport_generic_map_mem_to_cmd() via loopback.

With this patch the bug goes away. However after umount/mount of the
device my files are gone. So something is still not right. After looking
at it for a while I decided to rewrite the that part of the code and now
things do work for me.

For reference:
- http://article.gmane.org/gmane.linux.scsi.target.devel/595
  the sg_next() conversion
- http://article.gmane.org/gmane.linux.scsi.target.devel/602
  the rewrite of the copy code

(nab: Fix compile warning in rd_MEMCPY)

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/rd: simplify the page/offset computation</title>
<updated>2011-12-06T06:00:57Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-25T21:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5bff9e8584fbcdb361dada5a0425724b9e31e608'/>
<id>urn:sha1:5bff9e8584fbcdb361dada5a0425724b9e31e608</id>
<content type='text'>
Breakout rd_MEMCPY_do_task() usage of do_div() to tmp value during
rd_request-&gt;rd_page assignment.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Address legacy PYX_TRANSPORT_* return code breakage</title>
<updated>2011-12-06T06:00:49Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2011-11-04T09:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03e98c9eb916f3f0868c1dc344dde2a60287ff72'/>
<id>urn:sha1:03e98c9eb916f3f0868c1dc344dde2a60287ff72</id>
<content type='text'>
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
of locations and addresses cases where transport_generic_request_failure()
was returning the incorrect sense upon CHECK_CONDITION status after the
v3.1 converson to use errno return codes.

This includes the conversion of transport_generic_request_failure() to
process cmd-&gt;scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
before calling transport_send_check_condition_and_sense() to queue up
response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
for these cases.

transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
SCF_SCSI_DATA_SG_IO_CDB -&gt;do_task(), and emulated -&gt;execute_task() have
all been updated to set se_cmd-&gt;scsi_sense_reason and return errno codes
universally upon failure.  This includes cmd-&gt;scsi_sense_reason assignment
in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.

Finally it updates fabric modules to remove the legacy usage, and for
TFO-&gt;new_cmd_map() callers forwards return values outside of fabric code.
iscsi-target has also been updated to remove a handful of special cases
related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()

(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
     transport_generic_new_cmd, and re-add missing task-&gt;task_error_status
     assignment in transport_complete_task)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: make the -&gt;get_cdb method optional</title>
<updated>2011-10-24T03:21:11Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-10-12T15:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6193f06e6fe27c9475e407cb3cf2b0d4cd2725b0'/>
<id>urn:sha1:6193f06e6fe27c9475e407cb3cf2b0d4cd2725b0</id>
<content type='text'>
The most commonly used file, iblock and rd backends have no use for
a per-task CDB and thus don't need a method to copy it into their
otherwise unused CDB fields.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Cleanup unused se_task bits</title>
<updated>2011-10-24T03:21:05Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-10-12T15:07:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=42bf829eee0e36371a3df43978b14572c716cbe7'/>
<id>urn:sha1:42bf829eee0e36371a3df43978b14572c716cbe7</id>
<content type='text'>
This is a squashed version of the following se_task cleanup patches:

    target: remove the unused task_state_flags field in se_task
    target: remove the unused se_obj_ptr field in se_task
    target: remove the se_dev field in se_task

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove unneeded version.h includes</title>
<updated>2011-10-11T04:10:19Z</updated>
<author>
<name>Jesper Juhl</name>
</author>
<published>2011-08-01T21:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9375b1bfd2555c8bc828d394a4419a212b46ba71'/>
<id>urn:sha1:9375b1bfd2555c8bc828d394a4419a212b46ba71</id>
<content type='text'>
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/target/.
This patch removes them.

Signed-off-by: Jesper Juhl &lt;jj@chaosbits.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Convert target_core_rd.c to use use BUG_ON</title>
<updated>2011-08-22T19:26:17Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2011-08-02T10:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fc6148865c9a17cee33f251723f6a056f022ecd'/>
<id>urn:sha1:6fc6148865c9a17cee33f251723f6a056f022ecd</id>
<content type='text'>
Use BUG_ON(x) rather than if(x) BUG();

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@ identifier x; @@
-if (x) BUG();
+BUG_ON(x);

@@ identifier x; @@
-if (!x) BUG();
+BUG_ON(!x);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
