<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/printk.c, branch v2.6.38</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-02-11T01:53:55Z</updated>
<entry>
<title>cap_syslog: accept CAP_SYS_ADMIN for now</title>
<updated>2011-02-11T01:53:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-02-11T01:53:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee24aebffb75a7f940cf52c8cf6910947b3130c0'/>
<id>urn:sha1:ee24aebffb75a7f940cf52c8cf6910947b3130c0</id>
<content type='text'>
In commit ce6ada35bdf7 ("security: Define CAP_SYSLOG") Serge Hallyn
introduced CAP_SYSLOG, but broke backwards compatibility by no longer
accepting CAP_SYS_ADMIN as an override (it would cause a warning and
then reject the operation).

Re-instate CAP_SYS_ADMIN - but keeping the warning - as an acceptable
capability until any legacy applications have been updated.  There are
apparently applications out there that drop all capabilities except for
CAP_SYS_ADMIN in order to access the syslog.

(This is a re-implementation of a patch by Serge, cleaning the logic up
and making the code more readable)

Acked-by: Serge Hallyn &lt;serge@hallyn.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>console: rename acquire/release_console_sem() to console_lock/unlock()</title>
<updated>2011-01-26T00:50:06Z</updated>
<author>
<name>Torben Hohn</name>
<email>torbenh@gmx.de</email>
</author>
<published>2011-01-25T23:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff'/>
<id>urn:sha1:ac751efa6a0d70f2c9daef5c7e3a92270f5c2dff</id>
<content type='text'>
The -rt patches change the console_semaphore to console_mutex.  As a
result, a quite large chunk of the patches changes all
acquire/release_console_sem() to acquire/release_console_mutex()

This commit makes things use more neutral function names which dont make
implications about the underlying lock.

The only real change is the return value of console_trylock which is
inverted from try_acquire_console_sem()

This patch also paves the way to switching console_sem from a semaphore to
a mutex.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert]
Signed-off-by: Torben Hohn &lt;torbenh@gmx.de&gt;
Cc: Thomas Gleixner &lt;tglx@tglx.de&gt;
Cc: Greg KH &lt;gregkh@suse.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Geert Uytterhoeven &lt;geert@linux-m68k.org&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: use RCU to prevent potential lock contention in kmsg_dump</title>
<updated>2011-01-13T16:03:09Z</updated>
<author>
<name>Huang Ying</name>
<email>ying.huang@intel.com</email>
</author>
<published>2011-01-13T00:59:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb842b00c5eab66ec361b31550aa8a922745ce9e'/>
<id>urn:sha1:fb842b00c5eab66ec361b31550aa8a922745ce9e</id>
<content type='text'>
dump_list_lock is used to protect dump_list in kmsg_dumper implementation,
kmsg_dump() uses it to traverse dump_list too.  But if there is contention
on the lock, kmsg_dump() will fail, and the valuable kernel message may be
lost.

This patch solves this issue with RCU.  Because kmsg_dump() only read the
list, no lock is needed in kmsg_dump().  So that kmsg_dump() will never
fail because of lock contention.

Signed-off-by: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: "Paul E. McKenney" &lt;paulmck@us.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&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>kmsg_dump: add kmsg_dump() calls to the reboot, halt, poweroff and emergency_restart paths</title>
<updated>2011-01-13T16:03:07Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2011-01-13T00:59:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04c6862c055fb687c90d9652f32c11a063df15cf'/>
<id>urn:sha1:04c6862c055fb687c90d9652f32c11a063df15cf</id>
<content type='text'>
We need to know the reason why system rebooted in support service.
However, we can't inform our customers of the reason because final
messages are lost on current Linux kernel.

This patch improves the situation above because the final messages are
saved by adding kmsg_dump() to reboot, halt, poweroff and
emergency_restart path.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: Marco Stornelli &lt;marco.stornelli@gmail.com&gt;
Reviewed-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
Reviewed-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.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>Merge branch 'master' into next</title>
<updated>2011-01-09T22:46:24Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2011-01-09T22:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d2e7ad19229f982fc1eb731827d82ceac90abfb3'/>
<id>urn:sha1:d2e7ad19229f982fc1eb731827d82ceac90abfb3</id>
<content type='text'>
Conflicts:
	security/smack/smack_lsm.c

Verified and added fix by Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Ok'd by Casey Schaufler &lt;casey@schaufler-ca.com&gt;

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6</title>
<updated>2011-01-07T22:39:20Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-07T22:39:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=56b85f32d530d09d6805488ad00775d4e0e3baab'/>
<id>urn:sha1:56b85f32d530d09d6805488ad00775d4e0e3baab</id>
<content type='text'>
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (36 commits)
  serial: apbuart: Fixup apbuart_console_init()
  TTY: Add tty ioctl to figure device node of the system console.
  tty: add 'active' sysfs attribute to tty0 and console device
  drivers: serial: apbuart: Handle OF failures gracefully
  Serial: Avoid unbalanced IRQ wake disable during resume
  tty: fix typos/errors in tty_driver.h comments
  pch_uart : fix warnings for 64bit compile
  8250: fix uninitialized FIFOs
  ip2: fix compiler warning on ip2main_pci_tbl
  specialix: fix compiler warning on specialix_pci_tbl
  rocket: fix compiler warning on rocket_pci_ids
  8250: add a UPIO_DWAPB32 for 32 bit accesses
  8250: use container_of() instead of casting
  serial: omap-serial: Add support for kernel debugger
  serial: fix pch_uart kconfig &amp; build
  drivers: char: hvc: add arm JTAG DCC console support
  RS485 documentation: add 16C950 UART description
  serial: ifx6x60: fix memory leak
  serial: ifx6x60: free IRQ on error
  Serial: EG20T: add PCH_UART driver
  ...

Fixed up conflicts in drivers/serial/apbuart.c with evil merge that
makes the code look fairly sane (unlike either side).
</content>
</entry>
<entry>
<title>tty: add 'active' sysfs attribute to tty0 and console device</title>
<updated>2010-12-17T00:15:34Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2010-12-01T17:51:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbc92a3455577ab17615cbcb91826399061bd789'/>
<id>urn:sha1:fbc92a3455577ab17615cbcb91826399061bd789</id>
<content type='text'>
tty: add 'active' sysfs attribute to tty0 and console device

Userspace can query the actual virtual console, and the configured
console devices behind /dev/tt0 and /dev/console.

The last entry in the list of devices is the active device, analog
to the console= kernel command line option.

The attribute supports poll(), which is raised when the virtual
console is changed or /dev/console is reconfigured.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

index 0000000..b138b66
</content>
</entry>
<entry>
<title>syslog: check cap_syslog when dmesg_restrict</title>
<updated>2010-12-08T22:48:48Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serge@hallyn.com</email>
</author>
<published>2010-12-08T15:19:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38ef4c2e437d11b5922723504b62824e96761459'/>
<id>urn:sha1:38ef4c2e437d11b5922723504b62824e96761459</id>
<content type='text'>
Eric Paris pointed out that it doesn't make sense to require
both CAP_SYS_ADMIN and CAP_SYSLOG for certain syslog actions.
So require CAP_SYSLOG, not CAP_SYS_ADMIN, when dmesg_restrict
is set.

(I'm also consolidating the now common error path)

Signed-off-by: Serge E. Hallyn &lt;serge.hallyn@canonical.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Kees Cook &lt;kees.cook@canonical.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>printk: Use this_cpu_{read|write} api on printk_pending</title>
<updated>2010-12-08T19:16:01Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-11-26T16:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40dc11ffb35e8c4e8fa71092048e0f8de9db758c'/>
<id>urn:sha1:40dc11ffb35e8c4e8fa71092048e0f8de9db758c</id>
<content type='text'>
__get_cpu_var() is a bit inefficient, lets use __this_cpu_read() and
__this_cpu_write() to manipulate printk_pending.

printk_needs_cpu(cpu) is called only for the current cpu :
Use faster __this_cpu_read().

Remove the redundant unlikely on (cpu_is_offline(cpu)) test:

 # size kernel/printk.o*
   text	   data	    bss	    dec	    hex	filename
   9942	    756	 263488	 274186	  42f0a	kernel/printk.o.new
   9990	    756	 263488	 274234	  42f3a	kernel/printk.o.old

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Christoph Lameter &lt;cl@linux.com&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1290788536.2855.237.camel@edumazet-laptop&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>security: Define CAP_SYSLOG</title>
<updated>2010-11-28T21:35:12Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serge@hallyn.com</email>
</author>
<published>2010-11-25T17:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce6ada35bdf710d16582cc4869c26722547e6f11'/>
<id>urn:sha1:ce6ada35bdf710d16582cc4869c26722547e6f11</id>
<content type='text'>
Privileged syslog operations currently require CAP_SYS_ADMIN.  Split
this off into a new CAP_SYSLOG privilege which we can sanely take away
from a container through the capability bounding set.

With this patch, an lxc container can be prevented from messing with
the host's syslog (i.e. dmesg -c).

Changelog: mar 12 2010: add selinux capability2:cap_syslog perm
Changelog: nov 22 2010:
	. port to new kernel
	. add a WARN_ONCE if userspace isn't using CAP_SYSLOG

Signed-off-by: Serge Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Acked-by: Andrew G. Morgan &lt;morgan@kernel.org&gt;
Acked-By: Kees Cook &lt;kees.cook@canonical.com&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: "Christopher J. PeBenito" &lt;cpebenito@tresys.com&gt;
Cc: Eric Paris &lt;eparis@parisplace.org&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
