<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/s390, branch v5.15.219</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.219</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.219'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-27T12:28:22+00:00</updated>
<entry>
<title>s390/vfio_ccw: Free all memory if cp_init() fails</title>
<updated>2026-08-27T12:28:22+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-07-28T03:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f9bcff265556796834122f95de16d52a8375206c'/>
<id>urn:sha1:f9bcff265556796834122f95de16d52a8375206c</id>
<content type='text'>
[ Upstream commit 74186c2968f8f756ac3226b545b598457c910c75 ]

The routine cp_free() is called to unpin/free any memory once an I/O
is completed successfully, or if cp_prefetch() fails. But if cp_init()
fails, and cp-&gt;initialized is not enabled, the same routine cannot be
used to free all the memory.

An attempt to address this exists in ccwchain_handle_ccw(), where a
single call to ccwchain_free() is made for the currently-processed
CCW segment. But this will leak other segments (created as a result
of a Transfer in Channel) that had been allocated as part of the same
channel program.

Address this by performing the cleanup outside of the recursive
ccwchain_handle_ccw()/ccwchain_loop_tic() logic.

Fixes: 8b515be512a2 ("vfio-ccw: Fix memory leak and don't call cp_free in cp_init")
Cc: stable@vger.kernel.org
Reviewed-by: Farhan Ali &lt;alifm@linux.ibm.com&gt;
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/vfio_ccw: Implement a crw lock</title>
<updated>2026-08-27T12:28:21+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-08-24T14:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c94d4179bcc19e01b28db634c07a58b28116209'/>
<id>urn:sha1:3c94d4179bcc19e01b28db634c07a58b28116209</id>
<content type='text'>
[ Upstream commit 16b0798024c0e9117e395829ddbbe70981c79d9c ]

Unlike the channel_program struct, which covers synchronous I/O
submissions and asynchronous interrupts, the CRW region relies
exclusively on asynchronous events coming from hardware.

Implement a lock to manage the list of those payloads, to ensure
they are read cohesively.

Fixes: 3f02cb2fd9d2 ("vfio-ccw: Wire up the CRW irq and CRW region")
Cc: stable@vger.kernel.org
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Reviewed-by: Farhan Ali &lt;alifm@linux.ibm.com&gt;
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
[ relocated crw_lock init and CRW drain from vfio_ccw_ops.c's mdev_init_dev()/mdev_release_dev() into vfio_ccw_drv.c's sch_probe()/sch_remove(), and kept the two-argument eventfd_signal() calls ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/vfio_ccw: Selectively expand io_mutex</title>
<updated>2026-08-27T12:28:21+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-08-24T14:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dab6a6627b0b0cce23653e99c7b0bf8c6cfd82e0'/>
<id>urn:sha1:dab6a6627b0b0cce23653e99c7b0bf8c6cfd82e0</id>
<content type='text'>
[ Upstream commit 34f4feff3e90bd09308fad0974e97113b23b812a ]

The io_mutex was defined to serialize the io_regions, but then has
also sort of been associated with the I/O themselves because of
the close relationship they share.

With the handful of races that are possible, the choices are either to:
 A) expand the scope of io_mutex to close these remaining windows, or
 B) reduce the scope of io_mutex to just io_region, and introduce a new
    lock mechanism for the remaining I/O resources

This patch implements A, since B brings with it a lot more interactions
that would need to be tracked and kept in a correct hierarchy. It also
takes advantage of the workqueue element for cp_free() that now gets
called out of fsm_notoper(), which could be invoked out of an interrupt
context and thus cannot acquire a mutex itself.

Fixes: 4f76617378ee ("vfio-ccw: protect the I/O region")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Stable-dep-of: 16b0798024c0 ("s390/vfio_ccw: Implement a crw lock")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/vfio_ccw: Ensure index for read/write regions are within range</title>
<updated>2026-08-27T12:28:21+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-08-24T14:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3acbedf5c0b8e0971f0de423c05cc02bbf6ddb99'/>
<id>urn:sha1:3acbedf5c0b8e0971f0de423c05cc02bbf6ddb99</id>
<content type='text'>
[ Upstream commit 9f5f9a78fedc45bc29d6a0a64e3a3472361afae5 ]

The introduction of the capability chain rightly clamped the
region indexes to the range of the capabilities itself, but
neglected to do so for the existing read/write regions which
should also be enforced.

Fixes: db8e5d17ac03 ("vfio-ccw: add capabilities chain")
Cc: stable@vger.kernel.org
Cc: Cornelia Huck &lt;cohuck@redhat.com&gt;
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Stable-dep-of: 16b0798024c0 ("s390/vfio_ccw: Implement a crw lock")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/vfio_ccw: Cancel existing workqueues</title>
<updated>2026-08-27T12:28:20+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-08-24T00:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7492ca2d0c5d59add01e267be9f5a6eeb8076fd7'/>
<id>urn:sha1:7492ca2d0c5d59add01e267be9f5a6eeb8076fd7</id>
<content type='text'>
[ Upstream commit 79c60b2c61105368dcc8444eb45847e21734f7c4 ]

The initialization of the io_work and crw_work workqueues begs the
question of whether they should be un-initialized. Add the corresponding
cleanup tags in _release_dev to ensure work isn't dispatched after
the private struct is free'd.

Suggested-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Fixes: e5f84dbaea59 ("vfio: ccw: return I/O results asynchronously")
Fixes: 3f02cb2fd9d2 ("vfio-ccw: Wire up the CRW irq and CRW region")
Cc: stable@vger.kernel.org
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
[ dropped the `vfio_ccw_mdev_release_dev()` hunk since 5.15 lacks the embedded `vfio_device` release callback, keeping only the `close_device()` drain ]
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/vfio_ccw: Fix out of bounds check on CCW array</title>
<updated>2026-08-23T12:17:16+00:00</updated>
<author>
<name>Eric Farman</name>
<email>farman@linux.ibm.com</email>
</author>
<published>2026-07-28T03:30:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=907adc667d902fafbdb2d740d57b55bd025dc4cd'/>
<id>urn:sha1:907adc667d902fafbdb2d740d57b55bd025dc4cd</id>
<content type='text'>
commit a005b7f1a491ffda61bff0fd0f6548f8986fb977 upstream.

The routine ccwchain_calc_length() counts the number of channel
command words (CCWs) that are chained together in a single channel
program, and rejects anything larger than CCWCHAIN_LEN_MAX (256) CCWs.

The loop itself is "do..while (count &lt; 257)", and while the logic in
is_cpa_within_range() correctly adjusts between the 0-index array of
CCWs and the count of CCWs starting at 1, this means it would look
at a possible 257th CCW before ending the loop and (correctly)
returning an error.

Fix this by restructuring the loop to break as soon as 256 CCWs
(thus indexes 0-255) are examined, without looking at memory
outside the range.

Fixes: 0a19e61e6d4c ("vfio: ccw: introduce channel program interfaces")
Cc: stable@vger.kernel.org
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/qeth: validate user buffer length in SNMP and ARP query ioctls</title>
<updated>2026-08-23T12:17:15+00:00</updated>
<author>
<name>Hidayath Khan</name>
<email>hidayath@linux.ibm.com</email>
</author>
<published>2026-07-30T14:22:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=46443eaddebd84c51940857b11787229be169dec'/>
<id>urn:sha1:46443eaddebd84c51940857b11787229be169dec</id>
<content type='text'>
commit d141f087b1af656f055d7c5793a3e87817ba0bbe upstream.

qeth_snmp_command() and qeth_l3_arp_query() allocate a buffer sized by
a user-supplied length (udata_len) without checking a lower bound, then
set udata_offset to a fixed non-zero value and pass both to a reply
callback. The callback bounds-checks the copy with

        if ((udata_len - udata_offset) &lt; len)

Both fields are u32, so a udata_len smaller than udata_offset makes the
subtraction wrap and the check pass, and the following memcpy() writes
past the allocation. A udata_len of 0 also yields ZERO_SIZE_PTR from
kzalloc(), which the existing NULL check does not catch.

Reject buffers smaller than udata_offset before allocating, so the
callback subtraction can no longer underflow.

Fixes: 4a71df50047f ("qeth: new qeth device driver")
Cc: stable@vger.kernel.org
Reviewed-by: Alexandra Winter &lt;wintera@linux.ibm.com&gt;
Signed-off-by: Hidayath Khan &lt;hidayath@linux.ibm.com&gt;
Reviewed-by: Joe Damato &lt;joe@dama.to&gt;
Link: https://patch.msgid.link/20260730142216.218309-1-hidayath@linux.ibm.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/zcrypt: Fix missing mem scrub at clear key import in cca_clr2cipherkey()</title>
<updated>2026-08-19T15:14:12+00:00</updated>
<author>
<name>Harald Freudenberger</name>
<email>freude@linux.ibm.com</email>
</author>
<published>2026-08-10T13:40:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be7ae07fb745d1cf575b03a178a055b0a2859364'/>
<id>urn:sha1:be7ae07fb745d1cf575b03a178a055b0a2859364</id>
<content type='text'>
[ Upstream commit 01476391aecef36a3b789ee844357b22fbc90665 ]

The helper function _ip_cprb_helper() uses internal buffer memory for
building and processing CPRBs. After use this buffer was never
scrubbed which could lead to leaving for example clear key material in
memory which could be exposed via tricky reuse of this same memory.

Extend the _ip_cprb_helper() function with another parameter 'scrub'
used to steer scrubbing of this buffer. So now the caller has the
opportunity to decide if scrubbing is needed or not.

Extend the clear key to secure key token import process in function
cca_clr2cipherkey() to tell the helper function from above to scrub
the cprb buffer when the clear key value is part of the request data.

Add explicit scrubbing on return from function cca_clr2cipherkey() for
the random EXOR buffer and the cprb buffer.

Overall this cleans the internal used buffer in case of clear key
import to prevent sensitive data to get exposed.

Fixes: 4bc123b18ce6 ("s390/zcrypt: Add low level functions for CCA AES cipher keys")
Cc: stable@vger.kernel.org
Reviewed-by: Holger Dengler &lt;dengler@linux.ibm.com&gt;
Signed-off-by: Harald Freudenberger &lt;freude@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Holger Dengler &lt;dengler@linux.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>s390/zcrypt: Validate length for CCA ECC private key requests</title>
<updated>2026-08-19T15:14:11+00:00</updated>
<author>
<name>Holger Dengler</name>
<email>dengler@linux.ibm.com</email>
</author>
<published>2026-07-29T09:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=447a37a6bef11bfd3645069e380460b11386e2b9'/>
<id>urn:sha1:447a37a6bef11bfd3645069e380460b11386e2b9</id>
<content type='text'>
commit a9ae0f6dd45c3ccc1d69363f7aea8af179122730 upstream.

cca_ecc2protkey() derives the copy length for the CPRB parameter
block directly from the length field in the key token. Reject the
request early if the token length exceeds the available space in the
parameter block.

Fixes: fa6999e326fe ("s390/pkey: support CCA and EP11 secure ECC private keys")
Signed-off-by: Holger Dengler &lt;dengler@linux.ibm.com&gt;
Cc: stable@vger.kernel.org # 5.10+
Reviewed-by: Harald Freudenberger &lt;freude@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>s390/zcrypt: Validate length for CCA AES cipher key requests</title>
<updated>2026-08-19T15:14:11+00:00</updated>
<author>
<name>Holger Dengler</name>
<email>dengler@linux.ibm.com</email>
</author>
<published>2026-07-29T09:36:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e500ecb6704d879f9c2417c2ed6faba595015ca'/>
<id>urn:sha1:4e500ecb6704d879f9c2417c2ed6faba595015ca</id>
<content type='text'>
commit 06afe425d5283b9764303de47f554da5a808ce8a upstream.

cca_cipher2protkey() derives the copy length for the CPRB parameter
block directly from the length field in the key token. Reject the
request early if the token length exceeds the available space in the
parameter block.

Fixes: 4bc123b18ce6 ("s390/zcrypt: Add low level functions for CCA AES cipher keys")
Signed-off-by: Holger Dengler &lt;dengler@linux.ibm.com&gt;
Cc: stable@vger.kernel.org # 5.4+
Reviewed-by: Harald Freudenberger &lt;freude@linux.ibm.com&gt;
Signed-off-by: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
