Re: [dm-devel] [PATCH] block: fix a crash when bio_for_each_folio_all iterates over an empty bio

2023-04-17 Thread Christoph Hellwig
On Mon, Apr 17, 2023 at 08:32:54PM +0100, Matthew Wilcox wrote: > On Mon, Apr 17, 2023 at 03:11:57PM -0400, Mikulas Patocka wrote: > > If we use bio_for_each_folio_all on an empty bio, it will access the first > > bio vector unconditionally (it is uninitialized) and it may crash > > depending on th

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-04-17 Thread Paul Moore
On Mon, Apr 17, 2023 at 5:18 PM Fan Wu wrote: > On Mon, Apr 17, 2023 at 04:16:29PM -0400, Paul Moore wrote: > > On Mon, Apr 17, 2023 at 2:06???PM Fan Wu wrote: > > > On Thu, Apr 13, 2023 at 02:45:07PM -0400, Paul Moore wrote: > > > > On Wed, Apr 12, 2023 at 7:36???PM Fan Wu > > > > wrote: > > >

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-04-17 Thread Fan Wu
On Mon, Apr 17, 2023 at 04:16:29PM -0400, Paul Moore wrote: > On Mon, Apr 17, 2023 at 2:06???PM Fan Wu wrote: > > On Thu, Apr 13, 2023 at 02:45:07PM -0400, Paul Moore wrote: > > > On Wed, Apr 12, 2023 at 7:36???PM Fan Wu > > > wrote: > > > > On Tue, Apr 11, 2023 at 05:45:41PM -0400, Paul Moore w

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-04-17 Thread Paul Moore
On Mon, Apr 17, 2023 at 2:06 PM Fan Wu wrote: > On Thu, Apr 13, 2023 at 02:45:07PM -0400, Paul Moore wrote: > > On Wed, Apr 12, 2023 at 7:36???PM Fan Wu wrote: > > > On Tue, Apr 11, 2023 at 05:45:41PM -0400, Paul Moore wrote: > > > > On Mon, Apr 10, 2023 at 3:10???PM Fan Wu > > > > wrote: > > >

Re: [dm-devel] [PATCH] block: fix a crash when bio_for_each_folio_all iterates over an empty bio

2023-04-17 Thread Mikulas Patocka
On Mon, 17 Apr 2023, Matthew Wilcox wrote: > On Mon, Apr 17, 2023 at 03:11:57PM -0400, Mikulas Patocka wrote: > > If we use bio_for_each_folio_all on an empty bio, it will access the first > > bio vector unconditionally (it is uninitialized) and it may crash > > depending on the uninitialized d

Re: [dm-devel] [PATCH] block: fix a crash when bio_for_each_folio_all iterates over an empty bio

2023-04-17 Thread Matthew Wilcox
On Mon, Apr 17, 2023 at 03:11:57PM -0400, Mikulas Patocka wrote: > If we use bio_for_each_folio_all on an empty bio, it will access the first > bio vector unconditionally (it is uninitialized) and it may crash > depending on the uninitialized data. Wait, how do we have an empty bio in the first pl

Re: [dm-devel] [PATCH v6 06/18] dm: Add support for block PR read keys/reservation

2023-04-17 Thread Mike Snitzer
On Fri, Apr 07 2023 at 4:05P -0400, Mike Christie wrote: > This adds support in dm for the block PR read keys and read reservation > callouts. > > Signed-off-by: Mike Christie Acked-by: Mike Snitzer -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-

[dm-devel] [PATCH] block: fix a crash when bio_for_each_folio_all iterates over an empty bio

2023-04-17 Thread Mikulas Patocka
If we use bio_for_each_folio_all on an empty bio, it will access the first bio vector unconditionally (it is uninitialized) and it may crash depending on the uninitialized data. This patch fixes it by checking the parameter "i" against "bio->bi_vcnt" and returning NULL fi->folio if it is out of ra

Re: [dm-devel] [RFC PATCH v9 05/16] ipe: add userspace interface

2023-04-17 Thread Fan Wu
On Thu, Apr 13, 2023 at 02:45:07PM -0400, Paul Moore wrote: > On Wed, Apr 12, 2023 at 7:36???PM Fan Wu wrote: > > On Tue, Apr 11, 2023 at 05:45:41PM -0400, Paul Moore wrote: > > > On Mon, Apr 10, 2023 at 3:10???PM Fan Wu > > > wrote: > > > > On Thu, Mar 02, 2023 at 02:04:42PM -0500, Paul Moore w

Re: [dm-devel] [PATCH v3 1/3] block: Introduce provisioning primitives

2023-04-17 Thread Brian Foster
On Thu, Apr 13, 2023 at 05:02:17PM -0700, Sarthak Kukreti wrote: > Introduce block request REQ_OP_PROVISION. The intent of this request > is to request underlying storage to preallocate disk space for the given > block range. Block devices that support this capability will export > a provision limi

Re: [dm-devel] Possible deadlock detected in Linux 6.2.0 in dm_get_inactive_table (dm-ioctl.c)

2023-04-17 Thread Mike Snitzer
On Mon, Apr 17 2023 at 1:08P -0400, Zheng Zhang wrote: > Alasdir, Mike, and to whom it may concern: > > Hello! We have found a bug in the Linux kernel version 6.2.0 by syzkaller > with our own templates. The bug causes a possible recursive locking > scenario, resulting in a deadlock. > The key