1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/device_mapper
Zdenek Kabelac 8a568b9562 libdm: do not add params for resume and remove
DM_DEVICE_CREATE with table is doing several ioctl operations,
however only some of then takes parameters.
Since _create_and_load_v4() reused already existing dm task from
DM_DEVICE_RELOAD it has also kept passing its table parameters
to DM_DEVICE_RESUME ioctl - but this ioctl is supposed to not take
any argument and thus there is no wiping of passed data - and
since kernel returns buffer and shortens dmi->data_size accordingly,
anything past returned data size remained uncleared in zfree()
function.

This has problem if the user used dm_task_secure_data (i.e. cryptsetup),
as in this case binary expact secured data are erased from main memory
after use, but they may have been left in place.

This patch is also closing the possible hole for error path,
which also reuse same dm task structure for DM_DEVICE_REMOVE.

(cherry picked from commit 10e191fd12)
2018-12-17 14:06:08 +01:00
..
datastruct device_mapper: move hash.[hc] to base/data-struct 2018-06-08 13:54:19 +01:00
ioctl libdm: do not add params for resume and remove 2018-12-17 14:06:08 +01:00
misc cleanup: move cast to det_t into MKDEV macro 2018-12-04 14:33:36 -06:00
mm device_mapper: optimize dm_pool_strndup 2018-12-04 14:33:38 -06:00
regex build: get separate builddir working again 2018-06-04 13:22:14 +01:00
vdo device_mapper: fix incorrect dm_strncpy usage 2018-12-04 14:33:38 -06:00
all.h device_mapper: basic support for vdo dm target 2018-07-09 15:28:35 +02:00
libdm-common.c cleanup: move cast to det_t into MKDEV macro 2018-12-04 14:33:36 -06:00
libdm-common.h device_mapper: rename libdevmapper.h -> all.h 2018-06-08 12:31:45 +01:00
libdm-config.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
libdm-deptree.c devicemapper: retry mirror leg deactivation 2018-12-04 14:33:36 -06:00
libdm-file.c cov: mark warning as expected one 2018-12-04 14:33:36 -06:00
libdm-report.c cov: ensure vars are set 2018-10-15 17:49:44 +02:00
libdm-string.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
libdm-targets.c device-mapper: Fork libdm internally. 2018-05-16 13:00:50 +01:00
libdm-timestamp.c device_mapper: remove dbg_malloc. 2018-06-08 13:40:53 +01:00
Makefile makefiles: improving cleaning rules 2018-12-04 14:33:37 -06:00