29 Jan, 2020

4 commits

  • Pull networking updates from David Miller:

    1) Add WireGuard

    2) Add HE and TWT support to ath11k driver, from John Crispin.

    3) Add ESP in TCP encapsulation support, from Sabrina Dubroca.

    4) Add variable window congestion control to TIPC, from Jon Maloy.

    5) Add BCM84881 PHY driver, from Russell King.

    6) Start adding netlink support for ethtool operations, from Michal
    Kubecek.

    7) Add XDP drop and TX action support to ena driver, from Sameeh
    Jubran.

    8) Add new ipv4 route notifications so that mlxsw driver does not have
    to handle identical routes itself. From Ido Schimmel.

    9) Add BPF dynamic program extensions, from Alexei Starovoitov.

    10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes.

    11) Add support for macsec HW offloading, from Antoine Tenart.

    12) Add initial support for MPTCP protocol, from Christoph Paasch,
    Matthieu Baerts, Florian Westphal, Peter Krystad, and many others.

    13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu
    Cherian, and others.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits)
    net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC
    udp: segment looped gso packets correctly
    netem: change mailing list
    qed: FW 8.42.2.0 debug features
    qed: rt init valid initialization changed
    qed: Debug feature: ilt and mdump
    qed: FW 8.42.2.0 Add fw overlay feature
    qed: FW 8.42.2.0 HSI changes
    qed: FW 8.42.2.0 iscsi/fcoe changes
    qed: Add abstraction for different hsi values per chip
    qed: FW 8.42.2.0 Additional ll2 type
    qed: Use dmae to write to widebus registers in fw_funcs
    qed: FW 8.42.2.0 Parser offsets modified
    qed: FW 8.42.2.0 Queue Manager changes
    qed: FW 8.42.2.0 Expose new registers and change windows
    qed: FW 8.42.2.0 Internal ram offsets modifications
    MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver
    Documentation: net: octeontx2: Add RVU HW and drivers overview
    octeontx2-pf: ethtool RSS config support
    octeontx2-pf: Add basic ethtool support
    ...

    Linus Torvalds
     
  • Pull x86 cpu-features updates from Ingo Molnar:
    "The biggest change in this cycle was a large series from Sean
    Christopherson to clean up the handling of VMX features. This both
    fixes bugs/inconsistencies and makes the code more coherent and
    future-proof.

    There are also two cleanups and a minor TSX syslog messages
    enhancement"

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits)
    x86/cpu: Remove redundant cpu_detect_cache_sizes() call
    x86/cpu: Print "VMX disabled" error message iff KVM is enabled
    KVM: VMX: Allow KVM_INTEL when building for Centaur and/or Zhaoxin CPUs
    perf/x86: Provide stubs of KVM helpers for non-Intel CPUs
    KVM: VMX: Use VMX_FEATURE_* flags to define VMCS control bits
    KVM: VMX: Check for full VMX support when verifying CPU compatibility
    KVM: VMX: Use VMX feature flag to query BIOS enabling
    KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR
    x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured
    x86/cpu: Set synthetic VMX cpufeatures during init_ia32_feat_ctl()
    x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_*
    x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs
    x86/vmx: Introduce VMX_FEATURES_*
    x86/cpu: Clear VMX feature flag if VMX is not fully enabled
    x86/zhaoxin: Use common IA32_FEAT_CTL MSR initialization
    x86/centaur: Use common IA32_FEAT_CTL MSR initialization
    x86/mce: WARN once if IA32_FEAT_CTL MSR is left unlocked
    x86/intel: Initialize IA32_FEAT_CTL MSR at boot
    tools/x86: Sync msr-index.h from kernel sources
    selftests, kvm: Replace manual MSR defs with common msr-index.h
    ...

    Linus Torvalds
     
  • Pull perf updates from Ingo Molnar:
    "Kernel side changes:

    - Ftrace is one of the last W^X violators (after this only KLP is
    left). These patches move it over to the generic text_poke()
    interface and thereby get rid of this oddity. This requires a
    surprising amount of surgery, by Peter Zijlstra.

    - x86/AMD PMUs: add support for 'Large Increment per Cycle Events' to
    count certain types of events that have a special, quirky hw ABI
    (by Kim Phillips)

    - kprobes fixes by Masami Hiramatsu

    Lots of tooling updates as well, the following subcommands were
    updated: annotate/report/top, c2c, clang, record, report/top TUI,
    sched timehist, tests; plus updates were done to the gtk ui, libperf,
    headers and the parser"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits)
    perf/x86/amd: Add support for Large Increment per Cycle Events
    perf/x86/amd: Constrain Large Increment per Cycle events
    perf/x86/intel/rapl: Add Comet Lake support
    tracing: Initialize ret in syscall_enter_define_fields()
    perf header: Use last modification time for timestamp
    perf c2c: Fix return type for histogram sorting comparision functions
    perf beauty sockaddr: Fix augmented syscall format warning
    perf/ui/gtk: Fix gtk2 build
    perf ui gtk: Add missing zalloc object
    perf tools: Use %define api.pure full instead of %pure-parser
    libperf: Setup initial evlist::all_cpus value
    perf report: Fix no libunwind compiled warning break s390 issue
    perf tools: Support --prefix/--prefix-strip
    perf report: Clarify in help that --children is default
    tools build: Fix test-clang.cpp with Clang 8+
    perf clang: Fix build with Clang 9
    kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic
    tools lib: Fix builds when glibc contains strlcpy()
    perf report/top: Make 'e' visible in the help and make it toggle showing callchains
    perf report/top: Do not offer annotation for symbols without samples
    ...

    Linus Torvalds
     
  • Pull RCU updates from Ingo Molnar:
    "The RCU changes in this cycle were:
    - Expedited grace-period updates
    - kfree_rcu() updates
    - RCU list updates
    - Preemptible RCU updates
    - Torture-test updates
    - Miscellaneous fixes
    - Documentation updates"

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (69 commits)
    rcu: Remove unused stop-machine #include
    powerpc: Remove comment about read_barrier_depends()
    .mailmap: Add entries for old paulmck@kernel.org addresses
    srcu: Apply *_ONCE() to ->srcu_last_gp_end
    rcu: Switch force_qs_rnp() to for_each_leaf_node_cpu_mask()
    rcu: Move rcu_{expedited,normal} definitions into rcupdate.h
    rcu: Move gp_state_names[] and gp_state_getname() to tree_stall.h
    rcu: Remove the declaration of call_rcu() in tree.h
    rcu: Fix tracepoint tracking RCU CPU kthread utilization
    rcu: Fix harmless omission of "CONFIG_" from #if condition
    rcu: Avoid tick_dep_set_cpu() misordering
    rcu: Provide wrappers for uses of ->rcu_read_lock_nesting
    rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special()
    rcu: Clear ->rcu_read_unlock_special only once
    rcu: Clear .exp_hint only when deferred quiescent state has been reported
    rcu: Rename some instance of CONFIG_PREEMPTION to CONFIG_PREEMPT_RCU
    rcu: Remove kfree_call_rcu_nobatch()
    rcu: Remove kfree_rcu() special casing and lazy-callback handling
    rcu: Add support for debug_objects debugging for kfree_rcu()
    rcu: Add multiple in-flight batches of kfree_rcu() work
    ...

    Linus Torvalds
     

28 Jan, 2020

5 commits

  • Pull timer updates from Thomas Gleixner:
    "The timekeeping and timers departement provides:

    - Time namespace support:

    If a container migrates from one host to another then it expects
    that clocks based on MONOTONIC and BOOTTIME are not subject to
    disruption. Due to different boot time and non-suspended runtime
    these clocks can differ significantly on two hosts, in the worst
    case time goes backwards which is a violation of the POSIX
    requirements.

    The time namespace addresses this problem. It allows to set offsets
    for clock MONOTONIC and BOOTTIME once after creation and before
    tasks are associated with the namespace. These offsets are taken
    into account by timers and timekeeping including the VDSO.

    Offsets for wall clock based clocks (REALTIME/TAI) are not provided
    by this mechanism. While in theory possible, the overhead and code
    complexity would be immense and not justified by the esoteric
    potential use cases which were discussed at Plumbers '18.

    The overhead for tasks in the root namespace (ie where host time
    offsets = 0) is in the noise and great effort was made to ensure
    that especially in the VDSO. If time namespace is disabled in the
    kernel configuration the code is compiled out.

    Kudos to Andrei Vagin and Dmitry Sofanov who implemented this
    feature and kept on for more than a year addressing review
    comments, finding better solutions. A pleasant experience.

    - Overhaul of the alarmtimer device dependency handling to ensure
    that the init/suspend/resume ordering is correct.

    - A new clocksource/event driver for Microchip PIT64

    - Suspend/resume support for the Hyper-V clocksource

    - The usual pile of fixes, updates and improvements mostly in the
    driver code"

    * tag 'timers-core-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits)
    alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n
    alarmtimer: Use wakeup source from alarmtimer platform device
    alarmtimer: Make alarmtimer platform device child of RTC device
    alarmtimer: Update alarmtimer_get_rtcdev() docs to reflect reality
    hrtimer: Add missing sparse annotation for __run_timer()
    lib/vdso: Only read hrtimer_res when needed in __cvdso_clock_getres()
    MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel
    clocksource/drivers/hyper-v: Set TSC clocksource as default w/ InvariantTSC
    clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources
    clocksource/drivers/timer-microchip-pit64b: Fix sparse warning
    clocksource/drivers/exynos_mct: Rename Exynos to lowercase
    clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access
    clocksource/drivers/timer-ti-dm: Switch to platform_get_irq
    clocksource/drivers/timer-ti-dm: Convert to devm_platform_ioremap_resource
    clocksource/drivers/em_sti: Fix variable declaration in em_sti_probe
    clocksource/drivers/em_sti: Convert to devm_platform_ioremap_resource
    clocksource/drivers/bcm2835_timer: Fix memory leak of timer
    clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
    clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support
    clocksource/drivers/hyper-v: Reserve PAGE_SIZE space for tsc page
    ...

    Linus Torvalds
     
  • Pull cgroup updates from Tejun Heo:

    - cgroup2 interface for hugetlb controller. I think this was the last
    remaining bit which was missing from cgroup2

    - fixes for race and a spurious warning in threaded cgroup handling

    - other minor changes

    * 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
    iocost: Fix iocost_monitor.py due to helper type mismatch
    cgroup: Prevent double killing of css when enabling threaded cgroup
    cgroup: fix function name in comment
    mm: hugetlb controller for cgroups v2

    Linus Torvalds
     
  • Pull ioremap updates from Christoph Hellwig:
    "Remove the ioremap_nocache API (plus wrappers) that are always
    identical to ioremap"

    * tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap:
    remove ioremap_nocache and devm_ioremap_nocache
    MIPS: define ioremap_nocache to ioremap

    Linus Torvalds
     
  • Pull ACPI updates from Rafael Wysocki:
    "These update the ACPICA code in the kernel to the most recent upstream
    revision (20200110), add new hardware support to a handful of ACPI
    drivers, make the ACPI fan driver expose power states information for
    fans, add some more quirks, fix bugs and clean up assorted things.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20200110
    including:
    - Update of copyright notices to 2020 (Bob Moore).
    - Dispatcher fix to always generate buffer objects for the ASL
    create_field() operator (Maximilian Luz).
    - Debugger cleanup (Colin Ian King).
    - Disassembler change to create buffer fields in
    ACPI_PARSE_LOAD_PASS1 (Erik Kaneda).
    - UNIX line ending support for non-windows builds in acpisrc (Erik
    Kaneda).

    - Update the list of ACPICA maintainers (Rafael Wysocki).

    - Add Intel Tiger Lake ACPI device IDs to the ACPI DPTF, ACPI fan,
    int340x_thermal and intel-hid drivers (Gayatri Kammela).

    - Make the ACPI fan driver create additional sysfs attributes to
    expose power states information for fans (Srinivas Pandruvada).

    - Fix up the ACPI battery driver to deal with unexpected battery
    capacity information in a better way (Hans de Goede).

    - Add ACPI backlight quirks for Lenovo E41-25/45 and MSI MS-7721
    boards (Aaron Ma, Hans de Goede).

    - Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch to
    the ACPI button driver (Jason Ekstrand).

    - Drop TIMER_DEFERRABLE from the GHES polling mode timer function
    flags to make it run precisely at the configured time (Bhaskar
    Upadhaya).

    - Fix race condition related to the reference counting of query
    handlers in the ACPI EC driver (Rafael Wysocki).

    - Fix ACPI tools build issue (Zhengyuan Liu).

    - Replace dma_request_slave_channel() with dma_request_chan() in the
    firmware guide documentation for ACPI (Peter Ujfalusi).

    - Fix typo in a comment and clean up function parameter data type
    inconsistencies (Kacper Piwiński, Tian Tao)"

    * tag 'acpi-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits)
    ACPICA: Update version to 20200110
    ACPICA: All acpica: Update copyrights to 2020 Including tool signons.
    apei/ghes: Do not delay GHES polling
    ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch
    ACPI: PPTT: Consistently use unsigned int as parameter type
    ACPI: EC: Reference count query handlers under lock
    ACPICA: Update the list of maintainers
    ACPICA: Update version to 20191213
    ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator
    ACPICA: acpisrc: add unix line ending support for non-windows build
    ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
    ACPICA: debugger: fix spelling mistake "adress" -> "address"
    ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards
    docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan()
    thermal: int340x_thermal: Add Tiger Lake ACPI device IDs
    platform/x86: intel-hid: Add Tiger Lake ACPI device ID
    ACPI: fan: Add Tiger Lake ACPI device ID
    ACPI: DPTF: Add Tiger Lake ACPI device IDs
    ACPI: fan: Expose fan performance state information
    tools/power/acpi: fix compilation error
    ...

    Linus Torvalds
     
  • Pull x86 platform driver updates from Andy Shevchenko:

    - Enable thermal policy for ASUS TUF FX705DY/FX505DY

    - Support left round button on ASUS N56VB

    - Support new Mellanox platforms of basic class VMOD0009 and VMOD0010

    - Intel Comet Lake, Tiger Lake and Elkhart Lake support in the PMC
    driver

    - Big clean-up to Intel PMC core, PMC IPC and SCU IPC drivers

    - Touchscreen support for the PiPO W11 tablet

    * tag 'platform-drivers-x86-v5.6-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits)
    platform/x86: intel_pmc_ipc: Switch to use driver->dev_groups
    platform/x86: intel_pmc_ipc: Propagate error from kstrtoul()
    platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes
    platform/x86: intel_pmc_ipc: Get rid of unnecessary includes
    platform/x86: intel_pmc_ipc: Drop ipc_data_readb()
    platform/x86: intel_pmc_ipc: Drop intel_pmc_gcr_read() and intel_pmc_gcr_write()
    platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_raw_cmd() static
    platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() static
    platform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() static
    platform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functions
    platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command()
    platform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]()
    platform/x86: intel_scu_ipc: Drop unused macros
    platform/x86: intel_scu_ipc: Drop unused prototype intel_scu_ipc_fw_update()
    platform/x86: intel_scu_ipc: Sleeping is fine when polling
    platform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl()
    platform/x86: intel_scu_ipc: Remove Lincroft support
    platform/x86: intel_scu_ipc: Add constants for register offsets
    platform/x86: intel_scu_ipc: Fix interrupt support
    platform/x86: intel_scu_ipcutil: Remove default y from Kconfig
    ...

    Linus Torvalds
     

27 Jan, 2020

6 commits

  • Daniel Borkmann says:

    ====================
    pull-request: bpf-next 2020-01-27

    The following pull-request contains BPF updates for your *net-next* tree.

    We've added 20 non-merge commits during the last 5 day(s) which contain
    a total of 24 files changed, 433 insertions(+), 104 deletions(-).

    The main changes are:

    1) Make BPF trampolines and dispatcher aware for the stack unwinder, from Jiri Olsa.

    2) Improve handling of failed CO-RE relocations in libbpf, from Andrii Nakryiko.

    3) Several fixes to BPF sockmap and reuseport selftests, from Lorenz Bauer.

    4) Various cleanups in BPF devmap's XDP flush code, from John Fastabend.

    5) Fix BPF flow dissector when used with port ranges, from Yoshiki Komachi.

    6) Fix bpffs' map_seq_next callback to always inc position index, from Vasily Averin.

    7) Allow overriding LLVM tooling for runqslower utility, from Andrey Ignatov.

    8) Silence false-positive lockdep splats in devmap hash lookup, from Amol Grover.

    9) Fix fentry/fexit selftests to initialize a variable before use, from John Sperbeck.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Add a simple test to make sure that a filter based on specified port
    range classifies packets correctly.

    Signed-off-by: Yoshiki Komachi
    Signed-off-by: Daniel Borkmann
    Acked-by: Petar Penkov
    Acked-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20200117070533.402240-3-komachi.yoshiki@gmail.com

    Yoshiki Komachi
     
  • * acpi-tables:
    ACPI: PPTT: Consistently use unsigned int as parameter type

    * acpi-button:
    ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch

    * acpi-ec:
    ACPI: EC: Reference count query handlers under lock

    * acpi-doc:
    docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan()

    * acpi-tools:
    tools/power/acpi: fix compilation error

    Rafael J. Wysocki
     
  • * acpica:
    ACPICA: Update version to 20200110
    ACPICA: All acpica: Update copyrights to 2020 Including tool signons.
    ACPICA: Update the list of maintainers
    ACPICA: Update version to 20191213
    ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator
    ACPICA: acpisrc: add unix line ending support for non-windows build
    ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
    ACPICA: debugger: fix spelling mistake "adress" -> "address"

    Rafael J. Wysocki
     
  • tools/testing/selftests/bpf/Makefile supports overriding clang, llc and
    other tools so that custom ones can be used instead of those from PATH.
    It's convinient and heavily used by some users.

    Apply same rules to runqslower/Makefile.

    Signed-off-by: Andrey Ignatov
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/20200124224142.1833678-1-rdna@fb.com

    Andrey Ignatov
     
  • This test covers functionality and stability of the newly added
    nftables set implementation supporting concatenation of ranged
    fields.

    For some selected set expression types, test:
    - correctness, by checking that packets match or don't
    - concurrency, by attempting races between insertion, deletion, lookup
    - timeout feature, checking that packets don't match expired entries

    and (roughly) estimate matching rates, comparing to baselines for
    simple drop on netdev ingress hook and for hash and rbtrees sets.

    In order to send packets, this needs one of sendip, netcat or bash.
    To flood with traffic, iperf3, iperf and netperf are supported. For
    performance measurements, this relies on the sample pktgen script
    pktgen_bench_xmit_mode_netif_receive.sh.

    If none of the tools suitable for a given test are available, specific
    tests will be skipped.

    Signed-off-by: Stefano Brivio
    Signed-off-by: Pablo Neira Ayuso

    Stefano Brivio
     

25 Jan, 2020

12 commits

  • There's limit of 40 programs tht can be attached
    to trampoline for one function. Adding test that
    tries to attach that many plus one extra that needs
    to fail.

    Signed-off-by: Jiri Olsa
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200123161508.915203-4-jolsa@kernel.org

    Jiri Olsa
     
  • Add a test that runs traffic across a port throttled with TBF. The test
    checks that the observed throughput is within +-5% from the installed
    shaper.

    To allow checking both the software datapath and the offloaded one, make
    the test suitable for inclusion from driver-specific wrapper. Introduce
    such wrappers for mlxsw.

    Signed-off-by: Petr Machata
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Petr Machata
     
  • The function tc_rule_stats_get() fetches a packet counter of a given TC
    rule. Extend it to support byte counters as well by adding an optional
    argument with selector.

    Signed-off-by: Petr Machata
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Petr Machata
     
  • The function busywait() is handy as a safety-latched variant of a while
    loop. Many selftests deal specifically with counter values, and busywaiting
    on them is likely to be rather common (it is not quite common now, but
    busywait() has not been around for very long). To facilitate expressing
    simply what is tested, introduce two helpers:

    - until_counter_is(), which can be used as a predicate passed to
    busywait(), which holds when expression, which is itself passed as an
    argument to until_counter_is(), reaches a desired value.

    - busywait_for_counter(), which is useful for waiting until a given counter
    changes "by" (as opposed to "to") a certain amount.

    Signed-off-by: Petr Machata
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Petr Machata
     
  • The function humanize() is used for converting value in bits/s to a
    human-friendly approximate value in Kbps, Mbps or Gbps. There is nothing
    hardware-specific in that, so move the function to lib.sh.

    Similarly for the rate() function, which just does a bit of math to
    calculate a rate, given two counter values and a time interval.

    Signed-off-by: Petr Machata
    Signed-off-by: Ido Schimmel
    Signed-off-by: David S. Miller

    Petr Machata
     
  • …k/linux-rcu into core/rcu

    Pull RCU updates from Paul E. McKenney:

    - Expedited grace-period updates
    - kfree_rcu() updates
    - RCU list updates
    - Preemptible RCU updates
    - Torture-test updates
    - Miscellaneous fixes
    - Documentation updates

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

    Ingo Molnar
     
  • Fix bug requesting invalid size of reallocated array when constructing CO-RE
    relocation candidate list. This can cause problems if there are many potential
    candidates and a very fine-grained memory allocator bucket sizes are used.

    Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm")
    Reported-by: William Smith
    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Yonghong Song
    Link: https://lore.kernel.org/bpf/20200124201847.212528-1-andriin@fb.com

    Andrii Nakryiko
     
  • Previously, if libbpf failed to resolve CO-RE relocation for some
    instructions, it would either return error immediately, or, if
    .relaxed_core_relocs option was set, would replace relocatable offset/imm part
    of an instruction with a bogus value (-1). Neither approach is good, because
    there are many possible scenarios where relocation is expected to fail (e.g.,
    when some field knowingly can be missing on specific kernel versions). On the
    other hand, replacing offset with invalid one can hide programmer errors, if
    this relocation failue wasn't anticipated.

    This patch deprecates .relaxed_core_relocs option and changes the approach to
    always replacing instruction, for which relocation failed, with invalid BPF
    helper call instruction. For cases where this is expected, BPF program should
    already ensure that that instruction is unreachable, in which case this
    invalid instruction is going to be silently ignored. But if instruction wasn't
    guarded, BPF program will be rejected at verification step with verifier log
    pointing precisely to the place in assembly where the problem is.

    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Martin KaFai Lau
    Link: https://lore.kernel.org/bpf/20200124053837.2434679-1-andriin@fb.com

    Andrii Nakryiko
     
  • Currently, there is a lot of false positives if a single reuseport test
    fails. This is because expected_results and the result map are not cleared.

    Zero both after individual test runs, which fixes the mentioned false
    positives.

    Fixes: 91134d849a0e ("bpf: Test BPF_PROG_TYPE_SK_REUSEPORT")
    Signed-off-by: Lorenz Bauer
    Signed-off-by: Daniel Borkmann
    Reviewed-by: Jakub Sitnicki
    Acked-by: Martin KaFai Lau
    Acked-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20200124112754.19664-5-lmb@cloudflare.com

    Lorenz Bauer
     
  • Include the name of the mismatching result in human readable format
    when reporting an error. The new output looks like the following:

    unexpected result
    result: [1, 0, 0, 0, 0, 0]
    expected: [0, 0, 0, 0, 0, 0]
    mismatch on DROP_ERR_INNER_MAP (bpf_prog_linum:153)
    check_results:FAIL:382

    Signed-off-by: Lorenz Bauer
    Signed-off-by: Daniel Borkmann
    Reviewed-by: Jakub Sitnicki
    Acked-by: Martin KaFai Lau
    Acked-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20200124112754.19664-4-lmb@cloudflare.com

    Lorenz Bauer
     
  • The reuseport tests currently suffer from a race condition: FIN
    packets count towards DROP_ERR_SKB_DATA, since they don't contain
    a valid struct cmd. Tests will spuriously fail depending on whether
    check_results is called before or after the FIN is processed.

    Exit the BPF program early if FIN is set.

    Fixes: 91134d849a0e ("bpf: Test BPF_PROG_TYPE_SK_REUSEPORT")
    Signed-off-by: Lorenz Bauer
    Signed-off-by: Daniel Borkmann
    Reviewed-by: Jakub Sitnicki
    Acked-by: Martin KaFai Lau
    Acked-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20200124112754.19664-3-lmb@cloudflare.com

    Lorenz Bauer
     
  • Use a proper temporary file for sendpage tests. This means that running
    the tests doesn't clutter the working directory, and allows running the
    test on read-only filesystems.

    Fixes: 16962b2404ac ("bpf: sockmap, add selftests")
    Signed-off-by: Lorenz Bauer
    Signed-off-by: Daniel Borkmann
    Reviewed-by: Jakub Sitnicki
    Acked-by: Martin KaFai Lau
    Acked-by: John Fastabend
    Link: https://lore.kernel.org/bpf/20200124112754.19664-2-lmb@cloudflare.com

    Lorenz Bauer
     

24 Jan, 2020

4 commits

  • Add mptcp_connect tool:
    xmit two files back and forth between two processes, several net
    namespaces including some adding delays, losses and reordering.
    Wrapper script tests that data was transmitted without corruption.

    The "-c" command line option for mptcp_connect.sh is there for debugging:

    The script will use tcpdump to create one .pcap file per test case, named
    according to the namespaces, protocols, and connect address in use.
    For example, the first test case writes the capture to
    ns1-ns1-MPTCP-MPTCP-10.0.1.1.pcap.

    The stderr output from tcpdump is printed after the test completes to
    show tcpdump's "packets dropped by kernel" information.

    Also check that userspace can't create MPTCP sockets when mptcp.enabled
    sysctl is off.

    The "-b" option allows to tune/lower send buffer size.
    "-m mmap" can be used to test blocking io. Default is non-blocking
    io using read/write/poll.

    Will run automatically on "make kselftest".

    Note that the default timeout of 45 seconds is used even if there is a
    "settings" changing it to 450. 45 seconds should be enough in most cases
    but this depends on the machine running the tests.

    A fix to correctly read the "settings" file has been proposed upstream
    but not applied yet. It is not blocking the execution of these new tests
    but it would be nice to have it:

    https://patchwork.kernel.org/patch/11204935/

    Co-developed-by: Paolo Abeni
    Signed-off-by: Paolo Abeni
    Co-developed-by: Mat Martineau
    Signed-off-by: Mat Martineau
    Co-developed-by: Matthieu Baerts
    Signed-off-by: Matthieu Baerts
    Co-developed-by: Davide Caratti
    Signed-off-by: Davide Caratti
    Signed-off-by: Florian Westphal
    Signed-off-by: Christoph Paasch
    Signed-off-by: David S. Miller

    Florian Westphal
     
  • Add printing out BTF_KIND_FUNC's linkage.

    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Martin KaFai Lau
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/bpf/20200124054317.2459436-1-andriin@fb.com

    Andrii Nakryiko
     
  • Detect when bpftool source code changes and trigger rebuild within
    selftests/bpf Makefile. Also fix few small formatting problems.

    Signed-off-by: Andrii Nakryiko
    Signed-off-by: Daniel Borkmann
    Acked-by: Martin KaFai Lau
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/bpf/20200124054148.2455060-1-andriin@fb.com

    Andrii Nakryiko
     
  • The 'duration' variable is referenced in the CHECK() macro, and there are
    some uses of the macro before 'duration' is set. The clang compiler
    (validly) complains about this.

    Sample error:

    .../selftests/bpf/prog_tests/fexit_test.c:23:6: warning: variable 'duration' is uninitialized when used here [-Wuninitialized]
    if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    .../selftests/bpf/test_progs.h:134:25: note: expanded from macro 'CHECK'
    if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno))
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    _CHECK(condition, tag, duration, format)
    ^~~~~~~~

    Signed-off-by: John Sperbeck
    Signed-off-by: Stanislav Fomichev
    Signed-off-by: Daniel Borkmann
    Acked-by: Martin KaFai Lau
    Link: https://lore.kernel.org/bpf/20200123235144.93610-1-sdf@google.com

    John Sperbeck
     

23 Jan, 2020

6 commits

  • Alexei Starovoitov says:

    ====================
    pull-request: bpf-next 2020-01-22

    The following pull-request contains BPF updates for your *net-next* tree.

    We've added 92 non-merge commits during the last 16 day(s) which contain
    a total of 320 files changed, 7532 insertions(+), 1448 deletions(-).

    The main changes are:

    1) function by function verification and program extensions from Alexei.

    2) massive cleanup of selftests/bpf from Toke and Andrii.

    3) batched bpf map operations from Brian and Yonghong.

    4) tcp congestion control in bpf from Martin.

    5) bulking for non-map xdp_redirect form Toke.

    6) bpf_send_signal_thread helper from Yonghong.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch adds a bpf_cubic example. Some highlights:
    1. CONFIG_HZ .kconfig map is used.
    2. In bictcp_update(), calculation is changed to use usec
    resolution (i.e. USEC_PER_JIFFY) instead of using jiffies.
    Thus, usecs_to_jiffies() is not used in the bpf_cubic.c.
    3. In bitctcp_update() [under tcp_friendliness], the original
    "while (ca->ack_cnt > delta)" loop is changed to the equivalent
    "ca->ack_cnt / delta" operation.

    Signed-off-by: Martin KaFai Lau
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200122233658.903774-1-kafai@fb.com

    Martin KaFai Lau
     
  • This patch sync uapi bpf.h to tools/.

    Signed-off-by: Martin KaFai Lau
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/20200122233652.903348-1-kafai@fb.com

    Martin KaFai Lau
     
  • Add program extension tests that build on top of fexit_bpf2bpf tests.
    Replace three global functions in previously loaded test_pkt_access.c program
    with three new implementations:
    int get_skb_len(struct __sk_buff *skb);
    int get_constant(long val);
    int get_skb_ifindex(int val, struct __sk_buff *skb, int var);
    New function return the same results as original only if arguments match.

    new_get_skb_ifindex() demonstrates that 'skb' argument doesn't have to be first
    and only argument of BPF program. All normal skb based accesses are available.

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Daniel Borkmann
    Acked-by: John Fastabend
    Acked-by: Andrii Nakryiko
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/bpf/20200121005348.2769920-4-ast@kernel.org

    Alexei Starovoitov
     
  • Add minimal support for program extensions. bpf_object_open_opts() needs to be
    called with attach_prog_fd = target_prog_fd and BPF program extension needs to
    have in .c file section definition like SEC("freplace/func_to_be_replaced").
    libbpf will search for "func_to_be_replaced" in the target_prog_fd's BTF and
    will pass it in attach_btf_id to the kernel. This approach works for tests, but
    more compex use case may need to request function name (and attach_btf_id that
    kernel sees) to be more dynamic. Such API will be added in future patches.

    Signed-off-by: Alexei Starovoitov
    Signed-off-by: Daniel Borkmann
    Acked-by: John Fastabend
    Acked-by: Andrii Nakryiko
    Acked-by: Toke Høiland-Jørgensen
    Link: https://lore.kernel.org/bpf/20200121005348.2769920-3-ast@kernel.org

    Alexei Starovoitov
     
  • During cross-compilation, it was discovered that LDFLAGS and
    LDLIBS were not being used while building binaries, leading
    to defaults which were not necessarily correct.

    OpenEmbedded reported this kind of problem:

    ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS?

    Signed-off-by: Daniel Díaz
    Signed-off-by: Daniel Borkmann
    Acked-by: Andrii Nakryiko
    Acked-by: John Fastabend

    Daniel Díaz
     

21 Jan, 2020

3 commits

  • To make sure no new files are introduced that doesn't include the bpf/
    prefix in its #include, remove tools/lib/bpf from the include path
    entirely.

    Instead, we introduce a new header files directory under the scratch tools/
    dir, and add a rule to run the 'install_headers' rule from libbpf to have a
    full set of consistent libbpf headers in $(OUTPUT)/tools/include/bpf, and
    then use $(OUTPUT)/tools/include as the include path for selftests.

    For consistency we also make sure we put all the scratch build files from
    other bpftool and libbpf into tools/build/, so everything stays within
    selftests/.

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/157952561246.1683545.2762245552022369203.stgit@toke.dk

    Toke Høiland-Jørgensen
     
  • This adds support for specifying the libbpf include and object paths as
    arguments to the runqslower Makefile, to support reusing the libbpf version
    built as part of the selftests.

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/157952561135.1683545.5660339645093141381.stgit@toke.dk

    Toke Høiland-Jørgensen
     
  • Since we are now consistently using the bpf/ prefix on #include directives,
    we don't need to include tools/lib/bpf in the include path. Remove it to
    make sure we don't inadvertently introduce new includes without the prefix.

    Signed-off-by: Toke Høiland-Jørgensen
    Signed-off-by: Alexei Starovoitov
    Acked-by: Andrii Nakryiko
    Link: https://lore.kernel.org/bpf/157952561027.1683545.1976265477926794138.stgit@toke.dk

    Toke Høiland-Jørgensen