All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: v2.4.19-rmk4 slab.c: /proc/slabinfo uses broken instead of slab labels
@ 2002-11-28 22:34 Manfred Spraul
  2002-11-28 22:40 ` Russell King
  0 siblings, 1 reply; 7+ messages in thread
From: Manfred Spraul @ 2002-11-28 22:34 UTC (permalink / raw)
  To: Georg Nikodym; +Cc: linux-kernel

>
>
>> 1. Is the ARM __get_user() broken?
>> 2. Could I be doing something else broken that is confusing __get_user()?
>> 3. What was/is the intent of the test?  Or stated differently, why on earth
>>    would cachep->name be a user address?
>  
>

get_user is the standard test for bad pointers: If the pointer is bad, 
then the exception handler will prevent an oops.

Could you backport the get_fs()/set_fs() calls around the get_user() 
from 2.5? I assume that ARM needs it to distiguish between kernel and 
user addresses.

On i386, it's possible to skip set_fs() and use __get_user() - but 
that's i386 specific. For example the i386 oops code uses that.

--
    Manfred


^ permalink raw reply	[flat|nested] 7+ messages in thread
* v2.4.19-rmk4 slab.c: /proc/slabinfo uses broken instead of slab labels
@ 2002-11-27 20:15 Georg Nikodym
  2002-11-27 21:40 ` Georg Nikodym
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Nikodym @ 2002-11-27 20:15 UTC (permalink / raw)
  To: Linux/ARM Kernel List; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

In the 2.4.18-2.4.19 timeframe:

	http://linux.bkbits.net:8080/linux-2.4/cset@1.536

brcl (Ben LaHaise, I think) pushed in a change to mm/slab.c which
(amongst other things) adds the following code:

...
	name = cachep->name; 
===>	{
===>	char tmp; 
===>	if (__get_user(tmp, name)) 
===>		name = "broken"; 
===>	}       

	seq_printf(m, "%-17s %6lu %6lu %6u %4lu %4lu %4u",
		name, active_objs, num_objs, cachep->objsize,
		active_slabs, num_slabs, (1<<cachep->gfporder));
...

to s_show() (the stuff that gets called when somebody cat's /proc/slabinfo)

Trouble is that on my ARM platform, the __get_user() call always fails
and all the slabinfo entries are labelled "broken".

For my purposes, ifdef'ing the offending block out will likely be
sufficient (and safe?) but I'd like to know:

1. Is the ARM __get_user() broken?
2. Could I be doing something else broken that is confusing __get_user()?
3. What was/is the intent of the test?  Or stated differently, why on earth
   would cachep->name be a user address?

-g

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2002-11-29 23:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-28 22:34 v2.4.19-rmk4 slab.c: /proc/slabinfo uses broken instead of slab labels Manfred Spraul
2002-11-28 22:40 ` Russell King
2002-11-29 18:24   ` Manfred Spraul
2002-11-29 22:51     ` Russell King
2002-11-29 23:33       ` Manfred Spraul
  -- strict thread matches above, loose matches on Subject: below --
2002-11-27 20:15 Georg Nikodym
2002-11-27 21:40 ` Georg Nikodym

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.