Re: [RFC] 2.5.8 sort kernel tables

Keith Owens (kaos@ocs.com.au)
Fri, 19 Apr 2002 09:17:16 +1000


On 18 Apr 2002 19:51:43 +0200,
Andi Kleen <ak@suse.de> wrote:
>Paul Mackerras <paulus@samba.org> writes:
>>
>> BTW, do you have any valid examples of use of copy_to/from_user or
>> get/put_user in an init section?
>
>i386 uses the exception tables to check at startup for the old i386 bug of
>pages not being write protected when writing from supervisor mode. That
>function is __init.

It used to be, somebody realised that it did not work and took it out
of __init. With sorted tables it can be moved back.

/*
* This function cannot be __init, since exceptions don't work in that
* section.
*/
static int do_test_wp_bit(unsigned long vaddr);

That fixes the symptom, not the cause. It is better to sort the tables
at boot time than to find each bit of code that might break the tables
and change the code.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/