Presentation is loading. Please wait.

Presentation is loading. Please wait.

Files to change in Redhat Linux The following list is a starting point for adding a simple kernel service.

Similar presentations


Presentation on theme: "Files to change in Redhat Linux The following list is a starting point for adding a simple kernel service."— Presentation transcript:

1 Files to change in Redhat Linux The following list is a starting point for adding a simple kernel service.

2 Possible files to change in Redhat Linux 1./usr/src/redhat/BUILD/kernel-2.6.18/linux- 2.6.18.s390x/arch/s390/mm/fault.c 2./usr/src/redhat/BUILD/kernel-2.6.18/linux- 2.6.18.s390x/arch/s390/kernel/syscalls.S 3./usr/src/kernels/2.6.18-92.el5- s390x/include/asm-s390/unistd.h 4./usr/src/redhat/BUILD/kernel-2.6.18/linux- 2.6.18.s390x/include/asm-s390/unistd.h 5./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

3 Contents, by number on previous slide 1.“mm/fault.c”: Your code for the service call 2.“syscalls.S”: Builds the syscall table 3.“../kernels../unistd.h”: Defines the name & number of the call 4.“../redhat/BUILD/../unistd.h”: Same as above 5.“/usr/include/asm/unistd.h”: Contains the include values for the kernel itself to determine what facilities are available at compile time ---------------------------------------------- 6.“syscall_table.S”: Defines the name as a “long”

4 Names I used (for my own solution) …/fault.c: sys_DJ_fault_tracker 311 …/BUILD…/unistd.h“ /usr/include/asm“(this one allows the TESTING program to use sys_DJ_fault_tracker 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!!!!

5 Possible files to change in x86 Fedora Linux 1./rpmbuild/BUILD/kernel-3.9.fc17/linux-3.9.10- 100.fc17.i686/arch/x86/mm/fault.c 2./rpmbuild/BUILD/kernel-3.9.fc17/linux-3.9.10- 100.fc17.i686/arch/x86/syscalls/syscall_32.tbl 3./rpmbuild/BUILD/kernel-3.9.fc17/linux-3.9.10- 100.fc17.i686/arch/x86/include/asm/unistd.h 4./usr/include/asm/unistd.h


Download ppt "Files to change in Redhat Linux The following list is a starting point for adding a simple kernel service."

Similar presentations


Ads by Google