40 likes | 213 Views
Files to change in Redhat Linux. The following list is a starting point for adding a simple kernel service. Possible files to change in Redhat Linux. / usr / src / redhat /BUILD/kernel-2.6.18/linux-2.6.18.s390x/arch/ s390 /mm/ fault.c
E N D
Files to change in Redhat Linux The following list is a starting point for adding a simple kernel service.
Possible files to change in Redhat Linux • /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.s390x/arch/s390/mm/fault.c • /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.s390x/arch/s390/kernel/syscalls.S • /usr/src/kernels/2.6.18-92.el5-s390x/include/asm-s390/unistd.h • /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.s390x/include/asm-s390/unistd.h • /usr/include/asm/unistd.h --------- The following file is for PCs only ---------- /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.s390x/arch/i386/kernel/syscall_table.S
Contents, by number on previous slide • “mm/fault.c”: Your code for the service call • “syscalls.S”: Builds the syscall table • “../kernels../unistd.h”: Defines the name & number of the call • “../redhat/BUILD/../unistd.h”: Same as above • “/usr/include/asm/unistd.h”: Contains the include values for the kernel itself to determine what facilities are available at compile time---------------------------------------------- • “syscall_table.S”: Defines the name as a “long”
Names I used (for my own solution) • …/fault.c: sys_DJ_fault_tracker 311 • …/BUILD…/unistd.h “ • /usr/include/asm/unistd.h“(allows TESTING pgmto use a name instead of 311) • …/kernels…/asm-s390/unistd.h __NR_DJ_fault_tracker 311 (note that this one is different, but it doesn’t hurt because it isn’t referenced by fault.c) • …/syscalls.S (sys_DJ_fault_tracker, sys_DJ_fault_tracker, sys_DJ_fault_tracker) • The whole point of using a NAME instead of the number is that, users do not have to use raw numbers. Raw numbers lead to errors. Names are better (for humans anyway). • Of course, you should have your own names!!!!