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: <87cymk4i2m.ffs@tglx>
Date: Wed, 07 Aug 2024 14:45:53 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: James Bottomley <James.Bottomley@...senPartnership.com>, Vlastimil Babka
 <vbabka@...e.cz>, Linus Torvalds <torvalds@...ux-foundation.org>, Guenter
 Roeck <linux@...ck-us.net>
Cc: linux-kernel@...r.kernel.org, Linux-MM <linux-mm@...ck.org>, Helge
 Deller <deller@....de>, linux-parisc@...r.kernel.org
Subject: Re: [PATCH 6.10 000/809] 6.10.3-rc3 review

On Tue, Aug 06 2024 at 20:49, James Bottomley wrote:
> On Wed, 2024-08-07 at 01:24 +0200, Thomas Gleixner wrote:
>>  static int check_slab(struct kmem_cache *s, struct slab *slab)
>>  {
>>         int maxobj;
>> @@ -1386,8 +1388,10 @@ static int check_slab(struct kmem_cache
>>  
>>         maxobj = order_objects(slab_order(slab), s->size);
>>         if (slab->objects > maxobj) {
>> -               slab_err(s, slab, "objects %u > max %u",
>> -                       slab->objects, maxobj);
>> +               testme();
>> +               slab_err(s, slab, "objects %u > max %u size %u sorder
>> %u %u",
>> +                        slab->objects, maxobj, s->size,
>> slab_order(slab),
>> +                        order_objects(slab_order(slab), s->size));
>>                 return 0;
>>         }
>>         if (slab->inuse > slab->objects) {
>> 
>> I don't know and I don't want to know TBH...
>
> OK, so you're telling us we have a problem with slab_order on parisc
> ... that's folio_order, so it smells like a parisc bug with
> folio_test_large?  Unfortuntely I'm a bit pissed in an airport lounge
> on my way to the UK, so I've lost access to my pa test rig and can't
> test further for a while.

The point is that there are two invocations for order_objects(...) in
that code.

	maxobj = order_objects(slab_order(slab), s->size);

and the extra one in the slab_err() output:

        slab_err(s, slab, "objects %u > max %u size %u sorder %u %u",
		 slab->objects, maxobj, s->size,slab_order(slab),
                 order_objects(slab_order(slab), s->size));

>> [    0.000000] BUG kmem_cache_node (Not tainted): objects 21 > max 16
>> size 192 sorder 0 21

So maxobj = 16 and the second invocation correctly returns 21, if and
only if the $$divoI placement is in that weird range.

When I move it out of that range then both return 21 as expected.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ