kallsyms_lookup_name

2011-08-05 Thread Venkatram Tummala
Hi, I need to use some unexported kernel symbols in my kernel module but in the particular kernel version i am based on (2.6.18 - RHEL 5.7), kallsyms_lookup_name is not exported and there is no kallsyms_on_each_symbol in this kernel. And I can't change the kernel owing to reasons i have no control

Re: Debugging the linux kernel core dump

2011-08-05 Thread Akash
On Fri, Aug 5, 2011 at 9:23 PM, Mulyadi Santosa wrote: > Hi... > > On Fri, Aug 5, 2011 at 12:23, Akash wrote: > > I think it was not built with -g otherwise the symbols would have been > there > > in the vmlinux itself, right ? > > That is the reason I need to add symbols externally. > > Please d

Re: how to freeze the 2.6 kernel on SMP m/c

2011-08-05 Thread Mulyadi Santosa
On Fri, Aug 5, 2011 at 17:24, san deep wrote: > Hi, > > Could you please suggest  how to freeze  the 2.6 kernel(SMP m/c) with > my own dlkm with  less number of code. > > I tried the below mentioned code snippet, it hangs only the terminal > on which i executed the insmod command. >  Please correc

Re: Mapped more than Cached in /proc/meminfo

2011-08-05 Thread Mulyadi Santosa
On Fri, Aug 5, 2011 at 21:16, =/_00/\/\ wrote: > Hi, > > I am trying to analyze memory usage on my system. > As first step I am monitoring /proc/meminfo. > Surprisingly I see Mapped value is more than Cached. > > So in which case is it possible to have Mapped more than Cached ? your apps mmap() l

Re: Debugging the linux kernel core dump

2011-08-05 Thread Mulyadi Santosa
Hi... On Fri, Aug 5, 2011 at 12:23, Akash wrote: > I think it was not built with -g otherwise the symbols would have been there > in the vmlinux itself, right ? > That is the reason I need to add symbols externally. > Please dont ask me to rebuild the kernel, this is vanilla OpenSUSE 11.3 > symbo

Re: can i simply "re-version" the kernel down to 2.x?

2011-08-05 Thread Josh Cartwright
On Fri, Aug 05, 2011 at 10:36:00AM -0400, Robert P. J. Day wrote: > > for reasons that don't need explaining, i need to rebuild my current > 3.0.0... kernel so that it returns a "uname" version number of > "2.whatever". i simply have an app i want to run that checks the > output of "uname" and

Re: Compiling kernel module ...

2011-08-05 Thread Akash
Use #if like * *#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) // New socket create function #else // Old socket create function #endif LINUX_VERSION_CODE is defined somewhere in the kernel and you should ge

Re: Reboot not calling module_exit of LKM

2011-08-05 Thread Ramesh.P
Thanks Greg. Appreciate your reply. Regards, Ramesh On Fri, Aug 5, 2011 at 12:06 PM, Greg KH wrote: > On Fri, Aug 05, 2011 at 11:39:16AM -0700, Ramesh.P wrote: >> Hi, >> >> Good day! >> >> When a system is rebooted, the loadable kernel modules 'module_exit' >> functions are not called. I see thi

trouble with __aquires(lock) __releases(lock)

2011-08-05 Thread Jim Cromie
Im trying to use macros from include/linux/compiler.h and theyre giving me warnings that dont look right. after thrashing on my own hacks, I looked to well established uses for guidance. But make C=1 fs/file.o also gives errors, similar to mine. What am I missing ? or has some bitrot set in ? 2

Compiling kernel module ...

2011-08-05 Thread Abu Rasheda
I am compiling my driver and have run into following scenario. Socket create function got a new parameter in Vanila kenrel 2.6.33. while Scientific Linux has it back ported to 2.6.32. How do I handle this kind of situation ? so that my driver compiles for both kernel versions.

Re: Reboot not calling module_exit of LKM

2011-08-05 Thread Greg KH
On Fri, Aug 05, 2011 at 11:39:16AM -0700, Ramesh.P wrote: > Hi, > > Good day! > > When a system is rebooted, the loadable kernel modules 'module_exit' > functions are not called. I see this behavior in a custom kernel. My > questions are > > a. Is this applicable in mainline/normal kernel too?

Reboot not calling module_exit of LKM

2011-08-05 Thread Ramesh.P
Hi, Good day! When a system is rebooted, the loadable kernel modules 'module_exit' functions are not called. I see this behavior in a custom kernel. My questions are a. Is this applicable in mainline/normal kernel too? b. If yes, what are the reasons? (One reason may be, not to get into new prob

Re: can i simply "re-version" the kernel down to 2.x?

2011-08-05 Thread Robert P. J. Day
On Fri, 5 Aug 2011, Greg KH wrote: > On Fri, Aug 05, 2011 at 10:36:00AM -0400, Robert P. J. Day wrote: > > > > for reasons that don't need explaining, i need to rebuild my current > > 3.0.0... kernel so that it returns a "uname" version number of > > "2.whatever". i simply have an app i want to

Re: can i simply "re-version" the kernel down to 2.x?

2011-08-05 Thread Greg KH
On Fri, Aug 05, 2011 at 10:36:00AM -0400, Robert P. J. Day wrote: > > for reasons that don't need explaining, i need to rebuild my current > 3.0.0... kernel so that it returns a "uname" version number of > "2.whatever". i simply have an app i want to run that checks the > output of "uname" and

can i simply "re-version" the kernel down to 2.x?

2011-08-05 Thread Robert P. J. Day
for reasons that don't need explaining, i need to rebuild my current 3.0.0... kernel so that it returns a "uname" version number of "2.whatever". i simply have an app i want to run that checks the output of "uname" and if it doesn't see a major number of "2", it goes a bit squirrelly. there'

Mapped more than Cached in /proc/meminfo

2011-08-05 Thread =/_00/\/\
Hi, I am trying to analyze memory usage on my system. As first step I am monitoring /proc/meminfo. Surprisingly I see Mapped value is more than Cached. So in which case is it possible to have Mapped more than Cached ? Regards, ~/ ___ Kernelnewbies m

Re: Creating sparse file on XFS and EXT3 has different results

2011-08-05 Thread Greg Freemyer
Apologies for the top post. I simply forgot to not do that. On Aug 5, 2011 8:11 AM, "Greg Freemyer" wrote: > > There are no "specs" as to how a sparse file is handled in response to writes. > > Sparse is mostly beneficial when the holes are very large. > > If an app really wants to have minimal

Re: Creating sparse file on XFS and EXT3 has different results

2011-08-05 Thread Greg Freemyer
There are no "specs" as to how a sparse file is handled in response to writes. Sparse is mostly beneficial when the holes are very large. If an app really wants to have minimal on disk space, you should pre-allocate space with fallocate. You may even need to hole punch after the writes. Both xf

how to freeze the 2.6 kernel on SMP m/c

2011-08-05 Thread san deep
Hi, Could you please suggest how to freeze the 2.6 kernel(SMP m/c) with my own dlkm with less number of code. I tried the below mentioned code snippet, it hangs only the terminal on which i executed the insmod command. Please correct the below code to freeze whole kernel. #include #i