All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <nicoleotsuka@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: boot failure after merge of the dma-mapping tree
Date: Thu, 20 Aug 2020 13:31:53 -0700	[thread overview]
Message-ID: <20200820203153.GA13251@Asurada-Nvidia> (raw)
In-Reply-To: <20200820154941.GA11349@lst.de>

On Thu, Aug 20, 2020 at 05:49:41PM +0200, Christoph Hellwig wrote:
> On Thu, Aug 20, 2020 at 01:36:17AM -0700, Nicolin Chen wrote:
> > Took a quick look -- the boundary_size is seemingly passed from
> > https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/powerpc/kernel/iommu.c#n240
> > 
> > 	boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
> > 			1 << tbl->it_page_shift);
> > 
> > Looks like an overflow happens due to (ULONG_MAX + 1). Should
> > we fix here instead (or also)?
> 
> Yes, please.  I'll drop the patch again for now, but once we've
> got this sorted out I'll readd it.

I'll send a series of changes, as I found these...

   1    145  arch/alpha/kernel/pci_iommu.c <<iommu_arena_find_pages>>
             boundary_size = dma_get_seg_boundary(dev) + 1;
   2    488  arch/ia64/hp/common/sba_iommu.c <<sba_search_bitmap>>
             boundary_size = (unsigned long long )dma_get_seg_boundary(dev) + 1;
   3    266  arch/s390/pci/pci_dma.c <<__dma_alloc_iommu>>
             boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
   4    170  arch/sparc/kernel/iommu-common.c <<iommu_tbl_range_alloc>>
             boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
   5    475  arch/sparc/kernel/iommu.c <<dma_4u_map_sg>>
             seg_boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
   6    511  arch/sparc/kernel/pci_sun4v.c <<dma_4v_map_sg>>
             seg_boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1,
   7     97  arch/x86/kernel/amd_gart_64.c <<alloc_iommu>>
             base_index = ALIGN(iommu_bus_base & dma_get_seg_boundary(dev),
   8     99  arch/x86/kernel/amd_gart_64.c <<alloc_iommu>>
             boundary_size = ALIGN((u64)dma_get_seg_boundary(dev) + 1,
   9    359  drivers/parisc/ccio-dma.c <<ccio_alloc_range>>
             boundary_size = ALIGN((unsigned long long )dma_get_seg_boundary(dev) + 1,
  10    110  drivers/parisc/iommu-helpers.h <<iommu_coalesce_chunks>>
             unsigned int max_seg_boundary = dma_get_seg_boundary(dev) + 1;
  11    345  drivers/parisc/sba_iommu.c <<sba_search_bitmap>>
             boundary_size = ALIGN((unsigned long long )dma_get_seg_boundary(dev) + 1,

  reply	other threads:[~2020-08-20 20:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  5:51 linux-next: boot failure after merge of the dma-mapping tree Stephen Rothwell
2020-08-20  8:36 ` Nicolin Chen
2020-08-20 15:49   ` Christoph Hellwig
2020-08-20 20:31     ` Nicolin Chen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-07-09 13:39 Stephen Rothwell
2025-07-09 17:41 ` Leon Romanovsky
2025-07-09 23:46   ` Stephen Rothwell
2025-07-09 18:16 ` Leon Romanovsky
2025-07-10  0:10   ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820203153.GA13251@Asurada-Nvidia \
    --to=nicoleotsuka@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.