modload system call name


This weekend I've had to write a modloadable system call to read a cpu register that I can't read from userland on an amd64 box. Everything went well until I tried to modload the syscall module I'd built..
# modload /home/timu/src/syscalls/test1
can't load module
Dec  9 21:27:22 aaaaa test1: REQUEST INFO 
: Out of memory or no room in system tables
Dec  9 21:27:22 aaaaa test1: INITIALIZED
Dec  9 21:27:22 aaaaa genunix: WARNING: system call missing from bind file
Obvious I must have missed adding an entry to /etc/name_to_sysnum !
# grep timu /etc/name_to_sysnum
timuSyscall               66
oh! Its not that as I had used an unused number. ah! How does the system match the module name to the syscall number, there is nothing in the driver I have written to do that...It must be the name..
# cp test1 timuSyscall
# modload /home/timu/src/syscalls/timuSyscall
Dec  9 21:30:04 aaaaa timuSyscall: REQUEST INFO
Dec  9 21:30:04 aaaaa timuSyscall: INITIALIZED
#
So the module name that you are modloading must match the name you put in /etc/name_to_sysnum.
Comments:

Post a Comment:
Comments are closed for this entry.
About

timatworkhomeandinbetween

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
News

No bookmarks in folder

Blogroll

No bookmarks in folder