26 Oct, 2012

2 commits

  • Pull ARM fixes from Russell King:
    "A random collection of various fixes, mainly from Arnd and a few other
    people. Not thing really stands out here."

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: drop experimental status for hotplug and Thumb2
    ARM: 7560/1: SMP_TWD: use DIV_ROUND_CLOSEST() for periodic mode
    ARM: 7559/1: smp: switch away from the idmap before updating init_mm.mm_count
    ARM: 7556/1: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD
    ARM: 7555/1: kexec: fix segment memory addresses check
    ARM: warnings in arch/arm/include/asm/uaccess.h
    ARM: binfmt_flat: unused variable 'persistent'
    ARM: be really quiet when building with 'make -s'
    ARM: pass -marm to gcc by default for both C and assembler
    ARM: Xen: fix initial build problems
    ARM: export default read_current_timer
    ARM: Fix another build warning in arch/arm/mm/alignment.c
    ARM: export set_irq_flags
    ARM: kprobes: make more tests conditional

    Linus Torvalds
     
  • Pull CMA and DMA-mapping fixes from Marek Szyprowski:
    "This consists mainly of a set of one-liner fixes and cleanups for a
    few minor issues identified in both Contiguous Memory Allocator code
    and ARM DMA-mapping subsystem."

    * 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: mm: Remove unused arm_vmregion priv field
    ARM: dma-mapping: fix build warning in __dma_alloc()
    ARM: dma-mapping: support debug_dma_mapping_error
    mm: cma: alloc_contig_range: return early for err path
    drivers: cma: Fix wrong CMA selected region size default value
    drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation
    drivers: dma-contiguous: Don't redefine SZ_1M

    Linus Torvalds
     

24 Oct, 2012

9 commits

  • Commit e9da6e9905e639b0f842a244bc770b48ad0523e9 ("ARM: dma-mapping:
    remove custom consistent dma region") removed the last users of the
    field. Remove it.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Marek Szyprowski

    Laurent Pinchart
     
  • Fix build warning in __dma_alloc() as below:

    arch/arm/mm/dma-mapping.c: In function '__dma_alloc':
    arch/arm/mm/dma-mapping.c:653:29: warning: 'page' may be used uninitialized in this function [-Wuninitialized]

    Signed-off-by: Jingoo Han
    Signed-off-by: Marek Szyprowski

    Jingoo Han
     
  • Pull xen bug-fixes from Konrad Rzeszutek Wilk:
    - Fix mysterious SIGSEGV or SIGKILL in applications due to corrupting
    of the %eip when returning from a signal handler.
    - Fix various ARM compile issues after the merge fallout.
    - Continue on making more of the Xen generic code usable by ARM
    platform.
    - Fix SR-IOV passthrough to mirror multifunction PCI devices.
    - Fix various compile warnings.
    - Remove hypercalls that don't exist anymore.

    * tag 'stable/for-linus-3.7-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
    xen: dbgp: Fix warning when CONFIG_PCI is not enabled.
    xen: arm: comment on why 64-bit xen_pfn_t is safe even on 32 bit
    xen: balloon: use correct type for frame_list
    xen/x86: don't corrupt %eip when returning from a signal handler
    xen: arm: make p2m operations NOPs
    xen: balloon: don't include e820.h
    xen: grant: use xen_pfn_t type for frame_list.
    xen: events: pirq_check_eoi_map is X86 specific
    xen: XENMEM_translate_gpfn_list was remove ages ago and is unused.
    xen: sysfs: fix build warning.
    xen: sysfs: include err.h for PTR_ERR etc
    xen: xenbus: quirk uses x86 specific cpuid
    xen PV passthru: assign SR-IOV virtual functions to separate virtual slots
    xen/xenbus: Fix compile warning.
    xen/x86: remove duplicated include from enlighten.c

    Linus Torvalds
     
  • ... and fix the race in updating unaligned control ones

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Pull kvm fixes from Avi Kivity:
    "KVM updates for 3.7-rc2"

    * tag 'kvm-3.7-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM guest: exit idleness when handling KVM_PV_REASON_PAGE_NOT_PRESENT
    KVM: apic: fix LDR calculation in x2apic mode
    KVM: MMU: fix release noslot pfn

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Most of these are uprobes race fixes from Oleg, and their preparatory
    cleanups. (It's larger than what I'd normally send for an -rc kernel,
    but they looked significant enough to not delay them.)

    There's also an oprofile fix and an uncore PMU fix."

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
    perf/x86: Disable uncore on virtualized CPUs
    oprofile, x86: Fix wrapping bug in op_x86_get_ctrl()
    ring-buffer: Check for uninitialized cpu buffer before resizing
    uprobes: Fix the racy uprobe->flags manipulation
    uprobes: Fix prepare_uprobe() race with itself
    uprobes: Introduce prepare_uprobe()
    uprobes: Fix handle_swbp() vs unregister() + register() race
    uprobes: Do not delete uprobe if uprobe_unregister() fails
    uprobes: Don't return success if alloc_uprobe() fails
    uprobes/x86: Only rep+nop can be emulated correctly
    uprobes: Simplify is_swbp_at_addr(), remove stale comments
    uprobes: Kill set_orig_insn()->is_swbp_at_addr()
    uprobes: Introduce copy_opcode(), kill read_opcode()
    uprobes: Kill set_swbp()->is_swbp_at_addr()
    uprobes: Restrict valid_vma(false) to skip VM_SHARED vmas
    uprobes: Change valid_vma() to demand VM_MAYEXEC rather than VM_EXEC
    uprobes: Change write_opcode() to use FOLL_FORCE
    uprobes: Move clear_thread_flag(TIF_UPROBE) to uprobe_notify_resume()
    uprobes: Kill UTASK_BP_HIT state
    uprobes: Fix UPROBE_SKIP_SSTEP checks in handle_swbp()
    ...

    Linus Torvalds
     
  • Pull s390 fixes from Martin Schwidefsky:
    "Among the usual minor bug fixes the more interesting patches are the
    perf counters for the latest machine, the missing select to enable
    transparent huge pages and a build fix for the UAPI rework."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390,uapi: do not use uapi/asm-generic/kvm_para.h
    s390/cache: fix data/instruction cache output
    s390: fix linker script for 31 bit builds
    s390/thp: select HAVE_ARCH_TRANSPARENT_HUGEPAGE
    s390/kdump: Use 64 bit mode for 0x10000 entry point
    perf_cpum_cf: Add support for counters available with IBM zEC12
    s390/css: stop stsch loop after cc 3
    s390/cio: use generic bitmap functions
    s390/chpid: make headers usable (again)

    Linus Torvalds
     
  • Pull tile fixes from Chris Metcalf:
    "This fixes one issue with compiler flags that can cause modules not to
    load, and cleans up some warnings with ELF_R_xxx defines."

    * 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    arch/tile: avoid build warnings from duplicate ELF_R_xxx #defines
    arch/tile: avoid generating .eh_frame information in modules

    Linus Torvalds
     
  • Pull ia64 fix from Tony Luck:
    "Fix from dhowells for UAPI fallout"

    * tag 'please-pull-uapi-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux:
    UAPI: Make arch/ia64/include/asm/kvm_para.h generic

    Linus Torvalds
     

23 Oct, 2012

8 commits

  • These are now provided in , so clean up warnings
    by not re-defining them in module.c.

    Signed-off-by: Chris Metcalf
    Acked-by: Rusty Russell

    Chris Metcalf
     
  • The tile tool chain uses the .eh_frame information for backtracing.
    The vmlinux build drops any .eh_frame sections at link time, but when
    present in kernel modules, it causes a module load failure due to the
    presence of unsupported pc-relative relocations. When compiling to
    use compiler feedback support, the compiler by default omits .eh_frame
    information, so we don't see this problem. But when not using feedback,
    we need to explicitly suppress the .eh_frame.

    Signed-off-by: Chris Metcalf
    Cc: stable@vger.kernel.org

    Chris Metcalf
     
  • Without the patch, kind of below warning will be dumped if DMA-API
    debug is enabled:

    [ 11.069763] ------------[ cut here ]------------
    [ 11.074645] WARNING: at lib/dma-debug.c:948 check_unmap+0x770/0x860()
    [ 11.081420] ehci-omap ehci-omap.0: DMA-API: device driver failed to
    check map error[device address=0x0000000
    0adb78e80] [size=8 bytes] [mapped as single]
    [ 11.095611] Modules linked in:

    Cc: Russell King
    Cc: Marek Szyprowski
    Signed-off-by: Ming Lei
    Signed-off-by: Marek Szyprowski

    Ming Lei
     
  • Russell King
     
  • Both these features have been around for a long time now, and haven't
    had any recent issues brought up. So lets drop their experimental
    status.

    In any case, hotplugis selected by other non-experimental options
    which then cause a Kconfig warning.

    Signed-off-by: Russell King

    Russell King
     
  • KVM_PV_REASON_PAGE_NOT_PRESENT kicks cpu out of idleness, but we haven't
    marked that spot as an exit from idleness.

    Not doing so can cause RCU warnings such as:

    [ 732.788386] ===============================
    [ 732.789803] [ INFO: suspicious RCU usage. ]
    [ 732.790032] 3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63 Tainted: G W
    [ 732.790032] -------------------------------
    [ 732.790032] include/linux/rcupdate.h:738 rcu_read_lock() used illegally while idle!
    [ 732.790032]
    [ 732.790032] other info that might help us debug this:
    [ 732.790032]
    [ 732.790032]
    [ 732.790032] RCU used illegally from idle CPU!
    [ 732.790032] rcu_scheduler_active = 1, debug_locks = 1
    [ 732.790032] RCU used illegally from extended quiescent state!
    [ 732.790032] 2 locks held by trinity-child31/8252:
    [ 732.790032] #0: (&rq->lock){-.-.-.}, at: [] __schedule+0x178/0x8f0
    [ 732.790032] #1: (rcu_read_lock){.+.+..}, at: [] cpuacct_charge+0xe/0x200
    [ 732.790032]
    [ 732.790032] stack backtrace:
    [ 732.790032] Pid: 8252, comm: trinity-child31 Tainted: G W 3.7.0-rc1-next-20121019-sasha-00002-g6d8d02d-dirty #63
    [ 732.790032] Call Trace:
    [ 732.790032] [] lockdep_rcu_suspicious+0x10b/0x120
    [ 732.790032] [] cpuacct_charge+0x90/0x200
    [ 732.790032] [] ? cpuacct_charge+0xe/0x200
    [ 732.790032] [] update_curr+0x1a3/0x270
    [ 732.790032] [] dequeue_entity+0x2a/0x210
    [ 732.790032] [] dequeue_task_fair+0x45/0x130
    [ 732.790032] [] dequeue_task+0x89/0xa0
    [ 732.790032] [] deactivate_task+0x1e/0x20
    [ 732.790032] [] __schedule+0x879/0x8f0
    [ 732.790032] [] ? trace_hardirqs_off+0xd/0x10
    [ 732.790032] [] ? kvm_async_pf_task_wait+0x1d5/0x2b0
    [ 732.790032] [] schedule+0x55/0x60
    [ 732.790032] [] kvm_async_pf_task_wait+0x1f4/0x2b0
    [ 732.790032] [] ? abort_exclusive_wait+0xb0/0xb0
    [ 732.790032] [] ? prepare_to_wait+0x25/0x90
    [ 732.790032] [] do_async_page_fault+0x56/0xa0
    [ 732.790032] [] async_page_fault+0x28/0x30

    Signed-off-by: Sasha Levin
    Acked-by: Gleb Natapov
    Acked-by: Paul E. McKenney
    Signed-off-by: Avi Kivity

    Sasha Levin
     
  • Signed-off-by: Gleb Natapov
    Reviewed-by: Chegu Vinod
    Tested-by: Chegu Vinod
    Signed-off-by: Avi Kivity

    Gleb Natapov
     
  • We can not directly call kvm_release_pfn_clean to release the pfn
    since we can meet noslot pfn which is used to cache mmio info into
    spte

    Signed-off-by: Xiao Guangrong
    Cc: stable@vger.kernel.org
    Signed-off-by: Avi Kivity

    Xiao Guangrong
     

22 Oct, 2012

5 commits

  • The periodic mode is currently calculated by a simple division
    but we should pay more attention to our integer arithmetics.
    Also delete a comment that does not make any sense.

    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     
  • When booting a secondary CPU, the primary CPU hands two sets of page
    tables via the secondary_data struct:

    (1) swapper_pg_dir: a normal, cacheable, shared (if SMP) mapping
    of the kernel image (i.e. the tables used by init_mm).

    (2) idmap_pgd: an uncached mapping of the .idmap.text ELF
    section.

    The idmap is generally used when enabling and disabling the MMU, which
    includes early CPU boot. In this case, the secondary CPU switches to
    swapper as soon as it enters C code:

    struct mm_struct *mm = &init_mm;
    unsigned int cpu = smp_processor_id();

    /*
    * All kernel threads share the same mm context; grab a
    * reference and switch to it.
    */
    atomic_inc(&mm->mm_count);
    current->active_mm = mm;
    cpumask_set_cpu(cpu, mm_cpumask(mm));
    cpu_switch_mm(mm->pgd, mm);

    This causes a problem on ARMv7, where the identity mapping is treated as
    strongly-ordered leading to architecturally UNPREDICTABLE behaviour of
    exclusive accesses, such as those used by atomic_inc.

    This patch re-orders the secondary_start_kernel function so that we
    switch to swapper before performing any exclusive accesses.

    Cc:
    Cc: David McKay
    Reported-by: Gilles Chanteperdrix
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • Pull m68k updates from Geert Uytterhoeven:
    "Just the expected UAPI disintegration and the "new" kcmp syscall."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
    m68k: Wire up kcmp
    m68k: Remove empty #ifdef/#else/#endif block
    UAPI: (Scripted) Disintegrate arch/m68k/include/asm

    Linus Torvalds
     
  • …g/misc into perf/urgent

    Pull various uprobes bugfixes from Oleg Nesterov - mostly race and
    failure path fixes.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • …file into perf/urgent

    Pull event-wrapping Oprofile fix from Robert Richter.

    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     

21 Oct, 2012

1 commit

  • Pull arm64 fixes from Catalin Marinas:
    "Main changes:
    - AArch64 Linux compilation fixes following 3.7-rc1 changes
    (MODULES_USE_ELF_RELA, update_vsyscall() prototype)
    - Unnecessary register setting in start_thread() (thanks to Al Viro)
    - ptrace fixes"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/linux-aarch64:
    arm64: fix alignment padding in assembly code
    arm64: ptrace: use HW_BREAKPOINT_EMPTY type for disabled breakpoints
    arm64: ptrace: make structure padding explicit for debug registers
    arm64: No need to set the x0-x2 registers in start_thread()
    arm64: Ignore memory blocks below PHYS_OFFSET
    arm64: Fix the update_vsyscall() prototype
    arm64: Select MODULES_USE_ELF_RELA
    arm64: Remove duplicate inclusion of mmu_context.h in smp.c

    Linus Torvalds
     

20 Oct, 2012

15 commits

  • An interesting effect of using the generic version of linkage.h
    is that the padding is defined in terms of x86 NOPs, which can have
    even more interesting effects when the assembly code looks like this:

    ENTRY(func1)
    mov x0, xzr
    ENDPROC(func1)
    // fall through
    ENTRY(func2)
    mov x0, #1
    ret
    ENDPROC(func2)

    Admittedly, the code is not very nice. But having code from another
    architecture doesn't look completely sane either.

    The fix is to add arm64's version of linkage.h, which causes the insertion
    of proper AArch64 NOPs.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Catalin Marinas

    Marc Zyngier
     
  • Initializing uncore PMU on virtualized CPU may hang the kernel.
    This is because kvm does not emulate the entire hardware. Thers
    are lots of uncore related MSRs, making kvm enumerate them all
    is a non-trival task. So just disable uncore on virtualized CPU.

    Signed-off-by: Yan, Zheng
    Tested-by: Pekka Enberg
    Cc: a.p.zijlstra@chello.nl
    Cc: eranian@google.com
    Cc: andi@firstfloor.org
    Cc: avi@redhat.com
    Link: http://lkml.kernel.org/r/1345540117-14164-1-git-send-email-zheng.z.yan@intel.com
    Signed-off-by: Ingo Molnar

    Yan, Zheng
     
  • Pull perf fixes from Ingo Molnar:
    "Assorted small fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf python: Properly link with libtraceevent
    perf hists browser: Add back callchain folding symbol
    perf tools: Fix build on sparc.
    perf python: Link with libtraceevent
    perf python: Initialize 'page_size' variable
    tools lib traceevent: Fix missed freeing of subargs in free_arg() in filter
    lib tools traceevent: Add back pevent assignment in __pevent_parse_format()
    perf hists browser: Fix off-by-two bug on the first column
    perf tools: Remove warnings on JIT samples for srcline sort key
    perf tools: Fix segfault when using srcline sort key
    perf: Require exclude_guest to use PEBS - kernel side enforcement
    perf tool: Precise mode requires exclude_guest

    Linus Torvalds
     
  • …it/acme/linux into perf/urgent

    Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

    * The python binding needs to link with libtraceevent and to initialize
    the 'page_size' variable so that mmaping works again.

    * The callchain folding character that appears on the TUI just before
    the overhead had disappeared due to recent changes, add it back.

    * Intel PEBS in VT-x context uses the DS address as a guest linear address,
    even though its programmed by the host as a host linear address. This either
    results in guest memory corruption and or the hardware faulting and 'crashing'
    the virtual machine. Therefore we have to disable PEBS on VT-x enter and
    re-enable on VT-x exit, enforcing a strict exclude_guest.

    Kernel side enforcement fix by Peter Zijlstra, tooling side fix by David Ahern.

    * Fix build on sparc due to UAPI, fix from David Miller.

    * Fixes for the srclike sort key for unresolved symbols and when processing
    samples in JITted code, where we don't have an ELF file, just an special
    symbol table, fixes from Namhyung Kim.

    * Fix some leaks in libtraceevent, from Steven Rostedt.

    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Ingo Molnar
     
  • Pull ARM soc fixes from Olof Johansson:
    "A set of fixes and some minor cleanups for -rc2:

    - A series from Arnd that fixes warnings in drivers and other code
    included by ARM defconfigs. Most have been acked by corresponding
    maintainers (and seem quite hard to argue not picking up anyway in
    the few exception cases).
    - A few misc patches from the list for integrator/vt8500/i.MX
    - A batch of fixes to OMAP platforms, fixing:
    - boot problems on beaglebone,
    - regression fixes for local timers
    - clockdomain locking fixes
    - a few boot/sparse warnings
    - For Tegra:
    - Clock rate calculation overflow fix
    - Revert a change that removed timer clocks and a fix for symbol
    name clashes
    - For Renesas:
    - IO accessor / annotation cleanups to remove warnings
    - For Kirkwood/Dove/mvebu:
    - Fixes for device trees for Dove (some minor cleanups, some fixes)
    - Fixes for the mvebu gpio driver
    - Fix build problem for Feroceon due to missing ifdefs
    - Fix lsxl DTS files"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (31 commits)
    ARM: kirkwood: fix buttons on lsxl boards
    ARM: kirkwood: fix LEDs names for lsxl boards
    ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2
    gpio: mvebu: Add missing breaks in mvebu_gpio_irq_set_type
    ARM: dove: Add crypto engine to DT
    ARM: dove: Remove watchdog from DT
    ARM: dove: Restructure SoC device tree descriptor
    ARM: dove: Fix clock names of sata and gbe
    ARM: dove: Fix tauros2 device tree init
    ARM: dove: Add pcie clock support
    ARM: OMAP2+: Allow kernel to boot even if GPMC fails to reserve memory
    ARM: OMAP: clockdomain: Fix locking on _clkdm_clk_hwmod_enable / disable
    ARM: s3c: mark s3c2440_clk_add as __init_refok
    spi/s3c64xx: use correct dma_transfer_direction type
    ARM: OMAP4: devices: fixup OMAP4 DMIC platform device error message
    ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
    ARM: OMAP: resolve sparse warning concerning debug_card_init()
    ARM: OMAP4: Fix twd_local_timer_register regression
    ARM: tegra: add tegra_timer clock
    ARM: tegra: rename tegra system timer
    ...

    Linus Torvalds
     
  • From Jason Cooper:
    - improve #ifdef logic to prevent linker errors with CACHE_FEROCEON_L2
    - lsxl board dts fixes

    * tag 'kirkwood_fixes_for_v3.7' of git://git.infradead.org/users/jcooper/linux:
    ARM: kirkwood: fix buttons on lsxl boards
    ARM: kirkwood: fix LEDs names for lsxl boards
    ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2

    Olof Johansson
     
  • …nel/git/arm/arm-soc into fixes

    A collection of warning fixes on non-ARM code from Arnd Bergmann:

    * 'testing/driver-warnings' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: s3c: mark s3c2440_clk_add as __init_refok
    spi/s3c64xx: use correct dma_transfer_direction type
    pcmcia: sharpsl: don't discard sharpsl_pcmcia_ops
    USB: EHCI: mark ehci_orion_conf_mbus_windows __devinit
    mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN
    SCSI: ARM: make fas216_dumpinfo function conditional
    SCSI: ARM: ncr5380/oak uses no interrupts

    Olof Johansson
     
  • Pull miscellaneous x86 fixes from Peter Anvin:
    "The biggest ones are fixing suspend/resume breakage on 32 bits, and an
    interrim fix for mapping over holes that allows AMD kit with more than
    1 TB.

    A final solution for the latter is in the works, but involves some
    fairly invasive changes that will probably mean it will only be
    appropriate for 3.8."

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, MCE: Remove bios_cmci_threshold sysfs attribute
    x86, amd, mce: Avoid NULL pointer reference on CPU northbridge lookup
    x86: Exclude E820_RESERVED regions and memory holes above 4 GB from direct mapping.
    x86/cache_info: Use ARRAY_SIZE() in amd_l3_attrs()
    x86/reboot: Remove quirk entry for SBC FITPC
    x86, suspend: Correct the restore of CR4, EFER; skip computing EFLAGS.ID

    Linus Torvalds
     
  • Pull Xtensa patchset from Chris Zankel:
    "These are all limited to the xtensa subtree and include some important
    changes (adding long missing system calls for newer libc versions and
    other fixes) and the UAPI changes"

    * tag 'xtensa-next-20121018' of git://github.com/czankel/xtensa-linux:
    xtensa: add missing system calls to the syscall table
    xtensa: minor compiler warning fix
    xtensa: Use Kbuild infrastructure to handle asm-generic headers
    UAPI: (Scripted) Disintegrate arch/xtensa/include/asm
    xtensa: fix unaligned usermode access
    xtensa: reorganize SR referencing
    xtensa: fix boot parameters parsing
    xtensa: fix missing return in do_page_fault for SIGBUS case
    xtensa: copy_thread with CLONE_VM must not copy live parent AR windows
    xtensa: fix memmove(), bcopy(), and memcpy().
    xtensa: ISS: fix rs_put_char
    xtensa: ISS: fix specific simcalls

    Linus Torvalds
     
  • * commit 'v3.7-rc1': (10892 commits)
    Linux 3.7-rc1
    x86, boot: Explicitly include autoconf.h for hostprogs
    perf: Fix UAPI fallout
    ARM: config: make sure that platforms are ordered by option string
    ARM: config: sort select statements alphanumerically
    UAPI: (Scripted) Disintegrate include/linux/byteorder
    UAPI: (Scripted) Disintegrate include/linux
    UAPI: Unexport linux/blk_types.h
    UAPI: Unexport part of linux/ppp-comp.h
    perf: Handle new rbtree implementation
    procfs: don't need a PATH_MAX allocation to hold a string representation of an int
    vfs: embed struct filename inside of names_cache allocation if possible
    audit: make audit_inode take struct filename
    vfs: make path_openat take a struct filename pointer
    vfs: turn do_path_lookup into wrapper around struct filename variant
    audit: allow audit code to satisfy getname requests from its names_list
    vfs: define struct filename and have getname() return it
    btrfs: Fix compilation with user namespace support enabled
    userns: Fix posix_acl_file_xattr_userns gid conversion
    userns: Properly print bluetooth socket uids
    ...

    Konrad Rzeszutek Wilk
     
  • Signed-off-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     
  • In 32 bit guests, if a userspace process has %eax == -ERESTARTSYS
    (-512) or -ERESTARTNOINTR (-513) when it is interrupted by an event
    /and/ the process has a pending signal then %eip (and %eax) are
    corrupted when returning to the main process after handling the
    signal. The application may then crash with SIGSEGV or a SIGILL or it
    may have subtly incorrect behaviour (depending on what instruction it
    returned to).

    The occurs because handle_signal() is incorrectly thinking that there
    is a system call that needs to restarted so it adjusts %eip and %eax
    to re-execute the system call instruction (even though user space had
    not done a system call).

    If %eax == -514 (-ERESTARTNOHAND (-514) or -ERESTART_RESTARTBLOCK
    (-516) then handle_signal() only corrupted %eax (by setting it to
    -EINTR). This may cause the application to crash or have incorrect
    behaviour.

    handle_signal() assumes that regs->orig_ax >= 0 means a system call so
    any kernel entry point that is not for a system call must push a
    negative value for orig_ax. For example, for physical interrupts on
    bare metal the inverse of the vector is pushed and page_fault() sets
    regs->orig_ax to -1, overwriting the hardware provided error code.

    xen_hypervisor_callback() was incorrectly pushing 0 for orig_ax
    instead of -1.

    Classic Xen kernels pushed %eax which works as %eax cannot be both
    non-negative and -RESTARTSYS (etc.), but using -1 is consistent with
    other non-system call entry points and avoids some of the tests in
    handle_signal().

    There were similar bugs in xen_failsafe_callback() of both 32 and
    64-bit guests. If the fault was corrected and the normal return path
    was used then 0 was incorrectly pushed as the value for orig_ax.

    Signed-off-by: David Vrabel
    Acked-by: Jan Beulich
    Acked-by: Ian Campbell
    Cc: stable@vger.kernel.org
    Signed-off-by: Konrad Rzeszutek Wilk

    David Vrabel
     
  • This makes common code less ifdef-y and is consistent with PVHVM on
    x86.

    Also note that phys_to_machine_mapping_valid should take a pfn
    argument and make it do so.

    Add __set_phys_to_machine, make set_phys_to_machine a simple wrapper
    (on systems with non-nop implementations the outer one can allocate
    new p2m pages).

    Make __set_phys_to_machine check for identity mapping or invalid only.

    Acked-by: Stefano Stabellini
    Signed-off-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     
  • This correctly sizes it as 64 bit on ARM but leaves it as unsigned
    long on x86 (therefore no intended change on x86).

    The long and ulong guest handles are now unused (and a bit dangerous)
    so remove them.

    Acked-by: Stefano Stabellini
    Signed-off-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell
     
  • Define PRI macros for xen_ulong_t and xen_pfn_t and use to fix:
    drivers/xen/sys-hypervisor.c:288:4: warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'xen_ulong_t' [-Wformat]

    Ideally this would use PRIx64 on ARM but these (or equivalent) don't
    seem to be available in the kernel.

    Acked-by: Stefano Stabellini
    Signed-off-by: Ian Campbell
    Signed-off-by: Konrad Rzeszutek Wilk

    Ian Campbell