Skip to contentSkip to conversation

um: kernel: ksyms: Export symbol syscall() for fixing modpost issue

PATCH In review Chen Gang 2 participants 3 messages Oct 4, 2014 – May 31, 2015 User-mode Linux (UML)

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 um: kernel: ksyms: Export symbol syscall() for fixing modpost issue

syscall() is implemented in libc.so/a (e.g. for glibc, in "syscall.o"), so for normal ".o" files, it is undefined, neither can be found within kernel wide, so will break modpost.

Since ".o" files is OK, can simply export 'syscall' symbol, let modpost know about that, then can fix this issue.

The related error (with allmodconfig under um):

MODPOST 1205 modules
ERROR: "syscall" [fs/hostfs/hostfs.ko] undefined!

---
 arch/um/kernel/ksyms.c | 3 +++
 1 file changed, 3 insertions(+)
arch/um/kernel/ksyms.c +3 -0
index 543c047..e7780f3 100644
@@ -42,3 +42,6 @@ EXPORT_SYMBOL(os_makedev);
 EXPORT_SYMBOL(add_sigio_fd);
 EXPORT_SYMBOL(ignore_sigio_fd);
 EXPORT_SYMBOL(sigio_broken);
+
+extern long int syscall (long int __sysno, ...);
+EXPORT_SYMBOL(syscall);
Signature · 1 line
1.9.3
author
#1 lore raw

Hello Maintainers:

Please help check this patch, when you have time.

Thanks.

Quoted 29 lines · Chen Gang

syscall() is implemented in libc.so/a (e.g. for glibc, in "syscall.o"), so for normal ".o" files, it is undefined, neither can be found within kernel wide, so will break modpost.

Since ".o" files is OK, can simply export 'syscall' symbol, let modpost know about that, then can fix this issue.

The related error (with allmodconfig under um):

MODPOST 1205 modules
ERROR: "syscall" [fs/hostfs/hostfs.ko] undefined!

---
 arch/um/kernel/ksyms.c | 3 +++
 1 file changed, 3 insertions(+)
arch/um/kernel/ksyms.c +3 -0
index 543c047..e7780f3 100644
@@ -42,3 +42,6 @@ EXPORT_SYMBOL(os_makedev);
 EXPORT_SYMBOL(add_sigio_fd);
 EXPORT_SYMBOL(ignore_sigio_fd);
 EXPORT_SYMBOL(sigio_broken);
+
+extern long int syscall (long int __sysno, ...);
+EXPORT_SYMBOL(syscall);
Signature · 3 lines
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
#2 lore raw
In reply to Chen Gang

Am 04.10.2014 um 15:11 schrieb Chen Gang:

Quoted 22 lines

syscall() is implemented in libc.so/a (e.g. for glibc, in "syscall.o"), so for normal ".o" files, it is undefined, neither can be found within kernel wide, so will break modpost.

Since ".o" files is OK, can simply export 'syscall' symbol, let modpost know about that, then can fix this issue.

The related error (with allmodconfig under um):

MODPOST 1205 modules
ERROR: "syscall" [fs/hostfs/hostfs.ko] undefined!

---
 arch/um/kernel/ksyms.c | 3 +++
 1 file changed, 3 insertions(+)
arch/um/kernel/ksyms.c +0 -0
index 543c047..e7780f3 100644

arch/um/kernel/ksyms.c EXPORT_SYMBOL(os_makedev); · line 47

Quoted 6 lines
arch/um/kernel/ksyms.c +3 -0
@@ -42,3 +42,6 @@ EXPORT_SYMBOL(os_makedev);
 EXPORT_SYMBOL(add_sigio_fd);
 EXPORT_SYMBOL(ignore_sigio_fd);
 EXPORT_SYMBOL(sigio_broken);
+
+extern long int syscall (long int __sysno, ...);
+EXPORT_SYMBOL(syscall);

Thanks Chen, applied to my 4.2 queue!

------------------------------------------------------------------------------
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel