[OpenAFS-devel] Fwd: openafs problems on AMD64

Jeffrey Hutzelman jhutz@cmu.edu
Tue, 04 Apr 2006 12:21:15 -0400


On Tuesday, April 04, 2006 10:15:58 AM +0200 Stefaan 
<stefaan.deroeck@gmail.com> wrote:

>> Does the kernel in question have CONFIG_DEBUG_RODATA turned on? 2.6.16
>> constified (and or .rodata'd) many syscall tables, which means they
>> actually become readonly if CONFIG_DEBUG_RODATA is turned on. This is why
>> the 64bit table cannot be found. the 32bit table is found because it is
>> EXPORT_SYMBOL'd, but the attempt to update it causes a pagefault.
>
> Does this mean this kernel option should be turned off for linux on
> any architecture (not just AMD64)?

Chaskiel's description is slightly unclear.
We can't find the 64-bit system call table (or any table on some other 
architectures) because it was moved into a different section, either by use 
of 'const' or of an explicit directive putting it in .rodata.  That means 
it's not where we're looking for it.  This is true regardless of whether 
CONFIG_DEBUG_RODATA is turned on.

We do find the 32-bit system call table on amd64 because it was already in 
the .text section and so wasn't moved.  Unfortunately, CONFIG_DEBUG_RODATA 
makes that segment read-only, so when we try to update it, the system 
panics.  Turning CONFIG_DEBUG_RODATA off will make this problem go away.

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA