Messages in this thread | | | Date | Mon, 13 Sep 2004 18:26:37 +0300 | From | Constantine Gavrilov <> | Subject | Re: Calling syscalls from x86-64 kernel results in a crash on Opteron machines |
| |
Brian Gerst wrote:
> > You should never use the unistd.h macros from kernel space. Call > sys_foo() directly. This may mean you have to export it. The reason > it crashes is that the "syscall" opcode used by the x86-64 macros > (unlike the "int $0x80" for i386) causes a fault when already running > in kernel space. > > -- > Brian Gerst
I can see from the crash report that the fault happens. I want to understand why.
I can use workarounds. (Calling sys_foo() directly from module can be a problem -- I would have to know the "versioned" function name or the address of the function within the kernel space. Calling an entry from the syscall table is much easier.)
-- ---------------------------------------- Constantine Gavrilov Kernel Developer Qlusters Software Ltd 1 Azrieli Center, Tel-Aviv Phone: +972-3-6081977 Fax: +972-3-6081841 ----------------------------------------
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |