1. 21 Mar, 2019 1 commit
  2. 18 Mar, 2019 3 commits
    • Martynas Pumputis's avatar
      bpf: Try harder when allocating memory for large maps · f01a7dbe
      Martynas Pumputis authored
      It has been observed that sometimes a higher order memory allocation
      for BPF maps fails when there is no obvious memory pressure in a system.
      E.g. the map (BPF_MAP_TYPE_LRU_HASH, key=38, value=56, max_elems=524288)
      could not be created due to vmalloc unable to allocate 75497472B,
      when the system's memory consumption (in MB) was the following:
      
          Total: 3942 Used: 837 (21.24%) Free: 138 Buffers: 239 Cached: 2727
      
      Later analysis [1] by Michal Hocko showed that the vmalloc was not trying
      to reclaim memory from the page cache and was failing prematurely due to
      __GFP_NORETRY.
      
      Considering dcda9b04 ("mm, tree wide: replace __GFP_REPEAT by
      __GFP_RETRY_MAYFAIL with more useful semantic") and [1], we can replace
      __GFP_NORETRY with __GFP_RETRY_MAYFAIL, as it won't invoke OOM killer
      and will try harder to fulfil allocation requests.
      
      Unfortunately, replacing the body of the BPF map memory allocation
      function with the kvmalloc_node helper function is not an option at
      this point in time, given 1) kmalloc is non-optional for higher order
      allocations, and 2) passing __GFP_RETRY_MAYFAIL to the kmalloc would
      stress the slab allocator too much for large requests.
      
      The change has been tested with the workloads mentioned above and by
      observing oom_kill value from /proc/vmstat.
      
      [1]: https://lore.kernel.org/bpf/20190310071318.GW5232@dhcp22.suse.cz/Signed-off-by: default avatarMartynas Pumputis <m@lambda.lt>
      Acked-by: default avatarYonghong Song <yhs@fb.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20190318153940.GL8924@dhcp22.suse.cz/
      f01a7dbe
    • Erik Hugne's avatar
      tipc: allow service ranges to be connect()'ed on RDM/DGRAM · ea239314
      Erik Hugne authored
      We move the check that prevents connecting service ranges to after
      the RDM/DGRAM check, and move address sanity control to a separate
      function that also validates the service range.
      
      Fixes: 23998835 ("tipc: improve address sanity check in tipc_connect()")
      Signed-off-by: default avatarErik Hugne <erik.hugne@gmail.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ea239314
    • Randy Dunlap's avatar
      networking: fix snmp_counter.rst Doc. Warnings · 65e9a6d2
      Randy Dunlap authored
      Fix documentation markup warnings in snmp_counter.rst:
      
      Documentation/networking/snmp_counter.rst:416: WARNING: Title underline too short.
      Documentation/networking/snmp_counter.rst:684: WARNING: Bullet list ends without a blank line; unexpected unindent.
      Documentation/networking/snmp_counter.rst:693: WARNING: Title underline too short.
      Documentation/networking/snmp_counter.rst:707: WARNING: Bullet list ends without a blank line; unexpected unindent.
      Documentation/networking/snmp_counter.rst:712: WARNING: Bullet list ends without a blank line; unexpected unindent.
      Documentation/networking/snmp_counter.rst:722: WARNING: Title underline too short.
      Documentation/networking/snmp_counter.rst:733: WARNING: Bullet list ends without a blank line; unexpected unindent.
      Documentation/networking/snmp_counter.rst:736: WARNING: Bullet list ends without a blank line; unexpected unindent.
      Documentation/networking/snmp_counter.rst:739: WARNING: Bullet list ends without a blank line; unexpected unindent.
      
      Fixes: 80cc4950 ("net: Add part of TCP counts explanations in snmp_counters.rst")
      Fixes: 8e2ea53a ("add snmp counters document")
      Fixes: a6c7c7aa ("net: add document for several snmp counters")
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: yupeng <yupeng0921@gmail.com>
      65e9a6d2
  3. 17 Mar, 2019 1 commit
  4. 16 Mar, 2019 8 commits
  5. 15 Mar, 2019 11 commits
  6. 14 Mar, 2019 16 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · f261c4e5
      Linus Torvalds authored
      Merge misc patches from Andrew Morton:
      
      - a little bit more MM
      
      - a few fixups
      
      [ The "little bit more MM" is actually just one of the three patches
        Andrew sent for mm/filemap.c, I'm still mulling over two more of them
        from Josef Bacik     - Linus ]
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        include/linux/swap.h: use offsetof() instead of custom __swapoffset macro
        tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind
        zram: default to lzo-rle instead of lzo
        filemap: pass vm_fault to the mmap ra helpers
      f261c4e5
    • Pi-Hsun Shih's avatar
      include/linux/swap.h: use offsetof() instead of custom __swapoffset macro · a4046c06
      Pi-Hsun Shih authored
      Use offsetof() to calculate offset of a field to take advantage of
      compiler built-in version when possible, and avoid UBSAN warning when
      compiling with Clang:
      
        UBSAN: Undefined behaviour in mm/swapfile.c:3010:38
        member access within null pointer of type 'union swap_header'
        CPU: 6 PID: 1833 Comm: swapon Tainted: G S                4.19.23 #43
        Call trace:
         dump_backtrace+0x0/0x194
         show_stack+0x20/0x2c
         __dump_stack+0x20/0x28
         dump_stack+0x70/0x94
         ubsan_epilogue+0x14/0x44
         ubsan_type_mismatch_common+0xf4/0xfc
         __ubsan_handle_type_mismatch_v1+0x34/0x54
         __se_sys_swapon+0x654/0x1084
         __arm64_sys_swapon+0x1c/0x24
         el0_svc_common+0xa8/0x150
         el0_svc_compat_handler+0x2c/0x38
         el0_svc_compat+0x8/0x18
      
      Link: http://lkml.kernel.org/r/20190312081902.223764-1-pihsun@chromium.orgSigned-off-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
      Acked-by: default avatarMichal Hocko <mhocko@suse.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4046c06
    • Alexey Dobriyan's avatar
      tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind · 17415606
      Alexey Dobriyan authored
      : selftests: proc: proc-pid-vm
      : ========================================
      : proc-pid-vm: proc-pid-vm.c:277: main: Assertion `rv == strlen(buf0)' failed.
      : Aborted
      
      Because the vsyscall mapping is enabled.  Read from vsyscall page to tell
      if vsyscall is being used.
      
      Link: http://lkml.kernel.org/r/20190307183204.GA11405@avx2
      Link: http://lkml.kernel.org/r/20190219094722.GB28258@shao2-debian
      Fixes: 34aab6bec23e7e9 ("proc: test /proc/*/maps, smaps, smaps_rollup, statm")
      Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      17415606
    • Dave Rodgman's avatar
      zram: default to lzo-rle instead of lzo · ce82f19f
      Dave Rodgman authored
      lzo-rle gives higher performance and similar compression ratios to lzo.
      
      Link: http://lkml.kernel.org/r/20190205155944.16007-4-dave.rodgman@arm.comSigned-off-by: default avatarDave Rodgman <dave.rodgman@arm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ce82f19f
    • Josef Bacik's avatar
      filemap: pass vm_fault to the mmap ra helpers · 2a1180f1
      Josef Bacik authored
      All of the arguments to these functions come from the vmf.
      
      Cut down on the amount of arguments passed by simply passing in the vmf
      to these two helpers.
      
      Link: http://lkml.kernel.org/r/20181211173801.29535-3-josef@toxicpanda.comSigned-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: default avatarJan Kara <jack@suse.cz>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Rik van Riel <riel@redhat.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      2a1180f1
    • Alexei Starovoitov's avatar
      Merge branch 'fix-bpf-docs' · 89538398
      Alexei Starovoitov authored
      Quentin Monnet says:
      
      ====================
      Hi,
      This set is an update to the documentation for the BPF helper functions in
      the UAPI header bpf.h, used to generate the bpf-helpers(7) man page.
      
      First patch contains fixes to the current documentation. The second patch
      adds documentation for the two helpers bpf_spin_lock() and
      bpf_spin_unlock(). The last patch simply reports the changes to the version
      of that header in tools/.
      ====================
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      89538398
    • Quentin Monnet's avatar
      tools: bpf: synchronise BPF UAPI header with tools · ea6eced0
      Quentin Monnet authored
      Synchronise the bpf.h header under tools, to report the latest fixes and
      additions to the documentation for the BPF helpers.
      Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      ea6eced0
    • Quentin Monnet's avatar
      bpf: add documentation for helpers bpf_spin_lock(), bpf_spin_unlock() · 0eb09785
      Quentin Monnet authored
      Add documentation for the BPF spinlock-related helpers to the doc in
      bpf.h. I added the constraints and restrictions coming with the use of
      spinlocks for BPF: not all of it is directly related to the use of the
      helper, but I thought it would be nice for users to find them in the man
      page.
      
      This list of restrictions is nearly a verbatim copy of the list in
      Alexei's commit log for those helpers.
      Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      0eb09785
    • Quentin Monnet's avatar
      bpf: fix documentation for eBPF helpers · 62369db2
      Quentin Monnet authored
      Another round of minor fixes for the documentation of the BPF helpers
      located in the UAPI bpf.h header file. Changes include:
      
      - Moving around description of some helpers, to keep the descriptions in
        the same order as helpers are declared (bpf_map_push_elem(), leftover
        from commit 90b1023f ("bpf: fix documentation for eBPF helpers"),
        bpf_rc_keydown(), and bpf_skb_ancestor_cgroup_id()).
      - Fixing typos ("contex" -> "context").
      - Harmonising return types ("void* " -> "void *", "uint64_t" -> "u64").
      - Addition of the "bpf_" prefix to bpf_get_storage().
      - Light additions of RST markup on some keywords.
      - Empty line deletion between description and return value for
        bpf_tcp_sock().
      - Edit for the description for bpf_skb_ecn_set_ce() (capital letters,
        acronym expansion, no effect if ECT not set, more details on return
        value).
      Signed-off-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
      Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      62369db2
    • Alexei Starovoitov's avatar
      Merge branch 'fix-fwd-enum-resolution' · cd70182e
      Alexei Starovoitov authored
      Andrii Nakryiko says:
      
      ====================
      This patchset adds ability to resolve forward-declared enums into their
      corresponding full enum definition types during type deduplication,
      eliminating one of the reasons for having duplicated graphs of types.
      ====================
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      cd70182e
    • Andrii Nakryiko's avatar
      selftests/bpf: add fwd enum resolution test for btf_dedup · 8fd7a61a
      Andrii Nakryiko authored
      This patch adds test verifying new btf_dedup logic of resolving
      forward-declared enums.
      Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      8fd7a61a
    • Andrii Nakryiko's avatar
      btf: resolve enum fwds in btf_dedup · 9768095b
      Andrii Nakryiko authored
      GCC and clang support enum forward declarations as an extension. Such
      forward-declared enums will be represented as normal BTF_KIND_ENUM types with
      vlen=0. This patch adds ability to resolve such enums to their corresponding
      fully defined enums. This helps to avoid duplicated BTF type graphs which only
      differ by some types referencing forward-declared enum vs full enum.
      
      One such example in kernel is enum irqchip_irq_state, defined in
      include/linux/interrupt.h and forward-declared in include/linux/irq.h. This
      causes entire struct task_struct and all referenced types to be duplicated in
      btf_dedup output. This patch eliminates such duplication cases.
      Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      9768095b
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3b319ee2
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These fix a couple of issues and do some cleanups on top of the
        previous ACPI changes for 5.1-rc1.
      
        Specifics:
      
         - Fix a crash caused by unloading an SSDT overlay (Andy Shevchenko)
      
         - Prevent user space from getting confusing error values on failing
           ACPI sysfs accesses (Rafael Wysocki)
      
         - Simplify leaf node detection in the PPTT parsing code by using a
           new flag defined in ACPI 6.3 (Jeremy Linton)
      
         - Add missing "static" in some places in the ACPI configfs code (Andy
           Shevchenko)
      
         - Fix acpidbg tool path in the ACPI documentation (Flavio Suligoi)"
      
      * tag 'acpi-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: sysfs: Prevent get_status() from returning acpi_status
        ACPI / device_sysfs: Avoid OF modalias creation for removed device
        ACPI / configfs: Mark local data structures static
        ACPI / configfs: Mark local functions static
        ACPI: tables: Simplify PPTT leaf node detection
        ACPI: Documentation: Fix path for acpidbg tool
      3b319ee2
    • Linus Torvalds's avatar
      Merge tag 'pm-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 9352ca58
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These are mostly fixes and cleanups on top of the previously merged
        power management material for 5.1-rc1 with one cpupower utility update
        that wasn't pushed earlier due to unfortunate timing.
      
        Specifics:
      
         - Fix registration of new cpuidle governors partially broken during
           the 5.0 development cycle by mistake (Rafael Wysocki).
      
         - Avoid integer overflows in the menu cpuidle governor by making it
           discard the overflowing data points upfront (Rafael Wysocki).
      
         - Fix minor mistake in the recent update of the iowait boost
           computation in the intel_pstate driver (Rafael Wysocki).
      
         - Drop incorrect __init annotation from one function in the pxa2xx
           cpufreq driver (Arnd Bergmann).
      
         - Fix the operating performance points (OPP) framework initialization
           for devices in multiple power domains if only one of them is
           scalable (Rajendra Nayak).
      
         - Fix mistake in dev_pm_opp_set_rate() which causes it to skip
           updating the performance state if the new frequency is the same as
           the old one (Viresh Kumar).
      
         - Rework the cancellation of wakeup source timers to avoid potential
           issues with it and do some cleanups unlocked by that change (Viresh
           Kumar, Rafael Wysocki).
      
         - Clean up the code computing the active/suspended time of devices in
           the PM-runtime framework after recent changes (Ulf Hansson).
      
         - Make the power management infrastructure code use pr_fmt()
           consistently (Joe Perches).
      
         - Clean up the generic power domains (genpd) framework somewhat
           (Aisheng Dong).
      
         - Improve kerneldoc comments for two functions in the cpufreq core
           (Rafael Wysocki).
      
         - Fix typo in a PM QoS file description comment (Aisheng Dong).
      
         - Update the handling of CPU boost frequencies in the cpupower
           utility (Abhishek Goel)"
      
      * tag 'pm-5.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: governor: Add new governors to cpuidle_governors again
        cpufreq: intel_pstate: Fix up iowait_boost computation
        PM / OPP: Update performance state when freq == old_freq
        PM / wakeup: Drop wakeup_source_drop()
        PM / wakeup: Rework wakeup source timer cancellation
        PM / domains: Remove one unnecessary blank line
        PM / Domains: Return early for all errors in _genpd_power_off()
        PM / Domains: Improve warn for multiple states but no governor
        OPP: Fix handling of multiple power domains
        PM / QoS: Fix typo in file description
        cpufreq: pxa2xx: remove incorrect __init annotation
        PM-runtime: Call pm_runtime_active|suspended_time() from sysfs
        PM-runtime: Consolidate code to get active/suspended time
        PM: Add and use pr_fmt()
        cpufreq: Improve kerneldoc comments for cpufreq_cpu_get/put()
        cpuidle: menu: Avoid overflows when computing variance
        tools/power/cpupower: Display boost frequency separately
      9352ca58
    • Linus Torvalds's avatar
      Merge tag 'microblaze-v5.1-rc1' of git://git.monstr.eu/linux-2.6-microblaze · 9bc44610
      Linus Torvalds authored
      Pull Microblaze update from Michal Simek:
       "Simplify debugfs initialization"
      
      * tag 'microblaze-v5.1-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
        microblaze: no need to check return value of debugfs_create functions
      9bc44610
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f3ca4c55
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "More fixes in the queue:
      
        1) Netfilter nat can erroneously register the device notifier twice,
           fix from Florian Westphal.
      
        2) Use after free in nf_tables, from Pablo Neira Ayuso.
      
        3) Parallel update of steering rule fix in mlx5 river, from Eli
           Britstein.
      
        4) RX processing panic in lan743x, fix from Bryan Whitehead.
      
        5) Use before initialization of TCP_SKB_CB, fix from Christoph Paasch.
      
        6) Fix locking in SRIOV mode of mlx4 driver, from Jack Morgenstein.
      
        7) Fix TX stalls in lan743x due to mishandling of interrupt ACKing
           modes, from Bryan Whitehead.
      
        8) Fix infoleak in l2tp_ip6_recvmsg(), from Eric Dumazet"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits)
        pptp: dst_release sk_dst_cache in pptp_sock_destruct
        MAINTAINERS: GENET & SYSTEMPORT: Add internal Broadcom list
        l2tp: fix infoleak in l2tp_ip6_recvmsg()
        net/tls: Inform user space about send buffer availability
        net_sched: return correct value for *notify* functions
        lan743x: Fix TX Stall Issue
        net/mlx4_core: Fix qp mtt size calculation
        net/mlx4_core: Fix locking in SRIOV mode when switching between events and polling
        net/mlx4_core: Fix reset flow when in command polling mode
        mlxsw: minimal: Initialize base_mac
        mlxsw: core: Prevent duplication during QSFP module initialization
        net: dwmac-sun8i: fix a missing check of of_get_phy_mode
        net: sh_eth: fix a missing check of of_get_phy_mode
        net: 8390: fix potential NULL pointer dereferences
        net: fujitsu: fix a potential NULL pointer dereference
        net: qlogic: fix a potential NULL pointer dereference
        isdn: hfcpci: fix potential NULL pointer dereference
        Documentation: devicetree: add a new optional property for port mac address
        net: rocker: fix a potential NULL pointer dereference
        net: qlge: fix a potential NULL pointer dereference
        ...
      f3ca4c55