22 Sep, 2015

2 commits

  • commit 77d6273e79e3a86552fcf10cdd31a69b46ed2ce6 upstream.

    call12 can't be safely used as the first call in the inline function,
    because the compiler does not extend the stack frame of the bounding
    function accordingly, which may result in corruption of local variables.

    If a call needs to be done, do call8 first followed by call12.

    For pure assembly code in _switch_to increase stack frame size of the
    bounding function.

    Signed-off-by: Max Filippov
    Signed-off-by: Greg Kroah-Hartman

    Max Filippov
     
  • commit 4229fb12a03e5da5882b420b0aa4a02e77447b86 upstream.

    Userspace return code may skip restoring THREADPTR register if there are
    no registers that need to be zeroed. This leads to spurious failures in
    libc NPTL tests.

    Always restore THREADPTR on return to userspace.

    Signed-off-by: Max Filippov
    Signed-off-by: Greg Kroah-Hartman

    Max Filippov
     

26 May, 2015

1 commit

  • xtensa:allmodconfig fails to build with the following errors.

    drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
    In function ‘gk20a_instobj_dtor_dma’:
    drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:154:2: error:
    implicit declaration of function ‘dma_free_attrs’
    drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:
    In function ‘gk20a_instobj_ctor_dma’:
    drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c:218:2: error:
    implicit declaration of function ‘dma_alloc_attrs’

    Xtensa does not provide those functions at this time.
    Provide dummy implementations to avoid build errors.

    Acked-by: Max Filippov
    Signed-off-by: Guenter Roeck
    Signed-off-by: Chris Zankel

    Guenter Roeck
     

18 Apr, 2015

1 commit

  • Pull Xtensa updates from Chris Zankel:

    - fix linker script transformation for .text / .text.fixup

    - wire bpf and execveat syscalls

    - provide __NR_sync_file_range2 instead of __NR_sync_file_range, as
    that's what xtensa uses.

    - make xtfpgs LCD driver functional and configurable. This fixes
    hardware lockup on KC705/ML605 boot

    - add audio subsystem bits to xtfpga DTS and provide sample KC705
    config with audio features enabled

    - add CY7C67300 USB controller support to XTFPGA

    - fix locking issues in ISS network driver

    - document PIC and MX interrupt distributor device tree bindings

    * tag 'xtensa-20150416' of git://github.com/czankel/xtensa-linux:
    xtensa: xtfpga: add CY7C67300 USB controller support
    irqchip: xtensa-pic: xtensa-mx: document DT bindings
    xtensa: ISS: fix locking in TAP network adapter
    xtensa: Fix fix linker script transformation for .text / .text.fixup
    xtensa: provide __NR_sync_file_range2 instead of __NR_sync_file_range
    xtensa: wire bpf and execveat syscalls
    xtensa: xtfpga: fix hardware lockup caused by LCD driver
    xtensa: xtfpga: provide defconfig with audio subsystem
    xtensa: xtfpga: add audio card to xtfpga DTS

    Linus Torvalds
     

16 Apr, 2015

1 commit

  • Pull exec domain removal from Richard Weinberger:
    "This series removes execution domain support from Linux.

    The idea behind exec domains was to support different ABIs. The
    feature was never complete nor stable. Let's rip it out and make the
    kernel signal handling code less complicated"

    * 'exec_domain_rip_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (27 commits)
    arm64: Removed unused variable
    sparc: Fix execution domain removal
    Remove rest of exec domains.
    arch: Remove exec_domain from remaining archs
    arc: Remove signal translation and exec_domain
    xtensa: Remove signal translation and exec_domain
    xtensa: Autogenerate offsets in struct thread_info
    x86: Remove signal translation and exec_domain
    unicore32: Remove signal translation and exec_domain
    um: Remove signal translation and exec_domain
    tile: Remove signal translation and exec_domain
    sparc: Remove signal translation and exec_domain
    sh: Remove signal translation and exec_domain
    s390: Remove signal translation and exec_domain
    mn10300: Remove signal translation and exec_domain
    microblaze: Remove signal translation and exec_domain
    m68k: Remove signal translation and exec_domain
    m32r: Remove signal translation and exec_domain
    m32r: Autogenerate offsets in struct thread_info
    frv: Remove signal translation and exec_domain
    ...

    Linus Torvalds
     

15 Apr, 2015

1 commit

  • Pull vfs update from Al Viro:
    "Part one:

    - struct filename-related cleanups

    - saner iov_iter_init() replacements (and switching the syscalls to
    use of those)

    - ntfs switch to ->write_iter() (Anton)

    - aio cleanups and splitting iocb into common and async parts
    (Christoph)

    - assorted fixes (me, bfields, Andrew Elble)

    There's a lot more, including the completion of switchover to
    ->{read,write}_iter(), d_inode/d_backing_inode annotations, f_flags
    race fixes, etc, but that goes after #for-davem merge. David has
    pulled it, and once it's in I'll send the next vfs pull request"

    * 'for-linus-1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (35 commits)
    sg_start_req(): use import_iovec()
    sg_start_req(): make sure that there's not too many elements in iovec
    blk_rq_map_user(): use import_single_range()
    sg_io(): use import_iovec()
    process_vm_access: switch to {compat_,}import_iovec()
    switch keyctl_instantiate_key_common() to iov_iter
    switch {compat_,}do_readv_writev() to {compat_,}import_iovec()
    aio_setup_vectored_rw(): switch to {compat_,}import_iovec()
    vmsplice_to_user(): switch to import_iovec()
    kill aio_setup_single_vector()
    aio: simplify arguments of aio_setup_..._rw()
    aio: lift iov_iter_init() into aio_setup_..._rw()
    lift iov_iter into {compat_,}do_readv_writev()
    NFS: fix BUG() crash in notify_change() with patch to chown_common()
    dcache: return -ESTALE not -EBUSY on distributed fs race
    NTFS: Version 2.1.32 - Update file write from aio_write to write_iter.
    VFS: Add iov_iter_fault_in_multipages_readable()
    drop bogus check in file_open_root()
    switch security_inode_getattr() to struct path *
    constify tomoyo_realpath_from_path()
    ...

    Linus Torvalds
     

14 Apr, 2015

2 commits


13 Apr, 2015

4 commits


12 Apr, 2015

1 commit


10 Apr, 2015

1 commit

  • Commit 779c88c94c34 ("ARM: 8321/1: asm-generic: introduce .text.fixup
    input section") introduced a new .text.fixup section which is merged
    with .text at link time. This causes xtensa builds to fail with lots
    of error messages similar to the following.

    lib/lib.a(kobject.o): In function `kobject_create':
    (.text+0x498): dangerous relocation: l32r: literal placed after use:
    (.literal+0x150)

    Linker script transformation needs to be updated to detect and handle
    the new section.

    Fixes: 779c88c94c34 ("ARM: 8321/1: asm-generic: introduce .text.fixup
    input section")
    Cc: Ard Biesheuvel
    Cc: Arnd Bergmann
    Signed-off-by: Guenter Roeck
    Signed-off-by: Chris Zankel

    Guenter Roeck
     

19 Mar, 2015

1 commit

  • Previously, pci_scan_root_bus() created a root PCI bus, enumerated the
    devices on it, and called pci_bus_add_devices(), which made the devices
    available for drivers to claim them.

    Most callers assigned resources to devices after pci_scan_root_bus()
    returns, which may be after drivers have claimed the devices. This is
    incorrect; the PCI core should not change device resources while a driver
    is managing the device.

    Remove pci_bus_add_devices() from pci_scan_root_bus() and do it after any
    resource assignment in the callers.

    Note that ARM's pci_common_init_dev() already called pci_bus_add_devices()
    after pci_scan_root_bus(), so we only need to remove the first call:

    pci_common_init_dev
    pcibios_init_hw
    pci_scan_root_bus
    pci_bus_add_devices # first call
    pci_bus_assign_resources
    pci_bus_add_devices # second call

    [bhelgaas: changelog, drop "root_bus" var in alpha common_init_pci(),
    return failure earlier in mn10300, add "return" in x86 pcibios_scan_root(),
    return early if xtensa platform_pcibios_fixup() fails]
    Signed-off-by: Yijing Wang
    Signed-off-by: Bjorn Helgaas
    CC: Richard Henderson
    CC: Ivan Kokshaysky
    CC: Matt Turner
    CC: David Howells
    CC: Tony Luck
    CC: Michal Simek
    CC: Ralf Baechle
    CC: Koichi Yasutake
    CC: Sebastian Ott
    CC: "David S. Miller"
    CC: Chris Metcalf
    CC: Chris Zankel
    CC: Max Filippov
    CC: Thomas Gleixner

    Yijing Wang
     

13 Mar, 2015

1 commit


04 Mar, 2015

2 commits


27 Feb, 2015

1 commit

  • LCD driver is always built for the XTFPGA platform, but its base address
    is not configurable, and is wrong for ML605/KC705. Its initialization
    locks up KC705 board hardware.

    Make the whole driver optional, and its base address and bus width
    configurable. Implement 4-bit bus access method.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     

19 Feb, 2015

1 commit

  • Pull asm-generic uaccess.h cleanup from Arnd Bergmann:
    "Like in 3.19, I once more have a multi-stage cleanup for one
    asm-generic header file, this time the work was done by Michael
    Tsirkin and cleans up the uaccess.h file in asm-generic, as well as
    all architectures for which the respective maintainers did not pick up
    his patches directly"

    * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (37 commits)
    sparc32: nocheck uaccess coding style tweaks
    sparc64: nocheck uaccess coding style tweaks
    xtensa: macro whitespace fixes
    sh: macro whitespace fixes
    parisc: macro whitespace fixes
    m68k: macro whitespace fixes
    m32r: macro whitespace fixes
    frv: macro whitespace fixes
    cris: macro whitespace fixes
    avr32: macro whitespace fixes
    arm64: macro whitespace fixes
    arm: macro whitespace fixes
    alpha: macro whitespace fixes
    blackfin: macro whitespace fixes
    sparc64: uaccess_64 macro whitespace fixes
    sparc32: uaccess_32 macro whitespace fixes
    avr32: whitespace fix
    sh: fix put_user sparse errors
    metag: fix put_user sparse errors
    ia64: fix put_user sparse errors
    ...

    Linus Torvalds
     

14 Feb, 2015

1 commit

  • printk and friends can now format bitmaps using '%*pb[l]'. cpumask
    and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
    respectively which can be used to generate the two printf arguments
    necessary to format the specified cpu/nodemask.

    Signed-off-by: Tejun Heo
    Cc: Chris Zankel
    Cc: Max Filippov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

13 Feb, 2015

1 commit

  • If an attacker can cause a controlled kernel stack overflow, overwriting
    the restart block is a very juicy exploit target. This is because the
    restart_block is held in the same memory allocation as the kernel stack.

    Moving the restart block to struct task_struct prevents this exploit by
    making the restart_block harder to locate.

    Note that there are other fields in thread_info that are also easy
    targets, at least on some architectures.

    It's also a decent simplification, since the restart code is more or less
    identical on all architectures.

    [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
    Signed-off-by: Andy Lutomirski
    Cc: Thomas Gleixner
    Cc: Al Viro
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Kees Cook
    Cc: David Miller
    Acked-by: Richard Weinberger
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Matt Turner
    Cc: Vineet Gupta
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Steven Miao
    Cc: Mark Salter
    Cc: Aurelien Jacquiot
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: David Howells
    Cc: Richard Kuo
    Cc: "Luck, Tony"
    Cc: Geert Uytterhoeven
    Cc: Michal Simek
    Cc: Ralf Baechle
    Cc: Jonas Bonn
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Acked-by: Michael Ellerman (powerpc)
    Tested-by: Michael Ellerman (powerpc)
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chen Liqin
    Cc: Lennox Wu
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Chris Zankel
    Cc: Max Filippov
    Cc: Oleg Nesterov
    Cc: Guenter Roeck
    Signed-off-by: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andy Lutomirski
     

12 Feb, 2015

1 commit

  • LKP has triggered a compiler warning after my recent patch "mm: account
    pmd page tables to the process":

    mm/mmap.c: In function 'exit_mmap':
    >> mm/mmap.c:2857:2: warning: right shift count >= width of type [enabled by default]

    The code:

    > 2857 WARN_ON(mm_nr_pmds(mm) >
    2858 round_up(FIRST_USER_ADDRESS, PUD_SIZE) >> PUD_SHIFT);

    In this, on tile, we have FIRST_USER_ADDRESS defined as 0. round_up() has
    the same type -- int. PUD_SHIFT.

    I think the best way to fix it is to define FIRST_USER_ADDRESS as unsigned
    long. On every arch for consistency.

    Signed-off-by: Kirill A. Shutemov
    Reported-by: Wu Fengguang
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     

11 Feb, 2015

1 commit


07 Feb, 2015

2 commits


30 Jan, 2015

1 commit

  • The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
    "you should SIGSEGV" error, because the SIGSEGV case was generally
    handled by the caller - usually the architecture fault handler.

    That results in lots of duplication - all the architecture fault
    handlers end up doing very similar "look up vma, check permissions, do
    retries etc" - but it generally works. However, there are cases where
    the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.

    In particular, when accessing the stack guard page, libsigsegv expects a
    SIGSEGV. And it usually got one, because the stack growth is handled by
    that duplicated architecture fault handler.

    However, when the generic VM layer started propagating the error return
    from the stack expansion in commit fee7e49d4514 ("mm: propagate error
    from stack expansion even for guard page"), that now exposed the
    existing VM_FAULT_SIGBUS result to user space. And user space really
    expected SIGSEGV, not SIGBUS.

    To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
    duplicate architecture fault handlers about it. They all already have
    the code to handle SIGSEGV, so it's about just tying that new return
    value to the existing code, but it's all a bit annoying.

    This is the mindless minimal patch to do this. A more extensive patch
    would be to try to gather up the mostly shared fault handling logic into
    one generic helper routine, and long-term we really should do that
    cleanup.

    Just from this patch, you can generally see that most architectures just
    copied (directly or indirectly) the old x86 way of doing things, but in
    the meantime that original x86 model has been improved to hold the VM
    semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
    "newer" things, so it would be a good idea to bring all those
    improvements to the generic case and teach other architectures about
    them too.

    Reported-and-tested-by: Takashi Iwai
    Tested-by: Jan Engelhardt
    Acked-by: Heiko Carstens # "s390 still compiles and boots"
    Cc: linux-arch@vger.kernel.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

13 Jan, 2015

1 commit

  • While working on arch/xtensa/include/asm/uaccess.h, I noticed
    that some macros within this header are made harder to read because they
    violate a coding style rule: space is missing after comma.

    Fix it up.

    Signed-off-by: Michael S. Tsirkin
    Acked-by: Max Filippov

    Michael S. Tsirkin
     

17 Dec, 2014

1 commit

  • Pull Xtensa fixes from Chris Zankel:
    - fix nommu support
    - remove s6000 variant and s6105 platform
    - fix permissions for kmapped pages so that copy_to_user_page works with them
    - add power management menu to Kconfig to allow use of runtime PM
    - disable linker optimizations because of a linker bug
    - fix sparse error

    * tag 'xtensa-next-20141215' of git://github.com/czankel/xtensa-linux:
    xtensa: disable link optimization
    xtensa/uaccess: fix sparse errors
    xtensa: fix kmap_prot definition
    xtensa: add power management menu to Kconfig
    xtensa: remove s6000 variant and s6105 platform
    xtensa: make PLATFORM_DEFAULT_MEM parameters configurable
    xtensa: nommu: clean up memory map dump
    xtensa: nommu: reserve memory below PLATFORM_DEFAULT_MEM_START
    xtensa: nommu: set up cache and atomctl in initialize_mmu
    xtensa: move vecbase SR initialization to _startup
    xtensa: nommu: fix uImage load address
    xtensa: nommu: fix load address definitions
    xtensa: nommu: fix Image.elf reset code and ld script
    xtensa: nommu: add MMU dependency to DEBUG_TLB_SANITY
    xtensa: nommu: don't build most of the cache flushing code
    xtensa: nommu: don't provide arch_get_unmapped_area
    xtensa: nommu: provide MAP_UNINITIALIZED definition
    xtensa: nommu: provide _PAGE_CHG_MASK definition
    xtensa: nommu: provide __invalidate_dcache_page_alias stub
    xtensa: nommu: move init_mmu stub to nommu_context.h

    Linus Torvalds
     

16 Dec, 2014

3 commits


12 Dec, 2014

1 commit

  • Pull networking updates from David Miller:

    1) New offloading infrastructure and example 'rocker' driver for
    offloading of switching and routing to hardware.

    This work was done by a large group of dedicated individuals, not
    limited to: Scott Feldman, Jiri Pirko, Thomas Graf, John Fastabend,
    Jamal Hadi Salim, Andy Gospodarek, Florian Fainelli, Roopa Prabhu

    2) Start making the networking operate on IOV iterators instead of
    modifying iov objects in-situ during transfers. Thanks to Al Viro
    and Herbert Xu.

    3) A set of new netlink interfaces for the TIPC stack, from Richard
    Alpe.

    4) Remove unnecessary looping during ipv6 routing lookups, from Martin
    KaFai Lau.

    5) Add PAUSE frame generation support to gianfar driver, from Matei
    Pavaluca.

    6) Allow for larger reordering levels in TCP, which are easily
    achievable in the real world right now, from Eric Dumazet.

    7) Add a variable of napi_schedule that doesn't need to disable cpu
    interrupts, from Eric Dumazet.

    8) Use a doubly linked list to optimize neigh_parms_release(), from
    Nicolas Dichtel.

    9) Various enhancements to the kernel BPF verifier, and allow eBPF
    programs to actually be attached to sockets. From Alexei
    Starovoitov.

    10) Support TSO/LSO in sunvnet driver, from David L Stevens.

    11) Allow controlling ECN usage via routing metrics, from Florian
    Westphal.

    12) Remote checksum offload, from Tom Herbert.

    13) Add split-header receive, BQL, and xmit_more support to amd-xgbe
    driver, from Thomas Lendacky.

    14) Add MPLS support to openvswitch, from Simon Horman.

    15) Support wildcard tunnel endpoints in ipv6 tunnels, from Steffen
    Klassert.

    16) Do gro flushes on a per-device basis using a timer, from Eric
    Dumazet. This tries to resolve the conflicting goals between the
    desired handling of bulk vs. RPC-like traffic.

    17) Allow userspace to ask for the CPU upon what a packet was
    received/steered, via SO_INCOMING_CPU. From Eric Dumazet.

    18) Limit GSO packets to half the current congestion window, from Eric
    Dumazet.

    19) Add a generic helper so that all drivers set their RSS keys in a
    consistent way, from Eric Dumazet.

    20) Add xmit_more support to enic driver, from Govindarajulu
    Varadarajan.

    21) Add VLAN packet scheduler action, from Jiri Pirko.

    22) Support configurable RSS hash functions via ethtool, from Eyal
    Perry.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1820 commits)
    Fix race condition between vxlan_sock_add and vxlan_sock_release
    net/macb: fix compilation warning for print_hex_dump() called with skb->mac_header
    net/mlx4: Add support for A0 steering
    net/mlx4: Refactor QUERY_PORT
    net/mlx4_core: Add explicit error message when rule doesn't meet configuration
    net/mlx4: Add A0 hybrid steering
    net/mlx4: Add mlx4_bitmap zone allocator
    net/mlx4: Add a check if there are too many reserved QPs
    net/mlx4: Change QP allocation scheme
    net/mlx4_core: Use tasklet for user-space CQ completion events
    net/mlx4_core: Mask out host side virtualization features for guests
    net/mlx4_en: Set csum level for encapsulated packets
    be2net: Export tunnel offloads only when a VxLAN tunnel is created
    gianfar: Fix dma check map error when DMA_API_DEBUG is enabled
    cxgb4/csiostor: Don't use MASTER_MUST for fw_hello call
    net: fec: only enable mdio interrupt before phy device link up
    net: fec: clear all interrupt events to support i.MX6SX
    net: fec: reset fep link status in suspend function
    net: sock: fix access via invalid file descriptor
    net: introduce helper macro for_each_cmsghdr
    ...

    Linus Torvalds
     

11 Dec, 2014

1 commit

  • As there are now no remaining users of arch_fast_hash(), lets kill
    it entirely.

    This basically reverts commit 71ae8aac3e19 ("lib: introduce arch
    optimized hash library") and follow-up work, that is f.e., commit
    237217546d44 ("lib: hash: follow-up fixups for arch hash"),
    commit e3fec2f74f7f ("lib: Add missing arch generic-y entries for
    asm-generic/hash.h") and last but not least commit 6a02652df511
    ("perf tools: Fix include for non x86 architectures").

    Cc: Francesco Fusco
    Cc: Thomas Graf
    Cc: Arnaldo Carvalho de Melo
    Signed-off-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

10 Dec, 2014

1 commit

  • Pull asm-generic asm/io.h rewrite from Arnd Bergmann:
    "While there normally is no reason to have a pull request for
    asm-generic but have all changes get merged through whichever tree
    needs them, I do have a series for 3.19.

    There are two sets of patches that change significant portions of
    asm/io.h, and this branch contains both in order to resolve the
    conflicts:

    - Will Deacon has done a set of patches to ensure that all
    architectures define {read,write}{b,w,l,q}_relaxed() functions or
    get them by including asm-generic/io.h.

    These functions are commonly used on ARM specific drivers to avoid
    expensive L2 cache synchronization implied by the normal
    {read,write}{b,w,l,q}, but we need to define them on all
    architectures in order to share the drivers across architectures
    and to enable CONFIG_COMPILE_TEST configurations for them

    - Thierry Reding has done an unrelated set of patches that extends
    the asm-generic/io.h file to the degree necessary to make it useful
    on ARM64 and potentially other architectures"

    * tag 'asm-generic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: (29 commits)
    ARM64: use GENERIC_PCI_IOMAP
    sparc: io: remove duplicate relaxed accessors on sparc32
    ARM: sa11x0: Use void __iomem * in MMIO accessors
    arm64: Use include/asm-generic/io.h
    ARM: Use include/asm-generic/io.h
    asm-generic/io.h: Implement generic {read,write}s*()
    asm-generic/io.h: Reconcile I/O accessor overrides
    /dev/mem: Use more consistent data types
    Change xlate_dev_{kmem,mem}_ptr() prototypes
    ARM: ixp4xx: Properly override I/O accessors
    ARM: ixp4xx: Fix build with IXP4XX_INDIRECT_PCI
    ARM: ebsa110: Properly override I/O accessors
    ARC: Remove redundant PCI_IOBASE declaration
    documentation: memory-barriers: clarify relaxed io accessor semantics
    x86: io: implement dummy relaxed accessor macros for writes
    tile: io: implement dummy relaxed accessor macros for writes
    sparc: io: implement dummy relaxed accessor macros for writes
    powerpc: io: implement dummy relaxed accessor macros for writes
    parisc: io: implement dummy relaxed accessor macros for writes
    mn10300: io: implement dummy relaxed accessor macros for writes
    ...

    Linus Torvalds
     

09 Dec, 2014

2 commits


06 Dec, 2014

1 commit

  • introduce new setsockopt() command:

    setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd, sizeof(prog_fd))

    where prog_fd was received from syscall bpf(BPF_PROG_LOAD, attr, ...)
    and attr->prog_type == BPF_PROG_TYPE_SOCKET_FILTER

    setsockopt() calls bpf_prog_get() which increments refcnt of the program,
    so it doesn't get unloaded while socket is using the program.

    The same eBPF program can be attached to multiple sockets.

    User task exit automatically closes socket which calls sk_filter_uncharge()
    which decrements refcnt of eBPF program

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

    Alexei Starovoitov
     

14 Nov, 2014

1 commit


12 Nov, 2014

1 commit

  • Alternative to RPS/RFS is to use hardware support for multiple
    queues.

    Then split a set of million of sockets into worker threads, each
    one using epoll() to manage events on its own socket pool.

    Ideally, we want one thread per RX/TX queue/cpu, but we have no way to
    know after accept() or connect() on which queue/cpu a socket is managed.

    We normally use one cpu per RX queue (IRQ smp_affinity being properly
    set), so remembering on socket structure which cpu delivered last packet
    is enough to solve the problem.

    After accept(), connect(), or even file descriptor passing around
    processes, applications can use :

    int cpu;
    socklen_t len = sizeof(cpu);

    getsockopt(fd, SOL_SOCKET, SO_INCOMING_CPU, &cpu, &len);

    And use this information to put the socket into the right silo
    for optimal performance, as all networking stack should run
    on the appropriate cpu, without need to send IPI (RPS/RFS).

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet