Skip to content
Snippets Groups Projects
  1. Apr 29, 2008
    • Li Zefan's avatar
      cgroups: simplify init_subsys() · e8d55fde
      Li Zefan authored
      
      We are at system boot and there is only 1 cgroup group (i,e, init_css_set), so
      we don't need to run through the css_set linked list.  Neither do we need to
      run through the task list, since no processes have been created yet.
      
      Also referring to a comment in cgroup.h:
      
      struct css_set
      {
      	...
      	/*
      	 * Set of subsystem states, one for each subsystem. This array
      	 * is immutable after creation apart from the init_css_set
      	 * during subsystem registration (at boot time).
      	 */
      	struct cgroup_subsys_state *subsys[CGROUP_SUBSYS_COUNT];
      }
      
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      Reviewed-by: default avatarPaul Menage <menage@google.com>
      Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
      Cc: Pavel Emelyanov <xemul@openvz.org>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e8d55fde
    • Serge E. Hallyn's avatar
      cgroups: implement device whitelist · 08ce5f16
      Serge E. Hallyn authored
      
      Implement a cgroup to track and enforce open and mknod restrictions on device
      files.  A device cgroup associates a device access whitelist with each cgroup.
       A whitelist entry has 4 fields.  'type' is a (all), c (char), or b (block).
      'all' means it applies to all types and all major and minor numbers.  Major
      and minor are either an integer or * for all.  Access is a composition of r
      (read), w (write), and m (mknod).
      
      The root device cgroup starts with rwm to 'all'.  A child devcg gets a copy of
      the parent.  Admins can then remove devices from the whitelist or add new
      entries.  A child cgroup can never receive a device access which is denied its
      parent.  However when a device access is removed from a parent it will not
      also be removed from the child(ren).
      
      An entry is added using devices.allow, and removed using
      devices.deny.  For instance
      
      	echo 'c 1:3 mr' > /cgroups/1/devices.allow
      
      allows cgroup 1 to read and mknod the device usually known as
      /dev/null.  Doing
      
      	echo a > /cgroups/1/devices.deny
      
      will remove the default 'a *:* mrw' entry.
      
      CAP_SYS_ADMIN is needed to change permissions or move another task to a new
      cgroup.  A cgroup may not be granted more permissions than the cgroup's parent
      has.  Any task can move itself between cgroups.  This won't be sufficient, but
      we can decide the best way to adequately restrict movement later.
      
      [akpm@linux-foundation.org: coding-style fixes]
      [akpm@linux-foundation.org: fix may-be-used-uninitialized warning]
      Signed-off-by: default avatarSerge E. Hallyn <serue@us.ibm.com>
      Acked-by: default avatarJames Morris <jmorris@namei.org>
      Looks-good-to: Pavel Emelyanov <xemul@openvz.org>
      Cc: Daniel Hokka Zakrisson <daniel@hozac.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Paul Menage <menage@google.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      08ce5f16
    • Andres Salomon's avatar
      x86: olpc: add One Laptop Per Child architecture support · 3ef0e1f8
      Andres Salomon authored
      
      This adds support for OLPC XO hardware.  Open Firmware on XOs don't contain
      the VSA, so it is necessary to emulate the PCI BARs in the kernel.  This also
      adds functionality for running EC commands, and a CONFIG_OLPC.
      
      A number of OLPC drivers depend upon CONFIG_OLPC.
      
      olpc_ec_timeout is a hack to work around Embedded Controller bugs.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: geode_has_vsa build fix]
      [akpm@linux-foundation.org: olpc_register_battery_callback doesn't exist]
      Signed-off-by: default avatarAndres Salomon <dilinger@debian.org>
      Acked-by: default avatarIngo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jordan Crouse <jordan.crouse@amd.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ef0e1f8
    • Rik van Riel's avatar
      sysrq: add show-backtrace-on-all-cpus function · 5045bcae
      Rik van Riel authored
      
      SysRQ-P is not always useful on SMP systems, since it usually ends up showing
      the backtrace of a CPU that is doing just fine, instead of the backtrace of
      the CPU that is having problems.
      
      This patch adds SysRQ show-all-cpus(L), which shows the backtrace of every
      active CPU in the system.  It skips idle CPUs because some SMP systems are
      just too large and we already know what the backtrace of the idle task looks
      like.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: default avatarRik van Riel <riel@redhat.com>
      Randy Dunlap <randy.dunlap@oracle.com>
      Cc: <lwoodman@redhat.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5045bcae
    • Nur Hussein's avatar
      Taint kernel after WARN_ON(condition) · 95b570c9
      Nur Hussein authored
      
      The kernel is sent to tainted within the warn_on_slowpath() function, and
      whenever a warning occurs the new taint flag 'W' is set.  This is useful to
      know if a warning occurred before a BUG by preserving the warning as a flag
      in the taint state.
      
      This does not work on architectures where WARN_ON has its own definition.
      These archs are:
      	1. s390
      	2. superh
      	3. avr32
      	4. parisc
      
      The maintainers of these architectures have been added in the Cc: list
      in this email to alert them to the situation.
      
      The documentation in oops-tracing.txt has been updated to include the
      new flag.
      
      Signed-off-by: default avatarNur Hussein <nurhussein@gmail.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      95b570c9
  2. Apr 28, 2008
  3. Apr 27, 2008
Loading