Skip to contentSkip to conversation

Size of pointers in sys_call_table?

DISCUSSION Andi Kleen 2 participants 2 messages Aug 28, 2001 – Aug 29, 2001 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Andi Kleen

author
#1 lore raw
Quoted 6 lines · Alan Cox
Quoted 3 lines

The layout of the sys_call_table is totally architecture dependant. The question to ask here is why do you need to use it? Modifying it to hook into syscalls is frowned upon.

And potentially unsafe (think about caching, and non atomic writes on some platforms)

It is ATM impossible to make a module that patches sys_call_table safe against module unload races. The only way is to put a stub into the main kernel that manages the module counters and calls a separate hook (i.e. as done by nfsd's syscall)

[Introducing quiescent states in module unloading would probably fix that, as it has been discussed for a long time now, but I lost hope that it'll ever get implemented in the main kernel]

Other than that on some weird architectures like IA64 it can get quite complicated to patch the syscall table.

-Andi

#2 lore raw
Quoted 3 lines · Andi Kleen

[Introducing quiescent states in module unloading would probably fix that, as it has been discussed for a long time now, but I lost hope that it'll ever get implemented in the main kernel]

It will, in 2.5.