09 Oct, 2013

1 commit


08 Oct, 2013

1 commit

  • on x86 system with net.core.bpf_jit_enable = 1

    sudo tcpdump -i eth1 'tcp port 22'

    causes the warning:
    [ 56.766097] Possible unsafe locking scenario:
    [ 56.766097]
    [ 56.780146] CPU0
    [ 56.786807] ----
    [ 56.793188] lock(&(&vb->lock)->rlock);
    [ 56.799593]
    [ 56.805889] lock(&(&vb->lock)->rlock);
    [ 56.812266]
    [ 56.812266] *** DEADLOCK ***
    [ 56.812266]
    [ 56.830670] 1 lock held by ksoftirqd/1/13:
    [ 56.836838] #0: (rcu_read_lock){.+.+..}, at: [] vm_unmap_aliases+0x8c/0x380
    [ 56.849757]
    [ 56.849757] stack backtrace:
    [ 56.862194] CPU: 1 PID: 13 Comm: ksoftirqd/1 Not tainted 3.12.0-rc3+ #45
    [ 56.868721] Hardware name: System manufacturer System Product Name/P8Z77 WS, BIOS 3007 07/26/2012
    [ 56.882004] ffffffff821944c0 ffff88080bbdb8c8 ffffffff8175a145 0000000000000007
    [ 56.895630] ffff88080bbd5f40 ffff88080bbdb928 ffffffff81755b14 0000000000000001
    [ 56.909313] ffff880800000001 ffff880800000000 ffffffff8101178f 0000000000000001
    [ 56.923006] Call Trace:
    [ 56.929532] [] dump_stack+0x55/0x76
    [ 56.936067] [] print_usage_bug+0x1f7/0x208
    [ 56.942445] [] ? save_stack_trace+0x2f/0x50
    [ 56.948932] [] ? check_usage_backwards+0x150/0x150
    [ 56.955470] [] mark_lock+0x282/0x2c0
    [ 56.961945] [] __lock_acquire+0x45d/0x1d50
    [ 56.968474] [] ? __lock_acquire+0x2de/0x1d50
    [ 56.975140] [] ? cpumask_next_and+0x55/0x90
    [ 56.981942] [] lock_acquire+0x92/0x1d0
    [ 56.988745] [] ? vm_unmap_aliases+0x16a/0x380
    [ 56.995619] [] _raw_spin_lock+0x41/0x50
    [ 57.002493] [] ? vm_unmap_aliases+0x16a/0x380
    [ 57.009447] [] vm_unmap_aliases+0x16a/0x380
    [ 57.016477] [] ? vm_unmap_aliases+0x8c/0x380
    [ 57.023607] [] change_page_attr_set_clr+0xc0/0x460
    [ 57.030818] [] ? trace_hardirqs_on+0xd/0x10
    [ 57.037896] [] ? kmem_cache_free+0xb0/0x2b0
    [ 57.044789] [] ? free_object_rcu+0x93/0xa0
    [ 57.051720] [] set_memory_rw+0x2f/0x40
    [ 57.058727] [] bpf_jit_free+0x2c/0x40
    [ 57.065577] [] sk_filter_release_rcu+0x1a/0x30
    [ 57.072338] [] rcu_process_callbacks+0x202/0x7c0
    [ 57.078962] [] __do_softirq+0xf7/0x3f0
    [ 57.085373] [] run_ksoftirqd+0x35/0x70

    cannot reuse jited filter memory, since it's readonly,
    so use original bpf insns memory to hold work_struct

    defer kfree of sk_filter until jit completed freeing

    tested on x86_64 and i386

    Signed-off-by: Alexei Starovoitov
    Acked-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     

02 Oct, 2013

3 commits

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be.h
    drivers/net/usb/qmi_wwan.c
    drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
    include/net/netfilter/nf_conntrack_synproxy.h
    include/net/secure_seq.h

    The conflicts are of two varieties:

    1) Conflicts with Joe Perches's 'extern' removal from header file
    function declarations. Usually it's an argument signature change
    or a function being added/removed. The resolutions are trivial.

    2) Some overlapping changes in qmi_wwan.c and be.h, one commit adds
    a new value, another changes an existing value. That sort of
    thing.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Pull sparc fix from David Miller:
    "Just a single bug fix to a regression added during some strlcpy()
    conversions"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: Fix buggy strlcpy() conversion in ldom_reboot().

    Linus Torvalds
     
  • Pull two KVM fixes from Gleb Natapov.

    * git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: VMX: do not check bit 12 of EPT violation exit qualification when undefined
    ARM: kvm: rename cpu_reset to avoid name clash

    Linus Torvalds
     

01 Oct, 2013

4 commits

  • The FAULT_FLAG_WRITE flag has been set based on uninitialized variable.

    Fixes a regression added by commit 759496ba6407 ("arch: mm: pass
    userspace fault flag to generic fault handler")

    Signed-off-by: Felipe Pena
    Cc: Johannes Weiner
    Cc: Michal Hocko
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Felipe Pena
     
  • Pull AVR32 fixes from Hans-Christian Egtvedt.

    Fix build warnings and use the Kbuild infrastructure for generic headers
    rather than doing it by hand.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
    avr32: cast syscall_return to silence compiler warning
    avr32: fix clockevents kernel warning
    avr32: use Kbuild infrastructure to handle the asm-generic headers

    Linus Torvalds
     
  • Pull S+core fixes from Lennox Wu:
    "These updates include updating information of maintainers, fix some
    trivial errors, and add a necessary function for supporting ipv6"

    * tag 'for-linus-20130929' of git://github.com/sctscore/official-linux:
    Score: Update the information of Score maintaners
    Score: Modify the Makefile of Score, remove -mlong-calls for compiling
    Score: Implement the function csum_ipv6_magic
    Score: The commit is for compiling successfully

    Linus Torvalds
     
  • Pull ARC Fixes from Vineet Gupta:
    - Handle unaligned access in zero delay loops
    - spinlock livelock fix for SMP systemC model
    - fix 32bit overflow in access_ok
    - better setup of clockevents

    * tag 'arc-fixes-for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
    ARC: Use clockevents_config_and_register over clockevents_register_device
    ARC: Workaround spinlock livelock in SMP SystemC simulation
    ARC: Fix 32-bit wrap around in access_ok()
    ARC: Handle zero-overhead-loop in unaligned access handler

    Linus Torvalds
     

30 Sep, 2013

3 commits

  • The patch fixes the following compiler warning:
    CC arch/avr32/kernel/process.o
    arch/avr32/kernel/process.c: In function 'copy_thread':
    arch/avr32/kernel/process.c:292: warning: assignment makes integer \
    from pointer without a cast

    Signed-off-by: Gabor Juhos
    Acked-by: Hans-Christian Egtvedt

    Gabor Juhos
     
  • Since commit 01426478df3a8791ff5c8b6b82d409e699cfaf38
    (avr32: Use generic idle loop) the kernel throws the
    following warning on avr32:

    WARNING: at 900322e4 [verbose debug info unavailable]
    Modules linked in:
    CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.0-rc2 #117
    task: 901c3ecc ti: 901c0000 task.ti: 901c0000
    PC is at cpu_idle_poll_ctrl+0x1c/0x38
    LR is at comparator_mode+0x3e/0x40
    pc : [] lr : [] Not tainted
    sp : 901c1f74 r12: 00000000 r11: 901c74a0
    r10: 901d2510 r9 : 00000001 r8 : 901db4de
    r7 : 901c74a0 r6 : 00000001 r5 : 00410020 r4 : 901db574
    r3 : 00410024 r2 : 90206fe0 r1 : 00000000 r0 : 007f0000
    Flags: qvnzc
    Mode bits: hjmde....G
    CPU Mode: Supervisor
    Call trace:
    [] clockevents_set_mode+0x16/0x2e
    [] clockevents_shutdown+0xa/0x1e
    [] clockevents_exchange_device+0x58/0x70
    [] tick_check_new_device+0x38/0x54
    [] clockevents_register_device+0x32/0x90
    [] time_init+0xa8/0x108
    [] start_kernel+0x128/0x23c

    When the 'avr32_comparator' clockevent device is registered,
    the clockevent core sets the mode of that clockevent device
    to CLOCK_EVT_MODE_SHUTDOWN. Due to this, the 'comparator_mode'
    function calls the 'cpu_idle_poll_ctrl' to disables idle poll.
    This results in the aforementioned warning because the polling
    is not enabled yet.

    Change the code to only disable idle poll if it is enabled by
    the same function to avoid the warning.

    Cc: stable@vger.kernel.org
    Signed-off-by: Gabor Juhos
    Acked-by: Hans-Christian Egtvedt

    Gabor Juhos
     
  • Use kbuild to add asm-generic headers that do nothing, also remove the arch
    specific wrapper headers.

    This only affects headers that do nothing but include the generic
    equivalent. It does not touch any header that does a little more.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Hans-Christian Egtvedt

    Steven Rostedt
     

29 Sep, 2013

6 commits

  • As mentioned in commit afe4fd062416b ("pkt_sched: fq: Fair Queue packet
    scheduler"), this patch adds a new socket option.

    SO_MAX_PACING_RATE offers the application the ability to cap the
    rate computed by transport layer. Value is in bytes per second.

    u32 val = 1000000;
    setsockopt(sockfd, SOL_SOCKET, SO_MAX_PACING_RATE, &val, sizeof(val));

    To be effectively paced, a flow must use FQ packet scheduler.

    Note that a packet scheduler takes into account the headers for its
    computations. The effective payload rate depends on MSS and retransmits
    if any.

    I chose to make this pacing rate a SOL_SOCKET option instead of a
    TCP one because this can be used by other protocols.

    Signed-off-by: Eric Dumazet
    Cc: Steinar H. Gunderson
    Cc: Michael Kerrisk
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • …nt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

    Pull scheduler, timer and x86 fixes from Ingo Molnar:
    - A context tracking ARM build and functional fix
    - A handful of ARM clocksource/clockevent driver fixes
    - An AMD microcode patch level sysfs reporting fixlet

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    arm: Fix build error with context tracking calls

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
    clocksource: of: Respect device tree node status
    clocksource: exynos_mct: Set IRQ affinity when the CPU goes online
    arm: clocksource: mvebu: Use the main timer as clock source from DT

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/microcode/AMD: Fix patch level reporting for family 15h

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "A couple of tooling fixlets and a PMU detection printout fix"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86: Fix PMU detection printout when no PMU is detected
    perf symbols: Demangle cloned functions
    perf machine: Fix path unpopulated in machine__create_modules()
    perf tools: Explicitly add libdl dependency
    perf probe: Fix probing symbols with optimization suffix
    perf trace: Add mmap2 handler
    perf kmem: Make it work again on non NUMA machines

    Linus Torvalds
     
  • Pull s390 lockref enablement from Heiko Carstens:
    "Enabling the new lockless lockref variant on s390 would have been
    trivial until Tony Luck added a cpu_relax() call into the
    CMPXCHG_LOOP(), with commit d472d9d98b46 ("lockref: Relax in cmpxchg
    loop")

    As already mentioned cpu_relax() is very expensive on s390 since it
    yields() the current virtual cpu. So we are talking of several
    thousand cycles. Considering this enabling the lockless lockref
    variant would contradict the intention of the new semantics. And also
    some quick measurements show performance regressions of 50% and more.

    Simply removing the cpu_relax() call again seems also not very
    desireable since Waiman Long reported that for some workloads the call
    improved performance by 5%."

    * 'lockref' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390: enable ARCH_USE_CMPXCHG_LOCKREF
    lockref: use arch_mutex_cpu_relax() in CMPXCHG_LOOP()
    mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef

    Linus Torvalds
     
  • Pull DeviceTree fixes from Rob Herring:
    "Clean-up to fix some warnings for !OF builds and spelling fixes in
    docs:

    - Clean-up openrisc prom.h
    - Fix warnings caused by of_irq.h ifdefs
    - Spelling fix for Synopsys"

    * tag 'devicetree-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    dts: Fix misspelling of Synopsys
    of: clean-up ifdefs in of_irq.h
    openrisc: clean-up prom.h

    Linus Torvalds
     
  • Pull ARM fixes from Russell King:
    "Just a few relatively small ARM fixes found since the last merge
    window, nothing too exciting"

    * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
    ARM: 7837/3: fix Thumb-2 bug in AES assembler code
    ARM: only allow kernel mode neon with AEABI
    ARM: 7839/1: entry: fix tracing of ARM-private syscalls
    ARM: 7836/1: add __get_user_unaligned/__put_user_unaligned

    Linus Torvalds
     

28 Sep, 2013

5 commits

  • Ran into this cryptic PMU bootup log recently:

    [ 0.124047] Performance Events:
    [ 0.125000] smpboot: ...

    Turns out we print this if no PMU is detected. Fall back to
    the right condition so that the following is printed:

    [ 0.122381] Performance Events: no PMU driver, software events only.

    Cc: Peter Zijlstra
    Cc: Arnaldo Carvalho de Melo
    Link: http://lkml.kernel.org/n/tip-u2fwaUffakjp0qkpRfqljgsn@git.kernel.org
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Enable ARCH_USE_CMPXCHG_LOCKREF since it shows performance improvements
    with Linus' simple stat() test case of up to 50% on a 30 cpu system.

    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • Linus suggested to replace

    #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX
    #define arch_mutex_cpu_relax() cpu_relax()
    #endif

    with just a simple

    #ifndef arch_mutex_cpu_relax
    # define arch_mutex_cpu_relax() cpu_relax()
    #endif

    to get rid of CONFIG_HAVE_CPU_RELAX_SIMPLE. So architectures can
    simply define arch_mutex_cpu_relax if they want an architecture
    specific function instead of having to add a select statement in
    their Kconfig in addition.

    Suggested-by: Linus Torvalds
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • …el/git/frederic/linux-dynticks into sched/urgent

    Pull context tracking ARM fix from Frederic Weisbecker.

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

    Ingo Molnar
     
  • Commit 117a0c5fc9c2d06045bd217385b2b39ea426b5a6 ("sparc: kernel: using
    strlcpy() instead of strcpy()") added a bug to ldom_reboot in
    arch/sparc/kernel/ds.c

    - strcpy(full_boot_str + strlen("boot "), boot_command);
    + strlcpy(full_boot_str + strlen("boot "), boot_command,
    + sizeof(full_boot_str + strlen("boot ")));

    That last sizeof() expression evaluates to sizeof(size_t) which is
    not what was intended.

    Also even the corrected:

    sizeof(full_boot_str) + strlen("boot ")

    is not right as the destination buffer length is just plain
    "sizeof(full_boot_str)" and that's what the final argument
    should be.

    Signed-off-by: David S. Miller

    David S. Miller
     

27 Sep, 2013

6 commits

  • ad65782fba50 (context_tracking: Optimize main APIs off case
    with static key) converted context tracking main APIs to inline
    function and left ARM asm callers behind.

    This can be easily fixed by making ARM calling the post static
    keys context tracking function. We just need to replicate the
    static key checks there. We'll remove these later when ARM will
    support the context tracking static keys.

    Reported-by: Guenter Roeck
    Reported-by: Russell King
    Signed-off-by: Frederic Weisbecker
    Tested-by: Kevin Hilman
    Cc: Nicolas Pitre
    Cc: Anil Kumar
    Cc: Tony Lindgren
    Cc: Benoit Cousson
    Cc: Guenter Roeck
    Cc: Russell King
    Cc: Kevin Hilman

    Frederic Weisbecker
     
  • clockevents_config_and_register is more clever and correct than doing it
    by hand; so use it.

    [vgupta: fixed build failure due to missing ; in patch]

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Vineet Gupta

    Uwe Kleine-König
     
  • Some ARC SMP systems lack native atomic R-M-W (LLOCK/SCOND) insns and
    can only use atomic EX insn (reg with mem) to build higher level R-M-W
    primitives. This includes a SystemC based SMP simulation model.

    So rwlocks need to use a protecting spinlock for atomic cmp-n-exchange
    operation to update reader(s)/writer count.

    The spinlock operation itself looks as follows:

    mov reg, 1 ; 1=locked, 0=unlocked
    retry:
    EX reg, [lock] ; load existing, store 1, atomically
    BREQ reg, 1, rety ; if already locked, retry

    In single-threaded simulation, SystemC alternates between the 2 cores
    with "N" insn each based scheduling. Additionally for insn with global
    side effect, such as EX writing to shared mem, a core switch is
    enforced too.

    Given that, 2 cores doing a repeated EX on same location, Linux often
    got into a livelock e.g. when both cores were fiddling with tasklist
    lock (gdbserver / hackbench) for read/write respectively as the
    sequence diagram below shows:

    core1 core2
    -------- --------
    1. spin lock [EX r=0, w=1] - LOCKED
    2. rwlock(Read) - LOCKED
    3. spin unlock [ST 0] - UNLOCKED
    spin lock [EX r=0,w=1] - LOCKED
    -- resched core 1----

    5. spin lock [EX r=1] - ALREADY-LOCKED

    -- resched core 2----
    6. rwlock(Write) - READER-LOCKED
    7. spin unlock [ST 0]
    8. rwlock failed, retry again

    9. spin lock [EX r=0, w=1]
    -- resched core 1----

    10 spinlock locked in #9, retry #5
    11. spin lock [EX gets 1]
    -- resched core 2----
    ...
    ...

    The fix was to unlock using the EX insn too (step 7), to trigger another
    SystemC scheduling pass which would let core1 proceed, eliding the
    livelock.

    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • Anton reported

    | LTP tests syscalls/process_vm_readv01 and process_vm_writev01 fail
    | similarly in one testcase test_iov_invalid -> lvec->iov_base.
    | Testcase expects errno EFAULT and return code -1,
    | but it gets return code 1 and ERRNO is 0 what means success.

    Essentially test case was passing a pointer of -1 which access_ok()
    was not catching. It was doing [@addr + @sz
    Signed-off-by: Vineet Gupta

    Vineet Gupta
     
  • If a load or store is the last instruction in a zero-overhead-loop, and
    it's misaligned, the loop would execute only once.

    This fixes that problem.

    Signed-off-by: Mischa Jonker
    Signed-off-by: Vineet Gupta

    Mischa Jonker
     
  • On AMD family 14h, applying microcode patch on the a core (core0)
    would also affect the other core (core1) in the same compute
    unit. The driver would skip applying the patch on core1, but it
    still need to update kernel structures to reflect the proper
    patch level.

    The current logic is not updating the struct
    ucode_cpu_info.cpu_sig.rev of the skipped core. This causes the
    /sys/devices/system/cpu/cpu1/microcode/version to report
    incorrect patch level as shown below:

    $ grep . cpu?/microcode/version
    cpu0/microcode/version:0x600063d
    cpu1/microcode/version:0x6000626
    cpu2/microcode/version:0x600063d
    cpu3/microcode/version:0x6000626
    cpu4/microcode/version:0x600063d

    Signed-off-by: Suravee Suthikulpanit
    Acked-by: Borislav Petkov
    Cc:
    Cc:
    Cc:
    Link: http://lkml.kernel.org/r/1285806432-1995-1-git-send-email-suravee.suthikulpanit@amd.com
    Signed-off-by: Ingo Molnar

    Suravee Suthikulpanit
     

26 Sep, 2013

8 commits

  • Pull Xen fixes from Konrad Rzeszutek Wilk:
    "Bug-fixes and one update to the kernel-paramters.txt documentation.

    - Fix PV spinlocks triggering jump_label code bug
    - Remove extraneous code in the tpm front driver
    - Fix ballooning out of pages when non-preemptible
    - Fix deadlock when using a 32-bit initial domain with large amount
    of memory
    - Add xen_nopvpsin parameter to the documentation"

    * tag 'stable/for-linus-3.12-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/spinlock: Document the xen_nopvspin parameter.
    xen/p2m: check MFN is in range before using the m2p table
    xen/balloon: don't alloc page while non-preemptible
    xen: Do not enable spinlocks before jump_label_init() has executed
    tpm: xen-tpmfront: Remove the locality sysfs attribute
    tpm: xen-tpmfront: Fix default durations

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:

    - Fix a comment

    - A small cleanup the main purpose of which is to work around an
    internal compiler error bug in certain Codesource toolchains.

    * git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: mm: Move some checks out of 'for' loop in DMA operations
    MIPS: cpu-features.h: s/MIPS53/MIPS64/

    Linus Torvalds
     
  • Pull powerpc fixes from Ben Herrenschmidt:
    "Here are a few things for -rc2, this time it's all written by me so it
    can only be perfect .... right ? :)

    So we have the fix to call irq_enter/exit on the irq stack we've been
    discussing, plus a cleanup on top to remove an unused (and broken)
    stack limit tracking feature (well, make it 32-bit only in fact where
    it is used and works properly).

    Then we have two things that I wrote over the last couple of days and
    made the executive decision to include just because I can (and I'm
    sure you won't object .... right ?).

    They fix a couple of annoying and long standing "issues":

    - We had separate zImages for when booting via Open Firmware vs.
    booting via a flat device-tree, while it's trivial to make one that
    deals with both

    - We wasted a ton of cycles spinning secondary CPUs uselessly at boot
    instead of starting them when needed on pseries, thus contributing
    significantly to global warming"

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pseries: Do not start secondaries in Open Firmware
    powerpc/zImage: make the "OF" wrapper support ePAPR boot
    powerpc: Remove ksp_limit on ppc64
    powerpc/irq: Run softirqs off the top of the irq stack

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "An EFI fix and two reboot-quirk fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/reboot: Fix apparent cut-n-paste mistake in Dell reboot workaround
    x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
    x86, efi: Don't map Boot Services on i386

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Assorted standalone fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Add model number for Avoton Silvermont
    perf: Fix capabilities bitfield compatibility in 'struct perf_event_mmap_page'
    perf/x86/intel/uncore: Don't use smp_processor_id() in validate_group()
    perf: Update ABI comment
    tools lib lk: Uninclude linux/magic.h in debugfs.c
    perf tools: Fix old GCC build error in trace-event-parse.c:parse_proc_kallsyms()
    perf probe: Fix finder to find lines of given function
    perf session: Check for SIGINT in more loops
    perf tools: Fix compile with libelf without get_phdrnum
    perf tools: Fix buildid cache handling of kallsyms with kcore
    perf annotate: Fix objdump line parsing offset validation
    perf tools: Fill in new definitions for madvise()/mmap() flags
    perf tools: Sharpen the libaudit dependencies test

    Linus Torvalds
     
  • Signed-off-by: Lennox Wu

    Lennox Wu
     
  • Signed-off-by: Lennox Wu

    Lennox Wu
     
  • The modifications include:
    1. Kconfig of Score: we don't support ioremap
    2. Missed headfile including
    3. There are some errors in other people's commit not checked by us, we fix it now
    3.1 arch/score/kernel/entry.S: wrong instructions
    3.2 arch/score/kernel/process.c : just some typos

    Signed-off-by: Lennox Wu

    Lennox Wu
     

25 Sep, 2013

3 commits

  • The check cpu_needs_post_dma_flush() in mips_dma_sync_sg_for_cpu() and
    the check !plat_device_is_coherent() in mips_dma_sync_sg_for_device()
    can be moved outside the for loop.

    As a side effect, this also avoids a GCC bug that caused kernel compile
    to fail with the error:

    arch/mips/mm/dma-default.c: In function 'mips_dma_sync_sg_for_cpu':
    arch/mips/mm/dma-default.c:316:1: internal compiler error: in add_insn_before, at emit-rtl.c:3852

    This gcc failure is seen in Code Sourcery toolchains [e.g. gcc version
    4.7.2 (Sourcery CodeBench Lite 2012.09-99)] after commit "MIPS: Optimize
    current_cpu_type() for better code."

    Signed-off-by: Jayachandran C
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5907/
    Reviewed-by: Markos Chandras
    Tested-by: Markos Chandras
    Signed-off-by: Ralf Baechle

    Jayachandran C
     
  • On hosts with more than 168 GB of memory, a 32-bit guest may attempt
    to grant map an MFN that is error cannot lookup in its mapping of the
    m2p table. There is an m2p lookup as part of m2p_add_override() and
    m2p_remove_override(). The lookup falls off the end of the mapped
    portion of the m2p and (because the mapping is at the highest virtual
    address) wraps around and the lookup causes a fault on what appears to
    be a user space address.

    do_page_fault() (thinking it's a fault to a userspace address), tries
    to lock mm->mmap_sem. If the gntdev device is used for the grant map,
    m2p_add_override() is called from from gnttab_mmap() with mm->mmap_sem
    already locked. do_page_fault() then deadlocks.

    The deadlock would most commonly occur when a 64-bit guest is started
    and xenconsoled attempts to grant map its console ring.

    Introduce mfn_to_pfn_no_overrides() which checks the MFN is within the
    mapped portion of the m2p table before accessing the table and use
    this in m2p_add_override(), m2p_remove_override(), and mfn_to_pfn()
    (which already had the correct range check).

    All faults caused by accessing the non-existant parts of the m2p are
    thus within the kernel address space and exception_fixup() is called
    without trying to lock mm->mmap_sem.

    This means that for MFNs that are outside the mapped range of the m2p
    then mfn_to_pfn() will always look in the m2p overrides. This is
    correct because it must be a foreign MFN (and the PFN in the m2p in
    this case is only relevant for the other domain).

    Signed-off-by: David Vrabel
    Cc: Stefano Stabellini
    Cc: Jan Beulich
    --
    v3: check for auto_translated_physmap in mfn_to_pfn_no_overrides()
    v2: in mfn_to_pfn() look in m2p_overrides if the MFN is out of
    range as it's probably foreign.
    Signed-off-by: Konrad Rzeszutek Wilk
    Acked-by: Stefano Stabellini

    David Vrabel
     
  • Bit 12 is undefined in any of the following cases:
    - If the "NMI exiting" VM-execution control is 1 and the "virtual NMIs"
    VM-execution control is 0.
    - If the VM exit sets the valid bit in the IDT-vectoring information field

    Signed-off-by: Gleb Natapov
    [Add parentheses around & within && - Paolo]
    Signed-off-by: Paolo Bonzini

    Gleb Natapov