[BusyBox] SIGSEGV with klogd

William Barsse wbarsse at pfn.com
Fri Aug 6 15:34:22 UTC 2004


Hi Glenn,

Thanks for taking a look at the patch. Now to answer you question about 
the console_log_level : If you strace klogd _without_ setting the log 
level with the -c flag, you will still see it try to do a syscall to set 
the log level to -1. When building klogd, gcc will also tell you that 
the comparison checking wether or not to set the log level will always fail.
As for the second patch it is only interesting when one of the following 
conditions are met :
- your kernel generates a lot of printk output on boot, ie more than 4096
- you reduce the size of the log_buffer.
(Note the first version of the second patch doesn't work, look at the 
second version if you are interested).

Well, hope I managed to be somewhat clear,
- William

Glenn McGrath wrote:
> On Tue, 27 Jul 2004 14:12:37 -0400
> William Barsse <wbarsse at pfn.com> wrote:
> 
> 
>>Hi all,
>>
>>I've run into an issue with klogd causing a segv. It seems to be due
>>to the way the syslog call is being made with data read from the
>>kernel's log buffer. The call looks like this
>>
>>syslog(priority, stuff);
>>
>>however this breaks if 'stuff' contains a % character since it is 
>>regarded as a format string. Calling it this way solves things :
>>
>>syslog(priority, "%s", stuff);
> 
> 
> Ive applied this, but i didnt see the need to change 'int
> console_log_level' to an unsigned.
> 
> Havent looked at your 2nd patch yet.
> 
> 
> Glenn
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> busybox mailing list
> busybox at mail.busybox.net
> http://busybox.net/mailman/listinfo/busybox



More information about the busybox mailing list