<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/kernel/printk.c, branch linux-2.6.31.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.31.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2009-06-16T18:02:28Z</updated>
<entry>
<title>printk: Add KERN_DEFAULT printk log-level</title>
<updated>2009-06-16T18:02:28Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-06-16T18:02:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e28d713704117bca0820c732210df6075b09f13b'/>
<id>urn:sha1:e28d713704117bca0820c732210df6075b09f13b</id>
<content type='text'>
This adds a KERN_DEFAULT loglevel marker, for when you cannot decide
which loglevel you want, and just want to keep an existing printk
with the default loglevel.

The difference between having KERN_DEFAULT and having no log-level
marker at all is two-fold:

 - having the log-level marker will now force a new-line if the
   previous printout had not added one (perhaps because it forgot,
   but perhaps because it expected a continuation)

 - having a log-level marker is required if you are printing out a
   message that otherwise itself could perhaps otherwise be mistaken
   for a log-level.

Signed-of-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>printk: clean up handling of log-levels and newlines</title>
<updated>2009-06-16T17:57:02Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-06-16T17:57:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5fd29d6ccbc98884569d6f3105aeca70858b3e0f'/>
<id>urn:sha1:5fd29d6ccbc98884569d6f3105aeca70858b3e0f</id>
<content type='text'>
It used to be that we would only look at the log-level in a printk()
after explicit newlines, which can cause annoying problems when the
previous printk() did not end with a '\n'. In that case, the log-level
marker would be just printed out in the middle of the line, and be
seen as just noise rather than change the logging level.

This changes things to always look at the log-level in the first
bytes of the printout. If a log level marker is found, it is always
used as the log-level. Additionally, if no newline existed, one is
added (unless the log-level is the explicit KERN_CONT marker, to
explicitly show that it's a continuation of a previous line).

Acked-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2009-04-05T17:23:25Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2009-04-05T17:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4c393fd551654179c46b65e4a70ea20d831c783'/>
<id>urn:sha1:e4c393fd551654179c46b65e4a70ea20d831c783</id>
<content type='text'>
* 'printk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  printk: correct the behavior of printk_timed_ratelimit()
  vsprintf: unify the format decoding layer for its 3 users, cleanup
  fix regression from "vsprintf: unify the format decoding layer for its 3 users"
  vsprintf: fix bug in negative value printing
  vsprintf: unify the format decoding layer for its 3 users
  vsprintf: add binary printf
  printk: introduce printk_once()

Fix trivial conflicts (printk_once vs log_buf_kexec_setup() added near
each other) in include/linux/kernel.h.
</content>
</entry>
<entry>
<title>kexec: add dmesg log symbols to /proc/vmcoreinfo lists</title>
<updated>2009-04-03T02:05:04Z</updated>
<author>
<name>Neil Horman</name>
</author>
<published>2009-04-02T23:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=04d491ab2a53008a1aa98ac09561768c7f3adda3'/>
<id>urn:sha1:04d491ab2a53008a1aa98ac09561768c7f3adda3</id>
<content type='text'>
It would be nice to be able to extract the dmesg log from a vmcore file
without needing to keep the debug symbols for the running kernel handy all
the time.  We have a facility to do this in /proc/vmcore.  This patch adds
the log_buf and log_end symbols to the vmcoreinfo area so that tools (like
makedumpfile) can easily extract the dmesg logs from a vmcore image.

[akpm@linux-foundation.org: several fixes and cleanups]
[akpm@linux-foundation.org: fix unused log_buf_kexec_setup()]
[akpm@linux-foundation.org: build fix]
Signed-off-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Simon Horman &lt;horms@verge.net.au&gt;
Acked-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Cc: Simon Horman &lt;horms@verge.net.au&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Cc: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>printk: correct the behavior of printk_timed_ratelimit()</title>
<updated>2009-03-17T15:25:28Z</updated>
<author>
<name>Guillaume Knispel</name>
</author>
<published>2009-03-17T15:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f2d28a2ebcb525a6ec7e2152106ddb385ef52b73'/>
<id>urn:sha1:f2d28a2ebcb525a6ec7e2152106ddb385ef52b73</id>
<content type='text'>
Impact: fix jiffies-comparison sign-wrap behavior

The behavior provided by printk_timed_ratelimit() is, in some
situations, probably not what a caller would reasonably expect:

bool printk_timed_ratelimit(unsigned long *caller_jiffies,
			unsigned int interval_msecs)
{
	if (*caller_jiffies == 0 || time_after(jiffies, *caller_jiffies)) {
		*caller_jiffies = jiffies + msecs_to_jiffies(interval_msecs);
		return true;
	}
	return false;
}

On a 32 bit computer, if printk_timed_ratelimit() is initially called at
time jiffies == Ja, *caller_jiffies is set to
Ja + msecs_to_jiffies(interval_msecs): let's say Ja + 42 for this
example.

If this caller then doesn't call printk_timed_ratelimit() until
jiffies == Ja + (1 &lt;&lt; 31) + 42 (which can happen as soon as ~ 25 days
later on a 1000 HZ system), printk_timed_ratelimit() will then always
return false to this caller until jiffies loops completely (1 &lt;&lt; 31 more
ticks).

Ths change makes it only return false if jiffies is in the small
time window starting at the previous call when true was returned and
ending interval_msecs later.  Note that if jiffies loops completely
between two calls to printk_timed_ratelimit(), it will obviously still
wrongly return false, but this is something with a low probability.

If something completely reliable is needed I guess jiffies_64 must be
used (which this change does not do).

Signed-off-by: Guillaume Knispel &lt;gknispel@proformatique.com&gt;
Cc: Ulrich Drepper &lt;drepper@redhat.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Andrew Morton &lt;akpm@osdl.org&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
LKML-Reference: &lt;20090317161842.0059096b@xilun.lan.proformatique.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>PM: Fix suspend_console and resume_console to use only one semaphore</title>
<updated>2009-02-21T22:17:18Z</updated>
<author>
<name>Arve Hjønnevåg</name>
</author>
<published>2009-02-14T01:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=403f307576396f3362fbb65af190885b6036c72c'/>
<id>urn:sha1:403f307576396f3362fbb65af190885b6036c72c</id>
<content type='text'>
This fixes a race where a thread acquires the console while the
console is suspended, and the console is resumed before this
thread releases it. In this case, the secondary console
semaphore would be left locked, and the primary semaphore would
be released twice. This in turn would cause the console switch
on suspend or resume to hang forever.

Note that suspend_console does not actually lock the console
for clients that use acquire_console_sem, it only locks it for
clients that use try_acquire_console_sem. If we change
suspend_console to fully lock the console, then the kernel
may deadlock on suspend. One client of try_acquire_console_sem
is acquire_console_semaphore_for_printk, which uses it to
prevent printk from using the console while it is suspended.

Signed-off-by: Arve Hjønnevåg &lt;arve@android.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] System call wrappers part 27</title>
<updated>2009-01-14T13:15:29Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2009-01-14T13:14:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1e7bfb2134dfec37ce04fb3a4ca89299e892d10c'/>
<id>urn:sha1:1e7bfb2134dfec37ce04fb3a4ca89299e892d10c</id>
<content type='text'>
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>[CVE-2009-0029] Make sys_syslog a conditional system call</title>
<updated>2009-01-14T13:15:16Z</updated>
<author>
<name>Heiko Carstens</name>
</author>
<published>2009-01-14T13:13:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f627a741d24f12955fa2d9f8831c3b12860635bd'/>
<id>urn:sha1:f627a741d24f12955fa2d9f8831c3b12860635bd</id>
<content type='text'>
Remove the -ENOSYS implementation for !CONFIG_PRINTK and use
the cond_syscall infrastructure instead.

Acked-by: Kyle McMartin &lt;kyle@redhat.com&gt;
Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>trivial: printk: fix indentation of new_text_line declaration</title>
<updated>2009-01-06T10:28:06Z</updated>
<author>
<name>Jiri Kosina</name>
</author>
<published>2008-12-04T11:39:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edb123e16c6092bd08b67d1130ff03efeada0c89'/>
<id>urn:sha1:edb123e16c6092bd08b67d1130ff03efeada0c89</id>
<content type='text'>
Remove bogus indentation of new_text_line declaration introduced in
commit ac60ad741.

Acked-by: Nick Andrew &lt;nick@nick-andrew.net&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>printk: fix discarding message when recursion_bug</title>
<updated>2008-12-19T21:52:47Z</updated>
<author>
<name>Hiroshi Shimamoto</name>
</author>
<published>2008-12-19T18:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=26cc271db798cf211d35967cbfbb53e997126b84'/>
<id>urn:sha1:26cc271db798cf211d35967cbfbb53e997126b84</id>
<content type='text'>
Impact: fix truncated recursion bug message printout

When recursion_bug is true, kernel discards original message because printk_buf
contains recursion_bug_msg with NULL terminator. The sizeof(recursion_bug_msg)
makes this, use strlen() to get correct length without NULL terminator.

Reported-by: Toshikazu Nakayama &lt;nakayama.ts@ncos.nec.co.jp&gt;
Signed-off-by: Hiroshi Shimamoto &lt;h-shimamoto@ct.jp.nec.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
</feed>
