1. 21 Sep, 2018 9 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 9 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
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2a8a2b7c
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
      
       - Correct the L1TF fallout on 32bit and the off by one in the 'too much
         RAM for protection' calculation.
      
       - Add a helpful kernel message for the 'too much RAM' case
      
       - Unbreak the VDSO in case that the compiler desides to use indirect
         jumps/calls and emits retpolines which cannot be resolved because the
         kernel uses its own thunks, which does not work for the VDSO. Make it
         use the builtin thunks.
      
       - Re-export start_thread() which was unexported when the 32/64bit
         implementation was unified. start_thread() is required by modular
         binfmt handlers.
      
       - Trivial cleanups
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/speculation/l1tf: Suggest what to do on systems with too much RAM
        x86/speculation/l1tf: Fix off-by-one error when warning that system has too much RAM
        x86/kvm/vmx: Remove duplicate l1d flush definitions
        x86/speculation/l1tf: Fix overflow in l1tf_pfn_limit() on 32bit
        x86/process: Re-export start_thread()
        x86/mce: Add notifier_block forward declaration
        x86/vdso: Fix vDSO build if a retpoline is emitted
      2a8a2b7c
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · de375035
      Linus Torvalds authored
      Pull irq update from Thomas Gleixner:
       "A small set of updats/fixes for the irq subsystem:
      
         - Allow GICv3 interrupts to be configured as wake-up sources to
           enable wakeup from suspend
      
         - Make the error handling of the STM32 irqchip init function work
      
         - A set of small cleanups and improvements"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3: Allow interrupt to be configured as wake-up sources
        irqchip/tango: Set irq handler and data in one go
        dt-bindings: irqchip: renesas-irqc: Document r8a774a1 support
        irqchip/s3c24xx: Remove unneeded comparison of unsigned long to 0
        irqchip/stm32: Fix init error handling
        irqchip/bcm7038-l1: Hide cpu offline callback when building for !SMP
      de375035
    • Linus Torvalds's avatar
      Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9ce3233
      Linus Torvalds authored
      Pull licking update from Thomas Gleixner:
       "Mark the switch cases which fall through to the next case with the
        proper comment so the fallthrough compiler checks can be enabled"
      
      * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        futex: Mark expected switch fall-throughs
      a9ce3233
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-4.19_dax-memory-failure' of... · 2923b27e
      Linus Torvalds authored
      Merge tag 'libnvdimm-for-4.19_dax-memory-failure' of gitolite.kernel.org:pub/scm/linux/kernel/git/nvdimm/nvdimm
      
      Pull libnvdimm memory-failure update from Dave Jiang:
       "As it stands, memory_failure() gets thoroughly confused by dev_pagemap
        backed mappings. The recovery code has specific enabling for several
        possible page states and needs new enabling to handle poison in dax
        mappings.
      
        In order to support reliable reverse mapping of user space addresses:
      
         1/ Add new locking in the memory_failure() rmap path to prevent races
            that would typically be handled by the page lock.
      
         2/ Since dev_pagemap pages are hidden from the page allocator and the
            "compound page" accounting machinery, add a mechanism to determine
            the size of the mapping that encompasses a given poisoned pfn.
      
         3/ Given pmem errors can be repaired, change the speculatively
            accessed poison protection, mce_unmap_kpfn(), to be reversible and
            otherwise allow ongoing access from the kernel.
      
        A side effect of this enabling is that MADV_HWPOISON becomes usable
        for dax mappings, however the primary motivation is to allow the
        system to survive userspace consumption of hardware-poison via dax.
        Specifically the current behavior is:
      
           mce: Uncorrected hardware memory error in user-access at af34214200
           {1}[Hardware Error]: It has been corrected by h/w and requires no further action
           mce: [Hardware Error]: Machine check events logged
           {1}[Hardware Error]: event severity: corrected
           Memory failure: 0xaf34214: reserved kernel page still referenced by 1 users
           [..]
           Memory failure: 0xaf34214: recovery action for reserved kernel page: Failed
           mce: Memory error not recovered
           <reboot>
      
        ...and with these changes:
      
           Injecting memory failure for pfn 0x20cb00 at process virtual address 0x7f763dd00000
           Memory failure: 0x20cb00: Killing dax-pmd:5421 due to hardware memory corruption
           Memory failure: 0x20cb00: recovery action for dax page: Recovered
      
        Given all the cross dependencies I propose taking this through
        nvdimm.git with acks from Naoya, x86/core, x86/RAS, and of course dax
        folks"
      
      * tag 'libnvdimm-for-4.19_dax-memory-failure' of gitolite.kernel.org:pub/scm/linux/kernel/git/nvdimm/nvdimm:
        libnvdimm, pmem: Restore page attributes when clearing errors
        x86/memory_failure: Introduce {set, clear}_mce_nospec()
        x86/mm/pat: Prepare {reserve, free}_memtype() for "decoy" addresses
        mm, memory_failure: Teach memory_failure() about dev_pagemap pages
        filesystem-dax: Introduce dax_lock_mapping_entry()
        mm, memory_failure: Collect mapping size in collect_procs()
        mm, madvise_inject_error: Let memory_failure() optionally take a page reference
        mm, dev_pagemap: Do not clear ->mapping on final put
        mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages
        filesystem-dax: Set page->index
        device-dax: Set page->index
        device-dax: Enable page_mapping()
        device-dax: Convert to vmf_insert_mixed and vm_fault_t
      2923b27e