[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y20ktNwgPqUbOwxH@casper.infradead.org>
Date: Thu, 10 Nov 2022 16:20:04 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Vlastimil Babka <vbabka@...e.cz>
Cc: Theodore Ts'o <tytso@....edu>,
Aaro Koskinen <aaro.koskinen@....fi>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Paul Cercueil <paul@...pouillou.net>, 42.hyeyoo@...il.com,
akpm@...ux-foundation.org, catalin.marinas@....com, cl@...ux.com,
iamjoonsoo.kim@....com, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, penberg@...nel.org, rientjes@...gle.com,
rkovhaev@...il.com, roman.gushchin@...ux.dev,
Feng Tang <feng.tang@...el.com>
Subject: Re: Deprecating and removing SLOB
On Thu, Nov 10, 2022 at 08:31:31AM +0100, Vlastimil Babka wrote:
> > octeon-hcd will crash the kernel when SLOB is used. This usually happens
> > after the 18-byte control transfer when a device descriptor is read.
> > The DMA engine is always transfering full 32-bit words and if the
> > transfer is shorter, some random garbage appears after the buffer.
> > The problem is not visible with SLUB since it rounds up the allocations
> > to word boundary, and the extra bytes will go undetected.
>
> Ah, actually it wouldn't *now* as SLUB would make the allocation fall into
> kmalloc-32 cache and only add redzone beyond 32 bytes. But with upcoming
> changes by Feng Tang, this should work.
This is kind of "if a bug stings a tree in a forest, does it hurt"
problem. If all allocations of 18 bytes are rounded up to 20 or more
bytes, then it doesn't matter that the device has this bug. Sure, it
may end up hurting in the future if we decide to create 18-byte slab
caches, but it's not actually going to affect anything today (and we
seem to be moving towards less precision in order to get more
performance)
Powered by blists - more mailing lists