Skip to content
Snippets Groups Projects
  1. Apr 29, 2008
    • David Howells's avatar
      keys: add keyctl function to get a security label · 70a5bb72
      David Howells authored
      
      Add a keyctl() function to get the security label of a key.
      
      The following is added to Documentation/keys.txt:
      
       (*) Get the LSM security context attached to a key.
      
      	long keyctl(KEYCTL_GET_SECURITY, key_serial_t key, char *buffer,
      		    size_t buflen)
      
           This function returns a string that represents the LSM security context
           attached to a key in the buffer provided.
      
           Unless there's an error, it always returns the amount of data it could
           produce, even if that's too big for the buffer, but it won't copy more
           than requested to userspace. If the buffer pointer is NULL then no copy
           will take place.
      
           A NUL character is included at the end of the string if the buffer is
           sufficiently big.  This is included in the returned count.  If no LSM is
           in force then an empty string will be returned.
      
           A process must have view permission on the key for this function to be
           successful.
      
      [akpm@linux-foundation.org: declare keyctl_get_security()]
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Cc: Paul Moore <paul.moore@hp.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: James Morris <jmorris@namei.org>
      Cc: Kevin Coffman <kwc@citi.umich.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      70a5bb72
    • David Howells's avatar
      keys: allow the callout data to be passed as a blob rather than a string · 4a38e122
      David Howells authored
      
      Allow the callout data to be passed as a blob rather than a string for
      internal kernel services that call any request_key_*() interface other than
      request_key().  request_key() itself still takes a NUL-terminated string.
      
      The functions that change are:
      
      	request_key_with_auxdata()
      	request_key_async()
      	request_key_async_with_auxdata()
      
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Cc: Paul Moore <paul.moore@hp.com>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Cc: Stephen Smalley <sds@tycho.nsa.gov>
      Cc: James Morris <jmorris@namei.org>
      Cc: Kevin Coffman <kwc@citi.umich.edu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4a38e122
    • Randy Dunlap's avatar
      doc: fix DMA-API function parameters · 02d15c43
      Randy Dunlap authored
      
      Fix kernel bugzilla #10388.
      
      DMA-API.txt has wrong argument type for some functions.  It uses struct device
      but should use struct pci_dev.
      
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      02d15c43
    • Arthur Kepner's avatar
      dma: document dma_*map*_attrs() interfaces · a75b0a2f
      Arthur Kepner authored
      
      Document the new dma_*map*_attrs() functions.
      
      [markn@au1.ibm.com: fix up for dma-add-dma_map_attrs-interfaces and update docs]
      Signed-off-by: default avatarArthur Kepner <akepner@sgi.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Signed-off-by: default avatarMark Nelson <markn@au1.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a75b0a2f
    • Paul Menage's avatar
      Cpuset hardwall flag: add a mem_hardwall flag to cpusets · 78608366
      Paul Menage authored
      
      This flag provides the hardwalling properties of mem_exclusive, without
      enforcing the exclusivity.  Either mem_hardwall or mem_exclusive is sufficient
      to prevent GFP_KERNEL allocations from passing outside the cpuset's assigned
      nodes.
      
      Signed-off-by: default avatarPaul Menage <menage@google.com>
      Acked-by: default avatarPaul Jackson <pj@sgi.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      78608366
    • Pavel Emelyanov's avatar
      memcgroups: add a document describing the resource counter abstraction · faebe9fd
      Pavel Emelyanov authored
      
      The resource counter is supposed to facilitate the resource accounting of
      arbitrary resource (and it already does this for memory controller).
      
      However, it is about to be used in other resources controllers (swap, kernel
      memory, networking, etc), so provide a doc describing how to work with it.
      This will eliminate all the possible future duplications in the appropriate
      controllers' docs.
      
      Fixed errors pointed out by Randy.
      
      [akpm@linux-foundation.org: fix documentation tpyo]
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
      Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      faebe9fd
    • 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