All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-11-12 15:46 ` Tony Battersby
  0 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-11-12 15:46 UTC (permalink / raw)
  To: Matthew Wilcox, Christoph Hellwig, Marek Szyprowski,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA

Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
driver corrupts DMA pool memory.

Signed-off-by: Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
---
--- linux/mm/dmapool.c.orig	2018-08-06 17:52:53.000000000 -0400
+++ linux/mm/dmapool.c	2018-08-06 17:53:31.000000000 -0400
@@ -454,17 +454,39 @@ void dma_pool_free(struct dma_pool *pool
 	{
 		void *page_vaddr = vaddr - offset;
 		unsigned int chain = page->dma_free_off;
+		unsigned int free_blks = 0;
+
 		while (chain < pool->allocation) {
-			if (chain != offset) {
-				chain = *(int *)(page_vaddr + chain);
-				continue;
+			if (unlikely(chain == offset)) {
+				spin_unlock_irqrestore(&pool->lock, flags);
+				dev_err(pool->dev,
+					"dma_pool_free %s, dma %pad already free\n",
+					pool->name, &dma);
+				return;
+			}
+
+			/*
+			 * A buggy driver could corrupt the freelist by
+			 * use-after-free, buffer overflow, etc.  Besides
+			 * checking for corruption, this also prevents an
+			 * endless loop in case corruption causes a circular
+			 * loop in the freelist.
+			 */
+			if (unlikely(++free_blks + page->dma_in_use >
+				     pool->blks_per_alloc)) {
+ freelist_corrupt:
+				spin_unlock_irqrestore(&pool->lock, flags);
+				dev_err(pool->dev,
+					"dma_pool_free %s, freelist corrupted\n",
+					pool->name);
+				return;
 			}
-			spin_unlock_irqrestore(&pool->lock, flags);
-			dev_err(pool->dev,
-				"dma_pool_free %s, dma %pad already free\n",
-				pool->name, &dma);
-			return;
+
+			chain = *(int *)(page_vaddr + chain);
 		}
+		if (unlikely(free_blks + page->dma_in_use !=
+			     pool->blks_per_alloc))
+			goto freelist_corrupt;
 	}
 	memset(vaddr, POOL_POISON_FREED, pool->size);
 #endif

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-11-12 15:46 ` Tony Battersby
  0 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-11-12 15:46 UTC (permalink / raw)
  To: Matthew Wilcox, Christoph Hellwig, Marek Szyprowski, iommu, linux-mm
  Cc: linux-scsi

Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
driver corrupts DMA pool memory.

Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
---
--- linux/mm/dmapool.c.orig	2018-08-06 17:52:53.000000000 -0400
+++ linux/mm/dmapool.c	2018-08-06 17:53:31.000000000 -0400
@@ -454,17 +454,39 @@ void dma_pool_free(struct dma_pool *pool
 	{
 		void *page_vaddr = vaddr - offset;
 		unsigned int chain = page->dma_free_off;
+		unsigned int free_blks = 0;
+
 		while (chain < pool->allocation) {
-			if (chain != offset) {
-				chain = *(int *)(page_vaddr + chain);
-				continue;
+			if (unlikely(chain == offset)) {
+				spin_unlock_irqrestore(&pool->lock, flags);
+				dev_err(pool->dev,
+					"dma_pool_free %s, dma %pad already free\n",
+					pool->name, &dma);
+				return;
+			}
+
+			/*
+			 * A buggy driver could corrupt the freelist by
+			 * use-after-free, buffer overflow, etc.  Besides
+			 * checking for corruption, this also prevents an
+			 * endless loop in case corruption causes a circular
+			 * loop in the freelist.
+			 */
+			if (unlikely(++free_blks + page->dma_in_use >
+				     pool->blks_per_alloc)) {
+ freelist_corrupt:
+				spin_unlock_irqrestore(&pool->lock, flags);
+				dev_err(pool->dev,
+					"dma_pool_free %s, freelist corrupted\n",
+					pool->name);
+				return;
 			}
-			spin_unlock_irqrestore(&pool->lock, flags);
-			dev_err(pool->dev,
-				"dma_pool_free %s, dma %pad already free\n",
-				pool->name, &dma);
-			return;
+
+			chain = *(int *)(page_vaddr + chain);
 		}
+		if (unlikely(free_blks + page->dma_in_use !=
+			     pool->blks_per_alloc))
+			goto freelist_corrupt;
 	}
 	memset(vaddr, POOL_POISON_FREED, pool->size);
 #endif

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-11-12 15:46 ` Tony Battersby
@ 2018-11-13  6:36     ` Matthew Wilcox
  -1 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-11-13  6:36 UTC (permalink / raw)
  To: Tony Battersby
  Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Christoph Hellwig, linux-scsi-u79uwXL29TY76Z2rM5mHXA

On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> driver corrupts DMA pool memory.
> 
> Signed-off-by: Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>

I like it!  Also, here you're using blks_per_alloc in a way which isn't
normally in the performance path, but might be with the right config
options.  With that, I withdraw my objection to the previous patch and

Acked-by: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>

Andrew, can you funnel these in through your tree?  If you'd rather not,
I don't mind stuffing them into a git tree and asking Linus to pull
for 4.21.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-11-13  6:36     ` Matthew Wilcox
  0 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-11-13  6:36 UTC (permalink / raw)
  To: Tony Battersby
  Cc: Christoph Hellwig, Marek Szyprowski, iommu, linux-mm, linux-scsi

On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> driver corrupts DMA pool memory.
> 
> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>

I like it!  Also, here you're using blks_per_alloc in a way which isn't
normally in the performance path, but might be with the right config
options.  With that, I withdraw my objection to the previous patch and

Acked-by: Matthew Wilcox <willy@infradead.org>

Andrew, can you funnel these in through your tree?  If you'd rather not,
I don't mind stuffing them into a git tree and asking Linus to pull
for 4.21.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-11-13  6:36     ` Matthew Wilcox
@ 2018-12-04 16:22         ` Tony Battersby
  -1 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-12-04 16:22 UTC (permalink / raw)
  To: Matthew Wilcox, Andrew Morton
  Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Christoph Hellwig, linux-scsi-u79uwXL29TY76Z2rM5mHXA

On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
>> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
>> driver corrupts DMA pool memory.
>>
>> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> I like it!  Also, here you're using blks_per_alloc in a way which isn't
> normally in the performance path, but might be with the right config
> options.  With that, I withdraw my objection to the previous patch and
>
> Acked-by: Matthew Wilcox <willy@infradead.org>
>
> Andrew, can you funnel these in through your tree?  If you'd rather not,
> I don't mind stuffing them into a git tree and asking Linus to pull
> for 4.21.
>
No reply for 3 weeks, so adding Andrew Morton to recipient list.

Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
Wilcox's request above.

Tony Battersby

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 16:22         ` Tony Battersby
  0 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-12-04 16:22 UTC (permalink / raw)
  To: Matthew Wilcox, Andrew Morton
  Cc: Christoph Hellwig, Marek Szyprowski, iommu, linux-mm, linux-scsi

On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
>> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
>> driver corrupts DMA pool memory.
>>
>> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> I like it!  Also, here you're using blks_per_alloc in a way which isn't
> normally in the performance path, but might be with the right config
> options.  With that, I withdraw my objection to the previous patch and
>
> Acked-by: Matthew Wilcox <willy@infradead.org>
>
> Andrew, can you funnel these in through your tree?  If you'd rather not,
> I don't mind stuffing them into a git tree and asking Linus to pull
> for 4.21.
>
No reply for 3 weeks, so adding Andrew Morton to recipient list.

Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
Wilcox's request above.

Tony Battersby

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 16:22         ` Tony Battersby
@ 2018-12-04 20:14             ` Andrew Morton
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew Morton @ 2018-12-04 20:14 UTC (permalink / raw)
  To: Tony Battersby
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, Andy Shevchenko,
	Matthew Wilcox, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Christoph Hellwig

On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org> wrote:

> On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> >> driver corrupts DMA pool memory.
> >>
> >> Signed-off-by: Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
> > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > normally in the performance path, but might be with the right config
> > options.  With that, I withdraw my objection to the previous patch and
> >
> > Acked-by: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> >
> > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > I don't mind stuffing them into a git tree and asking Linus to pull
> > for 4.21.
> >
> No reply for 3 weeks, so adding Andrew Morton to recipient list.
> 
> Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
> Wilcox's request above.
> 

I'll take a look, but I see that this v4 series has several review
comments from Matthew which remain unresponded to.  Please attend to
that.

Also, Andy had issues with the v2 series so it would be good to hear an
update from him?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 20:14             ` Andrew Morton
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Morton @ 2018-12-04 20:14 UTC (permalink / raw)
  To: Tony Battersby
  Cc: Matthew Wilcox, Christoph Hellwig, Marek Szyprowski, iommu,
	linux-mm, linux-scsi, Andy Shevchenko

On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb@cybernetics.com> wrote:

> On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> >> driver corrupts DMA pool memory.
> >>
> >> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > normally in the performance path, but might be with the right config
> > options.  With that, I withdraw my objection to the previous patch and
> >
> > Acked-by: Matthew Wilcox <willy@infradead.org>
> >
> > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > I don't mind stuffing them into a git tree and asking Linus to pull
> > for 4.21.
> >
> No reply for 3 weeks, so adding Andrew Morton to recipient list.
> 
> Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
> Wilcox's request above.
> 

I'll take a look, but I see that this v4 series has several review
comments from Matthew which remain unresponded to.  Please attend to
that.

Also, Andy had issues with the v2 series so it would be good to hear an
update from him?

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 20:14             ` Andrew Morton
@ 2018-12-04 20:18                 ` Matthew Wilcox
  -1 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-12-04 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, Andy Shevchenko,
	Christoph Hellwig, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Tony Battersby

On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org> wrote:
> 
> > On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> > >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> > >> driver corrupts DMA pool memory.
> > >>
> > >> Signed-off-by: Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
> > > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > > normally in the performance path, but might be with the right config
> > > options.  With that, I withdraw my objection to the previous patch and
> > >
> > > Acked-by: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> > >
> > > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > > I don't mind stuffing them into a git tree and asking Linus to pull
> > > for 4.21.
> > >
> > No reply for 3 weeks, so adding Andrew Morton to recipient list.
> > 
> > Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
> > Wilcox's request above.
> > 
> 
> I'll take a look, but I see that this v4 series has several review
> comments from Matthew which remain unresponded to.  Please attend to
> that.

I only had a review comment on 8/9, which I then withdrew during my review
of patch 9/9.  Unless I missed something during my re-review of my responses?

> Also, Andy had issues with the v2 series so it would be good to hear an
> update from him?

Certainly.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 20:18                 ` Matthew Wilcox
  0 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-12-04 20:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tony Battersby, Christoph Hellwig, Marek Szyprowski, iommu,
	linux-mm, linux-scsi, Andy Shevchenko

On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb@cybernetics.com> wrote:
> 
> > On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> > >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> > >> driver corrupts DMA pool memory.
> > >>
> > >> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> > > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > > normally in the performance path, but might be with the right config
> > > options.  With that, I withdraw my objection to the previous patch and
> > >
> > > Acked-by: Matthew Wilcox <willy@infradead.org>
> > >
> > > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > > I don't mind stuffing them into a git tree and asking Linus to pull
> > > for 4.21.
> > >
> > No reply for 3 weeks, so adding Andrew Morton to recipient list.
> > 
> > Andrew, I have 9 dmapool patches ready for merging in 4.21.� See Matthew
> > Wilcox's request above.
> > 
> 
> I'll take a look, but I see that this v4 series has several review
> comments from Matthew which remain unresponded to.  Please attend to
> that.

I only had a review comment on 8/9, which I then withdrew during my review
of patch 9/9.  Unless I missed something during my re-review of my responses?

> Also, Andy had issues with the v2 series so it would be good to hear an
> update from him?

Certainly.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 20:18                 ` Matthew Wilcox
@ 2018-12-04 20:28                     ` Andrew Morton
  -1 siblings, 0 replies; 20+ messages in thread
From: Andrew Morton @ 2018-12-04 20:28 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, Andy Shevchenko,
	Christoph Hellwig, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Tony Battersby

On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:

> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> > On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org> wrote:
> > 
> > > On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> > > >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> > > >> driver corrupts DMA pool memory.
> > > >>
> > > >> Signed-off-by: Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
> > > > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > > > normally in the performance path, but might be with the right config
> > > > options.  With that, I withdraw my objection to the previous patch and
> > > >
> > > > Acked-by: Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> > > >
> > > > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > > > I don't mind stuffing them into a git tree and asking Linus to pull
> > > > for 4.21.
> > > >
> > > No reply for 3 weeks, so adding Andrew Morton to recipient list.
> > > 
> > > Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
> > > Wilcox's request above.
> > > 
> > 
> > I'll take a look, but I see that this v4 series has several review
> > comments from Matthew which remain unresponded to.  Please attend to
> > that.
> 
> I only had a review comment on 8/9, which I then withdrew during my review
> of patch 9/9.  Unless I missed something during my re-review of my responses?

And in 0/9, that 1.3MB allocation.

Maybe it's using kvmalloc, I didn't look.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 20:28                     ` Andrew Morton
  0 siblings, 0 replies; 20+ messages in thread
From: Andrew Morton @ 2018-12-04 20:28 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Tony Battersby, Christoph Hellwig, Marek Szyprowski, iommu,
	linux-mm, linux-scsi, Andy Shevchenko

On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox <willy@infradead.org> wrote:

> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> > On Tue, 4 Dec 2018 11:22:34 -0500 Tony Battersby <tonyb@cybernetics.com> wrote:
> > 
> > > On 11/13/18 1:36 AM, Matthew Wilcox wrote:
> > > > On Mon, Nov 12, 2018 at 10:46:35AM -0500, Tony Battersby wrote:
> > > >> Prevent a possible endless loop with DMAPOOL_DEBUG enabled if a buggy
> > > >> driver corrupts DMA pool memory.
> > > >>
> > > >> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> > > > I like it!  Also, here you're using blks_per_alloc in a way which isn't
> > > > normally in the performance path, but might be with the right config
> > > > options.  With that, I withdraw my objection to the previous patch and
> > > >
> > > > Acked-by: Matthew Wilcox <willy@infradead.org>
> > > >
> > > > Andrew, can you funnel these in through your tree?  If you'd rather not,
> > > > I don't mind stuffing them into a git tree and asking Linus to pull
> > > > for 4.21.
> > > >
> > > No reply for 3 weeks, so adding Andrew Morton to recipient list.
> > > 
> > > Andrew, I have 9 dmapool patches ready for merging in 4.21.  See Matthew
> > > Wilcox's request above.
> > > 
> > 
> > I'll take a look, but I see that this v4 series has several review
> > comments from Matthew which remain unresponded to.  Please attend to
> > that.
> 
> I only had a review comment on 8/9, which I then withdrew during my review
> of patch 9/9.  Unless I missed something during my re-review of my responses?

And in 0/9, that 1.3MB allocation.

Maybe it's using kvmalloc, I didn't look.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 20:18                 ` Matthew Wilcox
@ 2018-12-04 20:30                     ` Andy Shevchenko
  -1 siblings, 0 replies; 20+ messages in thread
From: Andy Shevchenko @ 2018-12-04 20:30 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: linux-scsi, Christoph Hellwig, linux-mm,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Andrew Morton,
	Tony Battersby

On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:

> > Also, Andy had issues with the v2 series so it would be good to hear an
> > update from him?
>
> Certainly.

Hmm... I certainly forgot what was long time ago.
If I _was_ in Cc list and didn't comment, I'm fine with it.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 20:30                     ` Andy Shevchenko
  0 siblings, 0 replies; 20+ messages in thread
From: Andy Shevchenko @ 2018-12-04 20:30 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Andrew Morton, Tony Battersby, Christoph Hellwig,
	Marek Szyprowski, iommu, linux-mm, linux-scsi

On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy@infradead.org> wrote:
> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:

> > Also, Andy had issues with the v2 series so it would be good to hear an
> > update from him?
>
> Certainly.

Hmm... I certainly forgot what was long time ago.
If I _was_ in Cc list and didn't comment, I'm fine with it.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 20:28                     ` Andrew Morton
@ 2018-12-04 20:35                         ` Matthew Wilcox
  -1 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-12-04 20:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-scsi-u79uwXL29TY76Z2rM5mHXA, Andy Shevchenko,
	Christoph Hellwig, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Tony Battersby

On Tue, Dec 04, 2018 at 12:28:54PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> > I only had a review comment on 8/9, which I then withdrew during my review
> > of patch 9/9.  Unless I missed something during my re-review of my responses?
> 
> And in 0/9, that 1.3MB allocation.
> 
> Maybe it's using kvmalloc, I didn't look.

Oh!  That's the mptsas driver doing something utterly awful.  Not the
fault of this patchset, in any way.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 20:35                         ` Matthew Wilcox
  0 siblings, 0 replies; 20+ messages in thread
From: Matthew Wilcox @ 2018-12-04 20:35 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tony Battersby, Christoph Hellwig, Marek Szyprowski, iommu,
	linux-mm, linux-scsi, Andy Shevchenko

On Tue, Dec 04, 2018 at 12:28:54PM -0800, Andrew Morton wrote:
> On Tue, 4 Dec 2018 12:18:01 -0800 Matthew Wilcox <willy@infradead.org> wrote:
> > I only had a review comment on 8/9, which I then withdrew during my review
> > of patch 9/9.  Unless I missed something during my re-review of my responses?
> 
> And in 0/9, that 1.3MB allocation.
> 
> Maybe it's using kvmalloc, I didn't look.

Oh!  That's the mptsas driver doing something utterly awful.  Not the
fault of this patchset, in any way.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 20:30                     ` Andy Shevchenko
@ 2018-12-04 21:26                         ` Tony Battersby
  -1 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-12-04 21:26 UTC (permalink / raw)
  To: Andy Shevchenko, Matthew Wilcox
  Cc: linux-scsi, linux-mm,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Andrew Morton,
	Christoph Hellwig

On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy@infradead.org> wrote:
>> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
>>> Also, Andy had issues with the v2 series so it would be good to hear an
>>> update from him?
>> Certainly.
> Hmm... I certainly forgot what was long time ago.
> If I _was_ in Cc list and didn't comment, I'm fine with it.
>
v4 of the patchset is the same as v3 but with the last patch dropped. 
Andy had only one minor comment on v3 about the use of division in patch
#8, to which I replied.  That was back on August 8.

Tony

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 21:26                         ` Tony Battersby
  0 siblings, 0 replies; 20+ messages in thread
From: Tony Battersby @ 2018-12-04 21:26 UTC (permalink / raw)
  To: Andy Shevchenko, Matthew Wilcox
  Cc: Andrew Morton, Christoph Hellwig, Marek Szyprowski, iommu,
	linux-mm, linux-scsi

On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy@infradead.org> wrote:
>> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
>>> Also, Andy had issues with the v2 series so it would be good to hear an
>>> update from him?
>> Certainly.
> Hmm... I certainly forgot what was long time ago.
> If I _was_ in Cc list and didn't comment, I'm fine with it.
>
v4 of the patchset is the same as v3 but with the last patch dropped. 
Andy had only one minor comment on v3 about the use of division in patch
#8, to which I replied.  That was back on August 8.

Tony

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
  2018-12-04 21:26                         ` Tony Battersby
@ 2018-12-04 22:05                             ` Andy Shevchenko
  -1 siblings, 0 replies; 20+ messages in thread
From: Andy Shevchenko @ 2018-12-04 22:05 UTC (permalink / raw)
  To: Tony Battersby
  Cc: linux-scsi, Matthew Wilcox, linux-mm,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Andrew Morton,
	Christoph Hellwig

On Tue, Dec 4, 2018 at 11:26 PM Tony Battersby <tonyb-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org> wrote:
>
> On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> >>> Also, Andy had issues with the v2 series so it would be good to hear an
> >>> update from him?
> >> Certainly.
> > Hmm... I certainly forgot what was long time ago.
> > If I _was_ in Cc list and didn't comment, I'm fine with it.
> >
> v4 of the patchset is the same as v3 but with the last patch dropped.
> Andy had only one minor comment on v3 about the use of division in patch
> #8, to which I replied.  That was back on August 8.

Seems I'm fine with the last version then.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption
@ 2018-12-04 22:05                             ` Andy Shevchenko
  0 siblings, 0 replies; 20+ messages in thread
From: Andy Shevchenko @ 2018-12-04 22:05 UTC (permalink / raw)
  To: Tony Battersby
  Cc: Matthew Wilcox, Andrew Morton, Christoph Hellwig,
	Marek Szyprowski, iommu, linux-mm, linux-scsi

On Tue, Dec 4, 2018 at 11:26 PM Tony Battersby <tonyb@cybernetics.com> wrote:
>
> On 12/4/18 3:30 PM, Andy Shevchenko wrote:
> > On Tue, Dec 4, 2018 at 10:18 PM Matthew Wilcox <willy@infradead.org> wrote:
> >> On Tue, Dec 04, 2018 at 12:14:43PM -0800, Andrew Morton wrote:
> >>> Also, Andy had issues with the v2 series so it would be good to hear an
> >>> update from him?
> >> Certainly.
> > Hmm... I certainly forgot what was long time ago.
> > If I _was_ in Cc list and didn't comment, I'm fine with it.
> >
> v4 of the patchset is the same as v3 but with the last patch dropped.
> Andy had only one minor comment on v3 about the use of division in patch
> #8, to which I replied.  That was back on August 8.

Seems I'm fine with the last version then.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-12-04 22:05 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 15:46 [PATCH v4 9/9] dmapool: debug: prevent endless loop in case of corruption Tony Battersby
2018-11-12 15:46 ` Tony Battersby
     [not found] ` <9e65ec2e-5e22-4f65-7b92-ca2af0c555f3-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
2018-11-13  6:36   ` Matthew Wilcox
2018-11-13  6:36     ` Matthew Wilcox
     [not found]     ` <20181113063601.GT21824-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2018-12-04 16:22       ` Tony Battersby
2018-12-04 16:22         ` Tony Battersby
     [not found]         ` <4dcb22b0-a348-841d-8175-e368f67f33c3-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
2018-12-04 20:14           ` Andrew Morton
2018-12-04 20:14             ` Andrew Morton
     [not found]             ` <20181204121443.1430883634a6ecf5f4a6a4a2-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2018-12-04 20:18               ` Matthew Wilcox
2018-12-04 20:18                 ` Matthew Wilcox
     [not found]                 ` <20181204201801.GS10377-PfSpb0PWhxZc2C7mugBRk2EX/6BAtgUQ@public.gmane.org>
2018-12-04 20:28                   ` Andrew Morton
2018-12-04 20:28                     ` Andrew Morton
     [not found]                     ` <20181204122854.339503ccbbdc638940c9e1d0-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2018-12-04 20:35                       ` Matthew Wilcox
2018-12-04 20:35                         ` Matthew Wilcox
2018-12-04 20:30                   ` Andy Shevchenko
2018-12-04 20:30                     ` Andy Shevchenko
     [not found]                     ` <CAHp75VeCHnUcE8mfUkx_uXz9_ZoA+hAvVtFiFP+nLj4rJevBdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-12-04 21:26                       ` Tony Battersby
2018-12-04 21:26                         ` Tony Battersby
     [not found]                         ` <495c7e22-9332-1654-9ee0-63c33fae980e-vFAe+i1/wJI5UWNf+nJyDw@public.gmane.org>
2018-12-04 22:05                           ` Andy Shevchenko
2018-12-04 22:05                             ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.