Skip to content
Snippets Groups Projects
  1. Dec 26, 2012
    • Eric W. Biederman's avatar
      pidns: Stop pid allocation when init dies · c876ad76
      Eric W. Biederman authored
      
      Oleg pointed out that in a pid namespace the sequence.
      - pid 1 becomes a zombie
      - setns(thepidns), fork,...
      - reaping pid 1.
      - The injected processes exiting.
      
      Can lead to processes attempting access their child reaper and
      instead following a stale pointer.
      
      That waitpid for init can return before all of the processes in
      the pid namespace have exited is also unfortunate.
      
      Avoid these problems by disabling the allocation of new pids in a pid
      namespace when init dies, instead of when the last process in a pid
      namespace is reaped.
      
      Pointed-out-by: default avatarOleg Nesterov <oleg@redhat.com>
      Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      c876ad76
  2. Dec 25, 2012
  3. Dec 21, 2012
  4. Dec 20, 2012
  5. Dec 19, 2012
  6. Dec 18, 2012
  7. Dec 17, 2012
  8. Dec 15, 2012
  9. Dec 14, 2012
    • Linus Torvalds's avatar
      Revert "sched: Update_cfs_shares at period edge" · 17bc14b7
      Linus Torvalds authored
      
      This reverts commit f269ae04.
      
      It turns out it causes a very noticeable interactivity regression with
      CONFIG_SCHED_AUTOGROUP (test-case: "make -j32" of the kernel in a
      terminal window, while scrolling in a browser - the autogrouping means
      that the two end up in separate cgroups, and the browser should be
      smooth as silk despite the high load).
      
      Says Paul Turner:
       "It seems that the update-throttling on the wake-side is reducing the
        interactive tasks' ability to preempt.  While I suspect the right
        longer term answer here is force these updates only in the
        cross-cgroup case; this is less trivial.  For this release I believe
        the right answer is either going to be a revert or restore the updates
        on the enqueue-side."
      
      Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Bisected-by: default avatarMike Galbraith <efault@gmx.de>
      Acked-by: default avatarPaul Turner <pjt@google.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17bc14b7
    • Michal Marek's avatar
    • Takashi Iwai's avatar
      MODSIGN: Avoid using .incbin in C source · 919aa45e
      Takashi Iwai authored
      
      Using the asm .incbin statement in C sources breaks any gcc wrapper which
      assumes that preprocessed C source is self-contained. Use a separate .S
      file to include the siging key and certificate.
      
      [ This means we no longer need SYMBOL_PREFIX which is defined in kernel.h
        from cbdbf2ab, so I removed it -- RR ]
      
      Tested-by: default avatarMichal Marek <mmarek@suse.cz>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarJames Hogan <james.hogan@imgtec.com>
      919aa45e
    • Rusty Russell's avatar
      modules: don't hand 0 to vmalloc. · 82fab442
      Rusty Russell authored
      In commit d0a21265 David Rientjes unified various archs'
      module_alloc implementation (including x86) and removed the graduitous
      shortcut for size == 0.
      
      Then, in commit de7d2b56, Joe Perches added a warning for
      zero-length vmallocs, which can happen without kallsyms on modules
      with no init sections (eg. zlib_deflate).
      
      Fix this once and for all; the module code has to handle zero length
      anyway, so get it right at the caller and remove the now-gratuitous
      checks within the arch-specific module_alloc implementations.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42608
      
      
      Reported-by: default avatarConrad Kostecki <ConiKost@gmx.de>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      82fab442
    • Satoru Takeuchi's avatar
      module: Remove a extra null character at the top of module->strtab. · 54523ec7
      Satoru Takeuchi authored
      
      There is a extra null character('\0') at the top of module->strtab for
      each module. Commit 59ef28b1 introduced this bug and this patch fixes it.
      
      Live dump log of the current linus git kernel(HEAD is 2844a487):
      ============================================================================
      crash> mod | grep loop
      ffffffffa01db0a0  loop             16689  (not loaded)  [CONFIG_KALLSYMS]
      crash> module.core_symtab ffffffffa01db0a0
        core_symtab = 0xffffffffa01db320crash> rd 0xffffffffa01db320 12
      ffffffffa01db320:  0000005500000001 0000000000000000   ....U...........
      ffffffffa01db330:  0000000000000000 0002007400000002   ............t...
      ffffffffa01db340:  ffffffffa01d8000 0000000000000038   ........8.......
      ffffffffa01db350:  001a00640000000e ffffffffa01daeb0   ....d...........
      ffffffffa01db360:  00000000000000a0 0002007400000019   ............t...
      ffffffffa01db370:  ffffffffa01d8068 000000000000001b   h...............
      crash> module.core_strtab ffffffffa01db0a0
        core_strtab = 0xffffffffa01dbb30 ""
      crash> rd 0xffffffffa01dbb30 4
      ffffffffa01dbb30:  615f70616d6b0000 66780063696d6f74   ..kmap_atomic.xf
      ffffffffa01dbb40:  73636e75665f7265 72665f646e696600   er_funcs.find_fr
      ============================================================================
      
      We expect Just first one byte of '\0', but actually first two bytes
      are '\0'. Here is The relationship between symtab and strtab.
      
      	symtab_idx	strtab_idx	symbol
      	-----------------------------------------------
      	0		0x1		"\0" # startab_idx should be 0
      	1		0x2		"kmap_atomic"
      	2		0xe		"xfer_funcs"
      	3		0x19		"find_fr..."
      
      By applying this patch, it becomes as follows.
      
      	symtab_idx	strtab_idx	symbol
      	-----------------------------------------------
      	0		0x0		"\0"	# extra byte is removed
      	1		0x1		"kmap_atomic"
      	2		0xd		"xfer_funcs"
      	3		0x18		"find_fr..."
      
      Signed-off-by: default avatarSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
      Cc: Masaki Kimura <masaki.kimura.kz@hitachi.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      54523ec7
    • Kees Cook's avatar
      security: introduce kernel_module_from_file hook · 2e72d51b
      Kees Cook authored
      
      Now that kernel module origins can be reasoned about, provide a hook to
      the LSMs to make policy decisions about the module file. This will let
      Chrome OS enforce that loadable kernel modules can only come from its
      read-only hash-verified root filesystem. Other LSMs can, for example,
      read extended attributes for signatures, etc.
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarSerge E. Hallyn <serge.hallyn@canonical.com>
      Acked-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarMimi Zohar <zohar@us.ibm.com>
      Acked-by: default avatarJames Morris <james.l.morris@oracle.com>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      2e72d51b
    • Rusty Russell's avatar
      module: add flags arg to sys_finit_module() · 2f3238ae
      Rusty Russell authored
      
      Thanks to Michael Kerrisk for keeping us honest.  These flags are actually
      useful for eliminating the only case where kmod has to mangle a module's
      internals: for overriding module versioning.
      
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarLucas De Marchi <lucas.demarchi@profusion.mobi>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      2f3238ae
    • Kees Cook's avatar
      module: add syscall to load module from fd · 34e1169d
      Kees Cook authored
      
      As part of the effort to create a stronger boundary between root and
      kernel, Chrome OS wants to be able to enforce that kernel modules are
      being loaded only from our read-only crypto-hash verified (dm_verity)
      root filesystem. Since the init_module syscall hands the kernel a module
      as a memory blob, no reasoning about the origin of the blob can be made.
      
      Earlier proposals for appending signatures to kernel modules would not be
      useful in Chrome OS, since it would involve adding an additional set of
      keys to our kernel and builds for no good reason: we already trust the
      contents of our root filesystem. We don't need to verify those kernel
      modules a second time. Having to do signature checking on module loading
      would slow us down and be redundant. All we need to know is where a
      module is coming from so we can say yes/no to loading it.
      
      If a file descriptor is used as the source of a kernel module, many more
      things can be reasoned about. In Chrome OS's case, we could enforce that
      the module lives on the filesystem we expect it to live on.  In the case
      of IMA (or other LSMs), it would be possible, for example, to examine
      extended attributes that may contain signatures over the contents of
      the module.
      
      This introduces a new syscall (on x86), similar to init_module, that has
      only two arguments. The first argument is used as a file descriptor to
      the module and the second argument is a pointer to the NULL terminated
      string of module arguments.
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (merge fixes)
      34e1169d
  10. Dec 13, 2012
  11. Dec 11, 2012
    • Lino Sanfilippo's avatar
      fsnotify: pass group to fsnotify_destroy_mark() · e2a29943
      Lino Sanfilippo authored
      
      In fsnotify_destroy_mark() dont get the group from the passed mark anymore,
      but pass the group itself as an additional parameter to the function.
      
      Signed-off-by: default avatarLino Sanfilippo <LinoSanfilippo@gmx.de>
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      e2a29943
    • Mel Gorman's avatar
      mm: sched: numa: Delay PTE scanning until a task is scheduled on a new node · 5bca2303
      Mel Gorman authored
      
      Due to the fact that migrations are driven by the CPU a task is running
      on there is no point tracking NUMA faults until one task runs on a new
      node. This patch tracks the first node used by an address space. Until
      it changes, PTE scanning is disabled and no NUMA hinting faults are
      trapped. This should help workloads that are short-lived, do not care
      about NUMA placement or have bound themselves to a single node.
      
      This takes advantage of the logic in "mm: sched: numa: Implement slow
      start for working set sampling" to delay when the checks are made. This
      will take advantage of processes that set their CPU and node bindings
      early in their lifetime. It will also potentially allow any initial load
      balancing to take place.
      
      Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
      5bca2303
Loading