13 Feb, 2018

1 commit

  • (cherry picked from commit 12c69f1e94c89d40696e83804dd2f0965b5250cd)

    The 'noreplace-paravirt' option disables paravirt patching, leaving the
    original pv indirect calls in place.

    That's highly incompatible with retpolines, unless we want to uglify
    paravirt even further and convert the paravirt calls to retpolines.

    As far as I can tell, the option doesn't seem to be useful for much
    other than introducing surprising corner cases and making the kernel
    vulnerable to Spectre v2. It was probably a debug option from the early
    paravirt days. So just remove it.

    Signed-off-by: Josh Poimboeuf
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Juergen Gross
    Cc: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Andi Kleen
    Cc: Ashok Raj
    Cc: Greg KH
    Cc: Jun Nakajima
    Cc: Tim Chen
    Cc: Rusty Russell
    Cc: Dave Hansen
    Cc: Asit Mallick
    Cc: Andy Lutomirski
    Cc: Linus Torvalds
    Cc: Jason Baron
    Cc: Paolo Bonzini
    Cc: Alok Kataria
    Cc: Arjan Van De Ven
    Cc: David Woodhouse
    Cc: Dan Williams
    Link: https://lkml.kernel.org/r/20180131041333.2x6blhxirc2kclrq@treble
    Signed-off-by: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    Josh Poimboeuf
     

17 Jan, 2018

2 commits

  • commit da285121560e769cc31797bba6422eea71d473e0 upstream.

    Add a spectre_v2= option to select the mitigation used for the indirect
    branch speculation vulnerability.

    Currently, the only option available is retpoline, in its various forms.
    This will be expanded to cover the new IBRS/IBPB microcode features.

    The RETPOLINE_AMD feature relies on a serializing LFENCE for speculation
    control. For AMD hardware, only set RETPOLINE_AMD if LFENCE is a
    serializing instruction, which is indicated by the LFENCE_RDTSC feature.

    [ tglx: Folded back the LFENCE/AMD fixes and reworked it so IBRS
    integration becomes simple ]

    Signed-off-by: David Woodhouse
    Signed-off-by: Thomas Gleixner
    Cc: gnomes@lxorguk.ukuu.org.uk
    Cc: Rik van Riel
    Cc: Andi Kleen
    Cc: Josh Poimboeuf
    Cc: thomas.lendacky@amd.com
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: Jiri Kosina
    Cc: Andy Lutomirski
    Cc: Dave Hansen
    Cc: Kees Cook
    Cc: Tim Chen
    Cc: Greg Kroah-Hartman
    Cc: Paul Turner
    Link: https://lkml.kernel.org/r/1515707194-20531-5-git-send-email-dwmw@amazon.co.uk
    Signed-off-by: David Woodhouse
    Signed-off-by: Greg Kroah-Hartman

    David Woodhouse
     
  • commit 01c9b17bf673b05bb401b76ec763e9730ccf1376 upstream.

    Add some details about how PTI works, what some of the downsides
    are, and how to debug it when things go wrong.

    Also document the kernel parameter: 'pti/nopti'.

    Signed-off-by: Dave Hansen
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Randy Dunlap
    Reviewed-by: Kees Cook
    Cc: Moritz Lipp
    Cc: Daniel Gruss
    Cc: Michael Schwarz
    Cc: Richard Fellner
    Cc: Andy Lutomirski
    Cc: Linus Torvalds
    Cc: Hugh Dickins
    Cc: Andi Lutomirsky
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20180105174436.1BC6FA2B@viggo.jf.intel.com
    Signed-off-by: Greg Kroah-Hartman

    Dave Hansen
     

05 Jan, 2018

3 commits

  • AMD (and possibly other vendors) are not affected by the leak
    KAISER is protecting against.

    Keep the "nopti" for traditional reasons and add pti=
    like upstream.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Greg Kroah-Hartman

    Borislav Petkov
     
  • Concentrate it in arch/x86/mm/kaiser.c and use the upstream string "nopti".

    Signed-off-by: Borislav Petkov
    Signed-off-by: Greg Kroah-Hartman

    Borislav Petkov
     
  • Added "nokaiser" boot option: an early param like "noinvpcid".
    Most places now check int kaiser_enabled (#defined 0 when not
    CONFIG_KAISER) instead of #ifdef CONFIG_KAISER; but entry_64.S
    and entry_64_compat.S are using the ALTERNATIVE technique, which
    patches in the preferred instructions at runtime. That technique
    is tied to x86 cpu features, so X86_FEATURE_KAISER is fabricated.

    Prior to "nokaiser", Kaiser #defined _PAGE_GLOBAL 0: revert that,
    but be careful with both _PAGE_GLOBAL and CR4.PGE: setting them when
    nokaiser like when !CONFIG_KAISER, but not setting either when kaiser -
    neither matters on its own, but it's hard to be sure that _PAGE_GLOBAL
    won't get set in some obscure corner, or something add PGE into CR4.
    By omitting _PAGE_GLOBAL from __supported_pte_mask when kaiser_enabled,
    all page table setup which uses pte_pfn() masks it out of the ptes.

    It's slightly shameful that the same declaration versus definition of
    kaiser_enabled appears in not one, not two, but in three header files
    (asm/kaiser.h, asm/pgtable.h, asm/tlbflush.h). I felt safer that way,
    than with #including any of those in any of the others; and did not
    feel it worth an asm/kaiser_enabled.h - kernel/cpu/common.c includes
    them all, so we shall hear about it if they get out of synch.

    Cleanups while in the area: removed the silly #ifdef CONFIG_KAISER
    from kaiser.c; removed the unused native_get_normal_pgd(); removed
    the spurious reg clutter from SWITCH_*_CR3 macro stubs; corrected some
    comments. But more interestingly, set CR4.PSE in secondary_startup_64:
    the manual is clear that it does not matter whether it's 0 or 1 when
    4-level-pts are enabled, but I was distracted to find cr4 different on
    BSP and auxiliaries - BSP alone was adding PSE, in probe_page_size_mask().

    Signed-off-by: Hugh Dickins
    Acked-by: Jiri Kosina
    Signed-off-by: Greg Kroah-Hartman

    Hugh Dickins
     

03 Jan, 2018

1 commit

  • commit 0790c9aad84901ca1bdc14746175549c8b5da215 upstream.

    The parameter is only present on x86_64 systems to save a few bytes,
    as PCID is always disabled on x86_32.

    Signed-off-by: Andy Lutomirski
    Reviewed-by: Nadav Amit
    Reviewed-by: Borislav Petkov
    Reviewed-by: Thomas Gleixner
    Cc: Andrew Morton
    Cc: Arjan van de Ven
    Cc: Borislav Petkov
    Cc: Dave Hansen
    Cc: Linus Torvalds
    Cc: Mel Gorman
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/8bbb2e65bcd249a5f18bfb8128b4689f08ac2b60.1498751203.git.luto@kernel.org
    Signed-off-by: Ingo Molnar
    Cc: Hugh Dickins
    Signed-off-by: Greg Kroah-Hartman

    Andy Lutomirski
     

24 Jun, 2017

1 commit

  • commit 1be7107fbe18eed3e319a6c3e83c78254b693acb upstream.

    Stack guard page is a useful feature to reduce a risk of stack smashing
    into a different mapping. We have been using a single page gap which
    is sufficient to prevent having stack adjacent to a different mapping.
    But this seems to be insufficient in the light of the stack usage in
    userspace. E.g. glibc uses as large as 64kB alloca() in many commonly
    used functions. Others use constructs liks gid_t buffer[NGROUPS_MAX]
    which is 256kB or stack strings with MAX_ARG_STRLEN.

    This will become especially dangerous for suid binaries and the default
    no limit for the stack size limit because those applications can be
    tricked to consume a large portion of the stack and a single glibc call
    could jump over the guard page. These attacks are not theoretical,
    unfortunatelly.

    Make those attacks less probable by increasing the stack guard gap
    to 1MB (on systems with 4k pages; but make it depend on the page size
    because systems with larger base pages might cap stack allocations in
    the PAGE_SIZE units) which should cover larger alloca() and VLA stack
    allocations. It is obviously not a full fix because the problem is
    somehow inherent, but it should reduce attack space a lot.

    One could argue that the gap size should be configurable from userspace,
    but that can be done later when somebody finds that the new 1MB is wrong
    for some special case applications. For now, add a kernel command line
    option (stack_guard_gap) to specify the stack gap size (in page units).

    Implementation wise, first delete all the old code for stack guard page:
    because although we could get away with accounting one extra page in a
    stack vma, accounting a larger gap can break userspace - case in point,
    a program run with "ulimit -S -v 20000" failed when the 1MB gap was
    counted for RLIMIT_AS; similar problems could come with RLIMIT_MLOCK
    and strict non-overcommit mode.

    Instead of keeping gap inside the stack vma, maintain the stack guard
    gap as a gap between vmas: using vm_start_gap() in place of vm_start
    (or vm_end_gap() in place of vm_end if VM_GROWSUP) in just those few
    places which need to respect the gap - mainly arch_get_unmapped_area(),
    and and the vma tree's subtree_gap support for that.

    Original-patch-by: Oleg Nesterov
    Original-patch-by: Michal Hocko
    Signed-off-by: Hugh Dickins
    Acked-by: Michal Hocko
    Tested-by: Helge Deller # parisc
    Signed-off-by: Linus Torvalds
    [wt: backport to 4.11: adjust context]
    [wt: backport to 4.9: adjust context ; kernel doc was not in admin-guide]
    Signed-off-by: Willy Tarreau
    Signed-off-by: Greg Kroah-Hartman

    Hugh Dickins
     

12 Apr, 2017

1 commit

  • [ Upstream commit 9c4aa1eecb48cfac18ed5e3aca9d9ae58fbafc11 ]

    Sometimes, the users may require a quirk to be provided from ACPI subsystem
    core to prevent a GPE from flooding.
    Normally, if a GPE cannot be dispatched, ACPICA core automatically prevents
    the GPE from firing. But there are cases the GPE is dispatched by _Lxx/_Exx
    provided via AML table, and OSPM is lacking of the knowledge to get
    _Lxx/_Exx correctly executed to handle the GPE, thus the GPE flooding may
    still occur.

    The existing quirk mechanism can be enabled/disabled using the following
    commands to prevent such kind of GPE flooding during runtime:
    # echo mask > /sys/firmware/acpi/interrupts/gpe00
    # echo unmask > /sys/firmware/acpi/interrupts/gpe00
    To avoid GPE flooding during boot, we need a boot stage mechanism.

    This patch provides such a boot stage quirk mechanism to stop this kind of
    GPE flooding. This patch doesn't fix any feature gap but since the new
    feature gaps could be found in the future endlessly, and can disappear if
    the feature gaps are filled, providing a boot parameter rather than a DMI
    table should suffice.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=53071
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=117481
    Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/887793
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Lv Zheng
     

26 Feb, 2017

1 commit

  • commit 47512cfd0d7a8bd6ab71d01cd89fca19eb2093eb upstream.

    The goldfish platform code registers the platform device unconditionally
    which causes havoc in several ways if the goldfish_pdev_bus driver is
    enabled:

    - Access to the hardcoded physical memory region, which is either not
    available or contains stuff which is completely unrelated.

    - Prevents that the interrupt of the serial port can be requested

    - In case of a spurious interrupt it goes into a infinite loop in the
    interrupt handler of the pdev_bus driver (which needs to be fixed
    seperately).

    Add a 'goldfish' command line option to make the registration opt-in when
    the platform is compiled in.

    I'm seriously grumpy about this engineering trainwreck, which has seven
    SOBs from Intel developers for 50 lines of code. And none of them figured
    out that this is broken. Impressive fail!

    Fixes: ddd70cf93d78 ("goldfish: platform device for x86")
    Reported-by: Gabriel C
    Signed-off-by: Thomas Gleixner
    Acked-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

26 Jan, 2017

1 commit

  • commit fff5d99225107f5f13fe4a9805adc2a1c4b5fb00 upstream.

    On architectures like arm64, swiotlb is tied intimately to the core
    architecture DMA support. In addition, ZONE_DMA cannot be disabled.

    To aid debugging and catch devices not supporting DMA to memory outside
    the 32-bit address space, add a kernel command line option
    "swiotlb=noforce", which disables the use of bounce buffers.
    If specified, trying to map memory that cannot be used with DMA will
    fail, and a rate-limited warning will be printed.

    Note that io_tlb_nslabs is set to 1, which is the minimal supported
    value.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Konrad Rzeszutek Wilk
    Signed-off-by: Greg Kroah-Hartman

    Geert Uytterhoeven
     

15 Oct, 2016

1 commit

  • Pull some more input subsystem updates from Dmitry Torokhov:
    "An update to the ALPS driver to support the V8 protocol with
    touchstick, a change for i8042 to skip selftest on many Asus laptops
    which helps to keep their touchpads working after resume, and a couple
    other driver fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: i8042 - skip selftest on ASUS laptops
    Input: melfas_mip4 - add ic_name sysfs attribute
    Input: melfas_mip4 - add maintainer information
    Input: melfas_mip4 - add devicetree binding documentations
    Input: elantech - add Fujitsu Lifebook E556 to force crc_enabled
    Input: synaptics-rmi4 - fix error handling in I2C transport driver
    Input: synaptics-rmi4 - fix error handling in SPI transport driver
    Input: ALPS - add V8 protocol documentation
    Input: ALPS - set DualPoint flag for 74 03 28 devices
    Input: ALPS - allow touchsticks to report pressure
    Input: ALPS - handle 0-pressure 1F events
    Input: ALPS - add touchstick support for SS5 hardware
    Input: elantech - force needed quirks on Fujitsu H760
    Input: elantech - fix Lenovo version typo

    Linus Torvalds
     

14 Oct, 2016

1 commit

  • Pull NFS client updates from Anna Schumaker:
    "Highlights include:

    Stable bugfixes:
    - sunrpc: fix writ espace race causing stalls
    - NFS: Fix inode corruption in nfs_prime_dcache()
    - NFSv4: Don't report revoked delegations as valid in nfs_have_delegation()
    - NFSv4: nfs4_copy_delegation_stateid() must fail if the delegation is invalid
    - NFSv4: Open state recovery must account for file permission changes
    - NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic

    Features:
    - Add support for tracking multiple layout types with an ordered list
    - Add support for using multiple backchannel threads on the client
    - Add support for pNFS file layout session trunking
    - Delay xprtrdma use of DMA API (for device driver removal)
    - Add support for xprtrdma remote invalidation
    - Add support for larger xprtrdma inline thresholds
    - Use a scatter/gather list for sending xprtrdma RPC calls
    - Add support for the CB_NOTIFY_LOCK callback
    - Improve hashing sunrpc auth_creds by using both uid and gid

    Bugfixes:
    - Fix xprtrdma use of DMA API
    - Validate filenames before adding to the dcache
    - Fix corruption of xdr->nwords in xdr_copy_to_scratch
    - Fix setting buffer length in xdr_set_next_buffer()
    - Don't deadlock the state manager on the SEQUENCE status flags
    - Various delegation and stateid related fixes
    - Retry operations if an interrupted slot receives EREMOTEIO
    - Make nfs boot time y2038 safe"

    * tag 'nfs-for-4.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (100 commits)
    NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
    fs: nfs: Make nfs boot time y2038 safe
    sunrpc: replace generic auth_cred hash with auth-specific function
    sunrpc: add RPCSEC_GSS hash_cred() function
    sunrpc: add auth_unix hash_cred() function
    sunrpc: add generic_auth hash_cred() function
    sunrpc: add hash_cred() function to rpc_authops struct
    Retry operation on EREMOTEIO on an interrupted slot
    pNFS: Fix atime updates on pNFS clients
    sunrpc: queue work on system_power_efficient_wq
    NFSv4.1: Even if the stateid is OK, we may need to recover the open modes
    NFSv4: If recovery failed for a specific open stateid, then don't retry
    NFSv4: Fix retry issues with nfs41_test/free_stateid
    NFSv4: Open state recovery must account for file permission changes
    NFSv4: Mark the lock and open stateids as invalid after freeing them
    NFSv4: Don't test open_stateid unless it is set
    NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid
    NFS: Always call nfs_inode_find_state_and_recover() when revoking a delegation
    NFSv4: Fix a race when updating an open_stateid
    NFSv4: Fix a race in nfs_inode_reclaim_delegation()
    ...

    Linus Torvalds
     

12 Oct, 2016

2 commits

  • On suspend/resume cycle, selftest is executed to reset i8042 controller.
    But when this is done in Asus devices, subsequent calls to detect/init
    functions to elantech driver fails. Skipping selftest fixes this problem.

    An easier step to reproduce this problem is adding i8042.reset=1 as a
    kernel parameter. On Asus laptops, it'll make the system to start with the
    touchpad already stuck, since psmouse_probe forcibly calls the selftest
    function.

    This patch was inspired by John Hiesey's change[1], but, since this problem
    affects a lot of models of Asus, let's avoid running selftests on them.

    All models affected by this problem:
    A455LD
    K401LB
    K501LB
    K501LX
    R409L
    V502LX
    X302LA
    X450LCP
    X450LD
    X455LAB
    X455LDB
    X455LF
    Z450LA

    [1]: https://marc.info/?l=linux-input&m=144312209020616&w=2

    Fixes: "ETPS/2 Elantech Touchpad dies after resume from suspend"
    (https://bugzilla.kernel.org/show_bug.cgi?id=107971)

    Signed-off-by: Marcos Paulo de Souza
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov

    Marcos Paulo de Souza
     
  • Today there are platforms with many CPUs (up to 4K). Trying to boot only
    part of the CPUs may result in too long string.

    For example lets take NPS platform that is part of arch/arc. This
    platform have SMP system with 256 cores each with 16 HW threads (SMT
    machine) where HW thread appears as CPU to the kernel. In this example
    there is total of 4K CPUs. When one tries to boot only part of the HW
    threads from each core the string representing the map may be long... For
    example if for sake of performance we decided to boot only first half of
    HW threads of each core the map will look like:
    0-7,16-23,32-39,...,4080-4087

    This patch introduce new syntax to accommodate with such use case. I
    added an optional postfix to a range of CPUs which will choose according
    to given modulo the desired range of reminders i.e.:

    :sed_size/group_size

    For example, above map can be described in new syntax like this:
    0-4095:8/16

    Note that this patch is backward compatible with current syntax.

    [akpm@linux-foundation.org: rework documentation]
    Link: http://lkml.kernel.org/r/1473579629-4283-1-git-send-email-noamca@mellanox.com
    Signed-off-by: Noam Camus
    Cc: David Decotigny
    Cc: Ben Hutchings
    Cc: David S. Miller
    Cc: Pan Xinhui
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Noam Camus
     

11 Oct, 2016

1 commit

  • Pull protection keys syscall interface from Thomas Gleixner:
    "This is the final step of Protection Keys support which adds the
    syscalls so user space can actually allocate keys and protect memory
    areas with them. Details and usage examples can be found in the
    documentation.

    The mm side of this has been acked by Mel"

    * 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/pkeys: Update documentation
    x86/mm/pkeys: Do not skip PKRU register if debug registers are not used
    x86/pkeys: Fix pkeys build breakage for some non-x86 arches
    x86/pkeys: Add self-tests
    x86/pkeys: Allow configuration of init_pkru
    x86/pkeys: Default to a restrictive init PKRU
    pkeys: Add details of system call use to Documentation/
    generic syscalls: Wire up memory protection keys syscalls
    x86: Wire up protection keys system calls
    x86/pkeys: Allocation/free syscalls
    x86/pkeys: Make mprotect_key() mask off additional vm_flags
    mm: Implement new pkey_mprotect() system call
    x86/pkeys: Add fault handling for PF_PK page fault bit

    Linus Torvalds
     

07 Oct, 2016

1 commit

  • Pull KVM updates from Radim Krčmář:
    "All architectures:
    - move `make kvmconfig` stubs from x86
    - use 64 bits for debugfs stats

    ARM:
    - Important fixes for not using an in-kernel irqchip
    - handle SError exceptions and present them to guests if appropriate
    - proxying of GICV access at EL2 if guest mappings are unsafe
    - GICv3 on AArch32 on ARMv8
    - preparations for GICv3 save/restore, including ABI docs
    - cleanups and a bit of optimizations

    MIPS:
    - A couple of fixes in preparation for supporting MIPS EVA host
    kernels
    - MIPS SMP host & TLB invalidation fixes

    PPC:
    - Fix the bug which caused guests to falsely report lockups
    - other minor fixes
    - a small optimization

    s390:
    - Lazy enablement of runtime instrumentation
    - up to 255 CPUs for nested guests
    - rework of machine check deliver
    - cleanups and fixes

    x86:
    - IOMMU part of AMD's AVIC for vmexit-less interrupt delivery
    - Hyper-V TSC page
    - per-vcpu tsc_offset in debugfs
    - accelerated INS/OUTS in nVMX
    - cleanups and fixes"

    * tag 'kvm-4.9-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (140 commits)
    KVM: MIPS: Drop dubious EntryHi optimisation
    KVM: MIPS: Invalidate TLB by regenerating ASIDs
    KVM: MIPS: Split kernel/user ASID regeneration
    KVM: MIPS: Drop other CPU ASIDs on guest MMU changes
    KVM: arm/arm64: vgic: Don't flush/sync without a working vgic
    KVM: arm64: Require in-kernel irqchip for PMU support
    KVM: PPC: Book3s PR: Allow access to unprivileged MMCR2 register
    KVM: PPC: Book3S PR: Support 64kB page size on POWER8E and POWER8NVL
    KVM: PPC: Book3S: Remove duplicate setting of the B field in tlbie
    KVM: PPC: BookE: Fix a sanity check
    KVM: PPC: Book3S HV: Take out virtual core piggybacking code
    KVM: PPC: Book3S: Treat VTB as a per-subcore register, not per-thread
    ARM: gic-v3: Work around definition of gic_write_bpr1
    KVM: nVMX: Fix the NMI IDT-vectoring handling
    KVM: VMX: Enable MSR-BASED TPR shadow even if APICv is inactive
    KVM: nVMX: Fix reload apic access page warning
    kvmconfig: add virtio-gpu to config fragment
    config: move x86 kvm_guest.config to a common location
    arm64: KVM: Remove duplicating init code for setting VMID
    ARM: KVM: Support vgic-v3
    ...

    Linus Torvalds
     

06 Oct, 2016

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.9 series:

    Subsystem improvements:

    - do away with the last users of the obsolete Kconfig options
    ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB (the latter
    always sounded like an item on a wishlist to Santa Claus to me). We
    can now select GPIOLIB and be done with it, for all archs. After
    some struggle it even work on UM. Not that it has GPIO, but if it
    wants to, it can select the library.

    - continued efforts to make drivers properly either tristate or bool.

    - introduce a warning for drivers assigning default triggers to their
    irqchip lines when probed from device tree, so we find and fix
    these ambigous drivers. It is agreed that in the OF config path,
    the device tree defines trigger characteristics.

    - the same warning, mutatis mutandis, for ACPI-probed GPIO irqchips.

    - we introduce the ability to mark certain IRQ lines as "unusable" as
    they can be taken by BIOS/firmware, unrouted in silicon and
    generally nasty if you use them, and such things. This is put to
    good use in the STMPE driver and also in the Cherryview pin control
    driver.

    - a new "mockup" virtual GPIO device that can be used for testing.
    The plan is to add unit tests under tools/* for exercising this
    device and verify that the kernel code paths are working as they
    should.

    - make memory-mapped I/O-drivers depend on HAS_IOMEM. This was
    implicit all the time, but when people started building UM with
    allyesconfig or allmodconfig it exploded in their face.

    - move some stray bits of device tree and ACPI HW description
    callbacks down into their respective implementation silo. These
    were causing issues when compiling on !HAS_IOMEM as well, so now
    eventually UM compiles the GPIOLIB library if it wants to.

    New drivers:

    - new driver for the Aspeed GPIO front-end companion to the pin
    controller merged through the pin control tree.

    - new driver for the LP873x PMIC GPIO portions.

    - new driver for Technologic Systems' I2C FPGA GPIO such as TS4900,
    TS-7970, TS-7990 and TS-4100.

    - new driver for the Broadcom BCM63xx series including BCM6338 and
    BCM6345.

    - new driver for the Intel WhiskeyCove PMIC GPIO.

    - new driver for the Allwinner AXP209 PMIC GPIO portions.

    - new driver for Diamond Systems 48 line GPIO-MM, another of these
    port-mapped I/O expansion cards.

    - support the STMicroelectronics STMPE1600 variant in the STMPE
    driver.

    Driver improvements:

    - the STMPE driver now supports rising/falling edge detection
    properly for IRQs.

    - the PCA954x will now fetch and enable its VCC regulator properly.

    - major rework of the PCA953x driver with the goal of eventually
    switching it over to use regmap and thus modernize it even more.

    - switch the IOP driver to use the generic MMIO GPIO library.

    - move the ages old HTC EGPIO (extended GPIO) GPIO expander driver
    over to this subsystem from MFD, achieveing some separation of
    concerns"

    * tag 'gpio-v4.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (81 commits)
    gpio: add missing static inline
    gpio: OF: localize some gpiochip init functions
    gpio: acpi: separation of concerns
    gpio: OF: separation of concerns
    gpio: make memory-mapped drivers depend on HAS_IOMEM
    gpio: stmpe: use BIT() macro
    gpio: stmpe: forbid unused lines to be mapped as IRQs
    mfd/gpio: Move HTC GPIO driver to GPIO subsystem
    gpio: MAINTAINERS: Add an entry for GPIO mockup driver
    gpio/mockup: add virtual gpio device
    gpio: Added zynq specific check for special pins on bank zero
    gpio: axp209: Implement get_direction
    gpio: aspeed: remove redundant return value check
    gpio: loongson1: remove redundant return value check
    ARM: omap2: fix missing include
    gpio: tc3589x: fix up complaints on unsigned
    gpio: tc3589x: add .get_direction() and small cleanup
    gpio: f7188x: use gpiochip_get_data instead of container_of
    gpio: tps65218: use devm_gpiochip_add_data() for gpio registration
    gpio: aspeed: fix return value check in aspeed_gpio_probe()
    ...

    Linus Torvalds
     

05 Oct, 2016

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "This is the documentation update pull for the 4.9 merge window.

    The Sphinx transition is still creating a fair amount of work. Here we
    have a number of fixes and, importantly, a proper PDF output solution,
    thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser.

    I've started a couple of new books: a driver API book (based on the
    old device-drivers.tmpl) and a development tools book. Both are meant
    to show how we can integrate together our existing documentation into
    a more coherent and accessible whole. It involves moving some stuff
    around and formatting changes, but, I think, the results are worth it.
    The good news is that most of our existing Documentation/*.txt files
    are *almost* in RST format already; the amount of messing around
    required is minimal.

    And, of course, there's the usual set of updates, typo fixes, and
    more"

    * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits)
    URL changed for Linux Foundation TAB
    dax : Fix documentation with respect to struct pages
    iio: Documentation: Correct the path used to create triggers.
    docs: Remove space-before-label guidance from CodingStyle
    docs-rst: add inter-document cross references
    Documentation/email-clients.txt: convert it to ReST markup
    Documentation/kernel-docs.txt: reorder based on timestamp
    Documentation/kernel-docs.txt: Add dates for online docs
    Documentation/kernel-docs.txt: get rid of broken docs
    Documentation/kernel-docs.txt: move in-kernel docs
    Documentation/kernel-docs.txt: remove more legacy references
    Documentation/kernel-docs.txt: add two published books
    Documentation/kernel-docs.txt: sort books per publication date
    Documentation/kernel-docs.txt: adjust LDD references
    Documentation/kernel-docs.txt: some improvements on the ReST output
    Documentation/kernel-docs.txt: Consistent indenting: 4 spaces
    Documentation/kernel-docs.txt: Add 4 paper/book references
    Documentation/kernel-docs.txt: Improve layouting of book list
    Documentation/kernel-docs.txt: Remove offline or outdated entries
    docs: Clean up bare :: lines
    ...

    Linus Torvalds
     

04 Oct, 2016

2 commits

  • Pull usb/phy/extcon updates from Greg KH:
    "Here is the big USB, and PHY, and extcon, patchsets for 4.9-rc1.

    Full details are in the shortlog, but generally a lot of new hardware
    support, usb gadget updates, and Wolfram's great cleanup of USB error
    message handling, making the kernel image a tad bit smaller.

    All of this has been in linux-next with no reported issues"

    * tag 'usb-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (343 commits)
    Revert "usbtmc: convert to devm_kzalloc"
    USB: serial: cp210x: Add ID for a Juniper console
    usb: Kconfig: using select for USB_COMMON dependency
    bluetooth: bcm203x: don't print error when allocating urb fails
    mmc: host: vub300: don't print error when allocating urb fails
    usb: hub: change CLEAR_FEATURE to SET_FEATURE
    usb: core: Introduce a USB port LED trigger
    USB: bcma: drop Northstar PHY 2.0 initialization code
    usb: core: hcd: add missing header dependencies
    usb: musb: da8xx: fix error handling message in probe
    usb: musb: Fix session based PM for first invalid VBUS
    usb: musb: Fix PM runtime for disconnect after unconfigure
    musb: Export musb_root_disconnect for use in modules
    usb: misc: legousbtower: Fix NULL pointer deference
    cdc-acm: hardening against malicious devices
    Revert "usb: gadget: NCM: Protect dev->port_usb using dev->lock"
    include: extcon: Fix compilation error caused because of incomplete merge
    MAINTAINERS: add tree entry for USB Serial
    phy-twl4030-usb: initialize charging-related stuff via pm_runtime
    phy-twl4030-usb: better handle musb_mailbox() failure
    ...

    Linus Torvalds
     
  • Pull tty and serial updates from Greg KH:
    "Here is the big tty and serial patch set for 4.9-rc1.

    It also includes some drivers/dma/ changes, as those were needed by
    some serial drivers, and they were all acked by the DMA maintainer.

    Also in here is the long-suffering ACPI SPCR patchset, which was
    passed around from maintainer to maintainer like a hot-potato. Seems I
    was the sucker^Wlucky one. All of those patches have been acked by the
    various subsystem maintainers as well.

    All of this has been in linux-next with no reported issues"

    * tag 'tty-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (111 commits)
    Revert "serial: pl011: add console matching function"
    MAINTAINERS: update entry for atmel_serial driver
    serial: pl011: add console matching function
    ARM64: ACPI: enable ACPI_SPCR_TABLE
    ACPI: parse SPCR and enable matching console
    of/serial: move earlycon early_param handling to serial
    Revert "drivers/tty: Explicitly pass current to show_stack"
    tty: amba-pl011: Don't complain on -EPROBE_DEFER when no irq
    nios2: dts: 10m50: Add tx-threshold parameter
    serial: 8250: Set Altera 16550 TX FIFO Threshold
    serial: 8250: of: Load TX FIFO Threshold from DT
    Documentation: dt: serial: Add TX FIFO threshold parameter
    drivers/tty: Explicitly pass current to show_stack
    serial: imx: Fix DCD reading
    serial: stm32: mark symbols static where possible
    serial: xuartps: Add some register initialisation to cdns_early_console_setup()
    serial: xuartps: Removed unwanted checks while reading the error conditions
    serial: xuartps: Rewrite the interrupt handling logic
    serial: stm32: use mapbase instead of membase for DMA
    tty/serial: atmel: fix fractional baud rate computation
    ...

    Linus Torvalds
     

03 Oct, 2016

1 commit

  • Pull arm64 updates from Will Deacon:
    "It's a bit all over the place this time with no "killer feature" to
    speak of. Support for mismatched cache line sizes should help people
    seeing whacky JIT failures on some SoCs, and the big.LITTLE perf
    updates have been a long time coming, but a lot of the changes here
    are cleanups.

    We stray outside arch/arm64 in a few areas: the arch/arm/ arch_timer
    workaround is acked by Russell, the DT/OF bits are acked by Rob, the
    arch_timer clocksource changes acked by Marc, CPU hotplug by tglx and
    jump_label by Peter (all CC'd).

    Summary:

    - Support for execute-only page permissions
    - Support for hibernate and DEBUG_PAGEALLOC
    - Support for heterogeneous systems with mismatches cache line sizes
    - Errata workarounds (A53 843419 update and QorIQ A-008585 timer bug)
    - arm64 PMU perf updates, including cpumasks for heterogeneous systems
    - Set UTS_MACHINE for building rpm packages
    - Yet another head.S tidy-up
    - Some cleanups and refactoring, particularly in the NUMA code
    - Lots of random, non-critical fixes across the board"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (100 commits)
    arm64: tlbflush.h: add __tlbi() macro
    arm64: Kconfig: remove SMP dependence for NUMA
    arm64: Kconfig: select OF/ACPI_NUMA under NUMA config
    arm64: fix dump_backtrace/unwind_frame with NULL tsk
    arm/arm64: arch_timer: Use archdata to indicate vdso suitability
    arm64: arch_timer: Work around QorIQ Erratum A-008585
    arm64: arch_timer: Add device tree binding for A-008585 erratum
    arm64: Correctly bounds check virt_addr_valid
    arm64: migrate exception table users off module.h and onto extable.h
    arm64: pmu: Hoist pmu platform device name
    arm64: pmu: Probe default hw/cache counters
    arm64: pmu: add fallback probe table
    MAINTAINERS: Update ARM PMU PROFILING AND DEBUGGING entry
    arm64: Improve kprobes test for atomic sequence
    arm64/kvm: use alternative auto-nop
    arm64: use alternative auto-nop
    arm64: alternative: add auto-nop infrastructure
    arm64: lse: convert lse alternatives NOP padding to use __nops
    arm64: barriers: introduce nops and __nops macros for NOP sequences
    arm64: sysreg: replace open-coded mrs_s/msr_s with {read,write}_sysreg_s
    ...

    Linus Torvalds
     

27 Sep, 2016

2 commits

  • Add initialisation of control register and baud rate to
    cdns_early_console_setup(), required when running kernel standalone
    without a boot loader. Baud rate is only initialised when specified in
    earlycon command-line option, otherwise it is assumed this has been
    set by a boot loader. Updated Documentation/kernel-parameters.txt
    accordingly.

    Signed-off-by: Scott Telford
    Signed-off-by: Greg Kroah-Hartman

    Scott Telford
     
  • This patch add basic structure of a virtual gpio device(gpio-mockup)
    for testing gpio subsystem. The tester could manipulate such device
    through userspace(sysfs or char device) and check the result from
    debugfs.

    Currently, it support one or more gpiochip(determined by module
    parameters with base,ngpio pair). One could test the overlap of
    different gpiochip and test the direction and/or output values of
    these chips.

    Signed-off-by: Kamlakant Patel
    Signed-off-by: Bamvor Jian Zhang
    Signed-off-by: Linus Walleij

    Bamvor Jian Zhang
     

24 Sep, 2016

1 commit

  • Erratum A-008585 says that the ARM generic timer counter "has the
    potential to contain an erroneous value for a small number of core
    clock cycles every time the timer value changes". Accesses to TVAL
    (both read and write) are also affected due to the implicit counter
    read. Accesses to CVAL are not affected.

    The workaround is to reread TVAL and count registers until successive
    reads return the same value. Writes to TVAL are replaced with an
    equivalent write to CVAL.

    The workaround is to reread TVAL and count registers until successive reads
    return the same value, and when writing TVAL to retry until counter
    reads before and after the write return the same value.

    The workaround is enabled if the fsl,erratum-a008585 property is found in
    the timer node in the device tree. This can be overridden with the
    clocksource.arm_arch_timer.fsl-a008585 boot parameter, which allows KVM
    users to enable the workaround until a mechanism is implemented to
    automatically communicate this information.

    This erratum can be found on LS1043A and LS2080A.

    Acked-by: Marc Zyngier
    Signed-off-by: Scott Wood
    [will: renamed read macro to reflect that it's not usually unstable]
    Signed-off-by: Will Deacon

    Scott Wood
     

20 Sep, 2016

1 commit


13 Sep, 2016

1 commit

  • Some SATA to USB bridges fail to cooperate with some
    drives resulting in no cache being present being reported
    to the host. That causes the host to skip sending
    a command to synchronize caches. That causes data loss
    when the drive is powered down.

    Signed-off-by: Oliver Neukum
    Reviewed-by: Martin K. Petersen
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

09 Sep, 2016

1 commit

  • PKRU is the register that lets you disallow writes or all access to a given
    protection key.

    The XSAVE hardware defines an "init state" of 0 for PKRU: its most
    permissive state, allowing access/writes to everything. Since we start off
    all new processes with the init state, we start all processes off with the
    most permissive possible PKRU.

    This is unfortunate. If a thread is clone()'d [1] before a program has
    time to set PKRU to a restrictive value, that thread will be able to write
    to all data, no matter what pkey is set on it. This weakens any integrity
    guarantees that we want pkeys to provide.

    To fix this, we define a very restrictive PKRU to override the
    XSAVE-provided value when we create a new FPU context. We choose a value
    that only allows access to pkey 0, which is as restrictive as we can
    practically make it.

    This does not cause any practical problems with applications using
    protection keys because we require them to specify initial permissions for
    each key when it is allocated, which override the restrictive default.

    In the end, this ensures that threads which do not know how to manage their
    own pkey rights can not do damage to data which is pkey-protected.

    I would have thought this was a pretty contrived scenario, except that I
    heard a bug report from an MPX user who was creating threads in some very
    early code before main(). It may be crazy, but folks evidently _do_ it.

    Signed-off-by: Dave Hansen
    Cc: linux-arch@vger.kernel.org
    Cc: Dave Hansen
    Cc: mgorman@techsingularity.net
    Cc: arnd@arndb.de
    Cc: linux-api@vger.kernel.org
    Cc: linux-mm@kvack.org
    Cc: luto@kernel.org
    Cc: akpm@linux-foundation.org
    Cc: torvalds@linux-foundation.org
    Link: http://lkml.kernel.org/r/20160729163021.F3C25D4A@viggo.jf.intel.com
    Signed-off-by: Thomas Gleixner

    Dave Hansen
     

06 Sep, 2016

1 commit

  • The driver that used the 'nodisconnect' parameter was removed in
    commit 565bae6a4a8f ("[SCSI] 53c7xx: kill driver"). Related documentation
    was cleaned up in commit f37a7238d379 ("[SCSI] 53c7xx: fix removal
    fallout"), except for the remaining two mentions that are removed here.

    Signed-off-by: Finn Thain
    Reviewed-by: Geert Uytterhoeven
    Signed-off-by: Jonathan Corbet

    Finn Thain
     

05 Sep, 2016

1 commit

  • This patch introduces a new IOMMU driver parameter, amd_iommu_guest_ir,
    which can be used to specify different interrupt remapping mode for
    passthrough devices to VM guest:
    * legacy: Legacy interrupt remapping (w/ 32-bit IRTE)
    * vapic : Guest vAPIC interrupt remapping (w/ GA mode 128-bit IRTE)

    Note that in vapic mode, it can also supports legacy interrupt remapping
    for non-passthrough devices with the 128-bit IRTE.

    Signed-off-by: Suravee Suthikulpanit
    Signed-off-by: Joerg Roedel

    Suravee Suthikulpanit
     

26 Aug, 2016

1 commit

  • From the old description people still can't get what's the exact
    difference between nr_cpus and maxcpus. Especially in kdump kernel
    nr_cpus is always suggested if it's implemented in the ARCH. The
    reason is nr_cpus is used to limit the max number of possible cpu
    in system, the sum of already plugged cpus and hot plug cpus can't
    exceed its value. However maxcpus is used to limit how many cpus
    are allowed to be brought up during bootup.

    Signed-off-by: Baoquan He
    Signed-off-by: Jonathan Corbet

    Baoquan He
     

19 Aug, 2016

1 commit

  • Hi Jon,

    This patch is an old one, we have corrected some minor issues on the newer one.
    Please only review the newest version from my last mail with this subject
    "[PATCH] ACPI: Update the maximum depth of C-state from 6 to 9".
    And I also attached it to this mail.

    Thanks,
    Baole

    On 7/11/2016 6:37 AM, Jonathan Corbet wrote:
    > On Mon, 4 Jul 2016 09:55:10 +0800
    > "baolex.ni" wrote:
    >
    >> Currently, CPUIDLE_STATE_MAX has been defined as 10 in the cpuidle head file,
    >> and max_cstate = CPUIDLE_STATE_MAX – 1, so 9 is the right maximum depth of C-state.
    >> This change is reflected in one place of the kernel-param file,
    >> but not in the other place where I suggest changing.
    >>
    >> Signed-off-by: Chuansheng Liu
    >> Signed-off-by: Baole Ni
    >
    > So why are there two signoffs on a single-line patch? Which one of you
    > is the actual author?
    >
    > Thanks,
    >
    > jon
    >

    From cf5f8aa6885874f6490b11507d3c0c86fa0a11f4 Mon Sep 17 00:00:00 2001
    From: Chuansheng Liu
    Date: Mon, 4 Jul 2016 08:52:51 +0800
    Subject: [PATCH] Update the maximum depth of C-state from 6 to 9
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit

    Currently, CPUIDLE_STATE_MAX has been defined as 10 in the cpuidle head file,
    and max_cstate = CPUIDLE_STATE_MAX – 1, so 9 is the right maximum depth of C-state.
    This change is reflected in one place of the kernel-param file,
    but not in the other place where I suggest changing.

    Signed-off-by: Chuansheng Liu
    Signed-off-by: Baole Ni
    Signed-off-by: Jonathan Corbet

    baolex.ni
     

10 Aug, 2016

1 commit

  • Some uio based PCI drivers, e.g., uio_cif, do not work if the assigned PCI
    memory resources are not page aligned. By using the kernel option
    "pci=resource_alignment=@:." it is possible to
    request page alignment for memory resources of devices.

    However, this is cumbersome when using several devices, and the
    bus/slot/func addresses may change if devices are added to or removed from
    the system.

    Extend the "pci=resource_alignment" option so we can specify the relevant
    devices via PCI vendor, device, subvendor, and subdevice IDs. The
    specification of the devices via IDs is indicated by a leading string
    "pci:" as argument to "pci=resource_alignment".

    The format of the specification is
    pci::[::]

    Examples:
    pci=resource_alignment=4096@pci:8086:9c22:103c:198f
    pci=resource_alignment=pci:8086:9c22 # defaults to PAGE_SIZE align

    [bhelgaas: changelog, use actual vendor/device IDs in examples]
    Signed-off-by: Mathias Koehrer
    Signed-off-by: Bjorn Helgaas

    Mathias Koehrer
     

07 Aug, 2016

1 commit

  • Pull documentation fixes from Jonathan Corbet:
    "Three fixes for the docs build, including removing an annoying warning
    on 'make help' if sphinx isn't present"

    * tag 'doc-4.8-fixes' of git://git.lwn.net/linux:
    DocBook: use DOCBOOKS="" to ignore DocBooks instead of IGNORE_DOCBOOKS=1
    Documenation: update cgroup's document path
    Documentation/sphinx: do not warn about missing tools in 'make help'

    Linus Torvalds
     

05 Aug, 2016

1 commit

  • Pull nfsd updates from Bruce Fields:
    "Highlights:

    - Trond made a change to the server's tcp logic that allows a fast
    client to better take advantage of high bandwidth networks, but may
    increase the risk that a single client could starve other clients;
    a new sunrpc.svc_rpc_per_connection_limit parameter should help
    mitigate this in the (hopefully unlikely) event this becomes a
    problem in practice.

    - Tom Haynes added a minimal flex-layout pnfs server, which is of no
    use in production for now--don't build it unless you're doing
    client testing or further server development"

    * tag 'nfsd-4.8' of git://linux-nfs.org/~bfields/linux: (32 commits)
    nfsd: remove some dead code in nfsd_create_locked()
    nfsd: drop unnecessary MAY_EXEC check from create
    nfsd: clean up bad-type check in nfsd_create_locked
    nfsd: remove unnecessary positive-dentry check
    nfsd: reorganize nfsd_create
    nfsd: check d_can_lookup in fh_verify of directories
    nfsd: remove redundant zero-length check from create
    nfsd: Make creates return EEXIST instead of EACCES
    SUNRPC: Detect immediate closure of accepted sockets
    SUNRPC: accept() may return sockets that are still in SYN_RECV
    nfsd: allow nfsd to advertise multiple layout types
    nfsd: Close race between nfsd4_release_lockowner and nfsd4_lock
    nfsd/blocklayout: Make sure calculate signature/designator length aligned
    xfs: abstract block export operations from nfsd layouts
    SUNRPC: Remove unused callback xpo_adjust_wspace()
    SUNRPC: Change TCP socket space reservation
    SUNRPC: Add a server side per-connection limit
    SUNRPC: Micro optimisation for svc_data_ready
    SUNRPC: Call the default socket callbacks instead of open coding
    SUNRPC: lock the socket while detaching it
    ...

    Linus Torvalds
     

04 Aug, 2016

3 commits

  • Pull module updates from Rusty Russell:
    "The only interesting thing here is Jessica's patch to add
    ro_after_init support to modules. The rest are all trivia"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    extable.h: add stddef.h so "NULL" definition is not implicit
    modules: add ro_after_init support
    jump_label: disable preemption around __module_text_address().
    exceptions: fork exception table content from module.h into extable.h
    modules: Add kernel parameter to blacklist modules
    module: Do a WARN_ON_ONCE() for assert module mutex not held
    Documentation/module-signing.txt: Note need for version info if reusing a key
    module: Invalidate signatures on force-loaded modules
    module: Issue warnings when tainting kernel
    module: fix redundant test.
    module: fix noreturn attribute for __module_put_and_exit()

    Linus Torvalds
     
  • Blacklisting a module in linux has long been a problem. The current
    procedure is to use rd.blacklist=module_name, however, that doesn't
    cover the case after the initramfs and before a boot prompt (where one
    is supposed to use /etc/modprobe.d/blacklist.conf to blacklist
    runtime loading). Using rd.shell to get an early prompt is hit-or-miss,
    and doesn't cover all situations AFAICT.

    This patch adds this functionality of permanently blacklisting a module
    by its name via the kernel parameter module_blacklist=module_name.

    [v2]: Rusty, use core_param() instead of __setup() which simplifies
    things.

    [v3]: Rusty, undo wreckage from strsep()

    [v4]: Rusty, simpler version of blacklisted()

    Signed-off-by: Prarit Bhargava
    Cc: Jonathan Corbet
    Cc: Rusty Russell
    Cc: linux-doc@vger.kernel.org
    Signed-off-by: Rusty Russell

    Prarit Bhargava
     
  • cgroup's document path is changed to "cgroup-v1". update it.

    Signed-off-by: seokhoon.yoon
    Signed-off-by: Jonathan Corbet

    seokhoon.yoon
     

03 Aug, 2016

2 commits

  • Merge yet more updates from Andrew Morton:

    - the rest of ocfs2

    - various hotfixes, mainly MM

    - quite a bit of misc stuff - drivers, fork, exec, signals, etc.

    - printk updates

    - firmware

    - checkpatch

    - nilfs2

    - more kexec stuff than usual

    - rapidio updates

    - w1 things

    * emailed patches from Andrew Morton : (111 commits)
    ipc: delete "nr_ipc_ns"
    kcov: allow more fine-grained coverage instrumentation
    init/Kconfig: add clarification for out-of-tree modules
    config: add android config fragments
    init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
    relay: add global mode support for buffer-only channels
    init: allow blacklisting of module_init functions
    w1:omap_hdq: fix regression
    w1: add helper macro module_w1_family
    w1: remove need for ida and use PLATFORM_DEVID_AUTO
    rapidio/switches: add driver for IDT gen3 switches
    powerpc/fsl_rio: apply changes for RIO spec rev 3
    rapidio: modify for rev.3 specification changes
    rapidio: change inbound window size type to u64
    rapidio/idt_gen2: fix locking warning
    rapidio: fix error handling in mbox request/release functions
    rapidio/tsi721_dma: advance queue processing from transfer submit call
    rapidio/tsi721: add messaging mbox selector parameter
    rapidio/tsi721: add PCIe MRRS override parameter
    rapidio/tsi721_dma: add channel mask and queue size parameters
    ...

    Linus Torvalds
     
  • Add a "printk.devkmsg" kernel command line parameter which controls how
    userspace writes into /dev/kmsg. It has three options:

    * ratelimit - ratelimit logging from userspace.
    * on - unlimited logging from userspace
    * off - logging from userspace gets ignored

    The default setting is to ratelimit the messages written to it.

    This changes the kernel default setting of "on" to "ratelimit" and we do
    that because we want to keep userspace spamming /dev/kmsg to sane
    levels. This is especially moot when a small kernel log buffer wraps
    around and messages get lost. So the ratelimiting setting should be a
    sane setting where kernel messages should have a bit higher chance of
    survival from all the spamming.

    It additionally does not limit logging to /dev/kmsg while the system is
    booting if we haven't disabled it on the command line.

    Furthermore, we can control the logging from a lower priority sysctl
    interface - kernel.printk_devkmsg.

    That interface will succeed only if printk.devkmsg *hasn't* been
    supplied on the command line. If it has, then printk.devkmsg is a
    one-time setting which remains for the duration of the system lifetime.
    This "locking" of the setting is to prevent userspace from changing the
    logging on us through sysctl(2).

    This patch is based on previous patches from Linus and Steven.

    [bp@suse.de: fixes]
    Link: http://lkml.kernel.org/r/20160719072344.GC25563@nazgul.tnic
    Link: http://lkml.kernel.org/r/20160716061745.15795-3-bp@alien8.de
    Signed-off-by: Borislav Petkov
    Cc: Dave Young
    Cc: Franck Bui
    Cc: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Cc: Uwe Kleine-König
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov