<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/s390/block/dasd_eckd.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-07-11T10:51:19Z</updated>
<entry>
<title>s390/dasd: Fix invalid dereferencing of indirect CCW data pointer</title>
<updated>2024-07-11T10:51:19Z</updated>
<author>
<name>Stefan Haberland</name>
<email>sth@linux.ibm.com</email>
</author>
<published>2024-07-03T09:23:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c116475f7d6410b1e6d399207ac75de6cf9c3652'/>
<id>urn:sha1:c116475f7d6410b1e6d399207ac75de6cf9c3652</id>
<content type='text'>
commit b3a58f3b90f564f42a5c35778d8c5107b2c2150b upstream.

Fix invalid dereferencing of indirect CCW data pointer in
dasd_eckd_dump_sense() that leads to a kernel panic in error cases.

When using indirect addressing for DASD CCWs (IDAW) the CCW CDA pointer
does not contain the data address itself but a pointer to the IDAL.
This needs to be translated from physical to virtual as well before
using it.

This dereferencing is also used for dasd_page_cache and also fixed
although it is very unlikely that this code path ever gets used.

Fixes: c0bd39601c13 ("s390/dasd: use new address translation helpers")
Cc: stable@vger.kernel.org
Signed-off-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Reviewed-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/cio,idal: fix virtual vs physical address confusion</title>
<updated>2024-03-13T08:23:47Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e1f51be68d9906e652d4678c4df1d34a9d8ad9ef'/>
<id>urn:sha1:e1f51be68d9906e652d4678c4df1d34a9d8ad9ef</id>
<content type='text'>
Fix virtual vs physical address confusion. This does not fix a bug since
virtual and physical address spaces are currently the same.

Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: use new address translation helpers</title>
<updated>2024-03-13T08:23:46Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c0bd39601c13ab08e961d77a90dfeeff56056353'/>
<id>urn:sha1:c0bd39601c13ab08e961d77a90dfeeff56056353</id>
<content type='text'>
Use virt_to_dma32() and friends to properly convert virtual to physical and
physical to virtual addresses so that "make C=1" does not generate any
warnings anymore.

Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd: remove superfluous virt_to_phys() conversion</title>
<updated>2024-03-13T08:23:46Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bdd0ab97506cf3f4667b8c42d5b20606c2321f46'/>
<id>urn:sha1:bdd0ab97506cf3f4667b8c42d5b20606c2321f46</id>
<content type='text'>
Only the last 12 bits of virtual / physical addresses are used when masking
with IDA_BLOCK_SIZE - 1. Given that the bits are the same regardless of
virtual or physical address, remove the virtual to physical address
conversion.

Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>s390/dasd_eckd: fix virtual vs physical address confusion</title>
<updated>2024-03-13T08:23:45Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2024-03-07T12:28:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=99aea41a4d11506c634000e234e0e1a707bd402d'/>
<id>urn:sha1:99aea41a4d11506c634000e234e0e1a707bd402d</id>
<content type='text'>
Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.

Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>dasd: move queue setup to common code</title>
<updated>2024-03-06T15:27:00Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2024-02-28T13:37:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0127a47f58c6bb7b54386960ee66864b937269eb'/>
<id>urn:sha1:0127a47f58c6bb7b54386960ee66864b937269eb</id>
<content type='text'>
Most of the code in setup_blk_queue is shared between all disciplines.
Move it to common code and leave a method to query the maximum number
of transferable blocks, and a flag to indicate discard support.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240228133742.806274-3-hch@lst.de
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Remove PRINTK_HEADER and KMSG_COMPONENT definitions</title>
<updated>2024-02-08T17:12:01Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.ibm.com</email>
</author>
<published>2024-02-08T16:42:47Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c6c6c69df6598aacf3921f26f89b12d5e321ea83'/>
<id>urn:sha1:c6c6c69df6598aacf3921f26f89b12d5e321ea83</id>
<content type='text'>
PRINTK_HEADER was mainly used to prefix log messages with the module
name. Most components don't use this definition anymore. Either because
there are no log messages being generated anymore, or pr_*() were
replaced by dev_*(), which contains device and component information
already.

PRINTK_HEADER is also dropped in the function
dasd_3990_erp_handle_match_erp() in dasd_3990_erp.c from a panic() call
as panic() already provides all relevant information.

KMSG_COMPONENT was mainly used to identify a component in a long gone
kernel message catalog feature.

Remove both definition since they're either not used or alternatives
make the code slightly shorter and more readable.

Signed-off-by: Jan Höppner &lt;hoeppner@linux.ibm.com&gt;
Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240208164248.540985-9-sth@linux.ibm.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Use dev_err() over printk()</title>
<updated>2024-02-08T17:12:01Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.ibm.com</email>
</author>
<published>2024-02-08T16:42:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0b3644b475e2564abe26a916af8447beb7c4966b'/>
<id>urn:sha1:0b3644b475e2564abe26a916af8447beb7c4966b</id>
<content type='text'>
To reduce the information required for the string generation in the
sense dump functions, use the more concise dev_err() variant over
printk(KERN_ERR, ...) to improve code readability.

The dev_err() function provides the component and device name for free
and the separate dev_name() calls as well as the PRINTK_HEADER can be
dropped.

Dropping PRINTK_HEADER removes the "dasd(eckd):" for all lines. Only the
first line of a dev_err() call is prefixed with the component and device
(e.g. "dasd-eckd 0.0.95d0:").

The format specifier for printed pointers is also changed to unhashed
(%px) as this can help with debugging and servicing.

Signed-off-by: Jan Höppner &lt;hoeppner@linux.ibm.com&gt;
Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240208164248.540985-7-sth@linux.ibm.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>s390/dasd: Simplify uid string generation</title>
<updated>2024-02-08T17:12:01Z</updated>
<author>
<name>Jan Höppner</name>
<email>hoeppner@linux.ibm.com</email>
</author>
<published>2024-02-08T16:42:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e5de34db1e95ef549236f9a2630d396a41c208a2'/>
<id>urn:sha1:e5de34db1e95ef549236f9a2630d396a41c208a2</id>
<content type='text'>
There are two variants of the device uid string. One containing the
virtual device unit information table (vduit) identifying the device as
a virtual device located on a real device in a z/VM environment. The
other variant does not contain those additional information.

Simplify the string generation with a shorter check of an existing vduit
embedded in the snprintf() calls.

Signed-off-by: Jan Höppner &lt;hoeppner@linux.ibm.com&gt;
Reviewed-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Signed-off-by: Stefan Haberland &lt;sth@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20240208164248.540985-2-sth@linux.ibm.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>s390/dasd: fix string length handling</title>
<updated>2023-09-01T13:47:43Z</updated>
<author>
<name>Heiko Carstens</name>
<email>hca@linux.ibm.com</email>
</author>
<published>2023-08-28T15:31:42Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f7cf22424665043787a96a66a048ff6b2cfd473c'/>
<id>urn:sha1:f7cf22424665043787a96a66a048ff6b2cfd473c</id>
<content type='text'>
Building dasd_eckd.o with latest clang reveals this bug:

    CC      drivers/s390/block/dasd_eckd.o
      drivers/s390/block/dasd_eckd.c:1082:3: warning: 'snprintf' will always be truncated;
      specified size is 1, but format string expands to at least 11 [-Wfortify-source]
       1082 |                 snprintf(print_uid, sizeof(*print_uid),
            |                 ^
      drivers/s390/block/dasd_eckd.c:1087:3: warning: 'snprintf' will always be truncated;
      specified size is 1, but format string expands to at least 10 [-Wfortify-source]
       1087 |                 snprintf(print_uid, sizeof(*print_uid),
            |                 ^

Fix this by moving and using the existing UID_STRLEN for the arrays
that are being written to. Also rename UID_STRLEN to DASD_UID_STRLEN
to clarify its scope.

Fixes: 23596961b437 ("s390/dasd: split up dasd_eckd_read_conf")
Reviewed-by: Peter Oberparleiter &lt;oberpar@linux.ibm.com&gt;
Signed-off-by: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Tested-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt; # build
Reported-by: Nathan Chancellor &lt;nathan@kernel.org&gt;
Closes: https://github.com/ClangBuiltLinux/linux/issues/1923
Reviewed-by: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Link: https://lore.kernel.org/r/20230828153142.2843753-2-hca@linux.ibm.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
