lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180916094142.GB4299@amd>
Date:   Sun, 16 Sep 2018 11:41:42 +0200
From:   Pavel Machek <pavel@....cz>
To:     Johannes Berg <johannes@...solutions.net>
Cc:     Randy Dunlap <rdunlap@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        linuxwifi@...el.com
Subject: Re: 4.19-rc[23] iwlwifi: BUG in swiotlb

On Sun 2018-09-16 11:34:14, Pavel Machek wrote:
> Hi!
> 
> > > Any ideas?
> > 
> > Hmm. Is this new?
> > 
> > > 2018-09-10T18:47:54.532837-07:00 dragon kernel: [   31.472371] kernel BUG at ../kernel/dma/swiotlb.c:521!
> > 
> >         nslots = ALIGN(size, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT;
> > 	[...]
> > 	BUG_ON(!nslots)
> > 
> > > 2018-09-10T18:47:54.613655-07:00 dragon kernel: [   31.490325]  swiotlb_alloc+0x88/0x170
> > > 2018-09-10T18:47:54.613656-07:00 dragon kernel: [   31.490329]  ? __kmalloc+0x1cc/0x200
> > > 2018-09-10T18:47:54.613657-07:00 dragon kernel: [   31.491652]  iwl_pcie_txq_alloc+0x1d4/0x3b0 [iwlwifi]
> > 
> > There are two calls to dma_alloc_coherent() here, should those even hit
> > swiotlb? The sizes of those should be
> >  * 256 x 128 (32k)
> >  * 32 x 256 (8k) [TFH, unlikely to be the case here]
> >  * 256 x 256 (65k) [TFH]
> >  * 32 x 64 (2k)
> >  * 256 x 64 (16k)
> > 
> > 
> > IO_TLB_SHIFT is 11, so we get 2k alignment, so even the smallest size
> > (32*64) should result in nslots being 1?
> > 
> > In fact, unless the driver passed *ZERO* as the size, this should never
> > happen (hence the BUG_ON), since ALIGN() would take care of rounding up
> > any smaller allocation here.
> > 
> > Presumably you can reproduce this pretty easily (and I don't know what
> > specific model of NIC you have etc.), so perhaps you can do something
> > like this?
> > 
> > https://p.sipsolutions.net/aa0dccd7a60fe176.txt
> 
> That results in: ... if I'm not mistaken. Tested on top of today's
> mainline. (-rc3.95 :-)

Hold on. I was confused by my build system. Let me retry.

Are you sure you are not mistaking WARN and WARN_ON?



-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ