Opened 11 years ago

Closed 11 years ago

#3215 closed bug (invalid)

debug_printf messages from userspace prefixed with "KERN" in syslog

Reported by: Adek336 Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

A userspace program may user debug_printf() to write a message to the syslog and ktrace_printf() to write a message to the trace buffer.

Both dprintf() and ktrace_printf(), when called in kernel space emit messages to the syslog and to the trace buffer, prefixed with "KERN: " to indicate the source.

When called from user space, ktrace_printf() indicated this by prefixing the message with "user: ". debug_printf(), on the other hand, prefixes the syslog messages with "KERN: ".

I suspect that in the syslog, the prefix also is supposed to indicate the source type so debug_printf() should emit "USER: "-like messages.

Change History (1)

comment:1 Changed 11 years ago by axeld

Resolution: invalid
Status: newclosed

debug_printf() uses a kernel service, and that stuff is supposed to go out the serial line (it just ends up in the syslog as there is a redirection).

If you want to use the syslog from applications, please use the appropriate API instead.

Note: See TracTickets for help on using tickets.