From 5245c6470eb926fcafc0a94b1aa8a3de933844af Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Wed, 16 Feb 2011 10:51:07 +1100 Subject: dm-ioctl-add-flag-to-wipe-buffers-for-secure-data Add DM_SECURE_DATA_FLAG which userspace can use to control that all allocated buffers for dm-ioctl are wiped immediatelly after use. The user buffer is wipes as well (we do not want to keep and return sensitive data back to userspace if flag is set). Wiping is useful mainly for cryptsetup to control that key is present in memory only on defined places and only for time needed. (For crypt, key can be present in table during load ot table status, wait and message command). Signed-off-by: Milan Broz --- include/linux/dm-ioctl.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 78bbf47bbb96..3708455ee6c3 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h @@ -267,9 +267,9 @@ enum { #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 19 -#define DM_VERSION_PATCHLEVEL 1 -#define DM_VERSION_EXTRA "-ioctl (2011-01-07)" +#define DM_VERSION_MINOR 20 +#define DM_VERSION_PATCHLEVEL 0 +#define DM_VERSION_EXTRA "-ioctl (2011-02-02)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ @@ -328,4 +328,10 @@ enum { */ #define DM_UUID_FLAG (1 << 14) /* In */ +/* + * If set, all buffers are wiped after use. Use when sending + * or requesting sensitive data such as an encryption key. + */ +#define DM_SECURE_DATA_FLAG (1 << 15) /* In */ + #endif /* _LINUX_DM_IOCTL_H */ -- cgit v1.2.3