summaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-02-19 21:28:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-03-01 13:26:31 +0100
commit27c1ade6068fe4de9eee0fa1dc9393fd4b79246c (patch)
treeaf1f4e11154540f203c195c23014fdac2de7285f /drivers/usb/cdns3/cdns3-imx.c
parente08c2a8d27e989f0f5b0888792643027d7e691e6 (diff)
dm-verity: recheck the hash after a failure
commit 9177f3c0dea6143d05cac1bbd28668fd0e216d11 upstream. If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-verity reports an error [1]. This commit fixes dm-verity, so that if hash verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the hash is rechecked. If the recheck succeeds, the content of the kernel buffer is copied into the user buffer; if the recheck fails, an error is reported. [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions