1. 03 May, 2017 13 commits
    • Daniel Borkmann's avatar
      xdp: use common helper for netlink extended ack reporting · 4d463c4d
      Daniel Borkmann authored
      Small follow-up to d74a32ac ("xdp: use netlink extended ACK reporting")
      in order to let drivers all use the same NL_SET_ERR_MSG_MOD() helper macro
      for reporting. This also ensures that we consistently add the driver's
      prefix for dumping the report in user space to indicate that the error
      message is driver specific and not coming from core code. Furthermore,
      NL_SET_ERR_MSG_MOD() now reuses NL_SET_ERR_MSG() and thus makes all macros
      check the pointer as suggested.
      
      References: https://www.spinics.net/lists/netdev/msg433267.htmlSigned-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Reviewed-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d463c4d
    • David Ahern's avatar
      net: ipv6: Do not duplicate DAD on link up · 6d717134
      David Ahern authored
      Andrey reported a warning triggered by the rcu code:
      
      ------------[ cut here ]------------
      WARNING: CPU: 1 PID: 5911 at lib/debugobjects.c:289
      debug_print_object+0x175/0x210
      ODEBUG: activate active (active state 1) object type: rcu_head hint:
              (null)
      Modules linked in:
      CPU: 1 PID: 5911 Comm: a.out Not tainted 4.11.0-rc8+ #271
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:16
       dump_stack+0x192/0x22d lib/dump_stack.c:52
       __warn+0x19f/0x1e0 kernel/panic.c:549
       warn_slowpath_fmt+0xe0/0x120 kernel/panic.c:564
       debug_print_object+0x175/0x210 lib/debugobjects.c:286
       debug_object_activate+0x574/0x7e0 lib/debugobjects.c:442
       debug_rcu_head_queue kernel/rcu/rcu.h:75
       __call_rcu.constprop.76+0xff/0x9c0 kernel/rcu/tree.c:3229
       call_rcu_sched+0x12/0x20 kernel/rcu/tree.c:3288
       rt6_rcu_free net/ipv6/ip6_fib.c:158
       rt6_release+0x1ea/0x290 net/ipv6/ip6_fib.c:188
       fib6_del_route net/ipv6/ip6_fib.c:1461
       fib6_del+0xa42/0xdc0 net/ipv6/ip6_fib.c:1500
       __ip6_del_rt+0x100/0x160 net/ipv6/route.c:2174
       ip6_del_rt+0x140/0x1b0 net/ipv6/route.c:2187
       __ipv6_ifa_notify+0x269/0x780 net/ipv6/addrconf.c:5520
       addrconf_ifdown+0xe60/0x1a20 net/ipv6/addrconf.c:3672
      ...
      
      Andrey's reproducer program runs in a very tight loop, calling
      'unshare -n' and then spawning 2 sets of 14 threads running random ioctl
      calls. The relevant networking sequence:
      
      1. New network namespace created via unshare -n
      - ip6tnl0 device is created in down state
      
      2. address added to ip6tnl0
      - equivalent to ip -6 addr add dev ip6tnl0 fd00::bb/1
      - DAD is started on the address and when it completes the host
        route is inserted into the FIB
      
      3. ip6tnl0 is brought up
      - the new fixup_permanent_addr function restarts DAD on the address
      
      4. exit namespace
      - teardown / cleanup sequence starts
      - once in a blue moon, lo teardown appears to happen BEFORE teardown
        of ip6tunl0
        + down on 'lo' removes the host route from the FIB since the dst->dev
          for the route is loobback
        + host route added to rcu callback list
          * rcu callback has not run yet, so rt is NOT on the gc list so it has
            NOT been marked obsolete
      
      5. in parallel to 4. worker_thread runs addrconf_dad_completed
      - DAD on the address on ip6tnl0 completes
      - calls ipv6_ifa_notify which inserts the host route
      
      All of that happens very quickly. The result is that a host route that
      has been deleted from the IPv6 FIB and added to the RCU list is re-inserted
      into the FIB.
      
      The exit namespace eventually gets to cleaning up ip6tnl0 which removes the
      host route from the FIB again, calls the rcu function for cleanup -- and
      triggers the double rcu trace.
      
      The root cause is duplicate DAD on the address -- steps 2 and 3. Arguably,
      DAD should not be started in step 2. The interface is in the down state,
      so it can not really send out requests for the address which makes starting
      DAD pointless.
      
      Since the second DAD was introduced by a recent change, seems appropriate
      to use it for the Fixes tag and have the fixup function only start DAD for
      addresses in the PREDAD state which occurs in addrconf_ifdown if the
      address is retained.
      
      Big thanks to Andrey for isolating a reliable reproducer for this problem.
      Fixes: f1705ec1 ("net: ipv6: Make address flushing on ifdown optional")
      Reported-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarAndrey Konovalov <andreyknvl@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6d717134
    • David Cai's avatar
      smsc911x: Adding support for Micochip LAN9250 Ethernet controller · f6fec61e
      David Cai authored
      Adding support for Microchip LAN9250 Ethernet controller.
      Signed-off-by: default avatarDavid Cai <david.cai@microchip.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6fec61e
    • David S. Miller's avatar
      Merge branch 'sample-bpf-loader-fixes' · 8b8e3ad0
      David S. Miller authored
      Jesper Dangaard Brouer says:
      
      ====================
      Improve bpf ELF-loader under samples/bpf
      
      This series improves and fixes bpf ELF loader and programs under
      samples/bpf.  The bpf_load.c created some hard to debug issues when
      the struct (bpf_map_def) used in the ELF maps section format changed
      in commit fb30d4b7 ("bpf: Add tests for map-in-map").
      
      This was hotfixed in commit 409526bea3c3 ("samples/bpf: bpf_load.c
      detect and abort if ELF maps section size is wrong") by detecting the
      issue and aborting the program.
      
      In most situations the bpf-loader should be able to handle these kind
      of changes to the struct size.  This patch series aim to do proper
      backward and forward compabilility handling when loading ELF files.
      
      This series also adjust the callback that was introduced in commit
      9fd63d05 ("bpf: Allow bpf sample programs (*_user.c) to change
      bpf_map_def") to use the new bpf_map_data structure, before more users
      start to use this callback.
      
      Hoping these changes can make the merge window, as above mentioned
      commits have not been merged yet, and it would be good to avoid users
      hitting these issues.
      ====================
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b8e3ad0
    • Jesper Dangaard Brouer's avatar
      samples/bpf: export map_data[] for more info on maps · 9178b4c1
      Jesper Dangaard Brouer authored
      Giving *_user.c side tools access to map_data[] provides easier
      access to information on the maps being loaded.  Still provide
      the guarantee that the order maps are being defined in inside the
      _kern.c file corresponds with the order in the array.  Now user
      tools are not blind, but can inspect and verify the maps that got
      loaded from the ELF binary.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9178b4c1
    • Jesper Dangaard Brouer's avatar
      samples/bpf: load_bpf.c make callback fixup more flexible · 6979bcc7
      Jesper Dangaard Brouer authored
      Do this change before others start to use this callback.
      Change map_perf_test_user.c which seems to be the only user.
      
      This patch extends capabilities of commit 9fd63d05 ("bpf:
      Allow bpf sample programs (*_user.c) to change bpf_map_def").
      
      Give fixup callback access to struct bpf_map_data, instead of
      only stuct bpf_map_def.  This add flexibility to allow userspace
      to reassign the map file descriptor.  This is very useful when
      wanting to share maps between several bpf programs.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6979bcc7
    • Jesper Dangaard Brouer's avatar
      samples/bpf: make bpf_load.c code compatible with ELF maps section changes · 156450d9
      Jesper Dangaard Brouer authored
      This patch does proper parsing of the ELF "maps" section, in-order to
      be both backwards and forwards compatible with changes to the map
      definition struct bpf_map_def, which gets compiled into the ELF file.
      
      The assumption is that new features with value zero, means that they
      are not in-use.  For backward compatibility where loading an ELF file
      with a smaller struct bpf_map_def, only copy objects ELF size, leaving
      rest of loaders struct zero.  For forward compatibility where ELF file
      have a larger struct bpf_map_def, only copy loaders own struct size
      and verify that rest of the larger struct is zero, assuming this means
      the newer feature was not activated, thus it should be safe for this
      older loader to load this newer ELF file.
      
      Fixes: fb30d4b7 ("bpf: Add tests for map-in-map")
      Fixes: 409526bea3c3 ("samples/bpf: bpf_load.c detect and abort if ELF maps section size is wrong")
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      156450d9
    • Jesper Dangaard Brouer's avatar
      samples/bpf: adjust rlimit RLIMIT_MEMLOCK for traceex2, tracex3 and tracex4 · 55de1703
      Jesper Dangaard Brouer authored
      Needed to adjust max locked memory RLIMIT_MEMLOCK for testing these bpf samples
      as these are using more and larger maps than can fit in distro default 64Kbytes limit.
      Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      55de1703
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial · 89c9fea3
      Linus Torvalds authored
      Pull trivial tree updates from Jiri Kosina.
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
        tty: fix comment for __tty_alloc_driver()
        init/main: properly align the multi-line comment
        init/main: Fix double "the" in comment
        Fix dead URLs to ftp.kernel.org
        drivers: Clean up duplicated email address
        treewide: Fix typo in xml/driver-api/basics.xml
        tools/testing/selftests/powerpc: remove redundant CFLAGS in Makefile: "-Wall -O2 -Wall" -> "-O2 -Wall"
        selftests/timers: Spelling s/privledges/privileges/
        HID: picoLCD: Spelling s/REPORT_WRTIE_MEMORY/REPORT_WRITE_MEMORY/
        net: phy: dp83848: Fix Typo
        UBI: Fix typos
        Documentation: ftrace.txt: Correct nice value of 120 priority
        net: fec: Fix typo in error msg and comment
        treewide: Fix typos in printk
      89c9fea3
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching · 76f1948a
      Linus Torvalds authored
      Pull livepatch updates from Jiri Kosina:
      
       - a per-task consistency model is being added for architectures that
         support reliable stack dumping (extending this, currently rather
         trivial set, is currently in the works).
      
         This extends the nature of the types of patches that can be applied
         by live patching infrastructure. The code stems from the design
         proposal made [1] back in November 2014. It's a hybrid of SUSE's
         kGraft and RH's kpatch, combining advantages of both: it uses
         kGraft's per-task consistency and syscall barrier switching combined
         with kpatch's stack trace switching. There are also a number of
         fallback options which make it quite flexible.
      
         Most of the heavy lifting done by Josh Poimboeuf with help from
         Miroslav Benes and Petr Mladek
      
         [1] https://lkml.kernel.org/r/20141107140458.GA21774@suse.cz
      
       - module load time patch optimization from Zhou Chengming
      
       - a few assorted small fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching:
        livepatch: add missing printk newlines
        livepatch: Cancel transition a safe way for immediate patches
        livepatch: Reduce the time of finding module symbols
        livepatch: make klp_mutex proper part of API
        livepatch: allow removal of a disabled patch
        livepatch: add /proc/<pid>/patch_state
        livepatch: change to a per-task consistency model
        livepatch: store function sizes
        livepatch: use kstrtobool() in enabled_store()
        livepatch: move patching functions into patch.c
        livepatch: remove unnecessary object loaded check
        livepatch: separate enabled and patched states
        livepatch/s390: add TIF_PATCH_PENDING thread flag
        livepatch/s390: reorganize TIF thread flag bits
        livepatch/powerpc: add TIF_PATCH_PENDING thread flag
        livepatch/x86: add TIF_PATCH_PENDING thread flag
        livepatch: create temporary klp_update_patch_state() stub
        x86/entry: define _TIF_ALLWORK_MASK flags explicitly
        stacktrace/x86: add function for detecting reliable stack traces
      76f1948a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid · 7af4c727
      Linus Torvalds authored
      Pull HID subsystem updates from Jiri Kosina:
      
       - The need for HID_QUIRK_NO_INIT_REPORTS per-device quirk has been
         growing dramatically during past years, so the time has come to
         switch over the default, and perform the pro-active reading only in
         cases where it's really needed (multitouch, wacom).
      
         The only place where this behavior is (in some form) preserved is
         hiddev so that we don't introduce userspace-visible change of
         behavior.
      
         From Benjamin Tissoires
      
       - HID++ support for power_supply / baterry reporting.
      
         From Benjamin Tissoires and Bastien Nocera
      
       - Vast improvements / rework of DS3 and DS4 in Sony driver.
      
         From Roderick Colenbrander
      
       - Improvment (in terms of getting closer to the Microsoft's
         interpretation of slightly ambiguous specification) of logical range
         interpretation in case null-state is set in the rdesc.
      
         From Valtteri Heikkilä and Tomasz Kramkowski
      
       - A lot of newly supported device IDs and small assorted fixes
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (71 commits)
        HID: usbhid: Add HID_QUIRK_NOGET for Aten CS-1758 KVM switch
        HID: asus: support backlight on USB keyboards
        HID: wacom: Move wacom_remote_irq and wacom_remote_status_irq
        HID: wacom: generic: sync pad events only for actual packets
        HID: sony: remove redundant check for -ve err
        HID: sony: Make sure to unregister sensors on failure
        HID: sony: Make DS4 bt poll interval adjustable
        HID: sony: Set proper bit flags on DS4 output report
        HID: sony: DS4 use brighter LED colors
        HID: sony: Improve navigation controller axis/button mapping
        HID: sony: Use DS3 MAC address as unique identifier on USB
        HID: logitech-hidpp: add a sysfs file to tell we support power_supply
        HID: logitech-hidpp: enable HID++ 1.0 battery reporting
        HID: logitech-hidpp: add support for battery status for the K750
        HID: logitech-hidpp: battery: provide CAPACITY_LEVEL
        HID: logitech-hidpp: rename battery level into capacity
        HID: logitech-hidpp: battery: provide ONLINE property
        HID: logitech-hidpp: notify battery on connect
        HID: logitech-hidpp: return an error if the queried feature is not present
        HID: logitech-hidpp: create the battery for all types of HID++ devices
        ...
      7af4c727
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 68fed41e
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "This is the bulk of pin control changes for the v4.12 cycle.
      
        The extra week before the merge window actually resulted in some of
        the type of fixes that usually arrive after the merge window already
        starting to trickle in from eager developers using -next, I'm
        impressed.
      
        I have recruited a Samsung subsubsystem maintainer (Krzysztof) to deal
        with the onset of Samsung patches. It works great.
      
        Apart from that it is a boring round, just incremental updates and
        fixes all over the place, no serious core changes or anything exciting
        like that. The most pleasing to see is Julia Cartwrights work to audit
        the irqchip-providing drivers for realtime locking compliance. It's
        one of those "I should really get around to looking into that" things
        that have been on my TODO list since forever.
      
        Summary:
      
        Core changes:
      
         - add bi-directional and output-enable pin configurations to the
           generic bindings and generic pin controlling core.
      
        New drivers or subdrivers:
      
         - Armada 37xx SoC pin controller and GPIO support.
      
         - Axis ARTPEC-6 SoC pin controller support.
      
         - AllWinner A64 R_PIO controller support, and opening up the
           AllWinner sunxi driver for ARM64 use.
      
         - Rockchip RK3328 support.
      
         - Renesas R-Car H3 ES2.0 support.
      
         - STM32F469 support in the STM32 driver.
      
         - Aspeed G4 and G5 pin controller support.
      
        Improvements:
      
         - a whole slew of realtime improvements to drivers implementing
           irqchips: BCM, AMD, SiRF, sunxi, rockchip.
      
         - switch meson driver to get the GPIO ranges from the device tree.
      
         - input schmitt trigger support on the Rockchip driver.
      
         - enable the sunxi (AllWinner) driver to also be used on ARM64
           silicon.
      
         - name the Qualcomm QDF2xxx GPIO lines.
      
         - support GMMR GPIO regions on the Intel Cherryview. This fixes a
           serialization problem on these platforms.
      
         - pad retention support for the Samsung Exynos 5433.
      
         - handle suspend-to-ram in the AT91-pio4 driver.
      
         - pin configuration support in the Aspeed driver.
      
        Cleanups:
      
         - the final name of Rockchip RK1108 was RV1108 so rename the driver
           and variables to stay consistent"
      
      * tag 'pinctrl-v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (80 commits)
        pinctrl: mediatek: Add missing pinctrl bindings for mt7623
        pinctrl: artpec6: Fix return value check in artpec6_pmx_probe()
        pinctrl: artpec6: Remove .owner field for driver
        pinctrl: tegra: xusb: Silence sparse warnings
        ARM: at91/at91-pinctrl documentation: fix spelling mistake: "contoller" -> "controller"
        pinctrl: make artpec6 explicitly non-modular
        pinctrl: aspeed: g5: Add pinconf support
        pinctrl: aspeed: g4: Add pinconf support
        pinctrl: aspeed: Add core pinconf support
        pinctrl: aspeed: Document pinconf in devicetree bindings
        pinctrl: Add st,stm32f469-pinctrl compatible to stm32-pinctrl
        pinctrl: stm32: Add STM32F469 MCU support
        Documentation: dt: Remove ngpios from stm32-pinctrl binding
        pinctrl: stm32: replace device_initcall() with arch_initcall()
        pinctrl: stm32: add possibility to use gpio-ranges to declare bank range
        pinctrl: armada-37xx: Add gpio support
        pinctrl: armada-37xx: Add pin controller support for Armada 37xx
        pinctrl: dt-bindings: Add documentation for Armada 37xx pin controllers
        pinctrl: core: Make pinctrl_init_controller() static
        pinctrl: generic: Add bi-directional and output-enable
        ...
      68fed41e
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · be580e75
      Linus Torvalds authored
      Pull MMC updates from Ulf Hansson:
       "MMC core:
         - Continue to re-factor code to prepare for eMMC CMDQ and blkmq support
         - Introduce queue semantics to prepare for eMMC CMDQ and blkmq support
         - Add helper functions to manage temporary enable/disable of eMMC CMDQ
         - Improve wait-busy detection for SDIO
      
        MMC host:
         - cavium: Add driver to support Cavium controllers
         - cavium: Extend Cavium driver to support Octeon and ThunderX SOCs
         - bcm2835: Add new driver for Broadcom BCM2835 controller
         - sdhci-xenon: Add driver to support Marvell Xenon SDHCI controller
         - sdhci-tegra: Add support for the Tegra186 variant
         - sdhci-of-esdhc: Support for UHS-I SD cards
         - sdhci-of-esdhc: Support for eMMC HS200 cards
         - sdhci-cadence: Add eMMC HS400 enhanced strobe support
         - sdhci-esdhc-imx: Reset tuning circuit when needed
         - sdhci-pci: Modernize and clean-up some PM related code
         - sdhci-pci: Avoid re-tuning at runtime PM for some Intel devices
         - sdhci-pci|acpi: Use aggressive PM for some Intel BYT controllers
         - sdhci: Re-factoring and modernizations
         - sdhci: Optimize delay loops
         - sdhci: Improve register dump print format
         - sdhci: Add support for the Command Queue Engine
         - meson-gx: Various improvements and clean-ups
         - meson-gx: Add support for CMD23
         - meson-gx: Basic tuning support to avoid CRC errors
         - s3cmci: Enable probing via DT
         - mediatek: Improve tuning support for eMMC HS200 and HS400 mode
         - tmio: Improve DMA support
         - tmio: Use correct response for CMD12
         - dw_mmc: Minor improvements and clean-ups"
      
      * tag 'mmc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (148 commits)
        mmc: sdhci-of-esdhc: limit SD clock for ls1012a/ls1046a
        mmc: sdhci-of-esdhc: poll ESDHC_CLOCK_STABLE bit with udelay
        mmc: sdhci-xenon: Fix default value of LOGIC_TIMING_ADJUST for eMMC5.0 PHY
        mmc: sdhci-xenon: Fix the work flow in xenon_remove().
        MIPS: Octeon: cavium_octeon_defconfig: Enable Octeon MMC
        mmc: sdhci-xenon: Remove redundant dev_err call in get_dt_pad_ctrl_data()
        mmc: cavium: Use module_pci_driver to simplify the code
        mmc: cavium: Add MMC support for Octeon SOCs.
        mmc: cavium: Fix detection of block or byte addressing.
        mmc: core: Export API to allow hosts to get the card address
        mmc: sdio: Fix sdio wait busy implement limitation
        mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card
        clk: apn806: fix spelling mistake: "mising" -> "missing"
        mmc: sdhci-of-esdhc: add delay between tuning cycles
        mmc: sdhci: Control the delay between tuning commands
        mmc: sdhci-of-esdhc: add tuning support
        mmc: sdhci-of-esdhc: add support for signal voltage switch
        mmc: sdhci-of-esdhc: add peripheral clock support
        mmc: sdhci-pci: Allow for 3 bytes from Intel DSM
        mmc: cavium: Fix a shift wrapping bug
        ...
      be580e75
  2. 02 May, 2017 27 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next · 8d65b08d
      Linus Torvalds authored
      Pull networking updates from David Millar:
       "Here are some highlights from the 2065 networking commits that
        happened this development cycle:
      
         1) XDP support for IXGBE (John Fastabend) and thunderx (Sunil Kowuri)
      
         2) Add a generic XDP driver, so that anyone can test XDP even if they
            lack a networking device whose driver has explicit XDP support
            (me).
      
         3) Sparc64 now has an eBPF JIT too (me)
      
         4) Add a BPF program testing framework via BPF_PROG_TEST_RUN (Alexei
            Starovoitov)
      
         5) Make netfitler network namespace teardown less expensive (Florian
            Westphal)
      
         6) Add symmetric hashing support to nft_hash (Laura Garcia Liebana)
      
         7) Implement NAPI and GRO in netvsc driver (Stephen Hemminger)
      
         8) Support TC flower offload statistics in mlxsw (Arkadi Sharshevsky)
      
         9) Multiqueue support in stmmac driver (Joao Pinto)
      
        10) Remove TCP timewait recycling, it never really could possibly work
            well in the real world and timestamp randomization really zaps any
            hint of usability this feature had (Soheil Hassas Yeganeh)
      
        11) Support level3 vs level4 ECMP route hashing in ipv4 (Nikolay
            Aleksandrov)
      
        12) Add socket busy poll support to epoll (Sridhar Samudrala)
      
        13) Netlink extended ACK support (Johannes Berg, Pablo Neira Ayuso,
            and several others)
      
        14) IPSEC hw offload infrastructure (Steffen Klassert)"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (2065 commits)
        tipc: refactor function tipc_sk_recv_stream()
        tipc: refactor function tipc_sk_recvmsg()
        net: thunderx: Optimize page recycling for XDP
        net: thunderx: Support for XDP header adjustment
        net: thunderx: Add support for XDP_TX
        net: thunderx: Add support for XDP_DROP
        net: thunderx: Add basic XDP support
        net: thunderx: Cleanup receive buffer allocation
        net: thunderx: Optimize CQE_TX handling
        net: thunderx: Optimize RBDR descriptor handling
        net: thunderx: Support for page recycling
        ipx: call ipxitf_put() in ioctl error path
        net: sched: add helpers to handle extended actions
        qed*: Fix issues in the ptp filter config implementation.
        qede: Fix concurrency issue in PTP Tx path processing.
        stmmac: Add support for SIMATIC IOT2000 platform
        net: hns: fix ethtool_get_strings overflow in hns driver
        tcp: fix wraparound issue in tcp_lp
        bpf, arm64: fix jit branch offset related to ldimm64
        bpf, arm64: implement jiting of BPF_XADD
        ...
      8d65b08d
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 5a0387a8
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "Here is the crypto update for 4.12:
      
        API:
         - Add batch registration for acomp/scomp
         - Change acomp testing to non-unique compressed result
         - Extend algorithm name limit to 128 bytes
         - Require setkey before accept(2) in algif_aead
      
        Algorithms:
         - Add support for deflate rfc1950 (zlib)
      
        Drivers:
         - Add accelerated crct10dif for powerpc
         - Add crc32 in stm32
         - Add sha384/sha512 in ccp
         - Add 3des/gcm(aes) for v5 devices in ccp
         - Add Queue Interface (QI) backend support in caam
         - Add new Exynos RNG driver
         - Add ThunderX ZIP driver
         - Add driver for hardware random generator on MT7623 SoC"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (101 commits)
        crypto: stm32 - Fix OF module alias information
        crypto: algif_aead - Require setkey before accept(2)
        crypto: scomp - add support for deflate rfc1950 (zlib)
        crypto: scomp - allow registration of multiple scomps
        crypto: ccp - Change ISR handler method for a v5 CCP
        crypto: ccp - Change ISR handler method for a v3 CCP
        crypto: crypto4xx - rename ce_ring_contol to ce_ring_control
        crypto: testmgr - Allow ecb(cipher_null) in FIPS mode
        Revert "crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT"
        crypto: ccp - Disable interrupts early on unload
        crypto: ccp - Use only the relevant interrupt bits
        hwrng: mtk - Add driver for hardware random generator on MT7623 SoC
        dt-bindings: hwrng: Add Mediatek hardware random generator bindings
        crypto: crct10dif-vpmsum - Fix missing preempt_disable()
        crypto: testmgr - replace compression known answer test
        crypto: acomp - allow registration of multiple acomps
        hwrng: n2 - Use devm_kcalloc() in n2rng_probe()
        crypto: chcr - Fix error handling related to 'chcr_alloc_shash'
        padata: get_next is never NULL
        crypto: exynos - Add new Exynos RNG driver
        ...
      5a0387a8
    • David S. Miller's avatar
      Merge branch 'tipc-refactor-socket-receive-functions' · 5d15af67
      David S. Miller authored
      Jon Maloy says:
      
      ====================
      tipc: refactor socket receive functions
      
      We try to make the functions tipc_sk_recvmsg() and
      tipc_sk_recvstream() more readable.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5d15af67
    • Jon Paul Maloy's avatar
      tipc: refactor function tipc_sk_recv_stream() · ec8a09fb
      Jon Paul Maloy authored
      We try to make this function more readable by improving variable names
      and comments, using more stack variables, and doing some smaller changes
      to the logics. We also rename the function to make it consistent with
      naming conventions used elsewhere in the code.
      Reviewed-by: default avatarParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec8a09fb
    • Jon Paul Maloy's avatar
      tipc: refactor function tipc_sk_recvmsg() · e9f8b101
      Jon Paul Maloy authored
      We try to make this function more readable by improving variable names
      and comments, plus some minor changes to the logics.
      Reviewed-by: default avatarParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e9f8b101
    • David S. Miller's avatar
      Merge branch 'thunderx-xdp' · b0e92279
      David S. Miller authored
      Sunil Goutham says:
      
      ====================
      net: thunderx: Adds XDP support
      
      This patch series adds support for XDP to ThunderX NIC driver
      which is used on CN88xx, CN81xx and CN83xx platforms.
      
      Patches 1-4 are performance improvement and cleanup patches
      which are done keeping XDP performance bottlenecks in view.
      Rest of the patches adds actual XDP support.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0e92279
    • Sunil Goutham's avatar
      net: thunderx: Optimize page recycling for XDP · 77322538
      Sunil Goutham authored
      Driver follows a method of taking one extra reference on the
      page for recycling which is fine in usual packet path where
      each 64KB page is segmented into multiple receive buffers.
      
      But in XDP mode since there is just one receive buffer per
      page taking extra page reference itself becomes big bottleneck
      consuming ~50% of CPU cycles due to atomic operations.
      
      This patch adds a internal ref count in pgcache for each
      page and additional page references are taken in a batch
      instead of just one at a time. Internal i.e 'pgcache->ref_count'
      and page's i.e 'page->_refcount' counters are compared to check
      page's recyclability.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77322538
    • Sunil Goutham's avatar
      net: thunderx: Support for XDP header adjustment · e3d06ff9
      Sunil Goutham authored
      When in XDP mode reserve XDP_PACKET_HEADROOM bytes at the start
      of receive buffer for XDP program to modify headers and adjust
      packet start. Additional code changes done to handle such packets.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e3d06ff9
    • Sunil Goutham's avatar
      net: thunderx: Add support for XDP_TX · 16f2bccd
      Sunil Goutham authored
      Adds support for XDP_TX i.e transmits packet out of
      the XDP TX queue mapped to the corresponding Rx queue
      on which packet is received.
      
      Since SQ for XDP TX will be used only on a single cpu i.e
      SQ description creation and freeing, using atomic free count
      is not necessary and will become a bottleneck. Hence added
      a separate 'xdp_free_cnt' used for SQs designated for XDP
      to track descriptor free count.
      
      Changes also include
      - A new entry 'xdp_page' is added to save transmitted packet's
        page pointer for later cleanup.
      - XDP Tx SQ's doorbell is ringed once per NAPI instance.
      - Retrieving designated SQ for packets being sent out by stack
        via 'nicvf_xmit'.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16f2bccd
    • Sunil Goutham's avatar
      net: thunderx: Add support for XDP_DROP · c56d91ce
      Sunil Goutham authored
      Adds support for XDP_DROP.
      Also since in XDP mode there is just a single buffer per page,
      made changes to recycle DMA mapping info as well along with pages.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c56d91ce
    • Sunil Goutham's avatar
      net: thunderx: Add basic XDP support · 05c773f5
      Sunil Goutham authored
      Adds basic XDP support i.e attaching a BPF program to an
      interface. Also takes care of allocating separate Tx queues
      for XDP path and for network stack packet transmission.
      
      This patch doesn't support handling of any of the XDP actions,
      all are treated as XDP_PASS i.e packets will be handed over to
      the network stack.
      
      Changes also involve allocating one receive buffer per page in XDP
      mode and multiple in normal mode i.e when no BPF program is attached.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05c773f5
    • Sunil Goutham's avatar
      net: thunderx: Cleanup receive buffer allocation · 927987f3
      Sunil Goutham authored
      Get rid of unnecessary double pointer references and type casting
      in receive buffer allocation code.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      927987f3
    • Sunil Goutham's avatar
      net: thunderx: Optimize CQE_TX handling · 0dada88b
      Sunil Goutham authored
      Optimized CQE handling with below changes
      - Feeing descriptors back to SQ in bulk i.e once per NAPI
        instance instead for every CQE_TX, this will reduce number
        of atomic updates to 'sq->free_cnt'.
      - Checking errors in CQE_TX and CQE_RX before calling appropriate
        fn()s to update error stats i.e reduce branching.
      
      Also removed debug messages in packet handling path which otherwise
      causes issues if DEBUG is enabled.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0dada88b
    • Sunil Goutham's avatar
      net: thunderx: Optimize RBDR descriptor handling · 5e848e4c
      Sunil Goutham authored
      Receive buffer's physical address or iova will anyway not
      go beyond 49bits, since it is the max supported HW address.
      As per perf, updating bitfields i.e buf_addr:42 in RBDR
      descriptor entry consumes lots of cpu cycles, hence changed
      it to a 64bit field with alignment requirements taken care of.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e848e4c
    • Sunil Goutham's avatar
      net: thunderx: Support for page recycling · 5836b442
      Sunil Goutham authored
      Adds support for page recycling for allocating receive buffers
      to reduce cost of refilling RBDR ring. Also got rid of using
      compound pages when pagesize is 4K, only order-0 pages now.
      
      Only page is recycled, DMA mappings still needs to be done for
      every receive buffer allocated due to following constraints
      - Cannot have just one receive buffer per 64KB page.
      - There is just one buffer ring shared across 8 Rx queues, so
        buffers of same page can go to any Rx queue.
      - HW gives buffer address where packet has been DMA'ed and not
        the index into buffer ring.
      This makes it not possible to resue DMA mapping info. So unfortunately
      have to go through costly mapping route for every buffer.
      Signed-off-by: default avatarSunil Goutham <sgoutham@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5836b442
    • Dan Carpenter's avatar
      ipx: call ipxitf_put() in ioctl error path · ee0d8d84
      Dan Carpenter authored
      We should call ipxitf_put() if the copy_to_user() fails.
      Reported-by: default avatar李强 <liqiang6-s@360.cn>
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee0d8d84
    • Jiri Pirko's avatar
      net: sched: add helpers to handle extended actions · 9da3242e
      Jiri Pirko authored
      Jump is now the only one using value action opcode. This is going to
      change soon. So introduce helpers to work with this. Convert TC_ACT_JUMP.
      
      This also fixes the TC_ACT_JUMP check, which is incorrectly done as a
      bit check, not a value check.
      
      Fixes: e0ee84de ("net sched actions: Complete the JUMPX opcode")
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9da3242e
    • David S. Miller's avatar
      Merge branch 'qed-PTP-fixes' · 5657f89a
      David S. Miller authored
      Sudarsana Reddy Kalluru says:
      
      ====================
      qed*: PTP bug fixes.
      
      The series addresses couple of issues in the PTP implementation.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5657f89a
    • sudarsana.kalluru@cavium.com's avatar
      qed*: Fix issues in the ptp filter config implementation. · 8d3f87d8
      sudarsana.kalluru@cavium.com authored
      PTP hardware filter configuration performed by the driver for a given
      user requested config is not correct for some of the PTP modes.
      Following changes are needed for PTP config-filter implementation.
       1. NIG_REG_TX_PTP_EN register - Bits 0/1/2 respectively enables
          TimeSync/"V1 frame format support"/"V2 frame format support" on
          the TX side. Set the associated bits based on the user request.
       2. ptp4l application fails to operate in Peer Delay mode. Following
          changes are needed to fix this,
          a. Driver should enable (set to 0) DA #1-related bits for IPv4,
             IPv6 and MAC destination addresses in these registers:
               NIG_REG_TX_LLH_PTP_RULE_MASK
               NIG_REG_LLH_PTP_RULE_MASK
          b. NIG_REG_LLH_PTP_PARAM_MASK/NIG_REG_TX_LLH_PTP_PARAM_MASK should
             be set to 0x0 in all modes.
      Signed-off-by: default avatarSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8d3f87d8
    • sudarsana.kalluru@cavium.com's avatar
      qede: Fix concurrency issue in PTP Tx path processing. · 461eec12
      sudarsana.kalluru@cavium.com authored
      PTP Tx timestamping data structures are not protected against the
      concurrent access in the Tx paths. Protecting the same using atomic
      bit locks.
      Signed-off-by: default avatarSudarsana Reddy Kalluru <Sudarsana.Kalluru@cavium.com>
      Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      461eec12
    • Jan Kiszka's avatar
      stmmac: Add support for SIMATIC IOT2000 platform · 212c7fd6
      Jan Kiszka authored
      The IOT2000 is industrial controller platform, derived from the Intel
      Galileo Gen2 board. The variant IOT2020 comes with one LAN port, the
      IOT2040 has two of them. They can be told apart based on the board asset
      tag in the DMI table.
      
      Based on patch by Sascha Weisenberger.
      Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: default avatarSascha Weisenberger <sascha.weisenberger@siemens.com>
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      212c7fd6
    • Timmy Li's avatar
      net: hns: fix ethtool_get_strings overflow in hns driver · 412b65d1
      Timmy Li authored
      hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
      is not enough for ethtool_get_strings(), which will cause random memory
      corruption.
      
      When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
      the following can be observed without this patch:
      [   43.115200] Slab corruption (Not tainted): Acpi-ParseExt start=ffff801fb0b69030, len=80
      [   43.115206] Redzone: 0x9f911029d006462/0x5f78745f31657070.
      [   43.115208] Last user: [<5f7272655f746b70>](0x5f7272655f746b70)
      [   43.115214] 010: 70 70 65 31 5f 74 78 5f 70 6b 74 00 6b 6b 6b 6b  ppe1_tx_pkt.kkkk
      [   43.115217] 030: 70 70 65 31 5f 74 78 5f 70 6b 74 5f 6f 6b 00 6b  ppe1_tx_pkt_ok.k
      [   43.115218] Next obj: start=ffff801fb0b69098, len=80
      [   43.115220] Redzone: 0x706d655f6f666966/0x9f911029d74e35b.
      [   43.115229] Last user: [<ffff0000084b11b0>](acpi_os_release_object+0x28/0x38)
      [   43.115231] 000: 74 79 00 6b 6b 6b 6b 6b 70 70 65 31 5f 74 78 5f  ty.kkkkkppe1_tx_
      [   43.115232] 010: 70 6b 74 5f 65 72 72 5f 63 73 75 6d 5f 66 61 69  pkt_err_csum_fai
      Signed-off-by: default avatarTimmy Li <lixiaoping3@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      412b65d1
    • Eric Dumazet's avatar
      tcp: fix wraparound issue in tcp_lp · a9f11f96
      Eric Dumazet authored
      Be careful when comparing tcp_time_stamp to some u32 quantity,
      otherwise result can be surprising.
      
      Fixes: 7c106d7e ("[TCP]: TCP Low Priority congestion control")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9f11f96
    • Daniel Borkmann's avatar
      bpf, arm64: fix jit branch offset related to ldimm64 · ddc665a4
      Daniel Borkmann authored
      When the instruction right before the branch destination is
      a 64 bit load immediate, we currently calculate the wrong
      jump offset in the ctx->offset[] array as we only account
      one instruction slot for the 64 bit load immediate although
      it uses two BPF instructions. Fix it up by setting the offset
      into the right slot after we incremented the index.
      
      Before (ldimm64 test 1):
      
        [...]
        00000020:  52800007  mov w7, #0x0 // #0
        00000024:  d2800060  mov x0, #0x3 // #3
        00000028:  d2800041  mov x1, #0x2 // #2
        0000002c:  eb01001f  cmp x0, x1
        00000030:  54ffff82  b.cs 0x00000020
        00000034:  d29fffe7  mov x7, #0xffff // #65535
        00000038:  f2bfffe7  movk x7, #0xffff, lsl #16
        0000003c:  f2dfffe7  movk x7, #0xffff, lsl #32
        00000040:  f2ffffe7  movk x7, #0xffff, lsl #48
        00000044:  d29dddc7  mov x7, #0xeeee // #61166
        00000048:  f2bdddc7  movk x7, #0xeeee, lsl #16
        0000004c:  f2ddddc7  movk x7, #0xeeee, lsl #32
        00000050:  f2fdddc7  movk x7, #0xeeee, lsl #48
        [...]
      
      After (ldimm64 test 1):
      
        [...]
        00000020:  52800007  mov w7, #0x0 // #0
        00000024:  d2800060  mov x0, #0x3 // #3
        00000028:  d2800041  mov x1, #0x2 // #2
        0000002c:  eb01001f  cmp x0, x1
        00000030:  540000a2  b.cs 0x00000044
        00000034:  d29fffe7  mov x7, #0xffff // #65535
        00000038:  f2bfffe7  movk x7, #0xffff, lsl #16
        0000003c:  f2dfffe7  movk x7, #0xffff, lsl #32
        00000040:  f2ffffe7  movk x7, #0xffff, lsl #48
        00000044:  d29dddc7  mov x7, #0xeeee // #61166
        00000048:  f2bdddc7  movk x7, #0xeeee, lsl #16
        0000004c:  f2ddddc7  movk x7, #0xeeee, lsl #32
        00000050:  f2fdddc7  movk x7, #0xeeee, lsl #48
        [...]
      
      Also, add a couple of test cases to make sure JITs pass
      this test. Tested on Cavium ThunderX ARMv8. The added
      test cases all pass after the fix.
      
      Fixes: 8eee539d ("arm64: bpf: fix out-of-bounds read in bpf2a64_offset()")
      Reported-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Cc: Xi Wang <xi.wang@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ddc665a4
    • Daniel Borkmann's avatar
      bpf, arm64: implement jiting of BPF_XADD · 85f68fe8
      Daniel Borkmann authored
      This work adds BPF_XADD for BPF_W/BPF_DW to the arm64 JIT and therefore
      completes JITing of all BPF instructions, meaning we can thus also remove
      the 'notyet' label and do not need to fall back to the interpreter when
      BPF_XADD is used in a program!
      
      This now also brings arm64 JIT in line with x86_64, s390x, ppc64, sparc64,
      where all current eBPF features are supported.
      
      BPF_W example from test_bpf:
      
        .u.insns_int = {
          BPF_ALU32_IMM(BPF_MOV, R0, 0x12),
          BPF_ST_MEM(BPF_W, R10, -40, 0x10),
          BPF_STX_XADD(BPF_W, R10, R0, -40),
          BPF_LDX_MEM(BPF_W, R0, R10, -40),
          BPF_EXIT_INSN(),
        },
      
        [...]
        00000020:  52800247  mov w7, #0x12 // #18
        00000024:  928004eb  mov x11, #0xffffffffffffffd8 // #-40
        00000028:  d280020a  mov x10, #0x10 // #16
        0000002c:  b82b6b2a  str w10, [x25,x11]
        // start of xadd mapping:
        00000030:  928004ea  mov x10, #0xffffffffffffffd8 // #-40
        00000034:  8b19014a  add x10, x10, x25
        00000038:  f9800151  prfm pstl1strm, [x10]
        0000003c:  885f7d4b  ldxr w11, [x10]
        00000040:  0b07016b  add w11, w11, w7
        00000044:  880b7d4b  stxr w11, w11, [x10]
        00000048:  35ffffab  cbnz w11, 0x0000003c
        // end of xadd mapping:
        [...]
      
      BPF_DW example from test_bpf:
      
        .u.insns_int = {
          BPF_ALU32_IMM(BPF_MOV, R0, 0x12),
          BPF_ST_MEM(BPF_DW, R10, -40, 0x10),
          BPF_STX_XADD(BPF_DW, R10, R0, -40),
          BPF_LDX_MEM(BPF_DW, R0, R10, -40),
          BPF_EXIT_INSN(),
        },
      
        [...]
        00000020:  52800247  mov w7,  #0x12 // #18
        00000024:  928004eb  mov x11, #0xffffffffffffffd8 // #-40
        00000028:  d280020a  mov x10, #0x10 // #16
        0000002c:  f82b6b2a  str x10, [x25,x11]
        // start of xadd mapping:
        00000030:  928004ea  mov x10, #0xffffffffffffffd8 // #-40
        00000034:  8b19014a  add x10, x10, x25
        00000038:  f9800151  prfm pstl1strm, [x10]
        0000003c:  c85f7d4b  ldxr x11, [x10]
        00000040:  8b07016b  add x11, x11, x7
        00000044:  c80b7d4b  stxr w11, x11, [x10]
        00000048:  35ffffab  cbnz w11, 0x0000003c
        // end of xadd mapping:
        [...]
      
      Tested on Cavium ThunderX ARMv8, test suite results after the patch:
      
        No JIT:   [ 3751.855362] test_bpf: Summary: 311 PASSED, 0 FAILED, [0/303 JIT'ed]
        With JIT: [ 3573.759527] test_bpf: Summary: 311 PASSED, 0 FAILED, [303/303 JIT'ed]
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      85f68fe8
    • Linus Torvalds's avatar
      Merge branch 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 204f144c
      Linus Torvalds authored
      Pull fs/compat.c cleanups from Al Viro:
       "More moving of compat syscalls from fs/compat.c to fs/*.c where the
        native counterparts live.
      
        And death to compat_sys_getdents64() - the only architecture that used
        to need it was ia64, and _that_ has lost biarch support quite a few
        years ago"
      
      * 'work.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fs/compat.c: trim unused includes
        move compat_rw_copy_check_uvector() over to fs/read_write.c
        fhandle: move compat syscalls from compat.c
        open: move compat syscalls from compat.c
        stat: move compat syscalls from compat.c
        fcntl: move compat syscalls from compat.c
        readdir: move compat syscalls from compat.c
        statfs: move compat syscalls from compat.c
        utimes: move compat syscalls from compat.c
        move compat select-related syscalls to fs/select.c
        Remove compat_sys_getdents64()
      204f144c
    • Linus Torvalds's avatar
      Merge branch 'work.splice' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · da7b66ff
      Linus Torvalds authored
      Pull splice updates from Al Viro:
       "These actually missed the last cycle; the branch itself is from last
        December"
      
      * 'work.splice' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        make nr_pages calculation in default_file_splice_read() a bit less ugly
        splice/tee/vmsplice: validate flags
        splice_pipe_desc: kill ->flags
        remove spd_release_page()
      da7b66ff