Re: Deprecating and removing SLOB

From: Aaro Koskinen
Date: Wed Nov 09 2022 - 18:48:43 EST


Hi,

On Wed, Nov 09, 2022 at 01:39:12PM -0800, Linus Torvalds wrote:
> On Wed, Nov 9, 2022 at 12:56 PM Paul Cercueil <paul@xxxxxxxxxxxxxxx> wrote:
> >
> > It worked fine on some boards, but on others it had about a 25% chance
> > of booting, and 75% chance of hanging at boot. I tried printk-debugging
> > it, and was coming to the conclusion that it's memory corruption of
> > some sort.
> >
> > Then I switched to SLUB and all the problems are gone. Same with SLAB.
> >
> > So while I can't say for sure that SLOB is broken (it might be
> > triggering a bug somewhere else), I am highly suspicious that it is.
>
> I have this distinct memory of having seen other reports like this,
> but my google-fu is not strong enough to back that up.
>
> There definitely has been recurring noise about SLOB issues. There's a
> reason people have wanted to remove it for years and years.

Some of the reported SLOB issues have been actually real driver bugs,
that go unnoticed when SLUB/SLAB are used (unless perhaps debug stuff
is enabled). I'm not saying kernel should keep SLUB, but it's good at
failing early when there is a bug. See e.g. commit 120ee599b5bf ("staging:
octeon-usb: prevent memory corruption")

A.