1. 22 2月, 2012 1 次提交
  2. 18 1月, 2012 2 次提交
    • N
      Kernel: Audit Support For The ARM Platform · 29ef73b7
      Nathaniel Husted 提交于
      This patch provides functionality to audit system call events on the
      ARM platform. The implementation was based off the structure of the
      MIPS platform and information in this
      (http://lists.fedoraproject.org/pipermail/arm/2009-October/000382.html)
      mailing list thread. The required audit_syscall_exit and
      audit_syscall_entry checks were added to ptrace using the standard
      registers for system call values (r0 through r3). A thread information
      flag was added for auditing (TIF_SYSCALL_AUDIT) and a meta-flag was
      added (_TIF_SYSCALL_WORK) to simplify modifications to the syscall
      entry/exit. Now, if either the TRACE flag is set or the AUDIT flag is
      set, the syscall_trace function will be executed. The prober changes
      were made to Kconfig to allow CONFIG_AUDITSYSCALL to be enabled.
      
      Due to platform availability limitations, this patch was only tested
      on the Android platform running the modified "android-goldfish-2.6.29"
      kernel. A test compile was performed using Code Sourcery's
      cross-compilation toolset and the current linux-3.0 stable kernel. The
      changes compile without error. I'm hoping, due to the simple modifications,
      the patch is "obviously correct".
      Signed-off-by: NNathaniel Husted <nhusted@gmail.com>
      Signed-off-by: NEric Paris <eparis@redhat.com>
      29ef73b7
    • E
      audit: only allow tasks to set their loginuid if it is -1 · 633b4545
      Eric Paris 提交于
      At the moment we allow tasks to set their loginuid if they have
      CAP_AUDIT_CONTROL.  In reality we want tasks to set the loginuid when they
      log in and it be impossible to ever reset.  We had to make it mutable even
      after it was once set (with the CAP) because on update and admin might have
      to restart sshd.  Now sshd would get his loginuid and the next user which
      logged in using ssh would not be able to set his loginuid.
      
      Systemd has changed how userspace works and allowed us to make the kernel
      work the way it should.  With systemd users (even admins) are not supposed
      to restart services directly.  The system will restart the service for
      them.  Thus since systemd is going to loginuid==-1, sshd would get -1, and
      sshd would be allowed to set a new loginuid without special permissions.
      
      If an admin in this system were to manually start an sshd he is inserting
      himself into the system chain of trust and thus, logically, it's his
      loginuid that should be used!  Since we have old systems I make this a
      Kconfig option.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      633b4545
  3. 13 1月, 2012 1 次提交
  4. 10 1月, 2012 1 次提交
  5. 13 12月, 2011 1 次提交
  6. 12 12月, 2011 1 次提交
  7. 03 11月, 2011 1 次提交
  8. 29 9月, 2011 1 次提交
    • P
      rcu: Drive configuration directly from SMP and PREEMPT · 8008e129
      Paul E. McKenney 提交于
      This commit eliminates the possibility of running TREE_PREEMPT_RCU
      when SMP=n and of running TINY_RCU when PREEMPT=y.  People who really
      want these combinations can hand-edit init/Kconfig, but eliminating
      them as choices for production systems reduces the amount of testing
      required.  It will also allow cutting out a few #ifdefs.
      
      Note that running TREE_RCU and TINY_RCU on single-CPU systems using
      SMP-built kernels is still supported.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      8008e129
  9. 14 8月, 2011 1 次提交
  10. 26 7月, 2011 1 次提交
  11. 16 6月, 2011 2 次提交
  12. 09 6月, 2011 2 次提交
  13. 07 6月, 2011 1 次提交
  14. 27 5月, 2011 1 次提交
  15. 23 5月, 2011 1 次提交
    • L
      Give up on pushing CC_OPTIMIZE_FOR_SIZE · 281dc5c5
      Linus Torvalds 提交于
      I still happen to believe that I$ miss costs are a major thing, but
      sadly, -Os doesn't seem to be the solution.  With or without it, gcc
      will miss some obvious code size improvements, and with it enabled gcc
      will sometimes make choices that aren't good even with high I$ miss
      ratios.
      
      For example, with -Os, gcc on x86 will turn a 20-byte constant memcpy
      into a "rep movsl".  While I sincerely hope that x86 CPU's will some day
      do a good job at that, they certainly don't do it yet, and the cost is
      higher than a L1 I$ miss would be.
      
      Some day I hope we can re-enable this.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      281dc5c5
  16. 21 5月, 2011 1 次提交
  17. 11 5月, 2011 1 次提交
  18. 06 5月, 2011 1 次提交
  19. 27 4月, 2011 1 次提交
    • R
      init/Kconfig: fix EXPERT menu list · 6befe5f6
      Randy Dunlap 提交于
      The EXPERT menu list was recently broken by the insertion of a
      kconfig symbol (EMBEDDED) at the beginning of the EXPERT list of
      kconfig items.  Broken by:
      
        commit 6a108a14
        Author: David Rientjes <rientjes@google.com>
        Date:   Thu Jan 20 14:44:16 2011 -0800
          kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT
      
      Restore the EXPERT menu list -- don't inject a symbol (EMBEDDED)
      that does not depend on EXPERT into the list.
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Peter Foley <pefoley2@verizon.net>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6befe5f6
  20. 23 4月, 2011 1 次提交
    • J
      [PARISC] slub: fix panic with DISCONTIGMEM · 4a5fa359
      James Bottomley 提交于
      Slub makes assumptions about page_to_nid() which are violated by
      DISCONTIGMEM and !NUMA.  This violation results in a panic because
      page_to_nid() can be non-zero for pages in the discontiguous ranges and
      this leads to a null return by get_node().  The assertion by the
      maintainer is that DISCONTIGMEM should only be allowed when NUMA is also
      defined.  However, at least six architectures: alpha, ia64, m32r, m68k,
      mips, parisc violate this.  The panic is a regression against slab, so
      just mark slub broken in the problem configuration to prevent users
      reporting these panics.
      
      Cc: stable@kernel.org
      Acked-by: NDavid Rientjes <rientjes@google.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      4a5fa359
  21. 15 4月, 2011 2 次提交
    • A
      kbuild: move KALLSYMS_EXTRA_PASS from Kconfig to Makefile · 1e2795a1
      Artem Bityutskiy 提交于
      At the moment we have the CONFIG_KALLSYMS_EXTRA_PASS Kconfig switch,
      which users can enable or disable while configuring the kernel. This
      option is then used by 'make' to determine whether an extra kallsyms
      pass is needed or not.
      
      However, this approach is not nice and confusing, and this patch moves
      CONFIG_KALLSYMS_EXTRA_PASS from Kconfig to Makefile instead. The
      rationale is below.
      
      1. CONFIG_KALLSYMS_EXTRA_PASS is really about the build time, not
         run-time. There is no real need for it to be in Kconfig. It is
         just an additional work-around which should be used only in rare
         cases, when someone breaks kallsyms, so Kbuild/Makefile is much
         better place for this option.
      2. Grepping CONFIG_KALLSYMS_EXTRA_PASS shows that many defconfigs have
         it enabled, probably not because they try to work-around a kallsyms
         bug, but just because the Kconfig help text is confusing and does
         not really make it clear that this option should not be used unless
         except when kallsyms is broken.
      3. And since many people have CONFIG_KALLSYMS_EXTRA_PASS enabled in
         their Kconfig, we do might fail to notice kallsyms bugs in time. E.g.,
         many testers use "make allyesconfig" to test builds, which will enable
         CONFIG_KALLSYMS_EXTRA_PASS and kallsyms breakage will not be noticed.
      
      To address that, this patch:
      
      1. Kills CONFIG_KALLSYMS_EXTRA_PASS
      2. Changes Makefile so that people can use "make KALLSYMS_EXTRA_PASS=1"
         to enable the extra pass if needed. Additionally, they may define
         KALLSYMS_EXTRA_PASS as an environment variable.
      3. By default KALLSYMS_EXTRA_PASS is disabled and if kallsyms has issues,
         "make" should print a warning and suggest using KALLSYMS_EXTRA_PASS
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      [mmarek: Removed make help text, is not necessary]
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      1e2795a1
    • A
      Kconfig: improve KALLSYMS_ALL documentation · 71a83ec7
      Artem Bityutskiy 提交于
      Dumb users like myself are not able to grasp from the existing KALLSYMS_ALL
      documentation that this option is not what they need. Improve the help
      message and make it clearer that KALLSYMS is enough in the majority of
      use cases, and KALLSYMS_ALL should really be used very rarely.
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      71a83ec7
  22. 14 4月, 2011 1 次提交
  23. 15 3月, 2011 1 次提交
  24. 05 3月, 2011 1 次提交
    • A
      BKL: That's all, folks · 4ba8216c
      Arnd Bergmann 提交于
      This removes the implementation of the big kernel lock,
      at last. A lot of people have worked on this in the
      past, I so the credit for this patch should be with
      everyone who participated in the hunt.
      
      The names on the Cc list are the people that were the
      most active in this, according to the recorded git
      history, in alphabetical order.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Cc: Alessio Igor Bogani <abogani@texware.it>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Hans Verkuil <hverkuil@xs4all.nl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Jan Blunck <jblunck@infradead.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Paul Menage <menage@google.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      4ba8216c
  25. 04 3月, 2011 1 次提交
  26. 16 2月, 2011 1 次提交
    • S
      perf: Add cgroup support · e5d1367f
      Stephane Eranian 提交于
      This kernel patch adds the ability to filter monitoring based on
      container groups (cgroups). This is for use in per-cpu mode only.
      
      The cgroup to monitor is passed as a file descriptor in the pid
      argument to the syscall. The file descriptor must be opened to
      the cgroup name in the cgroup filesystem. For instance, if the
      cgroup name is foo and cgroupfs is mounted in /cgroup, then the
      file descriptor is opened to /cgroup/foo. Cgroup mode is
      activated by passing PERF_FLAG_PID_CGROUP in the flags argument
      to the syscall.
      
      For instance to measure in cgroup foo on CPU1 assuming
      cgroupfs is mounted under /cgroup:
      
      struct perf_event_attr attr;
      int cgroup_fd, fd;
      
      cgroup_fd = open("/cgroup/foo", O_RDONLY);
      fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
      close(cgroup_fd);
      Signed-off-by: NStephane Eranian <eranian@google.com>
      [ added perf_cgroup_{exit,attach} ]
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <4d590250.114ddf0a.689e.4482@mx.google.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e5d1367f
  27. 04 2月, 2011 1 次提交
  28. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  29. 17 1月, 2011 2 次提交
  30. 14 1月, 2011 2 次提交
    • P
      rcu: demote SRCU_SYNCHRONIZE_DELAY from kernel-parameter status · c072a388
      Paul E. McKenney 提交于
      Because the adaptive synchronize_srcu_expedited() approach has
      worked very well in testing, remove the kernel parameter and
      replace it by a C-preprocessor macro.  If someone finds problems
      with this approach, a more complex and aggressively adaptive
      approach might be required.
      
      Longer term, SRCU will be merged with the other RCU implementations,
      at which point synchronize_srcu_expedited() will be event driven,
      just as synchronize_sched_expedited() currently is.  At that point,
      there will be no need for this adaptive approach.
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      c072a388
    • L
      decompressors: add boot-time XZ support · 3ebe1243
      Lasse Collin 提交于
      This implements the API defined in <linux/decompress/generic.h> which is
      used for kernel, initramfs, and initrd decompression.  This patch together
      with the first patch is enough for XZ-compressed initramfs and initrd;
      XZ-compressed kernel will need arch-specific changes.
      
      The buffering requirements described in decompress_unxz.c are stricter
      than with gzip, so the relevant changes should be done to the
      arch-specific code when adding support for XZ-compressed kernel.
      Similarly, the heap size in arch-specific pre-boot code may need to be
      increased (30 KiB is enough).
      
      The XZ decompressor needs memmove(), memeq() (memcmp() == 0), and
      memzero() (memset(ptr, 0, size)), which aren't available in all
      arch-specific pre-boot environments.  I'm including simple versions in
      decompress_unxz.c, but a cleaner solution would naturally be nicer.
      Signed-off-by: NLasse Collin <lasse.collin@tukaani.org>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Alain Knaff <alain@knaff.lu>
      Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
      Cc: Phillip Lougher <phillip@lougher.demon.co.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3ebe1243
  31. 23 12月, 2010 1 次提交
  32. 30 11月, 2010 3 次提交
    • M
      sched: Add 'autogroup' scheduling feature: automated per session task groups · 5091faa4
      Mike Galbraith 提交于
      A recurring complaint from CFS users is that parallel kbuild has
      a negative impact on desktop interactivity.  This patch
      implements an idea from Linus, to automatically create task
      groups.  Currently, only per session autogroups are implemented,
      but the patch leaves the way open for enhancement.
      
      Implementation: each task's signal struct contains an inherited
      pointer to a refcounted autogroup struct containing a task group
      pointer, the default for all tasks pointing to the
      init_task_group.  When a task calls setsid(), a new task group
      is created, the process is moved into the new task group, and a
      reference to the preveious task group is dropped.  Child
      processes inherit this task group thereafter, and increase it's
      refcount.  When the last thread of a process exits, the
      process's reference is dropped, such that when the last process
      referencing an autogroup exits, the autogroup is destroyed.
      
      At runqueue selection time, IFF a task has no cgroup assignment,
      its current autogroup is used.
      
      Autogroup bandwidth is controllable via setting it's nice level
      through the proc filesystem:
      
        cat /proc/<pid>/autogroup
      
      Displays the task's group and the group's nice level.
      
        echo <nice level> > /proc/<pid>/autogroup
      
      Sets the task group's shares to the weight of nice <level> task.
      Setting nice level is rate limited for !admin users due to the
      abuse risk of task group locking.
      
      The feature is enabled from boot by default if
      CONFIG_SCHED_AUTOGROUP=y is selected, but can be disabled via
      the boot option noautogroup, and can also be turned on/off on
      the fly via:
      
        echo [01] > /proc/sys/kernel/sched_autogroup_enabled
      
      ... which will automatically move tasks to/from the root task group.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Cc: Paul Turner <pjt@google.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      [ Removed the task_group_path() debug code, and fixed !EVENTFD build failure. ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      LKML-Reference: <1290281700.28711.9.camel@maggy.simson.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5091faa4
    • P
      rcu: Make synchronize_srcu_expedited() fast if running readers · 46fdb093
      Paul E. McKenney 提交于
      The synchronize_srcu_expedited() function is currently quick if there
      are no active readers, but will delay a full jiffy if there are any.
      If these readers leave their SRCU read-side critical sections quickly,
      this is way too long to wait.  So this commit first waits ten microseconds,
      and only then falls back to jiffy-at-a-time waiting.
      Reported-by: NAvi Kivity <avi@redhat.com>
      Reported-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Tested-by: NTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      46fdb093
    • P
      rcu: add tracing for TINY_RCU and TINY_PREEMPT_RCU · 9e571a82
      Paul E. McKenney 提交于
      Add tracing for the tiny RCU implementations, including statistics on
      boosting in the case of TINY_PREEMPT_RCU and RCU_BOOST.
      Signed-off-by: NPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      9e571a82