Re: [dm-devel] Thin pool performance when allocating lots of blocks

2022-02-09 Thread Demi Marie Obenour
On 2/8/22 15:37, Zdenek Kabelac wrote: > Dne 08. 02. 22 v 20:00 Demi Marie Obenour napsal(a): >> Are thin volumes (which start as snapshots of a blank volume) efficient >> for building virtual machine images? Given the nature of this workload >> (writing to lots of new, possi

[dm-devel] Thin pool performance when allocating lots of blocks

2022-02-09 Thread Demi Marie Obenour
of performance problems? If it is, are there any better solutions? -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] Potential enhancements to dm-thin v2

2022-04-10 Thread Demi Marie Obenour
omatically is infeasible for arbitrary device stacks, but this is a common special case. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-12 Thread Demi Marie Obenour
On Mon, Apr 11, 2022 at 10:16:02AM +0200, Zdenek Kabelac wrote: > Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): > > For quite a while, I have wanted to write a tool to manage thin volumes > > that is not based on LVM. The main thing holding me back is that the > > curr

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-12 Thread Demi Marie Obenour
On Mon, Apr 11, 2022 at 10:16:43PM +0200, Zdenek Kabelac wrote: > Dne 11. 04. 22 v 19:22 Demi Marie Obenour napsal(a): > > On Mon, Apr 11, 2022 at 10:16:02AM +0200, Zdenek Kabelac wrote: > > > Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): > > > > > >

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-14 Thread Demi Marie Obenour
On Wed, Apr 13, 2022 at 09:55:00AM +0200, Zdenek Kabelac wrote: > Dne 12. 04. 22 v 16:29 David Teigland napsal(a): > > Dne 11. 04. 22 v 0:03 Demi Marie Obenour napsal(a): > > > For quite a while, I have wanted to write a tool to manage thin volumes > > > that is not ba

Re: [dm-devel] Potential enhancements to dm-thin v2

2022-04-14 Thread Demi Marie Obenour
On 4/12/22 05:32, Zdenek Kabelac wrote: > Dne 12. 04. 22 v 0:30 Demi Marie Obenour napsal(a): >> On Mon, Apr 11, 2022 at 10:16:43PM +0200, Zdenek Kabelac wrote: >>> Dne 11. 04. 22 v 19:22 Demi Marie Obenour napsal(a): >>>> On Mon, Apr 11, 2022 at 10:16:02AM +0200, Z

Re: [dm-devel] [PATCH v2] dm-crypt: make printing of the key constant-time

2022-05-09 Thread Demi Marie Obenour
Nit: did you mean CC: sta...@vger.kernel.org (colon instead of semicolon)? Also, would it be better to avoid using the formatting built-in to DMEMIT()? Finally, are there any architectures for which gcc or clang make this non-constant-time? -- Sincerely, Demi Marie Obenour (she/her/hers

[dm-devel] Kernel panic in dm-thin

2022-07-18 Thread Demi Marie Obenour
ge, but it obviously should still be fixed. Panic message and stack trace attached. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab <1>[13053.503343] BUG: kernel NULL pointer dereference, address: 0014 <1>[13053.503353] #PF: supervisor read access in kernel

[dm-devel] Kernel panic when device’s table references itself

2022-11-03 Thread Demi Marie Obenour
lock_ioctl. This is Fedora’s Linux 6.0.5 in case it matters. -- Sincerely, Demi Marie Obenour (she/her/hers) -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [RFC PATCH 0/7] Allow race-free block device handling

2023-01-26 Thread Demi Marie Obenour
insecure. - The DM_DEV_CREATE ioctl gains a new flag. Unknown flags were previously ignored, so this could theoretically break buggy userspace tools. - I have no idea if I got the block device reference counting and locking correct. Demi Marie Obenour (7): block: Support creating a struct

[dm-devel] [RFC PATCH 2/7] Allow userspace to get an FD to a newly-created DM device

2023-01-26 Thread Demi Marie Obenour
This allows creating a device-mapper device, opening it, and setting it to be deleted when unused in a single atomic operation. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c | 67 +-- include/uapi/linux/dm-ioctl.h | 16 - 2 files

Re: [dm-devel] [RFC PATCH 0/7] Allow race-free block device handling

2023-02-05 Thread Demi Marie Obenour
On Thu, Feb 02, 2023 at 02:56:34PM -0500, Mike Snitzer wrote: > On Thu, Feb 02 2023 at 1:41P -0500, > Demi Marie Obenour wrote: > > > On Thu, Feb 02, 2023 at 11:50:37AM -0500, Mike Snitzer wrote: > > > On Wed, Jan 25 2023 at 10:33P -0500, > > > Demi Marie Ob

Re: [dm-devel] [RFC PATCH 0/7] Allow race-free block device handling

2023-02-05 Thread Demi Marie Obenour
On Thu, Feb 02, 2023 at 11:50:37AM -0500, Mike Snitzer wrote: > On Wed, Jan 25 2023 at 10:33P -0500, > Demi Marie Obenour wrote: > > > This work aims to allow userspace to create and destroy block devices > > in a race-free and leak-free way, > > "race-free and l

[dm-devel] [PATCH 2/2] dm-thin: Allow specifying an offset

2023-02-06 Thread Demi Marie Obenour
This allows exposing only part of a thin volume without having to layer dm-linear. One use-case is a hypervisor replacing a partition table. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-thin.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff

[dm-devel] [PATCH 1/2] Fail I/O to thin pool devices

2023-02-06 Thread Demi Marie Obenour
. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-thin.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 64cfcf46881dc5d87d5dfdb5650ba9babd32cd31..d85fdbd782ae5426003c99a4b4bf53818cc85efa 100644 --- a

Re: [dm-devel] [PATCH 2/2] dm-thin: Allow specifying an offset

2023-02-07 Thread Demi Marie Obenour
et also has this feature, so there is precedent. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 1/2] Fail I/O to thin pool devices

2023-02-07 Thread Demi Marie Obenour
eral I prefer not to expose unnecessary attack surface. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH] dm-table: Check that a dm device doesn't reference itself

2023-02-07 Thread Demi Marie Obenour
devt(t->md->disk)) > + return -EINVAL; > > dd = find_device(&t->devices, dev); > if (!dd) { > -- > 2.30.2 I like this! More generally, should the kernel fail with -ELOOP if devices are stacked too deeply? - -- Sincerely, Demi Marie Obenour (she/her

[dm-devel] Thin pool CoW latency

2023-03-05 Thread Demi Marie Obenour
throwaway VM or installing packages onto a root volume that had just been shapshotted are dominated by metadata operations, rather than by in-place updates. I suspect that frequently-snapshotted volumes will observe similar behavior in general. - -- Sincerely, Demi Marie Obenour (she/her/hers

[dm-devel] [PATCH v2 12/16] device-mapper: inform caller about already-existing device

2023-05-30 Thread Demi Marie Obenour
Not only is this helpful for debugging, it also saves the caller an ioctl in the case where a device should be used if it exists or created otherwise. To ensure existing userspace is not broken, this feature is only enabled in strict mode. Signed-off-by: Demi Marie Obenour --- drivers/md/dm

[dm-devel] [PATCH v2 11/16] device-mapper: "." and ".." are not valid symlink names

2023-05-30 Thread Demi Marie Obenour
M_CONTROL_NODE) == 0 || + strcmp(name, ".") == 0 || + strcmp(name, "..") == 0) { + DMERR("device name cannot be \"%s\", \".\", or \"..\"", DM_CONTROL_NODE); return -EINVAL; } -- Sincerely, Dem

[dm-devel] [PATCH v2 14/16] block, loop: Increment diskseq when releasing a loop device

2023-05-30 Thread Demi Marie Obenour
. Export the inc_diskseq() function to make this possible. Signed-off-by: Demi Marie Obenour --- I considered destroying the loop device altogether instead of bumping its diskseq, but was not able to accomplish that. Suggestions welcome. --- block/genhd.c| 1 + drivers/block/loop.c | 6

[dm-devel] [PATCH v2 10/16] device-mapper: Refuse to create device named "control"

2023-05-30 Thread Demi Marie Obenour
Typical userspace setups create a symlink under /dev/mapper with the name of the device, but /dev/mapper/control is reserved for the control device. Therefore, trying to create such a device is almost certain to be a userspace bug. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c

[dm-devel] [PATCH v2 09/16] device-mapper: Allow userspace to suppress uevent generation

2023-05-30 Thread Demi Marie Obenour
Userspace can use this to avoid spamming udev with events that udev should ignore. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-core.h | 2 + drivers/md/dm-ioctl.c | 78 ++- drivers/md/dm.c | 5 ++- include/linux/device

[dm-devel] [PATCH v2 07/16] device-mapper: Allow userspace to opt-in to strict parameter checks

2023-05-30 Thread Demi Marie Obenour
supported by the ioctl, as well as nonzero padding and names and UUIDs that are not NUL-terminated. New flags will only be recognized if major version 5 is used. Kernels without this patch return -EINVAL if the major version is 5, so this is backwards compatible. Signed-off-by: Demi Marie Obenour

[dm-devel] [PATCH v2 15/16] xen-blkback: Minor cleanups

2023-05-30 Thread Demi Marie Obenour
This adds a couple of BUILD_BUG_ON()s and moves some arithmetic after the validation code that checks the arithmetic’s preconditions. The previous code was correct but could potentially trip sanitizers that check for unsigned integer wraparound. Signed-off-by: Demi Marie Obenour --- drivers

[dm-devel] [PATCH v2 02/16] device-mapper: Avoid pointer arithmetic overflow

2023-05-30 Thread Demi Marie Obenour
Especially on 32-bit systems, it is possible for the pointer arithmetic to overflow and cause a userspace pointer to be dereferenced in the kernel. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-io

[dm-devel] [PATCH v2 06/16] device-mapper: Avoid double-fetch of version

2023-05-30 Thread Demi Marie Obenour
ome a problem if future patches start relying on the version field. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/

[dm-devel] [PATCH v2 00/16] Diskseq support in loop, device-mapper, and blkback

2023-05-30 Thread Demi Marie Obenour
t;, "..", or "control". Since device-mapper devices are often accessed via /dev/mapper/NAME, such names would likely greatly confuse userspace. I consider this to be an extension of the existing check that prohibits device mapper names or UUIDs from containing '/'.

[dm-devel] [PATCH v2 04/16] device-mapper: Better error message for too-short target spec

2023-05-30 Thread Demi Marie Obenour
Previously the error was "unable to find target", which is not helpful. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioc

[dm-devel] [PATCH v2 05/16] device-mapper: Target parameters must not overlap next target spec

2023-05-30 Thread Demi Marie Obenour
The NUL terminator for each target parameter string must preceed the following 'struct dm_target_spec'. Otherwise, dm_split_args() might corrupt this struct. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- driver

[dm-devel] [PATCH v2 03/16] device-mapper: do not allow targets to overlap 'struct dm_ioctl'

2023-05-30 Thread Demi Marie Obenour
This prevents dm_split_args() from corrupting this struct. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/

[dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-05-30 Thread Demi Marie Obenour
support the new syntax, but a later patch will allow userspace to discover that the new syntax is supported. Signed-off-by: Demi Marie Obenour --- drivers/block/xen-blkback/xenbus.c | 112 +++-- 1 file changed, 89 insertions(+), 23 deletions(-) diff --git a/drivers/block

[dm-devel] [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened

2023-05-30 Thread Demi Marie Obenour
, such as loop devices with the autoclear flag set or device-mapper devices with the deferred-remove flag set. Signed-off-by: Demi Marie Obenour --- drivers/block/xen-blkback/xenbus.c | 35 ++ 1 file changed, 35 insertions(+) diff --git a/dri

[dm-devel] [PATCH v2 08/16] device-mapper: Allow userspace to provide expected diskseq

2023-05-30 Thread Demi Marie Obenour
This can be used to avoid race conditions in which a device is destroyed and recreated with the same major/minor, name, or UUID. diskseqs are only honored if strict parameter checking is on, to avoid any risk of breaking old userspace. Signed-off-by: Demi Marie Obenour --- drivers/md/dm

[dm-devel] [PATCH v2 01/16] device-mapper: Check that target specs are sufficiently aligned

2023-05-30 Thread Demi Marie Obenour
Otherwise subsequent code will dereference a misaligned `struct dm_target_spec *`, which is undefined behavior. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 7 +++ 1 file changed, 7 insertion

[dm-devel] [PATCH 4/6] device-mapper: Avoid double-fetch of version

2023-06-01 Thread Demi Marie Obenour
ome a problem if future patches start relying on the version field. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/

[dm-devel] [PATCH 5/6] device-mapper: Refuse to create device named "control"

2023-06-01 Thread Demi Marie Obenour
Typical userspace setups create a symlink under /dev/mapper with the name of the device, but /dev/mapper/control is reserved for the control device. Therefore, trying to create such a device is almost certain to be a userspace bug. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c

[dm-devel] [PATCH 0/6] Several device-mapper fixes

2023-06-01 Thread Demi Marie Obenour
at have existed since at least the beginning of git history. Demi Marie Obenour (6): device-mapper: Check that target specs are sufficiently aligned device-mapper: Avoid pointer arithmetic overflow device-mapper: structs and parameter strings must not overlap device-mapper: Avoid double-fe

[dm-devel] [PATCH 3/6] device-mapper: structs and parameter strings must not overlap

2023-06-01 Thread Demi Marie Obenour
too much dm_split_args() could corrupt the 'struct dm_ioctl'. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-)

[dm-devel] [PATCH 2/6] device-mapper: Avoid pointer arithmetic overflow

2023-06-01 Thread Demi Marie Obenour
Especially on 32-bit systems, it is possible for the pointer arithmetic to overflow and cause a userspace pointer to be dereferenced in the kernel. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-io

[dm-devel] [PATCH 1/6] device-mapper: Check that target specs are sufficiently aligned

2023-06-01 Thread Demi Marie Obenour
Otherwise subsequent code will dereference a misaligned `struct dm_target_spec *`, which is undefined behavior. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 7 +++ 1 file changed, 7 insertion

[dm-devel] [PATCH 6/6] device-mapper: "." and ".." are not valid symlink names

2023-06-01 Thread Demi Marie Obenour
M_CONTROL_NODE) == 0 || + strcmp(name, ".") == 0 || + strcmp(name, "..") == 0) { + DMERR("device name cannot be \"%s\", \".\", or \"..\"", DM_CONTROL_NODE); return -EINVAL; } -- Sincerely, Dem

Re: [dm-devel] [PATCH 4/6] device-mapper: Avoid double-fetch of version

2023-06-03 Thread Demi Marie Obenour
r patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: > https://github.com/intel-lab-lkp/linux/commits/Demi

[dm-devel] [PATCH v2 0/6] Several device-mapper fixes

2023-06-03 Thread Demi Marie Obenour
at have existed since at least the beginning of git history. Changes since v1: - Fix silly mistake (using sizeof() on a pointer) caught by 0day bot. Demi Marie Obenour (6): device-mapper: Check that target specs are sufficiently aligned device-mapper: Avoid pointer arithmetic overflow device

[dm-devel] [PATCH v2 2/6] device-mapper: Avoid pointer arithmetic overflow

2023-06-03 Thread Demi Marie Obenour
Especially on 32-bit systems, it is possible for the pointer arithmetic to overflow and cause a userspace pointer to be dereferenced in the kernel. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-io

[dm-devel] [PATCH v2 1/6] device-mapper: Check that target specs are sufficiently aligned

2023-06-03 Thread Demi Marie Obenour
Otherwise subsequent code will dereference a misaligned `struct dm_target_spec *`, which is undefined behavior. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 7 +++ 1 file changed, 7 insertion

[dm-devel] [PATCH v2 3/6] device-mapper: structs and parameter strings must not overlap

2023-06-03 Thread Demi Marie Obenour
too much dm_split_args() could corrupt the 'struct dm_ioctl'. Signed-off-by: Demi Marie Obenour Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org --- drivers/md/dm-ioctl.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-)

[dm-devel] [PATCH v2 4/6] device-mapper: Avoid double-fetch of version

2023-06-03 Thread Demi Marie Obenour
ome a problem if future patches start relying on the version field. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: sta...@vger.kernel.org Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --g

[dm-devel] [PATCH v2 5/6] device-mapper: Refuse to create device named "control"

2023-06-03 Thread Demi Marie Obenour
Typical userspace setups create a symlink under /dev/mapper with the name of the device, but /dev/mapper/control is reserved for the control device. Therefore, trying to create such a device is almost certain to be a userspace bug. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-ioctl.c

[dm-devel] [PATCH v2 6/6] device-mapper: "." and ".." are not valid symlink names

2023-06-03 Thread Demi Marie Obenour
M_CONTROL_NODE) == 0 || + strcmp(name, ".") == 0 || + strcmp(name, "..") == 0) { + DMERR("device name cannot be \"%s\", \".\", or \"..\"", DM_CONTROL_NODE); return -EINVAL; } -- Sincerely, Dem

Re: [dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-06 Thread Demi Marie Obenour
On Tue, Jun 06, 2023 at 10:25:47AM +0200, Roger Pau Monné wrote: > On Tue, May 30, 2023 at 04:31:13PM -0400, Demi Marie Obenour wrote: > > This allows specifying a disk sequence number in XenStore. If it does > > not match the disk sequence number of the underlying device, the devi

Re: [dm-devel] [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened

2023-06-06 Thread Demi Marie Obenour
On Tue, Jun 06, 2023 at 11:15:37AM +0200, Roger Pau Monné wrote: > On Tue, May 30, 2023 at 04:31:16PM -0400, Demi Marie Obenour wrote: > > Set "opened" to "0" before the hotplug script is called. Once the > > device node has been opened, set "opened"

Re: [dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-07 Thread Demi Marie Obenour
On Wed, Jun 07, 2023 at 10:20:08AM +0200, Roger Pau Monné wrote: > On Tue, Jun 06, 2023 at 01:01:20PM -0400, Demi Marie Obenour wrote: > > On Tue, Jun 06, 2023 at 10:25:47AM +0200, Roger Pau Monné wrote: > > > On Tue, May 30, 2023 at 04:31:13PM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened

2023-06-07 Thread Demi Marie Obenour
On Wed, Jun 07, 2023 at 10:44:48AM +0200, Roger Pau Monné wrote: > On Tue, Jun 06, 2023 at 01:31:25PM -0400, Demi Marie Obenour wrote: > > On Tue, Jun 06, 2023 at 11:15:37AM +0200, Roger Pau Monné wrote: > > > On Tue, May 30, 2023 at 04:31:16PM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened

2023-06-08 Thread Demi Marie Obenour
On Thu, Jun 08, 2023 at 11:11:44AM +0200, Roger Pau Monné wrote: > On Wed, Jun 07, 2023 at 12:29:26PM -0400, Demi Marie Obenour wrote: > > On Wed, Jun 07, 2023 at 10:44:48AM +0200, Roger Pau Monné wrote: > > > On Tue, Jun 06, 2023 at 01:31:25PM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 16/16] xen-blkback: Inform userspace that device has been opened

2023-06-08 Thread Demi Marie Obenour
On Thu, Jun 08, 2023 at 12:08:55PM +0200, Roger Pau Monné wrote: > On Tue, May 30, 2023 at 04:31:16PM -0400, Demi Marie Obenour wrote: > > Set "opened" to "0" before the hotplug script is called. Once the > > device node has been opened, set "opened"

Re: [dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-08 Thread Demi Marie Obenour
On Thu, Jun 08, 2023 at 10:29:18AM +0200, Roger Pau Monné wrote: > On Wed, Jun 07, 2023 at 12:14:46PM -0400, Demi Marie Obenour wrote: > > On Wed, Jun 07, 2023 at 10:20:08AM +0200, Roger Pau Monné wrote: > > > On Tue, Jun 06, 2023 at 01:01:20PM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-09 Thread Demi Marie Obenour
On Fri, Jun 09, 2023 at 05:13:45PM +0200, Roger Pau Monné wrote: > On Thu, Jun 08, 2023 at 11:33:26AM -0400, Demi Marie Obenour wrote: > > On Thu, Jun 08, 2023 at 10:29:18AM +0200, Roger Pau Monné wrote: > > > On Wed, Jun 07, 2023 at 12:14:46PM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-20 Thread Demi Marie Obenour
On Mon, Jun 12, 2023 at 10:09:39AM +0200, Roger Pau Monné wrote: > On Fri, Jun 09, 2023 at 12:55:39PM -0400, Demi Marie Obenour wrote: > > On Fri, Jun 09, 2023 at 05:13:45PM +0200, Roger Pau Monné wrote: > > > On Thu, Jun 08, 2023 at 11:33:26AM -0400, Demi Marie Obenour wrote: &

Re: [dm-devel] [PATCH v2 4/6] device-mapper: Avoid double-fetch of version

2023-06-22 Thread Demi Marie Obenour
On Thu, Jun 22, 2023 at 12:20:40PM -0400, Mike Snitzer wrote: > On Sat, Jun 03 2023 at 10:52P -0400, > Demi Marie Obenour wrote: > > > The version is fetched once in check_version(), which then does some > > validation and then overwrites the version in userspace wit

Re: [dm-devel] [PATCH v2 1/6] device-mapper: Check that target specs are sufficiently aligned

2023-06-22 Thread Demi Marie Obenour
On Thu, Jun 22, 2023 at 12:28:28PM -0400, Mike Snitzer wrote: > On Sat, Jun 03 2023 at 10:52P -0400, > Demi Marie Obenour wrote: > > > Otherwise subsequent code will dereference a misaligned > > `struct dm_target_spec *`, which is undefined behavior. > > > >

Re: [dm-devel] [PATCH v2 1/6] device-mapper: Check that target specs are sufficiently aligned

2023-06-22 Thread Demi Marie Obenour
On Thu, Jun 22, 2023 at 07:29:52PM +0200, Mikulas Patocka wrote: > > > On Sat, 3 Jun 2023, Demi Marie Obenour wrote: > > > Otherwise subsequent code will dereference a misaligned > > `struct dm_target_spec *`, which is undefined behavior. > > > > Signed-o

[dm-devel] [PATCH v2 1/4] dm ioctl: Allow userspace to opt-in to strict parameter checks

2023-06-24 Thread Demi Marie Obenour
supported by the ioctl, as well as nonzero padding and names and UUIDs that are not NUL-terminated. New flags will only be recognized if major version 5 is used. Kernels without this patch return -EINVAL if the major version is 5, so this is backwards compatible. Signed-off-by: Demi Marie Obenour

[dm-devel] [PATCH v2 0/4] Diskseq support in device-mapper

2023-06-24 Thread Demi Marie Obenour
evice. Furthermore, ioctls that operate on an existing device-mapper device now accept a diskseq parameter, which can be used to prevent races. Demi Marie Obenour (4): dm ioctl: Allow userspace to opt-in to strict parameter checks dm ioctl: Allow userspace to provide expected diskseq dm

[dm-devel] [PATCH v2 3/4] dm ioctl: Allow userspace to suppress uevent generation

2023-06-24 Thread Demi Marie Obenour
Userspace can use this to avoid spamming udev with events that udev should ignore. Signed-off-by: Demi Marie Obenour --- drivers/md/dm-core.h | 2 + drivers/md/dm-ioctl.c | 71 ++- drivers/md/dm.c | 5 ++- include/linux/device

[dm-devel] [PATCH v2 4/4] dm ioctl: inform caller about already-existing device

2023-06-24 Thread Demi Marie Obenour
Not only is this helpful for debugging, it also saves the caller an ioctl in the case where a device should be used if it exists or created otherwise. To ensure existing userspace is not broken, this feature is only enabled in strict mode. Signed-off-by: Demi Marie Obenour --- drivers/md/dm

[dm-devel] [PATCH v2 2/4] dm ioctl: Allow userspace to provide expected diskseq

2023-06-24 Thread Demi Marie Obenour
This can be used to avoid race conditions in which a device is destroyed and recreated with the same major/minor, name, or UUID. diskseqs are only honored if strict parameter checking is on, to avoid any risk of breaking old userspace. Signed-off-by: Demi Marie Obenour --- drivers/md/dm

Re: [dm-devel] [PATCH v2 3/4] dm ioctl: Allow userspace to suppress uevent generation

2023-06-25 Thread Demi Marie Obenour
On Sun, Jun 25, 2023 at 03:25:38PM +0200, Milan Broz wrote: > On 6/25/23 01:09, Demi Marie Obenour wrote: > > Userspace can use this to avoid spamming udev with events that udev > > should ignore. > > Well, does it also mean that udev will not create /dev/disk/by-* symlinks

Re: [dm-devel] [PATCH v2 3/4] dm ioctl: Allow userspace to suppress uevent generation

2023-06-25 Thread Demi Marie Obenour
On Sun, Jun 25, 2023 at 06:33:33PM +0200, Milan Broz wrote: > On 6/25/23 18:02, Demi Marie Obenour wrote: > > On Sun, Jun 25, 2023 at 03:25:38PM +0200, Milan Broz wrote: > > > On 6/25/23 01:09, Demi Marie Obenour wrote: > > > > Userspace can use this to avoid spamm

Re: [dm-devel] [PATCH v2 2/4] dm ioctl: Allow userspace to provide expected diskseq

2023-06-25 Thread Demi Marie Obenour
gt; See also: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4-rc7#n94 > > Regards, > Markus -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab signature.asc Description: PGP signature -- dm-devel