Bug 64014

Summary: sys_call_table[] not exported corrrecty
Product: [Retired] Red Hat Linux Reporter: Wilton Wong <wwong>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED DUPLICATE QA Contact: Brian Brock <bbrock>
Severity: high Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 18:48:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Wilton Wong 2002-04-23 20:07:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020401

Description of problem:
a patch in the kernel src rpm called linux-2.4.1-compilefailure.patch removes
the "EXPORT_SYMBOL(sys_call_table);" line from linux/kernel/ksyms.c and prevents
sys_call_table from being exported properly.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. make module that calls "extern void *sys_call_table[];"
2. try to insert module


Actual Results:  unresolved symbol sys_call_table 

Expected Results:  the module should have inserted

Additional info:

removing the following lines from linux-2.4.1-compilefailure.patch and
recompiling the kernel fixes the problem:
<SNIP>
--- linux/kernel/ksyms.c~       Sat Mar 23 19:10:44 2002
+++ linux/kernel/ksyms.c        Sun Mar 24 19:14:52 2002
@@ -499,9 +499,6 @@
 EXPORT_SYMBOL(simple_strtoull);
 EXPORT_SYMBOL(system_utsname); /* UTS data */
 EXPORT_SYMBOL(uts_sem);                /* UTS semaphore */
-#ifndef __mips__
-EXPORT_SYMBOL(sys_call_table);
-#endif
 EXPORT_SYMBOL(machine_restart);
 EXPORT_SYMBOL(machine_halt);
 EXPORT_SYMBOL(machine_power_off);
</SNIP>

Comment 1 Arjan van de Ven 2002-04-23 20:10:06 UTC
sys_call_table is not allowed to be modified in modules. Ever. Period.
If the code is doing that the code should be printed, taken outside and burned.
(So question: what is this code ?)

And for CALLING system calls... all system calls are properly EXPORT_SYMBOL()'d
and have a proper prototype, which is a LOT better than randomly calling a
function pointer of the wrong type.



Comment 2 Wilton Wong 2002-04-23 20:18:55 UTC
the code that is doing it is Bproc http://bproc.sourceforge.net it's a Beowulf
distributed process space, I'm sure that it could probably be fixed in bproc
itself, haven't looked too deep into that yet, but I will investigate. Anyways I
just thought that if it worked in my vanilla 2.4.18 kernel it should have worked
in the redhat kernel.

Comment 3 Alan Cox 2003-06-05 12:06:30 UTC

*** This bug has been marked as a duplicate of 75299 ***

Comment 4 Red Hat Bugzilla 2006-02-21 18:48:46 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.