20 Dec, 2014

19 commits

  • There are no users of this symbol left.

    Reported-by: Paul Bolle
    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Move pinmux alloc/dealloc code into functions that don't take
    the spinlock so we can use from code that has the spinlock already.

    CRISv32 has no working SMP, so spinlocks becomes a NOP,
    so deadlock was never seen.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Fixes compile error on allmodconfig.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Also, print kernel version on oops.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Drop i2c_init from this header, it was declared non-static here,
    but static in the C-file.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Make driver possible to load as a module and try to handle
    locking better.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • - Add free_initrd_mem as found by Guenter Roeck
    - Add free_init_pages
    - Export empty_zero_page symbol

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Don't enter watchdog handling if we're already in watchdog handling.

    Also some minor formatting tweaks.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • strcmp was lost when all other string functions were removed,
    but we still have an optimized version for this on CRISv32,
    so any driver built as a module would not have access to this symbol.

    In a similar manner, we had optimized versions of
    csum_partial_copy_from_user and __do_clear_user
    but no exported symbols for them, breaking bunch of other drivers
    when built as a module.

    At the same time, move EXPORT_SYMBOL(__copy_user) and
    EXPORT_SYMBOL(__copy_user_zeroing) C-files so it's
    located together with the function definition.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Fix headers_install by adjusting the path to arch files.
    And delete unused Kbuild file.
    Drop special handling of cris in the headers.sh script
    as a nice side-effect.

    Signed-off-by: Sam Ravnborg
    Cc: Mikael Starvik
    Cc: David Howells
    Signed-off-by: Jesper Nilsson

    Sam Ravnborg
     
  • Fixes the following compile error.

    arch/cris/arch-v32/kernel/time.c: In function 'reset_watchdog':
    arch/cris/arch-v32/kernel/time.c:121:2:
    error: implicit declaration of function 'global_page_state'

    Signed-off-by: Guenter Roeck
    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • File was already deleted.

    Signed-off-by: Jesper Nilsson

    Jesper Nilsson
     
  • Pull x86 apic updates from Thomas Gleixner:
    "After stopping the full x86/apic branch, I took some time to go
    through the first block of patches again, which are mostly cleanups
    and preparatory work for the irqdomain conversion and ioapic hotplug
    support.

    Unfortunaly one of the real problematic commits was right at the
    beginning, so I rebased this portion of the pending patches without
    the offenders.

    It would be great to get this into 3.19. That makes reworking the
    problematic parts simpler. The usual tip testing did not unearth any
    issues and it is fully bisectible now.

    I'm pretty confident that this wont affect the calmness of the xmas
    season.

    Changes:
    - Split the convoluted io_apic.c code into domain specific parts
    (vector, ioapic, msi, htirq)
    - Introduce proper helper functions to retrieve irq specific data
    instead of open coded dereferencing of pointers
    - Preparatory work for ioapic hotplug and irqdomain conversion
    - Removal of the non functional pci-ioapic driver
    - Removal of unused irq entry stubs
    - Make native_smp_prepare_cpus() preemtible to avoid GFP_ATOMIC
    allocations for everything which is called from there.
    - Small cleanups and fixes"

    * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    iommu/amd: Use helpers to access irq_cfg data structure associated with IRQ
    iommu/vt-d: Use helpers to access irq_cfg data structure associated with IRQ
    x86: irq_remapping: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Use helpers to access irq_cfg data structure associated with IRQ
    x86, irq: Make MSI and HT_IRQ indepenent of X86_IO_APIC
    x86, irq: Move IRQ initialization routines from io_apic.c into vector.c
    x86, irq: Move IOAPIC related declarations from hw_irq.h into io_apic.h
    x86, irq: Move HT IRQ related code from io_apic.c into htirq.c
    x86, irq: Move PCI MSI related code from io_apic.c into msi.c
    x86, irq: Replace printk(KERN_LVL) with pr_lvl() utilities
    x86, irq: Make UP version of irq_complete_move() an inline stub
    x86, irq: Move local APIC related code from io_apic.c into vector.c
    x86, irq: Introduce helpers to access struct irq_cfg
    x86, irq: Protect __clear_irq_vector() with vector_lock
    x86, irq: Rename local APIC related functions in io_apic.c as apic_xxx()
    x86, irq: Refine hw_irq.h to prepare for irqdomain support
    x86, irq: Convert irq_2_pin list to generic list
    x86, irq: Kill useless parameter 'irq_attr' of IO_APIC_get_PCI_irq_vector()
    x86, irq, acpi: Get rid of special handling of GSI for ACPI SCI
    x86, irq: Introduce helper to check whether an IOAPIC has been registered
    ...

    Linus Torvalds
     
  • Pull x86 MPX fixes from Thomas Gleixner:
    "Three updates for the new MPX infrastructure:
    - Use the proper error check in the trap handler
    - Add a proper config option for it
    - Bring documentation up to date"

    * 'x86-mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, mpx: Give MPX a real config option prompt
    x86, mpx: Update documentation
    x86_64/traps: Fix always true condition

    Linus Torvalds
     
  • Pull x86 fix from Ingo Molnar:
    "This contains a single TLS ABI validation fix from Andy Lutomirski"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/tls: Don't validate lm in set_thread_area() after all

    Linus Torvalds
     
  • Pull perf fixes and cleanups from Ingo Molnar:
    "A kernel fix plus mostly tooling fixes, but also some tooling
    restructuring and cleanups"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (39 commits)
    perf: Fix building warning on ARM 32
    perf symbols: Fix use after free in filename__read_build_id
    perf evlist: Use roundup_pow_of_two
    tools: Adopt roundup_pow_of_two
    perf tools: Make the mmap length autotuning more robust
    tools: Adopt rounddown_pow_of_two and deps
    tools: Adopt fls_long and deps
    tools: Move bitops.h from tools/perf/util to tools/
    tools: Introduce asm-generic/bitops.h
    tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
    tools: Whitespace prep patches for moving bitops.h
    tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
    tools: Move code originally from linux/log2.h to tools/include/linux/
    tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
    perf evlist: Do not use hard coded value for a mmap_pages default
    perf trace: Let the perf_evlist__mmap autosize the number of pages to use
    perf evlist: Improve the strerror_mmap method
    perf evlist: Clarify sterror_mmap variable names
    perf evlist: Fixup brown paper bag on "hint" for --mmap-pages cmdline arg
    perf trace: Provide a better explanation when mmap fails
    ...

    Linus Torvalds
     
  • Pull second batch of powerpc updates from Michael Ellerman:
    "The highlight is the series that reworks the idle management on
    powernv, which allows us to use deeper idle states on those machines.

    There's the fix from Anton for the "BUG at kernel/smpboot.c:134!"
    problem.

    An i2c driver for powernv. This is acked by Wolfram Sang, and he
    asked that we take it through the powerpc tree.

    A fix for audit from rgb at Red Hat, acked by Paul Moore who is one of
    the audit maintainers.

    A patch from Ben to export the symbol map of our OPAL firmware as a
    sysfs file, so that tools can use it.

    Also some CXL fixes, a couple of powerpc perf fixes, a fix for
    smt-enabled, and the patch to add __force to get_user() so we can use
    bitwise types"

    * tag 'powerpc-3.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux:
    powerpc/powernv: Ignore smt-enabled on Power8 and later
    powerpc/uaccess: Allow get_user() with bitwise types
    powerpc/powernv: Expose OPAL firmware symbol map
    powernv/powerpc: Add winkle support for offline cpus
    powernv/cpuidle: Redesign idle states management
    powerpc/powernv: Enable Offline CPUs to enter deep idle states
    powerpc/powernv: Switch off MMU before entering nap/sleep/rvwinkle mode
    i2c: Driver to expose PowerNV platform i2c busses
    powerpc: add little endian flag to syscall_get_arch()
    power/perf/hv-24x7: Use kmem_cache_free() instead of kfree
    powerpc/perf/hv-24x7: Use per-cpu page buffer
    cxl: Unmap MMIO regions when detaching a context
    cxl: Add timeout to process element commands
    cxl: Change contexts_lock to a mutex to fix sleep while atomic bug
    powerpc: Secondary CPUs must set cpu_callin_map after setting active and online

    Linus Torvalds
     

19 Dec, 2014

7 commits

  • Pull more ACPI and power management updates from Rafael Wysocki:
    "These are regression fixes (leds-gpio, ACPI backlight driver,
    operating performance points library, ACPI device enumeration
    messages, cpupower tool), other bug fixes (ACPI EC driver, ACPI device
    PM), some cleanups in the operating performance points (OPP)
    framework, continuation of CONFIG_PM_RUNTIME elimination, a couple of
    minor intel_pstate driver changes, a new MAINTAINERS entry for it and
    an ACPI fan driver change needed for better support of thermal
    management in user space.

    Specifics:

    - Fix a regression in leds-gpio introduced by a recent commit that
    inadvertently changed the name of one of the properties used by the
    driver (Fabio Estevam).

    - Fix a regression in the ACPI backlight driver introduced by a
    recent fix that missed one special case that had to be taken into
    account (Aaron Lu).

    - Drop the level of some new kernel messages from the ACPI core
    introduced by a recent commit to KERN_DEBUG which they should have
    used from the start and drop some other unuseful KERN_ERR messages
    printed by ACPI (Rafael J Wysocki).

    - Revert an incorrect commit modifying the cpupower tool (Prarit
    Bhargava).

    - Fix two regressions introduced by recent commits in the OPP library
    and clean up some existing minor issues in that code (Viresh
    Kumar).

    - Continue to replace CONFIG_PM_RUNTIME with CONFIG_PM throughout the
    tree (or drop it where that can be done) in order to make it
    possible to eliminate CONFIG_PM_RUNTIME (Rafael J Wysocki, Ulf
    Hansson, Ludovic Desroches).

    There will be one more "CONFIG_PM_RUNTIME removal" batch after this
    one, because some new uses of it have been introduced during the
    current merge window, but that should be sufficient to finally get
    rid of it.

    - Make the ACPI EC driver more robust against race conditions related
    to GPE handler installation failures (Lv Zheng).

    - Prevent the ACPI device PM core code from attempting to disable
    GPEs that it has not enabled which confuses ACPICA and makes it
    report errors unnecessarily (Rafael J Wysocki).

    - Add a "force" command line switch to the intel_pstate driver to
    make it possible to override the blacklisting of some systems in
    that driver if needed (Ethan Zhao).

    - Improve intel_pstate code documentation and add a MAINTAINERS entry
    for it (Kristen Carlson Accardi).

    - Make the ACPI fan driver create cooling device interfaces witn
    names that reflect the IDs of the ACPI device objects they are
    associated with, except for "generic" ACPI fans (PNP ID "PNP0C0B").

    That's necessary for user space thermal management tools to be able
    to connect the fans with the parts of the system they are supposed
    to be cooling properly. From Srinivas Pandruvada"

    * tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits)
    MAINTAINERS: add entry for intel_pstate
    ACPI / video: update the skip case for acpi_video_device_in_dod()
    power / PM: Eliminate CONFIG_PM_RUNTIME
    NFC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    SCSI / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / EC: Fix unexpected ec_remove_handlers() invocations
    Revert "tools: cpupower: fix return checks for sysfs_get_idlestate_count()"
    tracing / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    x86 / PM: Replace CONFIG_PM_RUNTIME in io_apic.c
    PM: Remove the SET_PM_RUNTIME_PM_OPS() macro
    mmc: atmel-mci: use SET_RUNTIME_PM_OPS() macro
    PM / Kconfig: Replace PM_RUNTIME with PM in dependencies
    ARM / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    sound / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    phy / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    video / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    tty / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    spi: Replace CONFIG_PM_RUNTIME with CONFIG_PM
    ACPI / PM: Do not disable wakeup GPEs that have not been enabled
    ACPI / utils: Drop error messages from acpi_evaluate_reference()
    ...

    Linus Torvalds
     
  • Pull sparc fix from David Miller:
    "Sparc32 locking bug fix from Andreas Larsson"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc32: destroy_context() and switch_mm() needs to disable interrupts.

    Linus Torvalds
     
  • Pull arch/arc updates from Vineet Gupta:
    "Minor updates for ARC for 3.19"

    * tag 'arc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: rename default defconfig
    ARC: [nsimosci] move peripherals to match model to FPGA
    ARC: document memory clobber in irq control macros
    ARC: R-M-W assist locks only needed for !LLSC
    ARC: add power management options

    Linus Torvalds
     
  • Pull arch/nios2 fixes from Ley Foon Tan:
    - add definition of ioremap_wc to io.h to fix build error from make
    allmodconfig
    - fix make defconfig
    - fix sparse error

    * tag 'nios2-fixes-v3.19' of git://git.rocketboards.org/linux-socfpga-next:
    nios2/uaccess: fix sparse errors
    nios2: enable "make defconfig"
    nios2: add definition of ioremap_wc to io.h

    Linus Torvalds
     
  • Pull KVM update from Paolo Bonzini:
    "3.19 changes for KVM:

    - spring cleaning: removed support for IA64, and for hardware-
    assisted virtualization on the PPC970

    - ARM, PPC, s390 all had only small fixes

    For x86:
    - small performance improvements (though only on weird guests)
    - usual round of hardware-compliancy fixes from Nadav
    - APICv fixes
    - XSAVES support for hosts and guests. XSAVES hosts were broken
    because the (non-KVM) XSAVES patches inadvertently changed the KVM
    userspace ABI whenever XSAVES was enabled; hence, this part is
    going to stable. Guest support is just a matter of exposing the
    feature and CPUID leaves support"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (179 commits)
    KVM: move APIC types to arch/x86/
    KVM: PPC: Book3S: Enable in-kernel XICS emulation by default
    KVM: PPC: Book3S HV: Improve H_CONFER implementation
    KVM: PPC: Book3S HV: Fix endianness of instruction obtained from HEIR register
    KVM: PPC: Book3S HV: Remove code for PPC970 processors
    KVM: PPC: Book3S HV: Tracepoints for KVM HV guest interactions
    KVM: PPC: Book3S HV: Simplify locking around stolen time calculations
    arch: powerpc: kvm: book3s_paired_singles.c: Remove unused function
    arch: powerpc: kvm: book3s_pr.c: Remove unused function
    arch: powerpc: kvm: book3s.c: Remove some unused functions
    arch: powerpc: kvm: book3s_32_mmu.c: Remove unused function
    KVM: PPC: Book3S HV: Check wait conditions before sleeping in kvmppc_vcore_blocked
    KVM: PPC: Book3S HV: ptes are big endian
    KVM: PPC: Book3S HV: Fix inaccuracies in ICP emulation for H_IPI
    KVM: PPC: Book3S HV: Fix KSM memory corruption
    KVM: PPC: Book3S HV: Fix an issue where guest is paused on receiving HMI
    KVM: PPC: Book3S HV: Fix computation of tlbie operand
    KVM: PPC: Book3S HV: Add missing HPTE unlock
    KVM: PPC: BookE: Improve irq inject tracepoint
    arm/arm64: KVM: Require in-kernel vgic for the arch timers
    ...

    Linus Torvalds
     
  • Commit 69111bac42f5 ("powerpc: Replace __get_cpu_var uses") introduced
    compile breakage to the e500 target by introducing invalid automatically
    created C syntax.

    Fix up the breakage and make the code compile again.

    Signed-off-by: Alexander Graf
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Linus Torvalds

    Alexander Graf
     
  • Load balancing can be triggered in the critical sections protected by
    srmmu_context_spinlock in destroy_context() and switch_mm() and can hang
    the cpu waiting for the rq lock of another cpu that in turn has called
    switch_mm hangning on srmmu_context_spinlock leading to deadlock.

    So, disable interrupt while taking srmmu_context_spinlock in
    destroy_context() and switch_mm() so we don't deadlock.

    See also commit 77b838fa1ef0 ("[SPARC64]: destroy_context() needs to disable
    interrupts.")

    Signed-off-by: Andreas Larsson
    Signed-off-by: David S. Miller

    Andreas Larsson
     

18 Dec, 2014

10 commits

  • It turns out that there's a lurking ABI issue. GCC, when
    compiling this in a 32-bit program:

    struct user_desc desc = {
    .entry_number = idx,
    .base_addr = base,
    .limit = 0xfffff,
    .seg_32bit = 1,
    .contents = 0, /* Data, grow-up */
    .read_exec_only = 0,
    .limit_in_pages = 1,
    .seg_not_present = 0,
    .useable = 0,
    };

    will leave .lm uninitialized. This means that anything in the
    kernel that reads user_desc.lm for 32-bit tasks is unreliable.

    Revert the .lm check in set_thread_area(). The value never did
    anything in the first place.

    Fixes: 0e58af4e1d21 ("x86/tls: Disallow unusual TLS segments")
    Signed-off-by: Andy Lutomirski
    Acked-by: Thomas Gleixner
    Cc: stable@vger.kernel.org # Only if 0e58af4e1d21 is backported
    Cc: Linus Torvalds
    Link: http://lkml.kernel.org/r/d7875b60e28c512f6a6fc0baf5714d58e7eaadbb.1418856405.git.luto@amacapital.net
    Signed-off-by: Ingo Molnar

    Andy Lutomirski
     
  • Starting with POWER8, the subcore logic relies on all threads of a core
    being booted so that they can participate in split mode switches. So on
    those machines we ignore the smt_enabled_at_boot setting (smt-enabled on
    the kernel command line).

    Signed-off-by: Greg Kurz
    [mpe: Update comment and change log to be more precise]
    Signed-off-by: Michael Ellerman

    Greg Kurz
     
  • Patch queue for ppc - 2014-12-18

    Highights this time around:

    - Removal of HV support for 970. It became a maintenance burden and received
    practically no testing. POWER8 with HV is available now, so just grab one
    of those boxes if PR isn't enough for you.
    - Some bug fixes and performance improvements
    - Tracepoints for book3s_hv

    Paolo Bonzini
     
  • They are not used anymore by IA64, move them away.

    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • At the moment, if p and x are both of the same bitwise type
    (eg. __le32), get_user(x, p) produces a sparse warning.

    This is because *p is loaded into a long then cast back to typeof(*p).

    When typeof(*p) is a bitwise type (which is uncommon), such a cast needs
    __force, otherwise sparse produces a warning.

    For non-bitwise types __force should have no effect, and should not hide
    any legitimate errors.

    Note that we are casting to typeof(*p) not typeof(x). Even with the
    cast, if x and *p are of different types we should get the warning, so I
    think we are not loosing the ability to detect any actual errors.

    virtio would like to use bitwise types with get_user() so fix these
    spurious warnings by adding __force.

    Signed-off-by: Michael S. Tsirkin
    [mpe: Fill in changelog with more details]
    Signed-off-by: Michael Ellerman

    Michael S. Tsirkin
     
  • The in-kernel XICS emulation is faster than doing it all in QEMU
    and it has got a lot of testing, so enable it by default.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Anton Blanchard
     
  • Pull user namespace related fixes from Eric Biederman:
    "As these are bug fixes almost all of thes changes are marked for
    backporting to stable.

    The first change (implicitly adding MNT_NODEV on remount) addresses a
    regression that was created when security issues with unprivileged
    remount were closed. I go on to update the remount test to make it
    easy to detect if this issue reoccurs.

    Then there are a handful of mount and umount related fixes.

    Then half of the changes deal with the a recently discovered design
    bug in the permission checks of gid_map. Unix since the beginning has
    allowed setting group permissions on files to less than the user and
    other permissions (aka ---rwx---rwx). As the unix permission checks
    stop as soon as a group matches, and setgroups allows setting groups
    that can not later be dropped, results in a situtation where it is
    possible to legitimately use a group to assign fewer privileges to a
    process. Which means dropping a group can increase a processes
    privileges.

    The fix I have adopted is that gid_map is now no longer writable
    without privilege unless the new file /proc/self/setgroups has been
    set to permanently disable setgroups.

    The bulk of user namespace using applications even the applications
    using applications using user namespaces without privilege remain
    unaffected by this change. Unfortunately this ix breaks a couple user
    space applications, that were relying on the problematic behavior (one
    of which was tools/selftests/mount/unprivileged-remount-test.c).

    To hopefully prevent needing a regression fix on top of my security
    fix I rounded folks who work with the container implementations mostly
    like to be affected and encouraged them to test the changes.

    > So far nothing broke on my libvirt-lxc test bed. :-)
    > Tested with openSUSE 13.2 and libvirt 1.2.9.
    > Tested-by: Richard Weinberger

    > Tested on Fedora20 with libvirt 1.2.11, works fine.
    > Tested-by: Chen Hanxiao

    > Ok, thanks - yes, unprivileged lxc is working fine with your kernels.
    > Just to be sure I was testing the right thing I also tested using
    > my unprivileged nsexec testcases, and they failed on setgroup/setgid
    > as now expected, and succeeded there without your patches.
    > Tested-by: Serge Hallyn

    > I tested this with Sandstorm. It breaks as is and it works if I add
    > the setgroups thing.
    > Tested-by: Andy Lutomirski # breaks things as designed :("

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    userns: Unbreak the unprivileged remount tests
    userns; Correct the comment in map_write
    userns: Allow setting gid_maps without privilege when setgroups is disabled
    userns: Add a knob to disable setgroups on a per user namespace basis
    userns: Rename id_map_mutex to userns_state_mutex
    userns: Only allow the creator of the userns unprivileged mappings
    userns: Check euid no fsuid when establishing an unprivileged uid mapping
    userns: Don't allow unprivileged creation of gid mappings
    userns: Don't allow setgroups until a gid mapping has been setablished
    userns: Document what the invariant required for safe unprivileged mappings.
    groups: Consolidate the setgroups permission checks
    mnt: Clear mnt_expire during pivot_root
    mnt: Carefully set CL_UNPRIVILEGED in clone_mnt
    mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers.
    umount: Do not allow unmounting rootfs.
    umount: Disallow unprivileged mount force
    mnt: Update unprivileged remount test
    mnt: Implicitly add MNT_NODEV on remount when it was implicitly added by mount

    Linus Torvalds
     
  • My commit 26178ec11ef3 ("x86: mm: consolidate VM_FAULT_RETRY handling")
    had a really stupid typo: the FAULT_FLAG_USER bit is in the 'flags'
    variable, not the 'fault' variable. Duh,

    The one silver lining in this is that Dave finding this at least
    confirms that trinity actually triggers this special path easily, in a
    way normal use does not.

    Reported-by: Dave Jones
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull thermal management update from Zhang Rui:
    "Summary:

    - of-thermal extension to allow drivers to register and use its
    functionality in a better way, without exploiting thermal core.
    From Lukasz Majewski.

    - Fix a bug in intel_soc_dts_thermal driver which calls a sleep
    function in interrupt handler. From Maurice Petallo.

    - add a thermal UAPI header file for exporting the thermal generic
    netlink information to user-space. From Florian Fainelli.

    - First round of refactoring in Exynos driver. Bartlomiej and Lukasz
    are attempting to make it lean and easier to understand.

    - New thermal driver for Rockchip (rk3288), with support for DT
    thermal. From Caesar Wang.

    - New thermal driver for Nvidia, Tegra124 SOCTHERM driver, with
    support for DT thermal. From Mikko Perttunen.

    - New cooling device, based on common clock framework. From Eduardo
    Valentin.

    - a couple of small fixes in thermal core framework. From Srinivas
    Pandruvada, Javi Merino, Luis Henriques.

    - Dropping Armada A375-Z1 SoC thermal support as the chip is not in
    the market, armada folks decided to drop its support.

    - a couple of small fixes and cleanups in int340x thermal driver"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (58 commits)
    thermal: provide an UAPI header file
    Thermal/int340x: Clear the error value of the last acpi_bus_get_device() call
    thermal/powerclamp: add id for braswell cpu
    thermal: Intel SoC DTS: Don't do thermal zone update inside spin_lock
    Thermal: fix platform_no_drv_owner.cocci warnings
    Thermal/int340x: avoid unnecessary pointer casting
    thermal: int3403: Delete a check before thermal_zone_device_unregister()
    thermal/int3400: export uuids
    thermal: of: Extend current of-thermal.c code to allow setting emulated temp
    thermal: of: Extend of-thermal to export table of trip points
    thermal: of: Rename struct __thermal_trip to struct thermal_trip
    thermal: of: Extend of-thermal.c to provide check if trip point is valid
    thermal: of: Extend of-thermal.c to provide number of trip points
    thermal: Fix error path in thermal_init()
    thermal: lock the thermal zone when switching governors
    thermal: core: ignore invalid trip temperature
    thermal: armada: Remove support for A375-Z1 SoC
    thermal: rockchip: add driver for thermal
    dt-bindings: document Rockchip thermal
    thermal: exynos: remove exynos_tmu_data.h include
    ...

    Linus Torvalds
     
  • Pull Microblaze fix from Michal Simek:
    "Fix mmap for cache coherent memory"

    * tag 'microblaze-3.19-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
    microblaze: Fix mmap for cache coherent memory

    Linus Torvalds
     

17 Dec, 2014

4 commits

  • Currently the H_CONFER hcall is implemented in kernel virtual mode,
    meaning that whenever a guest thread does an H_CONFER, all the threads
    in that virtual core have to exit the guest. This is bad for
    performance because it interrupts the other threads even if they
    are doing useful work.

    The H_CONFER hcall is called by a guest VCPU when it is spinning on a
    spinlock and it detects that the spinlock is held by a guest VCPU that
    is currently not running on a physical CPU. The idea is to give this
    VCPU's time slice to the holder VCPU so that it can make progress
    towards releasing the lock.

    To avoid having the other threads exit the guest unnecessarily,
    we add a real-mode implementation of H_CONFER that checks whether
    the other threads are doing anything. If all the other threads
    are idle (i.e. in H_CEDE) or trying to confer (i.e. in H_CONFER),
    it returns H_TOO_HARD which causes a guest exit and allows the
    H_CONFER to be handled in virtual mode.

    Otherwise it spins for a short time (up to 10 microseconds) to give
    other threads the chance to observe that this thread is trying to
    confer. The spin loop also terminates when any thread exits the guest
    or when all other threads are idle or trying to confer. If the
    timeout is reached, the H_CONFER returns H_SUCCESS. In this case the
    guest VCPU will recheck the spinlock word and most likely call
    H_CONFER again.

    This also improves the implementation of the H_CONFER virtual mode
    handler. If the VCPU is part of a virtual core (vcore) which is
    runnable, there will be a 'runner' VCPU which has taken responsibility
    for running the vcore. In this case we yield to the runner VCPU
    rather than the target VCPU.

    We also introduce a check on the target VCPU's yield count: if it
    differs from the yield count passed to H_CONFER, the target VCPU
    has run since H_CONFER was called and may have already released
    the lock. This check is required by PAPR.

    Signed-off-by: Sam Bobroff
    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Sam Bobroff
     
  • There are two ways in which a guest instruction can be obtained from
    the guest in the guest exit code in book3s_hv_rmhandlers.S. If the
    exit was caused by a Hypervisor Emulation interrupt (i.e. an illegal
    instruction), the offending instruction is in the HEIR register
    (Hypervisor Emulation Instruction Register). If the exit was caused
    by a load or store to an emulated MMIO device, we load the instruction
    from the guest by turning data relocation on and loading the instruction
    with an lwz instruction.

    Unfortunately, in the case where the guest has opposite endianness to
    the host, these two methods give results of different endianness, but
    both get put into vcpu->arch.last_inst. The HEIR value has been loaded
    using guest endianness, whereas the lwz will load the instruction using
    host endianness. The rest of the code that uses vcpu->arch.last_inst
    assumes it was loaded using host endianness.

    To fix this, we define a new vcpu field to store the HEIR value. Then,
    in kvmppc_handle_exit_hv(), we transfer the value from this new field to
    vcpu->arch.last_inst, doing a byte-swap if the guest and host endianness
    differ.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This removes the code that was added to enable HV KVM to work
    on PPC970 processors. The PPC970 is an old CPU that doesn't
    support virtualizing guest memory. Removing PPC970 support also
    lets us remove the code for allocating and managing contiguous
    real-mode areas, the code for the !kvm->arch.using_mmu_notifiers
    case, the code for pinning pages of guest memory when first
    accessed and keeping track of which pages have been pinned, and
    the code for handling H_ENTER hypercalls in virtual mode.

    Book3S HV KVM is now supported only on POWER7 and POWER8 processors.
    The KVM_CAP_PPC_RMA capability now always returns 0.

    Signed-off-by: Paul Mackerras
    Signed-off-by: Alexander Graf

    Paul Mackerras
     
  • This patch adds trace points in the guest entry and exit code and also
    for exceptions handled by the host in kernel mode - hypercalls and page
    faults. The new events are added to /sys/kernel/debug/tracing/events
    under a new subsystem called kvm_hv.

    Acked-by: Paul Mackerras
    Signed-off-by: Suresh Warrier
    Signed-off-by: Alexander Graf

    Suresh E. Warrier