25 Sep, 2014

12 commits

  • Pull networking fixes from David Miller:
    "Here is a quick pull request primarily meant to address the deconfig
    fallout from changing SCSI_NETLINK from being used via 'select' to
    being used via 'depends'.

    I applied a set of 5 patches written by Michal Marek, and then I
    carefully audited all of the remaining config files, basically:

    1) I scanned every arch config file, and if it mentioned CONFIG_INET
    or CONFIG_UNIX, I made sure it had CONFIG_NET=y

    2) After that, I scanned every arch config file, and if it did not
    have CONFIG_NET=y I made sure it did not reference any networking
    config options.

    Finally, we have some late breaking wireless fixes in here from John
    Linville and co"

    [ And there's a sparc bpf fix snuck in too ]

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    sparc: bpf_jit: fix loads from negative offsets
    parisc: Update defconfigs which were missing CONFIG_NET.
    powerpc: Update defconfigs which were missing CONFIG_NET.
    s390: Update defconfigs which were missing CONFIG_NET.
    mips: Update some more defconfigs which were missing CONFIG_NET.
    sparc: Set CONFIG_NET=y in defconfigs
    sh: Set CONFIG_NET=y in defconfigs
    powerpc: Set CONFIG_NET=y in defconfigs
    parisc: Set CONFIG_NET=y in defconfigs
    mips: Set CONFIG_NET=y in defconfigs
    brcmfmac: Fix off by one bug in brcmf_count_20mhz_channels()
    ath9k: Fix NULL pointer dereference on early irq
    net: rfkill: gpio: Fix clock status
    NFC: st21nfca: Fix potential depmod dependency cycle
    NFC: st21nfcb: Fix depmod dependency cycle
    NFC: microread: Potential overflows in microread_target_discovered()

    Linus Torvalds
     
  • - fix BPF_LD|ABS|IND from negative offsets:
    make sure to sign extend lower 32 bits in 64-bit register
    before calling C helpers from JITed code, otherwise 'int k'
    argument of bpf_internal_load_pointer_neg_helper() function
    will be added as large unsigned integer, causing packet size
    check to trigger and abort the program.

    It's worth noting that JITed code for 'A = A op K' will affect
    upper 32 bits differently depending whether K is simm13 or not.
    Since small constants are sign extended, whereas large constants
    are stored in temp register and zero extended.
    That is ok and we don't have to pay a penalty of sign extension
    for every sethi, since all classic BPF instructions have 32-bit
    semantics and we only need to set correct upper bits when
    transitioning from JITed code into C.

    - though instructions 'A &= 0' and 'A *= 0' are odd, JIT compiler
    should not optimize them out

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
    'select'.") removed what happened to be the only instance of 'select
    NET'. Defconfigs that were relying on the select now lack networking
    support.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
    'select'.") removed what happened to be the only instance of 'select
    NET'. Defconfigs that were relying on the select now lack networking
    support.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
    'select'.") removed what happened to be the only instance of 'select
    NET'. Defconfigs that were relying on the select now lack networking
    support.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit df568d8e ("scsi: Use 'depends' with LIBFC instead of
    'select'.") removed what happened to be the only instance of 'select
    NET'. Defconfigs that were relying on the select now lack networking
    support.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Commit 5d6be6a5 ("scsi_netlink : Make SCSI_NETLINK dependent on NET
    instead of selecting NET") removed what happened to be the only instance
    of 'select NET'. Defconfigs that were relying on the select now lack
    networking support.

    Reported-by: Stephen Rothwell
    Cc: sparclinux@vger.kernel.org
    Signed-off-by: Michal Marek
    Signed-off-by: David S. Miller

    Michal Marek
     
  • Commit 5d6be6a5 ("scsi_netlink : Make SCSI_NETLINK dependent on NET
    instead of selecting NET") removed what happened to be the only instance
    of 'select NET'. Defconfigs that were relying on the select now lack
    networking support.

    Reported-by: Stephen Rothwell
    Cc: linux-sh@vger.kernel.org
    Signed-off-by: Michal Marek
    Signed-off-by: David S. Miller

    Michal Marek
     
  • Commit 5d6be6a5 ("scsi_netlink : Make SCSI_NETLINK dependent on NET
    instead of selecting NET") removed what happened to be the only instance
    of 'select NET'. Defconfigs that were relying on the select now lack
    networking support.

    Reported-by: Stephen Rothwell
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Michal Marek
    Signed-off-by: David S. Miller

    Michal Marek
     
  • Commit 5d6be6a5 ("scsi_netlink : Make SCSI_NETLINK dependent on NET
    instead of selecting NET") removed what happened to be the only instance
    of 'select NET'. Defconfigs that were relying on the select now lack
    networking support.

    Reported-by: Stephen Rothwell
    Cc: linux-parisc@vger.kernel.org
    Signed-off-by: Michal Marek
    Signed-off-by: David S. Miller

    Michal Marek
     
  • Commit 5d6be6a5 ("scsi_netlink : Make SCSI_NETLINK dependent on NET
    instead of selecting NET") removed what happened to be the only instance
    of 'select NET'. Defconfigs that were relying on the select now lack
    networking support.

    Reported-by: Stephen Rothwell
    Cc: linux-mips@linux-mips.org
    Signed-off-by: Michal Marek
    Signed-off-by: David S. Miller

    Michal Marek
     
  • Pull crypto fixes from Herbert Xu:
    "This fixes three issues:

    - if ccp is loaded on a machine without ccp, it will incorrectly
    activate causing all requests to fail. Fixed by preventing ccp
    from loading if hardware isn't available.

    - not all IRQs were enabled for the qat driver, leading to potential
    stalls when it is used

    - disabled buggy AVX CTR implementation in aesni"

    * git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
    crypto: aesni - disable "by8" AVX CTR optimization
    crypto: ccp - Check for CCP before registering crypto algs
    crypto: qat - Enable all 32 IRQs

    Linus Torvalds
     

24 Sep, 2014

4 commits

  • The "by8" implementation introduced in commit 22cddcc7df8f ("crypto: aes
    - AES CTR x86_64 "by8" AVX optimization") is failing crypto tests as it
    handles counter block overflows differently. It only accounts the right
    most 32 bit as a counter -- not the whole block as all other
    implementations do. This makes it fail the cryptomgr test #4 that
    specifically tests this corner case.

    As we're quite late in the release cycle, just disable the "by8" variant
    for now.

    Reported-by: Romain Francoise
    Signed-off-by: Mathias Krause
    Cc: Chandramouli Narayanan
    Signed-off-by: Herbert Xu

    Mathias Krause
     
  • Pull parisc fixes from Helge Deller:
    "We avoid using -mfast-indirect-calls for 64bit kernel builds to
    prevent building an unbootable kernel due to latest gcc changes.

    In the pdc_stable/firmware-access driver we fix a few possible stack
    overflows and we now call secure_computing_strict() instead of
    secure_computing() which fixes upcoming SECCOMP patches in the
    for-next trees"

    * 'parisc-3.17-7' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Only use -mfast-indirect-calls option for 32-bit kernel builds
    parisc: pdc_stable.c: Avoid potential stack overflows
    parisc: pdc_stable.c: Cleaning up unnecessary use of memset in conjunction with strncpy
    parisc: ptrace: use secure_computing_strict()

    Linus Torvalds
     
  • In spite of what the GCC manual says, the -mfast-indirect-calls has
    never been supported in the 64-bit parisc compiler. Indirect calls have
    always been done using function descriptors irrespective of the
    -mfast-indirect-calls option.

    Recently, it was noticed that a function descriptor was always requested
    when the -mfast-indirect-calls option was specified. This caused
    problems when the option was used in application code and doesn't make
    any sense because the whole point of the option is to avoid using a
    function descriptor for indirect calls.

    Fixing this broke 64-bit kernel builds.

    I will fix GCC but for now we need the attached change. This results in
    the same kernel code as before.

    Signed-off-by: John David Anglin
    Cc: stable@vger.kernel.org # v3.0+
    Signed-off-by: Helge Deller

    John David Anglin
     
  • Prompted by a change to drivers/scsi/Kconfig which used to do a
    "select NET" but now does a "depends on NET". This meant that some
    configurations ended up without CONFIG_NET=y

    Signed-off-by Tony Luck

    Tony Luck
     

23 Sep, 2014

3 commits

  • This reverts commit 9cb0e394234d244fe5a97e743ec9dd7ddff7e64b.

    It causes my Sony Vaio Pro 11 to immediately reboot at startup.

    Acked-by: Ingo Molnar
    Cc: Peter Anvin
    Cc: Maarten Lankhorst
    Cc: Ard Biesheuvel
    Cc: Matt Fleming
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) If the user gives us a msg_namelen of 0, don't try to interpret
    anything pointed to by msg_name. From Ani Sinha.

    2) Fix some bnx2i/bnx2fc randconfig compilation errors.

    The gist of the issue is that we firstly have drivers that span both
    SCSI and networking. And at the top of that chain of dependencies
    we have things like SCSI_FC_ATTRS and SCSI_NETLINK which are
    selected.

    But since select is a sledgehammer and ignores dependencies,
    everything to select's SCSI_FC_ATTRS and/or SCSI_NETLINK has to also
    explicitly select their dependencies and so on and so forth.

    Generally speaking 'select' is supposed to only be used for child
    nodes, those which have no dependencies of their own. And this
    whole chain of dependencies in the scsi layer violates that rather
    strongly.

    So just make SCSI_NETLINK depend upon it's dependencies, and so on
    and so forth for the things selecting it (either directly or
    indirectly).

    From Anish Bhatt and Randy Dunlap.

    3) Fix generation of blackhole routes in IPSEC, from Steffen Klassert.

    4) Actually notice netdev feature changes in rtl_open() code, from
    Hayes Wang.

    5) Fix divide by zero in bond enslaving, from Nikolay Aleksandrov.

    6) Missing memory barrier in sunvnet driver, from David Stevens.

    7) Don't leave anycast addresses around when ipv6 interface is
    destroyed, from Sabrina Dubroca.

    8) Don't call efx_{arch}_filter_sync_rx_mode before addr_list_lock is
    initialized in SFC driver, from Edward Cree.

    9) Fix missing DMA error checking in 3c59x, from Neal Horman.

    10) Openvswitch doesn't emit OVS_FLOW_CMD_NEW notifications accidently,
    fix from Samuel Gauthier.

    11) pch_gbe needs to select NET_PTP_CLASSIFY otherwise we can get a
    build error.

    12) Fix macvlan regression wherein we stopped emitting
    broadcast/multicast frames over software devices. From Nicolas
    Dichtel.

    13) Fix infiniband bug due to unintended overflow of skb->cb[], from
    Eric Dumazet. And add an assertion so this doesn't happen again.

    14) dm9000_parse_dt() should return error pointers, not NULL. From
    Tobias Klauser.

    15) IP tunneling code uses this_cpu_ptr() in preemptible contexts, fix
    from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (87 commits)
    net: bcmgenet: call bcmgenet_dma_teardown in bcmgenet_fini_dma
    net: bcmgenet: fix TX reclaim accounting for fragments
    ipv4: do not use this_cpu_ptr() in preemptible context
    dm9000: Return an ERR_PTR() in all error conditions of dm9000_parse_dt()
    r8169: fix an if condition
    r8152: disable ALDPS
    ipoib: validate struct ipoib_cb size
    net: sched: shrink struct qdisc_skb_cb to 28 bytes
    tg3: Work around HW/FW limitations with vlan encapsulated frames
    macvlan: allow to enqueue broadcast pkt on virtual device
    pch_gbe: 'select' NET_PTP_CLASSIFY.
    scsi: Use 'depends' with LIBFC instead of 'select'.
    openvswitch: restore OVS_FLOW_CMD_NEW notifications
    genetlink: add function genl_has_listeners()
    lib: rhashtable: remove second linux/log2.h inclusion
    net: allow macvlans to move to net namespace
    3c59x: Fix bad offset spec in skb_frag_dma_map
    3c59x: Add dma error checking and recovery
    sparc: bpf_jit: fix support for ldx/stx mem and SKF_AD_VLAN_TAG
    can: at91_can: add missing prepare and unprepare of the clock
    ...

    Linus Torvalds
     
  • Pull KVM fixes from Paolo Bonzini:
    "Two very simple bugfixes, affecting all supported architectures"

    [ Two? There's three commits in here. Oh well, I guess Paolo didn't
    count the preparatory symbol export ]

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: correct null pid check in kvm_vcpu_yield_to()
    KVM: check for !is_zero_pfn() in kvm_is_mmio_pfn()
    mm: export symbol dependencies of is_zero_pfn()

    Linus Torvalds
     

22 Sep, 2014

2 commits

  • Pull ARM fixes from Russell King:
    "Fixes for ARM, the most notable being the fix from Nathan Lynch to fix
    the state of various registers during execve, to ensure that data
    can't be leaked between two executables.

    Fixes from Victor Kamensky for get_user() on big endian platforms,
    since the addition of 8-byte get_user() support broke these fairly
    badly.

    A fix from Sudeep Holla for affinity setting when hotplugging CPU 0.

    A fix from Stephen Boyd for a perf-induced sleep attempt while atomic.

    Lastly, a correctness fix for emulation of the SWP instruction on
    ARMv7+, and a fix for wrong carry handling when updating the
    translation table base address on LPAE platforms"

    * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
    ARM: 8149/1: perf: Don't sleep while atomic when enabling per-cpu interrupts
    ARM: 8148/1: flush TLS and thumbee register state during exec
    ARM: 8151/1: add missing exports for asm functions required by get_user macro
    ARM: 8137/1: fix get_user BE behavior for target variable with size of 8 bytes
    ARM: 8135/1: Fix in-correct barrier usage in SWP{B} emulation
    ARM: 8133/1: use irq_set_affinity with force=false when migrating irqs
    ARM: 8132/1: LPAE: drop wrong carry flag correction after adding TTBR1_OFFSET

    Linus Torvalds
     
  • Signed-off-by: Helge Deller

    Helge Deller
     

20 Sep, 2014

5 commits

  • fix several issues in sparc BPF JIT compiler.

    ldx/stx related:
    . classic BPF instructions that access mem[] slots were not setting
    SEEN_MEM flag, so stack wasn't allocated. Fix that by advertising
    correct flags

    . LDX/STX instructions were missing SEEN_XREG, so register value
    could have leaked to user space. Fix it.

    . since stack for mem[] slots is allocated with 'sub %sp' instead
    of 'save %sp', use %sp as base register instead of %fp.

    . ldx mem[0] means first slot in classic BPF which should have
    -4 offset instead of 0.

    . sparc64 needs 2047 stack bias as per ABI to access stack

    . emit_stmem() was using LD32I macro instead of ST32I

    SKF_AD_VLAN_TAG* related:
    . SKF_AD_VLAN_TAG_PRESENT must return 1 or 0 instead of '> 0' or 0
    as per classic BPF de facto standard

    . SKF_AD_VLAN_TAG needs to mask the field correctly

    Fixes: 2809a2087cc4 ("net: filter: Just In Time compiler for sparc")
    Signed-off-by: Alexei Starovoitov
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • Pull PCI fixes from Bjorn Helgaas:
    "These fix:

    - Boot video device detection on dual-GPU Apple systems
    - Hotplug fiascos on VGA switcheroo with radeon & nouveau drivers
    - Boot hang on Freescale i.MX6 systems
    - Excessive "no hotplug settings from platform" warnings

    In particular:

    Enumeration
    - Don't default exclusively to first video device (Bruno Prémont)

    PCI device hotplug
    - Remove "no hotplug settings from platform" warning (Bjorn Helgaas)
    - Add pci_ignore_hotplug() for VGA switcheroo (Bjorn Helgaas)

    Freescale i.MX6
    - Put LTSSM in "Detect" state before disabling (Lucas Stach)"

    * tag 'pci-v3.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    vgaarb: Drop obsolete #ifndef
    vgaarb: Don't default exclusively to first video device with mem+io
    ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug()
    PCI: Remove "no hotplug settings from platform" warning
    PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device
    PCI: imx6: Put LTSSM in "Detect" state before disabling it
    MAINTAINERS: Add Lucas Stach as co-maintainer for i.MX6 PCI driver

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Two kernel side fixes: a kprobes fix and a perf_remove_from_context()
    fix (which does not yet fix the migration bug which is WIP)"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf: Fix a race condition in perf_remove_from_context()
    kprobes/x86: Free 'optinsn' cache when range check fails

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "Misc fixes:

    EFI fixes, a build fix, a page table dumping (debug) fix and a clang
    build fix"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi/arm64: Fix fdt-related memory reservation
    x86/mm: Apply the section attribute to the variable, not its type
    x86/efi: Fixup GOT in all boot code paths
    x86/efi: Only load initrd above 4g on second try
    x86-64, ptdump: Mark espfix area only if existent
    x86, irq: Fix build error caused by 9eabc99a635a77cbf09

    Linus Torvalds
     
  • Pull MIPS fixes from Ralf Baechle:
    "A fair number of build fixes for various configurations.

    Fixes to BPF, and the BCM47xx platform code, a preemption fix for the
    Loongson core, a syscall auditing fix, wire up the new getrandom and
    memfd_create. Several patches for EVA"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (30 commits)
    MIPS: SmartMIPS: Disable assembler warnings
    MIPS: Move CPU topology macros to topology.h
    MIPS: Wire up new syscalls getrandom and memfd_create.
    MIPS: Fix a warning for virt_to_page
    arch/mips/net/bpf_jit.c: fix failure check
    MIPS: COP2: CPP macro safety fixes.
    MIPS: Kconfig: Select SMP symbols for CMP
    MIPS: ZBOOT: add missing include
    MIPS: IP28: Fix/clean spaces.h
    MIPS: IP28: Select correct L1_CACHE_SHIFT
    MIPS: BCM63xx: delete double assignment
    MIPS: Spelling s/confugrations/configurations/
    MIPS: OCTEON: make get_system_type() thread-safe
    MIPS: CPS: Initialize EVA before bringing up VPEs from secondary cores
    MIPS: Malta: EVA: Rename 'eva_entry' to 'platform_eva_init'
    MIPS: EVA: Add new EVA header
    MIPS: scall64-o32: Fix indirect syscall detection
    MIPS: syscall: Fix AUDIT value for O32 processes on MIPS64
    MIPS: Loongson: Fix COP2 usage for preemptible kernel
    MIPS: NL: Fix nlm_xlp_defconfig build error
    ...

    Linus Torvalds
     

17 Sep, 2014

2 commits

  • The kernel code overrides the default ISA as passed by the compiler
    in quite a few places. This has unfortunate side effects when smartmips
    is enabled leading to hundreds of warnings during build such as:

    {standard input}: Assembler messages:
    {standard input}:411: Warning: the `smartmips' extension requires MIPS32
    revision 1 or greater
    {standard input}: Assembler messages:
    {standard input}:43: Warning: the 64-bit MIPS architecture does not support the
    `smartmips' extension
    [...]

    Until the kernel code is fixed properly (if possible), disable all the
    assembler warning messages to make the build logs readable again.
    This has no runtime side effects but it makes it easier to spot
    more critical warnings and problems during build.

    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/7356/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • Commit 20cde694027e ("x86, ia64: Move EFI_FB vga_default_device()
    initialization to pci_vga_fixup()") moved boot video device detection from
    efifb to x86 and ia64 pci/fixup.c.

    For dual-GPU Apple computers above change represents a regression as code
    in efifb did forcefully override vga_default_device while the merge did not
    (vgaarb happens prior to PCI fixup).

    To improve on initial device selection by vgaarb (it cannot know if PCI
    device not behind bridges see/decode legacy VGA I/O or not), move the
    screen_info based check from pci_video_fixup() to vgaarb's init function and
    use it to refine/override decision taken while adding the individual PCI
    VGA devices. This way PCI fixup has no reason to adjust vga_default_device
    anymore but can depend on its value for flagging shadowed VBIOS.

    This has the nice benefit of removing duplicated code but does introduce a
    #if defined() block in vgaarb. Not all architectures have screen_info and
    would cause compile to fail without it.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=84461
    Reported-and-Tested-By: Andreas Noever
    Signed-off-by: Bruno Prémont
    Signed-off-by: Bjorn Helgaas
    CC: Matthew Garrett
    CC: stable@vger.kernel.org # v3.5+

    Bruno Prémont
     

16 Sep, 2014

4 commits

  • Rob Clark reports a sleeping while atomic bug when using perf.

    BUG: sleeping function called from invalid context at ../kernel/locking/mutex.c:583
    in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
    ------------[ cut here ]------------
    WARNING: CPU: 2 PID: 4828 at ../kernel/locking/mutex.c:479 mutex_lock_nested+0x3a0/0x3e8()
    DEBUG_LOCKS_WARN_ON(in_interrupt())
    Modules linked in:
    CPU: 2 PID: 4828 Comm: Xorg.bin Tainted: G W 3.17.0-rc3-00234-gd535c45-dirty #819
    [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
    [] (show_stack) from [] (dump_stack+0x98/0xb8)
    [] (dump_stack) from [] (warn_slowpath_common+0x70/0x8c)
    [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40)
    [] (warn_slowpath_fmt) from [] (mutex_lock_nested+0x3a0/0x3e8)
    [] (mutex_lock_nested) from [] (irq_find_host+0x20/0x9c)
    [] (irq_find_host) from [] (of_irq_get+0x28/0x48)
    [] (of_irq_get) from [] (platform_get_irq+0x1c/0x8c)
    [] (platform_get_irq) from [] (cpu_pmu_enable_percpu_irq+0x14/0x38)
    [] (cpu_pmu_enable_percpu_irq) from [] (flush_smp_call_function_queue+0x88/0x178)
    [] (flush_smp_call_function_queue) from [] (handle_IPI+0x88/0x160)
    [] (handle_IPI) from [] (gic_handle_irq+0x64/0x68)
    [] (gic_handle_irq) from [] (__irq_svc+0x44/0x5c)
    Exception stack(0xe63ddea0 to 0xe63ddee8)
    dea0: 00000001 00000001 00000000 c2f3b200 c16db380 c032d4a0 e63ddf40 60010013
    dec0: 00000000 001fbfd4 00000100 00000000 00000001 e63ddee8 c0284770 c02a2e30
    dee0: 20010013 ffffffff
    [] (__irq_svc) from [] (ktime_get_ts64+0x1c8/0x200)
    [] (ktime_get_ts64) from [] (poll_select_set_timeout+0x60/0xa8)
    [] (poll_select_set_timeout) from [] (SyS_select+0xa8/0x118)
    [] (SyS_select) from [] (ret_fast_syscall+0x0/0x48)
    ---[ end trace 0bb583b46342da6f ]---
    INFO: lockdep is turned off.

    We don't really need to get the platform irq again when we're
    enabling or disabling the per-cpu irq. Furthermore, we don't
    really need to set and clear bits in the active_irqs bitmask
    because that's only used in the non-percpu irq case to figure out
    when the last CPU PMU has been disabled. Just pass the irq
    directly to the enable/disable functions to clean all this up.
    This should be slightly more efficient and also fix the
    scheduling while atomic bug.

    Fixes: bbd64559376f "ARM: perf: support percpu irqs for the CPU PMU"

    Reported-by: Rob Clark
    Acked-by: Will Deacon
    Cc: stable@vger.kernel.org
    Signed-off-by: Stephen Boyd
    Signed-off-by: Russell King

    Stephen Boyd
     
  • The TPIDRURO and TPIDRURW registers need to be flushed during exec;
    otherwise TLS information is potentially leaked. TPIDRURO in
    particular needs careful treatment. Since flush_thread basically
    needs the same code used to set the TLS in arm_syscall, pull that into
    a common set_tls helper in tls.h and use it in both places.

    Similarly, TEEHBR needs to be cleared during exec as well. Clearing
    its save slot in thread_info isn't right as there is no guarantee
    that a thread switch will occur before the new program runs. Just
    setting the register directly is sufficient.

    Signed-off-by: Nathan Lynch
    Acked-by: Will Deacon
    Cc:
    Signed-off-by: Russell King

    Nathan Lynch
     
  • Previous commits that dealt with get_user for 64bit type missed to
    export proper functions, so if get_user macro with particular target/value
    types are used by kernel module modpost would produce 'undefined!' error.
    Solution is to export all required functions.

    Signed-off-by: Victor Kamensky
    Signed-off-by: Russell King

    Victor Kamensky
     
  • Cut & paste typo from the line above.

    Reported-by: Ben Hutchings
    Signed-off-by: Tony Luck
    Signed-off-by: Linus Torvalds

    Tony Luck
     

15 Sep, 2014

1 commit

  • Pull parisc updates from Helge Deller:
    "The most important patch is a new Light Weigth Syscall (LWS) for 8,
    16, 32 and 64 bit atomic CAS operations which is required in order to
    be able to implement the atomic gcc builtins on our platform.

    Other than that, we wire up the seccomp, getrandom and memfd_create
    syscalls, fixes a minor off-by-one bug and a wrong printk string"

    * 'parisc-3.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Implement new LWS CAS supporting 64 bit operations.
    parisc: Wire up seccomp, getrandom and memfd_create syscalls
    parisc: dino: fix %d confusingly prefixed with 0x in format string
    parisc: sys_hpux: NUL terminator is one past the end

    Linus Torvalds
     

14 Sep, 2014

3 commits

  • In order to make the static inline function is_zero_pfn() callable by
    modules, export its symbol dependencies 'zero_pfn' and (for s390 and
    mips) 'zero_page_mask'.

    We need this for KVM, as CONFIG_KVM is a tristate for all supported
    architectures except ARM and arm64, and testing a pfn whether it refers
    to the zero page is required to correctly distinguish the zero page
    from other special RAM ranges that may also have the PG_reserved bit
    set, but need to be treated as MMIO memory.

    Signed-off-by: Ard Biesheuvel
    Acked-by: Andrew Morton
    Signed-off-by: Paolo Bonzini

    Ard Biesheuvel
     
  • The current LWS cas only works correctly for 32bit. The new LWS allows
    for CAS operations of variable size.

    Signed-off-by: Guy Martin
    Cc: # 3.13+
    Signed-off-by: Helge Deller

    Guy Martin
     
  • It used to be an ad-hoc hack defined by the x86 version of
    that enabled a couple of library routines to know whether
    an integer multiply is faster than repeated shifts and additions.

    This just makes it use the real Kconfig system instead, and makes x86
    (which was the only architecture that did this) select the option.

    NOTE! Even for x86, this really is kind of wrong. If we cared, we would
    probably not enable this for builds optimized for netburst (P4), where
    shifts-and-adds are generally faster than multiplies. This patch does
    *not* change that kind of logic, though, it is purely a syntactic change
    with no code changes.

    This was triggered by the fact that we have other places that really
    want to know "do I want to expand multiples by constants by hand or
    not", particularly the hash generation code.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

13 Sep, 2014

4 commits

  • …linux/kernel/git/xen/tip

    Pull Xen ARM bugfix from Stefano Stabellini:
    "The patches fix the "xen_add_mach_to_phys_entry: cannot add" bug that
    has been affecting xen on arm and arm64 guests since 3.16. They
    require a few hypervisor side changes that just went in xen-unstable.

    A couple of days ago David sent out a pull request with a few other
    Xen fixes (it is already in master). Sorry we didn't synchronized
    better among us"

    * tag 'stable/for-linus-3.17-b-rc4-arm-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen/arm: remove mach_to_phys rbtree
    xen/arm: reimplement xen_dma_unmap_page & friends
    xen/arm: introduce XENFEAT_grant_map_identity

    Linus Torvalds
     
  • Pull arm64 fixes from Will Deacon:
    "Just a couple of stragglers here:

    - fix an issue migrating interrupts on CPU hotplug
    - fix a potential information leak of TLS registers across an exec
    (Nathan has sent a corresponding patch for arch/arm/ to rmk)"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: flush TLS registers during exec
    arm64: use irq_set_affinity with force=false when migrating irqs

    Linus Torvalds
     
  • e38361d 'ARM: 8091/2: add get_user() support for 8 byte types' commit
    broke V7 BE get_user call when target var size is 64 bit, but '*ptr' size
    is 32 bit or smaller. e38361d changed type of __r2 from 'register
    unsigned long' to 'register typeof(x) __r2 asm("r2")' i.e before the change
    even when target variable size was 64 bit, __r2 was still 32 bit.
    But after e38361d commit, for target var of 64 bit size, __r2 became 64
    bit and now it should occupy 2 registers r2, and r3. The issue in BE case
    that r3 register is least significant word of __r2 and r2 register is most
    significant word of __r2. But __get_user_4 still copies result into r2 (most
    significant word of __r2). Subsequent code copies from __r2 into x, but
    for situation described it will pick up only garbage from r3 register.

    Special __get_user_64t_(124) functions are introduced. They are similar to
    corresponding __get_user_(124) function but result stored in r3 register
    (lsw in case of 64 bit __r2 in BE image). Those function are used by
    get_user macro in case of BE and target var size is 64bit.

    Also changed __get_user_lo8 name into __get_user_32t_8 to get consistent
    naming accross all cases.

    Signed-off-by: Victor Kamensky
    Suggested-by: Daniel Thompson
    Reviewed-by: Daniel Thompson
    Signed-off-by: Russell King

    Victor Kamensky
     
  • According to the ARM ARMv7, explicit barriers are necessary when using
    synchronisation primitives such as SWP{B}. The use of these
    instructions does not automatically imply a barrier and any ordering
    requirements by the software must be explicitly expressed with the use
    of suitable barriers.

    Based on this, remove the barriers from SWP{B} emulation.

    Acked-by: Will Deacon
    Signed-off-by: Punit Agrawal
    Signed-off-by: Russell King

    Punit Agrawal