<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/gdth.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-27T09:22:00Z</updated>
<entry>
<title>scsi: gdth: Convert timers to use timer_setup()</title>
<updated>2017-10-27T09:22:00Z</updated>
<author>
<name>Kees Cook</name>
</author>
<published>2017-10-12T00:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7932589f47d5d5eaa9948bd479b42819b6b10509'/>
<id>urn:sha1:7932589f47d5d5eaa9948bd479b42819b6b10509</id>
<content type='text'>
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "James E.J. Bottomley" &lt;jejb@linux.vnet.ibm.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: gdth: avoid buffer overflow warning</title>
<updated>2017-08-07T18:04:01Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-07-14T12:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0606ffe26d6d7478fb5957cbc8b9cbbf14a7c68c'/>
<id>urn:sha1:0606ffe26d6d7478fb5957cbc8b9cbbf14a7c68c</id>
<content type='text'>
gcc notices that we would overflow the buffer for the
inquiry of the product name if we have too many adapters:

drivers/scsi/gdth.c: In function 'gdth_next':
drivers/scsi/gdth.c:2357:29: warning: 'sprintf' may write a terminating nul past the end of the destination [-Wformat-overflow=]
         sprintf(inq.product,"Host Drive  #%02d",t);
                             ^~~~~~~~~~~~~~~~~~~
drivers/scsi/gdth.c:2357:9: note: 'sprintf' output between 16 and 17 bytes into a destination of size 16
         sprintf(inq.product,"Host Drive  #%02d",t);

This won't happen in practice, so just use snprintf to
truncate the string.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Annotate hardware config module parameters in drivers/scsi/</title>
<updated>2017-04-20T11:02:32Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2017-04-04T15:54:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88f06b76e462119cb694c3ff13d7d343c49d2569'/>
<id>urn:sha1:88f06b76e462119cb694c3ff13d7d343c49d2569</id>
<content type='text'>
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in drivers/scsi/.

Suggested-by: Alan Cox &lt;gnomes@lxorguk.ukuu.org.uk&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
cc: "Juergen E. Fischer" &lt;fischer@norbit.de&gt;
cc: "James E.J. Bottomley" &lt;jejb@linux.vnet.ibm.com&gt;
cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
cc: Dario Ballabio &lt;ballabio_dario@emc.com&gt;
cc: Finn Thain &lt;fthain@telegraphics.com.au&gt;
cc: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
cc: Achim Leubner &lt;achim_leubner@adaptec.com&gt;
cc: linux-scsi@vger.kernel.org
</content>
</entry>
<entry>
<title>Replace &lt;asm/uaccess.h&gt; with &lt;linux/uaccess.h&gt; globally</title>
<updated>2016-12-24T19:46:01Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2016-12-24T19:46:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba'/>
<id>urn:sha1:7c0f6ba682b9c7632072ffbedf8d328c8f3c42ba</id>
<content type='text'>
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*&lt;asm/uaccess.h&gt;'
  sed -i -e "s!$PATT!#include &lt;linux/uaccess.h&gt;!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>gdth: replace struct timeval with ktime_get_real_seconds()</title>
<updated>2016-02-26T02:16:49Z</updated>
<author>
<name>Alison Schofield</name>
</author>
<published>2016-02-18T05:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a412c38bb5bb6fc6a5faaeac0d6d33d2c731b4c'/>
<id>urn:sha1:5a412c38bb5bb6fc6a5faaeac0d6d33d2c731b4c</id>
<content type='text'>
struct timeval will overflow on 32-bit systems in y2038 and is being
removed from the kernel. Replace the use of struct timeval and
do_gettimeofday() with ktime_get_real_seconds() which provides a 64-bit
seconds value and is y2038 safe.

gdth driver requires changes in two areas:

1) gdth_store_event() loads two u32 timestamp fields for ioctl GDTIOCTL_EVENT

   These timestamp fields are part of struct gdth_evt_str used for passing
   event data to userspace. At the first instance of an event we do
   (first_stamp=last_stamp="current time"). If that same event repeats,
   we do (last_stamp="current time") AND increment same_count to indicate
   how many times the event has repeated since first_stamp.

   This patch replaces the use of timeval and do_gettimeofday() with
   ktime_get_real_seconds() cast to u32 to extend the timestamp fields
   to y2106.

   Beyond y2106, the userspace tools (ie. RAID controller monitors) can
   work around the time rollover and this driver would still not need to
   change.

   Alternative: The alternative approach is to introduce a new ioctl in gdth
   with the u32 time fields defined as u64.  This would require userspace
   changes now, but not in y2106.

2)  gdth_show_info() calculates elapsed time using u32 first_stamp

    It is adding events with timestamps to a seq_file.  Timestamps are
    calculated as the "current time" minus the first_stamp.

    This patch replaces the use of timeval and do_gettimeofday() with
    ktime_get_real_seconds() cast to u32 to calculate the timestamp.

    This elapsed time calculation is safe even when the time wraps (beyond
    y2106) due to how unsigned subtraction works. A comment has been added
    to the code to indicate this safety.

    Alternative: This piece itself doesn't warrant an alternative, but
    if we do introduce a new structure &amp; ioctl with u64 timestamps, this
    would change accordingly.

Signed-off-by: Alison Schofield &lt;amsfield22@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16</title>
<updated>2014-11-24T19:01:40Z</updated>
<author>
<name>Hannes Reinecke</name>
</author>
<published>2014-11-17T13:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eb846d9f147455e4e5e1863bfb5e31974bb69b7c'/>
<id>urn:sha1:eb846d9f147455e4e5e1863bfb5e31974bb69b7c</id>
<content type='text'>
SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16).
So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be
consistent with SPC and to allow for better distinction.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Tested-by: Robert Elliott &lt;elliott@hp.com&gt;
Reviewed-by: Robert Elliott &lt;elliott@hp.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>scsi: don't set tagging state from scsi_adjust_queue_depth</title>
<updated>2014-11-12T10:19:43Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2014-11-03T19:15:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8b09f6fb67df7fc1b51ced1037fa9b677428149'/>
<id>urn:sha1:c8b09f6fb67df7fc1b51ced1037fa9b677428149</id>
<content type='text'>
Remove the tagged argument from scsi_adjust_queue_depth, and just let it
handle the queue depth.  For most drivers those two are fairly separate,
given that most modern drivers don't care about the SCSI "tagged" status
of a command at all, and many old drivers allow queuing of multiple
untagged commands in the driver.

Instead we start out with the -&gt;simple_tags flag set before calling
-&gt;slave_configure, which is how all drivers actually looking at
-&gt;simple_tags except for one worke anyway.  The one other case looks
broken, but I've kept the behavior as-is for now.

Except for that we only change -&gt;simple_tags from the -&gt;change_queue_type,
and when rejecting a tag message in a single driver, so keeping this
churn out of scsi_adjust_queue_depth is a clear win.

Now that the usage of scsi_adjust_queue_depth is more obvious we can
also remove all the trivial instances in -&gt;slave_alloc or -&gt;slave_configure
that just set it to the cmd_per_lun default.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] remove deprecated IRQF_DISABLED from SCSI</title>
<updated>2014-03-19T22:04:44Z</updated>
<author>
<name>Michael Opdenacker</name>
</author>
<published>2014-03-05T05:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4909cc2b89715c2dfd4c466a37cc08b2b3890fed'/>
<id>urn:sha1:4909cc2b89715c2dfd4c466a37cc08b2b3890fed</id>
<content type='text'>
It's a NOOP since 2.6.35 and it will be removed one day.

[jejb: remove from missed arm scsi drivers]
Signed-off-by: Michael Opdenacker &lt;michael.opdenacker@free-electrons.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Disable WRITE SAME for RAID and virtual host adapter drivers</title>
<updated>2013-11-29T04:48:39Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2013-10-23T10:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=54b2b50c20a61b51199bedb6e5d2f8ec2568fb43'/>
<id>urn:sha1:54b2b50c20a61b51199bedb6e5d2f8ec2568fb43</id>
<content type='text'>
Some host adapters do not pass commands through to the target disk
directly. Instead they provide an emulated target which may or may not
accurately report its capabilities. In some cases the physical device
characteristics are reported even when the host adapter is processing
commands on the device's behalf. This can lead to adapter firmware hangs
or excessive I/O errors.

This patch disables WRITE SAME for devices connected to host adapters
that provide an emulated target. Driver writers can disable WRITE SAME
by setting the no_write_same flag in the host adapter template.

[jejb: fix up rejections due to eh_deadline patch]
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: stable@kernel.org
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
</entry>
<entry>
<title>SCSI: remove unnecessary pci_set_drvdata()</title>
<updated>2013-10-14T13:26:04Z</updated>
<author>
<name>Jingoo Han</name>
</author>
<published>2013-09-24T01:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08b7e10716a518af01b07915dbb1938868bbf878'/>
<id>urn:sha1:08b7e10716a518af01b07915dbb1938868bbf878</id>
<content type='text'>
Since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d
(device-core: Ensure drvdata = NULL when no driver is bound),
the driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han &lt;jg1.han@samsung.com&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
