20 Dec, 2011

1 commit

  • If oprofilefs_ulong_from_user() is called with count equals
    zero, *val remains unchanged. Depending on the implementation it
    might be uninitialized.

    Change oprofilefs_ulong_from_user()'s interface to return count
    on success. Thus, we are able to return early if count equals
    zero which avoids using *val uninitialized. Fixing all users of
    oprofilefs_ulong_ from_user().

    This follows write syscall implementation when count is zero:
    "If count is zero ... [and if] no errors are detected, 0 will be
    returned without causing any other effect." (man 2 write)

    Reported-By: Mike Waychison
    Signed-off-by: Robert Richter
    Cc: Andrew Morton
    Cc:
    Cc: oprofile-list
    Link: http://lkml.kernel.org/r/20111219153830.GH16765@erda.amd.com
    Signed-off-by: Ingo Molnar

    Robert Richter
     

01 Dec, 2011

5 commits

  • git commit 20b40a794baf3b4b "signal race with restarting system calls"
    added code to the poke_user/poke_user_compat to reset the system call
    restart information in the thread-info if the PSW address is changed.
    The purpose of that change has been to workaround old gdbs that do
    not know about the REGSET_SYSTEM_CALL. It turned out that this is not
    a good idea, it makes the behaviour of the debuggee dependent on the
    order of specific ptrace call, e.g. the REGSET_SYSTEM_CALL register
    set needs to be written last. And the workaround does not really fix
    old gdbs, inferior calls on interrupted restarting system calls do not
    work either way.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The last breaking event address is a read-only value, the regset misses the
    .set function. If a PTRACE_SETREGSET is done for NT_S390_LAST_BREAK we
    get an oops due to a branch to zero:

    Kernel BUG at 0000000000000002 verbose debug info unavailable
    illegal operation: 0001 #1 SMP
    ...
    Call Trace:
    ( ptrace_regset+0x184/0x188)
    ptrace_request+0x37a/0x4fc
    arch_ptrace+0x108/0x1fc
    SyS_ptrace+0xaa/0x12c
    sysc_noemu+0x16/0x1c
    0x3fffd5ec10c
    Last Breaking-Event-Address:
    ptrace_regset+0x132/0x188

    Add a nop .set function to prevent the branch to zero.

    Signed-off-by: Martin Schwidefsky
    Cc: stable@kernel.org

    Martin Schwidefsky
     
  • This patch makes sure we don't underindicate _PAGE_CHANGED in case
    we have a race between an operation that changes the page and this
    code path that hits us between page_get_storage_key and
    page_set_storage_key. Note that we still have a potential
    underindication on _PAGE_REFERENCED in the unlikely event that
    the page was changed but not referenced _and_ someone references
    the page in the race window. That's not considered to be a problem.

    Signed-off-by: Carsten Otte
    Signed-off-by: Martin Schwidefsky

    Carsten Otte
     
  • The TIF_SYSCALL bit needs to be cleared if the debugger changes the state
    of the ptraced process in regard to the presence of a system call.
    Otherwise the system call will be restarted although the debugger set up
    an inferior call.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • In order to have the same behavior for kdump based stand-alone dump
    as for the kexec method, the is_kdump_kernel() check (only true for
    the kexec method) has to be replaced by the OLDMEM_BASE check (true
    for both methods).

    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     

21 Nov, 2011

1 commit

  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM guest: prevent tracing recursion with kvmclock
    Revert "KVM: PPC: Add support for explicit HIOR setting"
    KVM: VMX: Check for automatic switch msr table overflow
    KVM: VMX: Add support for guest/host-only profiling
    KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
    KVM: s390: announce SYNC_MMU
    KVM: s390: Fix tprot locking
    KVM: s390: handle SIGP sense running intercepts
    KVM: s390: Fix RUNNING flag misinterpretation

    Linus Torvalds
     

17 Nov, 2011

4 commits

  • KVM on s390 always had a sync mmu. Any mapping change in userspace
    mapping was always reflected immediately in the guest mapping.
    - In older code the guest mapping was just an offset
    - In newer code the last level page table is shared

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     
  • There is a potential host deadlock in the tprot intercept handling.
    We must not hold the mmap semaphore while resolving the guest
    address. If userspace is remapping, then the memory detection in
    the guest is broken anyway so we can safely separate the
    address translation from walking the vmas.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Christian Borntraeger
     
  • SIGP sense running may cause an intercept on higher level
    virtualization, so handle it by checking the CPUSTAT_RUNNING flag.

    Signed-off-by: Cornelia Huck
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Cornelia Huck
     
  • CPUSTAT_RUNNING was implemented signifying that a vcpu is not stopped.
    This is not, however, what the architecture says: RUNNING should be
    set when the host is acting on the behalf of the guest operating
    system.

    CPUSTAT_RUNNING has been changed to be set in kvm_arch_vcpu_load()
    and to be unset in kvm_arch_vcpu_put().

    For signifying stopped state of a vcpu, a host-controlled bit has
    been used and is set/unset basically on the reverse as the old
    CPUSTAT_RUNNING bit (including pushing it down into stop handling
    proper in handle_stop()).

    Cc: stable@kernel.org
    Signed-off-by: Cornelia Huck
    Signed-off-by: Carsten Otte
    Signed-off-by: Avi Kivity

    Cornelia Huck
     

14 Nov, 2011

9 commits


07 Nov, 2011

2 commits

  • …/kernel/git/jeremy/xen

    * 'upstream/jump-label-noearly' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
    jump-label: initialize jump-label subsystem much earlier
    x86/jump_label: add arch_jump_label_transform_static()
    s390/jump-label: add arch_jump_label_transform_static()
    jump_label: add arch_jump_label_transform_static() to optimise non-live code updates
    sparc/jump_label: drop arch_jump_label_text_poke_early()
    x86/jump_label: drop arch_jump_label_text_poke_early()
    jump_label: if a key has already been initialized, don't nop it out
    stop_machine: make stop_machine safe and efficient to call early
    jump_label: use proper atomic_t initializer

    Conflicts:
    - arch/x86/kernel/jump_label.c
    Added __init_or_module to arch_jump_label_text_poke_early vs
    removal of that function entirely
    - kernel/stop_machine.c
    same patch ("stop_machine: make stop_machine safe and efficient
    to call early") merged twice, with whitespace fix in one version

    Linus Torvalds
     
  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

03 Nov, 2011

4 commits

  • Says Andrew:

    "60 patches. That's good enough for -rc1 I guess. I have quite a lot
    of detritus to be rechecked, work through maintainers, etc.

    - most of the remains of MM
    - rtc
    - various misc
    - cgroups
    - memcg
    - cpusets
    - procfs
    - ipc
    - rapidio
    - sysctl
    - pps
    - w1
    - drivers/misc
    - aio"

    * akpm: (60 commits)
    memcg: replace ss->id_lock with a rwlock
    aio: allocate kiocbs in batches
    drivers/misc/vmw_balloon.c: fix typo in code comment
    drivers/misc/vmw_balloon.c: determine page allocation flag can_sleep outside loop
    w1: disable irqs in critical section
    drivers/w1/w1_int.c: multiple masters used same init_name
    drivers/power/ds2780_battery.c: fix deadlock upon insertion and removal
    drivers/power/ds2780_battery.c: add a nolock function to w1 interface
    drivers/power/ds2780_battery.c: create central point for calling w1 interface
    w1: ds2760 and ds2780, use ida for id and ida_simple_get() to get it
    pps gpio client: add missing dependency
    pps: new client driver using GPIO
    pps: default echo function
    include/linux/dma-mapping.h: add dma_zalloc_coherent()
    sysctl: make CONFIG_SYSCTL_SYSCALL default to n
    sysctl: add support for poll()
    RapidIO: documentation update
    drivers/net/rionet.c: fix ethernet address macros for LE platforms
    RapidIO: fix potential null deref in rio_setup_device()
    RapidIO: add mport driver for Tsi721 bridge
    ...

    Linus Torvalds
     
  • This avoids duplicating the function in every arch gup_fast.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • s390 didn't return 0 in that case, if it's rolling back the *nr pointer it
    should also return zero to avoid adding pages to the array at the wrong
    offset.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • Up to this point the code assumed old refcounting for hugepages (pre-thp).
    This updates the code directly to the thp mapcount tail page refcounting.

    Signed-off-by: Andrea Arcangeli
    Cc: Peter Zijlstra
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc: Rik van Riel
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Benjamin Herrenschmidt
    Cc: David Gibson
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: David Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     

02 Nov, 2011

3 commits


01 Nov, 2011

2 commits

  • Fix several compile errors on s390 caused by splitting module.h.

    Some include additions [e.g. qdio_setup.c, zfcp_qdio.c] are in
    anticipation of pending changes queued for s390 that increase
    the modular use footprint.

    [PG: added additional obvious changes since Heiko's original patch]

    Signed-off-by: Heiko Carstens
    Signed-off-by: Paul Gortmaker

    Heiko Carstens
     
  • * 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: (54 commits)
    [S390] Remove error checking from copy_oldmem_page()
    [S390] qdio: prevent dsci access without adapter interrupts
    [S390] irqstats: split IPI interrupt accounting
    [S390] add missing __tlb_flush_global() for !CONFIG_SMP
    [S390] sparse: fix sparse symbol shadow warning
    [S390] sparse: fix sparse NULL pointer warnings
    [S390] sparse: fix sparse warnings with __user pointers
    [S390] sparse: fix sparse warnings in math-emu
    [S390] sparse: fix sparse warnings about missing prototypes
    [S390] sparse: fix sparse ANSI-C warnings
    [S390] sparse: fix sparse static warnings
    [S390] sparse: fix access past end of array warnings
    [S390] dasd: prevent path verification before resume
    [S390] qdio: remove multicast polling
    [S390] qdio: reset outbound SBAL error states
    [S390] qdio: EQBS retry after CCQ 96
    [S390] qdio: add timestamp for last queue scan time
    [S390] Introduce get_clock_fast()
    [S390] kvm: Handle diagnose 0x10 (release pages)
    [S390] take mmap_sem when walking guest page table
    ...

    Linus Torvalds
     

31 Oct, 2011

1 commit

  • * 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (75 commits)
    KVM: SVM: Keep intercepting task switching with NPT enabled
    KVM: s390: implement sigp external call
    KVM: s390: fix register setting
    KVM: s390: fix return value of kvm_arch_init_vm
    KVM: s390: check cpu_id prior to using it
    KVM: emulate lapic tsc deadline timer for guest
    x86: TSC deadline definitions
    KVM: Fix simultaneous NMIs
    KVM: x86 emulator: convert push %sreg/pop %sreg to direct decode
    KVM: x86 emulator: switch lds/les/lss/lfs/lgs to direct decode
    KVM: x86 emulator: streamline decode of segment registers
    KVM: x86 emulator: simplify OpMem64 decode
    KVM: x86 emulator: switch src decode to decode_operand()
    KVM: x86 emulator: qualify OpReg inhibit_byte_regs hack
    KVM: x86 emulator: switch OpImmUByte decode to decode_imm()
    KVM: x86 emulator: free up some flag bits near src, dst
    KVM: x86 emulator: switch src2 to generic decode_operand()
    KVM: x86 emulator: expand decode flags to 64 bits
    KVM: x86 emulator: split dst decode to a generic decode_operand()
    KVM: x86 emulator: move memop, memopp into emulation context
    ...

    Linus Torvalds
     

30 Oct, 2011

8 commits