[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NMU sysklogd and/or switch to different system logger?



Martin Schulze wrote:
>> Really, 2.*2*?  Any reason for that rather than 2.4?
> 
> They're similar.  So it's from 2.4 as well.  Please take a look at the
> source and let me know if there are any problems to be expected with
> it, if you're in doubt.
The structures are the same... except for one thing.  In yours we have:

#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
struct kernel_sym
{
        unsigned long value;
        char name[MODULE_NAME_LEN];
};

While in 2.4 we have:

/* Used by get_kernel_syms, which is obsolete.  */
struct kernel_sym
{
        unsigned long value;
        char name[60];          /* should have been 64-sizeof(long); oh well 
*/
};

So on architectures with non-32-bit-longs, there's a gratuitous difference in 
the size of the module name buffer.  :-P

In the 2.4 kernel's module.c, at get_kernel_syms, it notes:
 * This call is obsolete.  New programs should use query_module+QM_SYMBOLS
 * which does not arbitrarily limit the length of symbols.

The 2.6 kernel has removed get_kernel_syms entirely, and the syscall appears 
(looking at the sources) to return a no-such-syscall error.  So I'm 
suspicious that the klogd code which uses get_kernel_syms (in ksym_mod.c) to 
translate addresses to symbol names may simply not work with a 2.6 kernel... 
has anyone checked whether it does?  :-)



Reply to: