Bug 150816 - /proc/kallsyms doesn't distinguish between exported and unexported symbols
/proc/kallsyms doesn't distinguish between exported and unexported symbols
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Dave Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-10 17:06 EST by Timur Tabi
Modified: 2015-01-04 17:17 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-11 20:52:46 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Timur Tabi 2005-03-10 17:06:26 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5)
Gecko/20041217

Description of problem:
In the 2.6.10 versions of FC3, the /proc/kallsyms file doesn't use the
"T" and "t" symbols correctly.  The capital "T" is for exported
symbols, and the lowercase "t" is for unexported symbols.  In
FC3/2.6.10, a number of symbols that are not exported still have a
capital "T".  

sys_open is an example:

grep -w sys_open /proc/kallsyms
c0151b27 T sys_open

If I try to load a module that links against sys_open(), it will fail.
 However, if it links against sys_read() instead, then it will still
load.  

grep -w sys_read /proc/kallsyms
c0152450 T sys_read



Version-Release number of selected component (if applicable):
kernel-smp-2.6.10-1.760_FC3

How reproducible:
Always

Steps to Reproduce:
N/A

Additional info:
Comment 1 Timur Tabi 2005-03-10 17:52:54 EST
More information:

As you can see from the following grep of the source code, sys_read is
exported on all platforms, but sys_open is not exported on i386.

[root@vic2 linux-2.6.10]# grep -wr sys_open * | grep EXPORT
arch/arm/kernel/armksyms.c:EXPORT_SYMBOL(sys_open);
arch/arm26/kernel/armksyms.c:EXPORT_SYMBOL(sys_open);
arch/alpha/kernel/alpha_ksyms.c:EXPORT_SYMBOL(sys_open);
arch/um/kernel/ksyms.c:EXPORT_SYMBOL(sys_open);
arch/parisc/kernel/parisc_ksyms.c:EXPORT_SYMBOL(sys_open);
[root@vic2 linux-2.6.10]# grep -wr sys_read * | grep EXPORT
arch/arm/kernel/armksyms.c:EXPORT_SYMBOL(sys_read);
arch/arm26/kernel/armksyms.c:EXPORT_SYMBOL(sys_read);
arch/alpha/kernel/alpha_ksyms.c:EXPORT_SYMBOL(sys_read);
arch/um/kernel/ksyms.c:EXPORT_SYMBOL(sys_read);
arch/parisc/kernel/parisc_ksyms.c:EXPORT_SYMBOL(sys_read);
fs/read_write.c:EXPORT_SYMBOL_GPL(sys_read);

Contrast this with a Suse 9.2 system (kernel 2.6.8):

vic2:~ # grep -w sys_close /proc/kallsyms
c0161400 T sys_close
vic2:~ # grep -w sys_open /proc/kallsyms
c01612a0 t sys_open  

Here, sys_close is correctly marked as exported, and sys_open is
correctly marked as unexported.
Comment 2 Dave Jones 2005-04-11 20:52:46 EDT
it's been deliberatly unexported in the Fedora kernel to discourage usage by
third party modules calling syscalls from modules.

Note You need to log in before you can comment on or make changes to this bug.