Skip to contentSkip to conversation

2.5.8 sort kernel tables

RFC Andi Kleen 2 participants 2 messages Apr 18, 2002 1 message not in the archive

lore
Share & tools
lore

Andi Kleen

author
#1 lore raw
In reply to a message not in the archive
Quoted 3 lines · Paul Mackerras

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.

-Andi

#2 lore raw
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Paul Mackerras

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.