linux-stable/drivers/md
Sweet Tea c6cd92fcab dm flakey: Properly corrupt multi-page bios.
[ Upstream commit a00f5276e2 ]

The flakey target is documented to be able to corrupt the Nth byte in
a bio, but does not corrupt byte indices after the first biovec in the
bio. Change the corrupting function to actually corrupt the Nth byte
no matter in which biovec that index falls.

A test device generating two-page bios, atop a flakey device configured
to corrupt a byte index on the second page, verified both the failure
to corrupt before this patch and the expected corruption after this
change.

Signed-off-by: John Dorminy <jdorminy@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-05 15:37:32 +01:00
..
bcache bcache: recal cached_dev_sectors on detach 2019-11-24 08:23:22 +01:00
persistent-data dm space map metadata: fix missing store of apply_bops() return value 2019-08-29 08:26:44 +02:00
bitmap.c md: free unused memory after bitmap resize 2017-12-17 15:08:00 +01:00
bitmap.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dm-bio-prison-v1.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-bio-prison-v1.h block: switch bios to blk_status_t 2017-06-09 09:27:32 -06:00
dm-bio-prison-v2.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-bio-prison-v2.h dm bio prison v2: new interface for the bio prison 2017-03-07 11:30:16 -05:00
dm-bio-record.h block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
dm-bufio.c Revert "dm bufio: fix deadlock with loop device" 2019-08-29 08:26:42 +02:00
dm-bufio.h dm integrity: optimize writing dm-bufio buffers that are partially changed 2017-08-28 11:47:17 -04:00
dm-builtin.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dm-cache-background-tracker.c dm cache: handle kmalloc failure allocating background_tracker struct 2017-05-17 09:44:53 -04:00
dm-cache-background-tracker.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: Fix loading discard bitset 2019-05-25 18:25:32 +02:00
dm-cache-metadata.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-policy-internal.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-policy-smq.c dm cache policy smq: don't do any writebacks unless IDLE 2017-05-14 21:54:33 -04:00
dm-cache-policy.c
dm-cache-policy.h dm cache: significant rework to leverage dm-bio-prison-v2 2017-03-07 13:28:31 -05:00
dm-cache-target.c dm cache: destroy migration_cache if cache target registration failed 2018-10-18 09:16:24 +02:00
dm-core.h dm: allocate struct mapped_device with kvzalloc 2017-11-30 08:40:43 +00:00
dm-crypt.c dm: disable CRYPTO_TFM_REQ_MAY_SLEEP to fix a GFP_KERNEL recursion deadlock 2019-04-20 09:15:08 +02:00
dm-delay.c dm delay: fix a crash when invalid device is specified 2019-05-25 18:25:33 +02:00
dm-era-target.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
dm-exception-store.c
dm-exception-store.h
dm-flakey.c dm flakey: Properly corrupt multi-page bios. 2019-12-05 15:37:32 +01:00
dm-integrity.c dm integrity: change memcmp to strncmp in dm_integrity_ctr 2019-05-02 09:40:32 +02:00
dm-io.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-ioctl.c dm ioctl: harden copy_params()'s copy_from_user() from malicious users 2018-11-13 11:15:10 -08:00
dm-kcopyd.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-linear.c dm linear: fix linear_end_io conditional definition 2018-10-18 09:16:24 +02:00
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c dm log writes: make sure super sector log updates are written in order 2019-07-03 13:16:00 +02:00
dm-log.c
dm-mpath.c dm mpath: return DM_MAPIO_REQUEUE on blk-mq rq allocation failure 2018-04-26 11:02:07 +02:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm raid: avoid bitmap with raid4/5/6 journal device 2019-12-01 09:13:42 +01:00
dm-raid1.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
dm-region-hash.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-round-robin.c
dm-rq.c dm rq: do not update rq partially in each ending bio 2017-08-28 10:23:28 -04:00
dm-rq.h dm rq: do not update rq partially in each ending bio 2017-08-28 10:23:28 -04:00
dm-service-time.c
dm-snap-persistent.c dm: make flush bios explicitly sync 2017-05-31 10:50:23 -04:00
dm-snap-transient.c
dm-snap.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-stats.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dm-stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dm-stripe.c - Some request-based DM core and DM multipath fixes and cleanups 2017-09-14 13:43:16 -07:00
dm-switch.c - Some request-based DM core and DM multipath fixes and cleanups 2017-09-14 13:43:16 -07:00
dm-sysfs.c
dm-table.c dm table: fix invalid memory accesses with too high sector number 2019-08-29 08:26:44 +02:00
dm-target.c dm: don't return errnos from ->map 2017-06-09 09:27:32 -06:00
dm-thin-metadata.c dm thin: fix passdown_double_checking_shared_status() 2019-01-31 08:13:45 +01:00
dm-thin-metadata.h dm thin: fix passdown_double_checking_shared_status() 2019-01-31 08:13:45 +01:00
dm-thin.c dm: Use kzalloc for all structs with embedded biosets/mempools 2019-11-06 12:42:52 +01:00
dm-uevent.c
dm-uevent.h
dm-verity-fec.c dm verity fec: fix GFP flags used with mempool_alloc() 2017-07-26 15:55:44 -04:00
dm-verity-fec.h dm verity fec: limit error correction recursion 2017-03-16 09:37:31 -04:00
dm-verity-target.c dm verity: use message limit for data block corruption message 2019-07-21 09:04:40 +02:00
dm-verity.h dm verity: switch to using asynchronous hash crypto API 2017-04-24 15:37:04 -04:00
dm-zero.c dm: don't return errnos from ->map 2017-06-09 09:27:32 -06:00
dm-zoned-metadata.c dm zoned: fix potential NULL dereference in dmz_do_reclaim() 2019-08-29 08:26:45 +02:00
dm-zoned-reclaim.c dm zoned: properly handle backing device failure 2019-08-29 08:26:44 +02:00
dm-zoned-target.c dm zoned: fix invalid memory access 2019-10-05 12:47:37 +02:00
dm-zoned.h dm zoned: properly handle backing device failure 2019-08-29 08:26:44 +02:00
dm.c dm: fix report zone remapping to account for partition offset 2018-10-18 09:16:24 +02:00
dm.h dm: introduce enum dm_queue_mode to cleanup related code 2017-04-27 17:08:44 -04:00
faulty.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
Kconfig dm zoned: drive-managed zoned block device target 2017-06-19 11:05:20 -04:00
linear.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
linear.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
md-cluster.c md-cluster: clear another node's suspend_area after the copy is finished 2018-10-03 17:00:47 -07:00
md-cluster.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
md.c md: allow metadata updates while suspending an array - fix 2019-11-24 08:23:03 +01:00
md.h md: don't report active array_state until after revalidate_disk() completes. 2019-10-05 12:48:10 +02:00
multipath.c block: replace bi_bdev with a gendisk pointer and partitions index 2017-08-23 12:49:55 -06:00
multipath.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
raid0.c md/raid0: fix warning message for parameter default_layout 2019-10-29 09:16:59 +01:00
raid0.h md/raid0: avoid RAID0 data corruption due to layout confusion. 2019-10-05 12:48:13 +02:00
raid1-10.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
raid1.c md/raid1: fail run raid1 array when active disk less than one 2019-10-05 12:48:00 +02:00
raid1.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
raid5-cache.c md/raid5: fix 'out of memory' during raid cache recovery 2019-02-06 17:31:37 +01:00
raid5-log.h md/raid5-cache: disable reshape completely 2018-10-10 08:54:20 +02:00
raid5-ppl.c raid5-ppl: check recovery_offset when performing ppl recovery 2017-12-20 10:10:36 +01:00
raid5.c md/raid6: Set R5_ReadError when there is read failure on parity disk 2019-10-05 12:48:10 +02:00
raid5.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
raid10.c md/raid10: prevent access of uninitialized resync_pages offset 2019-12-01 09:14:17 +01:00
raid10.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00