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
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
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
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
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):
> > >
> > >
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
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
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
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
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
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
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
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
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
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
.
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
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
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
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
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
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
M_CONTROL_NODE) == 0 ||
+ strcmp(name, ".") == 0 ||
+ strcmp(name, "..") == 0) {
+ DMERR("device name cannot be \"%s\", \".\", or \"..\"",
DM_CONTROL_NODE);
return -EINVAL;
}
--
Sincerely,
Dem
. 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
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
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
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
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
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
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/
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 '/'.
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
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
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/
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
, 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
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
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
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/
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
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
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(-)
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
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
M_CONTROL_NODE) == 0 ||
+ strcmp(name, ".") == 0 ||
+ strcmp(name, "..") == 0) {
+ DMERR("device name cannot be \"%s\", \".\", or \"..\"",
DM_CONTROL_NODE);
return -EINVAL;
}
--
Sincerely,
Dem
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
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
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
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
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(-)
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
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
M_CONTROL_NODE) == 0 ||
+ strcmp(name, ".") == 0 ||
+ strcmp(name, "..") == 0) {
+ DMERR("device name cannot be \"%s\", \".\", or \"..\"",
DM_CONTROL_NODE);
return -EINVAL;
}
--
Sincerely,
Dem
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
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"
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:
&
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:
&
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:
&
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"
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:
&
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:
&
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:
&
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
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.
> >
> >
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
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
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
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
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
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
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
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
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
72 matches
Mail list logo