<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/drivers/md/dm-integrity.c, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-08-03T15:46:40+00:00</updated>
<entry>
<title>dm-integrity: replace forgeable discard filler with a keyed sector marker</title>
<updated>2026-08-03T15:46:40+00:00</updated>
<author>
<name>Shukai Ni</name>
<email>shukai.ni@kuleuven.be</email>
</author>
<published>2026-07-28T14:33:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=68c5c42567bc462139128968ebbfadd0aefff519'/>
<id>urn:sha1:68c5c42567bc462139128968ebbfadd0aefff519</id>
<content type='text'>
The discard-block check in dm_integrity_rw_tag() treats a stored tag
of all 0xf6 bytes (DISCARD_FILLER) as proof a block was discarded and
skips HMAC verification. allow_discards is only accepted in
dm-integrity's standalone mode. An attacker with raw write access to
the backing device, but without the integrity key, can stamp any block
with an all-0xf6 tag and have it served as authentic.

Add a new "allow_discards_keyed" target argument that marks discarded
blocks with a keyed checksum of (salt || sector) instead, computed by
integrity_discard_checksum().

Fixes: 84597a44a9d8 ("dm integrity: add optional discard support")
Co-developed-by: Jo Van Bulck &lt;jo.vanbulck@cs.kuleuven.be&gt;
Signed-off-by: Jo Van Bulck &lt;jo.vanbulck@cs.kuleuven.be&gt;
Signed-off-by: Shukai Ni &lt;shukai.ni@kuleuven.be&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm-io: report non-retryable errors separatedly</title>
<updated>2026-07-27T21:09:28+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-27T21:09:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=47a5e62f39875f371bded6e34ffb9cf15ccd813d'/>
<id>urn:sha1:47a5e62f39875f371bded6e34ffb9cf15ccd813d</id>
<content type='text'>
The error codes BLK_STS_NOTSUPP and BLK_STS_INVAL should not cause leg
failure on dm-raid1. This patch changes the interface to dm-io, so that
it reports two error bitmaps - error_bits and unsup_bits. The unsup_bit
bitmap tracks BLK_STS_NOTSUPP or BLK_STS_INVAL errors, the error_bits
bitmap tracks all the other errors.

dm-raid1 is changed so that it won't fail a leg if it receives an error
in the unsup_bits bitmap.

This patch (with 62dc37a819a5) fixes misbehavior if the user uses
unaligned bio vectors on dm-raid1.

Fixes: 7eac33186957 ("iomap: simplify direct io validity check")
Fixes: 5ff3f74e145a ("block: simplify direct io validity check")
Cc: stable@vger.kernel.org
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm-integrity: fix wrong fallthrough in integrity_bio_wait</title>
<updated>2026-07-13T19:32:24+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-13T19:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=553f9a9a36a600977f01bfbcc8139ce0ca419384'/>
<id>urn:sha1:553f9a9a36a600977f01bfbcc8139ce0ca419384</id>
<content type='text'>
If dm_integrity_map_inline returned DM_MAPIO_KILL, the code would set
status BLK_STS_IOERR and then incorrectly fall through and submit the
bio. Luckily, dm_integrity_map_inline can't return DM_MAPIO_KILL at this
point, so the bug is just theoretical.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
</content>
</entry>
<entry>
<title>dm-integrity: clean-up error handling</title>
<updated>2026-07-13T19:32:03+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-13T19:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=4e53905a9da1736a448ab89f455ce3454de9e633'/>
<id>urn:sha1:4e53905a9da1736a448ab89f455ce3454de9e633</id>
<content type='text'>
Add "goto bad" to error handling. This commit doesn't fix any bug, just
cleans up the code.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
</content>
</entry>
<entry>
<title>dm-integrity: fix error message</title>
<updated>2026-07-13T19:31:27+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-13T19:23:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=70094662c1c95c05f1ec839c8117b3bd5668b361'/>
<id>urn:sha1:70094662c1c95c05f1ec839c8117b3bd5668b361</id>
<content type='text'>
Change "reading tags" to "writing tags" because the error is reported
when writing fails.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
</content>
</entry>
<entry>
<title>dm-integrity: fix a bug if the bio is out of limits</title>
<updated>2026-07-10T12:39:47+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-09T19:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5a266764fadaff8b5c1fe37a186ebf9b09cb953e'/>
<id>urn:sha1:5a266764fadaff8b5c1fe37a186ebf9b09cb953e</id>
<content type='text'>
If dm_integrity_check_limits fails, the code would exit with
DM_MAPIO_KILL. However, the range would be already locked at this point,
and it wouldn't be unlocked, resulting in a deadlock. Let's move the
limit check up, so that when it exits, no resources are leaked.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode")
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm-integrity: don't increment hash_offset twice</title>
<updated>2026-07-10T12:39:16+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-09T19:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=edf025f083854f80032b73a1aad69a3c90db236f'/>
<id>urn:sha1:edf025f083854f80032b73a1aad69a3c90db236f</id>
<content type='text'>
hash_offset is already incremented in the loop "for (i = 0; i &lt; to_copy;
i++, ts--)". Do not increment it again.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
Fixes: 84597a44a9d8 ("dm-integrity: dm integrity: add optional discard support")
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm-integrity: fix leaking uninitialized kernel memory</title>
<updated>2026-07-10T12:38:50+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-09T19:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7bb03b2b01b814a9fc14afbfc2cbb2cca5b34750'/>
<id>urn:sha1:7bb03b2b01b814a9fc14afbfc2cbb2cca5b34750</id>
<content type='text'>
If hash size is less than device's tuple size, dm-integrity is supposed
to zero the remaining space. There was a bug in the code that zeroing
didn't work. This commit fixes it.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Assisted-by: Claude:claude-opus-4.6
Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode")
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm-integrity: fix the 'fix_hmac' option</title>
<updated>2026-07-10T12:38:01+00:00</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2026-07-10T12:31:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=24d7e5e39b04c1ef8eee0688ca1527e879b22a40'/>
<id>urn:sha1:24d7e5e39b04c1ef8eee0688ca1527e879b22a40</id>
<content type='text'>
When the "fix_hmac" argument is used, dm-integrity is supposed to check
the superblock with the journal_mac. However, there was a logic bug in
the code - the code only checked the superblock mac if the bit
SB_FLAG_FIXED_HMAC was set in the superblock. So, the attacker could
clear this bit and bypass the checking trivially.

This commit changes dm-integrity so that when the user specified the
"fix_hmac" flag and the superblock doesn't have the bit
SB_FLAG_FIXED_HMAC set, the activation is aborted with an error.

Unfortunatelly, there's a bug in the integritysetup tool that when using
the 'open' command it passes the "fix_hmac" argument to the kernel even
if the user specified --integrity-legacy-hmac. The bug will be fixed in
the upcoming 2.8.7 release.

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Reported-by: Shukai Ni &lt;shukai.ni@kuleuven.be&gt;
</content>
</entry>
<entry>
<title>dm: provide helper to set stacked limits</title>
<updated>2026-03-27T21:19:17+00:00</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2026-03-25T19:36:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=33eded29319d41fcba5d0257b126a48b449aad47'/>
<id>urn:sha1:33eded29319d41fcba5d0257b126a48b449aad47</id>
<content type='text'>
There are multiple device mappers that set up their stacking limits
exactly the same for the logical, physical and minimum IO queue limits.
Provide a helper for it.

Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
</content>
</entry>
</feed>
