1. 21 Sep, 2018 13 commits
  2. 19 Sep, 2018 7 commits
  3. 16 Sep, 2018 4 commits
    • Eric W. Biederman's avatar
      signal: Pair exports with their functions · fb50f5a4
      Eric W. Biederman authored
      For readability and consistency with the other exports in
      kernel/signal.c pair the exports of signal sending functions with
      their functions, instead of having the exports in one big clump.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      fb50f5a4
    • Eric W. Biederman's avatar
      signal: Remove specific_send_sig_info · b21c5bd5
      Eric W. Biederman authored
      This function is static and it only has two callers.  As
      specific_send_sig_info is only called twice remembering what
      specific_send_sig_info does when reading the code is difficutl and it
      makes it hard to see which sending sending functions are equivalent to
      which others.
      
      So remove specific_send_sig_info to make the code easier to read.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      b21c5bd5
    • Eric W. Biederman's avatar
      signal: Use group_send_sig_info to kill all processes in a pid namespace · 82058d66
      Eric W. Biederman authored
      Replace send_sig_info in zap_pid_ns_processes with
      group_send_sig_info.  This makes more sense as the entire process
      group is being killed.  More importantly this allows the kill of those
      processes with PIDTYPE_MAX to indicate all of the process in the pid
      namespace are being signaled.  This is needed for fork to detect when
      signals are sent to a group of processes.
      
      Admittedly fork has another case to catch SIGKILL but the principle remains
      that it is desirable to know when a group of processes is being signaled.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      82058d66
    • Eric W. Biederman's avatar
      tty_io: Use group_send_sig_info in __do_SACK to note it is a session being killed · a8ebd171
      Eric W. Biederman authored
      Replace send_sig and force_sig in __do_SAK with group_send_sig_info
      the general helper for sending a signal to a process group.  This is
      wordier but it allows specifying PIDTYPE_SID so that the signal code
      knows the signal went to a session.
      
      Both force_sig() and send_sig(..., 1) specify SEND_SIG_PRIV and the
      new call of group_send_sig_info does that explicitly.  This is enough
      to ensure even a pid namespace init is killed.
      
      The global init remains unkillable.  The guarantee that __do_SAK tries
      to provide is a clean path to login to a machine.  As the global init is
      unkillable, if it chooses to hold open a tty it can violate this
      guarantee.  A technique other than killing processes would be needed
      to provide this guarantee to userspace.
      
      The only difference between force_sig and send_sig when sending
      SIGKILL is that SIGNAL_UNKILLABLE is cleared.  This has no affect on
      the processing of a signal sent with SEND_SIG_PRIV by any process, making
      it unnecessary, and not behavior that needs to be preserved.
      
      force_sig was used originally because it did not take as many locks as
      send_sig.  Today send_sig, force_sig and group_send_sig_info take the
      same locks when delivering a signal.
      
      group_send_sig_info also contains a permission check that force_sig
      and send_sig do not.  However the presence of SEND_SIG_PRIV makes the
      permission check a noop.  So the permission check does not result
      in any behavioral differences.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      a8ebd171
  4. 15 Sep, 2018 1 commit
    • Eric W. Biederman's avatar
      signal/GenWQE: Fix sending of SIGKILL · 0ab93e9c
      Eric W. Biederman authored
      The genweq_add_file and genwqe_del_file by caching current without
      using reference counting embed the assumption that a file descriptor
      will never be passed from one process to another.  It even embeds the
      assumption that the the thread that opened the file will be in
      existence when the process terminates.   Neither of which are
      guaranteed to be true.
      
      Therefore replace caching the task_struct of the opener with
      pid of the openers thread group id.  All the knowledge of the
      opener is used for is as the target of SIGKILL and a SIGKILL
      will kill the entire process group.
      
      Rename genwqe_force_sig to genwqe_terminate, remove it's unncessary
      signal argument, update it's ownly caller, and use kill_pid
      instead of force_sig.
      
      The work force_sig does in changing signal handling state is not
      relevant to SIGKILL sent as SEND_SIG_PRIV.  The exact same processess
      will be killed just with less work, and less confusion.  The work done
      by force_sig is really only needed for handling syncrhonous
      exceptions.
      
      It will still be possible to cause genwqe_device_remove to wait
      8 seconds by passing a file descriptor to another process but
      the possible user after free is fixed.
      
      Fixes: eaf4722d ("GenWQE Character device and DDCB queue")
      Cc: stable@vger.kernel.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Frank Haverkamp <haver@linux.vnet.ibm.com>
      Cc: Joerg-Stephan Vogt <jsvogt@de.ibm.com>
      Cc: Michael Jung <mijung@gmx.net>
      Cc: Michael Ruettger <michael@ibmra.de>
      Cc: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Cc: Eberhard S. Amann <esa@linux.vnet.ibm.com>
      Cc: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
      Cc: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      0ab93e9c
  5. 11 Sep, 2018 10 commits
  6. 26 Aug, 2018 5 commits
    • Linus Torvalds's avatar
      Linux 4.19-rc1 · 5b394b2d
      Linus Torvalds authored
      5b394b2d
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b933d6eb
      Linus Torvalds authored
      Pull timer update from Thomas Gleixner:
       "New defines for the compat time* types so they can be shared between
        32bit and 64bit builds. Not used yet, but merging them now allows the
        actual conversions to be merged through different maintainer trees
        without dependencies
      
        We still have compat interfaces for 32bit on 64bit even with the new
        2038 safe timespec/val variants because pointer size is different. And
        for the old style timespec/val interfaces we need yet another 'compat'
        interface for both 32bit native and 32bit on 64bit"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        y2038: Provide aliases for compat helpers
      b933d6eb
    • Linus Torvalds's avatar
      Merge branch 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax · aba16dc5
      Linus Torvalds authored
      Pull IDA updates from Matthew Wilcox:
       "A better IDA API:
      
            id = ida_alloc(ida, GFP_xxx);
            ida_free(ida, id);
      
        rather than the cumbersome ida_simple_get(), ida_simple_remove().
      
        The new IDA API is similar to ida_simple_get() but better named.  The
        internal restructuring of the IDA code removes the bitmap
        preallocation nonsense.
      
        I hope the net -200 lines of code is convincing"
      
      * 'ida-4.19' of git://git.infradead.org/users/willy/linux-dax: (29 commits)
        ida: Change ida_get_new_above to return the id
        ida: Remove old API
        test_ida: check_ida_destroy and check_ida_alloc
        test_ida: Convert check_ida_conv to new API
        test_ida: Move ida_check_max
        test_ida: Move ida_check_leaf
        idr-test: Convert ida_check_nomem to new API
        ida: Start new test_ida module
        target/iscsi: Allocate session IDs from an IDA
        iscsi target: fix session creation failure handling
        drm/vmwgfx: Convert to new IDA API
        dmaengine: Convert to new IDA API
        ppc: Convert vas ID allocation to new IDA API
        media: Convert entity ID allocation to new IDA API
        ppc: Convert mmu context allocation to new IDA API
        Convert net_namespace to new IDA API
        cb710: Convert to new IDA API
        rsxx: Convert to new IDA API
        osd: Convert to new IDA API
        sd: Convert to new IDA API
        ...
      aba16dc5
    • Linus Torvalds's avatar
      Merge tag 'gcc-plugins-v4.19-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · c4726e77
      Linus Torvalds authored
      Pull gcc plugin fix from Kees Cook:
       "Lift gcc test into Kconfig. This is for better behavior when the
        kernel is built with Clang, reported by Stefan Agner"
      
      * tag 'gcc-plugins-v4.19-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        gcc-plugins: Disable when building under Clang
      c4726e77
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d207ea8e
      Linus Torvalds authored
      Pull perf updates from Thomas Gleixner:
       "Kernel:
         - Improve kallsyms coverage
         - Add x86 entry trampolines to kcore
         - Fix ARM SPE handling
         - Correct PPC event post processing
      
        Tools:
         - Make the build system more robust
         - Small fixes and enhancements all over the place
         - Update kernel ABI header copies
         - Preparatory work for converting libtraceevnt to a shared library
         - License cleanups"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
        tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy'
        tools arch x86: Update tools's copy of cpufeatures.h
        perf python: Fix pyrf_evlist__read_on_cpu() interface
        perf mmap: Store real cpu number in 'struct perf_mmap'
        perf tools: Remove ext from struct kmod_path
        perf tools: Add gzip_is_compressed function
        perf tools: Add lzma_is_compressed function
        perf tools: Add is_compressed callback to compressions array
        perf tools: Move the temp file processing into decompress_kmodule
        perf tools: Use compression id in decompress_kmodule()
        perf tools: Store compression id into struct dso
        perf tools: Add compression id into 'struct kmod_path'
        perf tools: Make is_supported_compression() static
        perf tools: Make decompress_to_file() function static
        perf tools: Get rid of dso__needs_decompress() call in __open_dso()
        perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
        perf tools: Get rid of dso__needs_decompress() call in read_object_code()
        tools lib traceevent: Change to SPDX License format
        perf llvm: Allow passing options to llc in addition to clang
        perf parser: Improve error message for PMU address filters
        ...
      d207ea8e