1. Aug 03, 2022
    • Christophe JAILLET's avatar
      doc: sfp-phylink: Fix a broken reference · 6f63d044
      Christophe JAILLET authored
      The commit in Fixes: has changed a .txt file into a .yaml file. Update the
      documentation accordingly.
      
      While at it add some `` around some file names to improve the output.
      
      Fixes: 70991f1e
      
       ("dt-bindings: net: convert sff,sfp to dtschema")
      Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Link: https://lore.kernel.org/r/be3c7e87ca7f027703247eccfe000b8e34805094.1659247114.git.christophe.jaillet@wanadoo.fr
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      6f63d044
    • Jakub Kicinski's avatar
      Merge branch 'wireguard-patches-for-5-20-rc1' · 9017462f
      Jakub Kicinski authored
      Jason A. Donenfeld says:
      
      ====================
      wireguard patches for 5.20-rc1
      
      I had planned to send these out eventually as net.git patches, but as
      you emailed earlier, I figure there's no harm in just doing this now for
      net-next.git. Please apply the following small fixes:
      
      1) Rather than using msleep() in order to approximate ktime_get_coarse_
         boottime_ns(), instead use an hrtimer, rounded heuristically.
      
      2) An update in selftest config fragments, from Lukas.
      
      3) Linus noticed that a debugging WARN_ON() to detect (impossible) stack
         corruption would still allow the corruption to happen, making it harder
         to get the report about the corruption subsequently.
      
      4) Support for User Mode Linux in the test suite. This depends on some
         UML patches that are slated for 5.20. Richard hasn't sent his pull
         in, but they're in his tree, so I assume it'll happen.
      ====================
      
      Link: https://lore.kernel.org/r/20220802125613.340848-1-Jason@zx2c4.com
      
      
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      9017462f
    • Jason A. Donenfeld's avatar
      wireguard: selftests: support UML · b438b3b8
      Jason A. Donenfeld authored
      
      
      This shoud open up various possibilities like time travel execution, and
      is also just another platform to help shake out bugs.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      b438b3b8
    • Jason A. Donenfeld's avatar
      wireguard: allowedips: don't corrupt stack when detecting overflow · c31b14d8
      Jason A. Donenfeld authored
      
      
      In case push_rcu() and related functions are buggy, there's a
      WARN_ON(len >= 128), which the selftest tries to hit by being tricky. In
      case it is hit, we shouldn't corrupt the kernel's stack, though;
      otherwise it may be hard to even receive the report that it's buggy. So
      conditionalize the stack write based on that WARN_ON()'s return value.
      
      Note that this never *actually* happens anyway. The WARN_ON() in the
      first place is bounded by IS_ENABLED(DEBUG), and isn't expected to ever
      actually hit. This is just a debugging sanity check.
      
      Additionally, hoist the constant 128 into a named enum,
      MAX_ALLOWEDIPS_BITS, so that it's clear why this value is chosen.
      
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/all/CAHk-=wjJZGA6w_DxA+k7Ejbqsq+uGK==koPai3sqdsfJqemvag@mail.gmail.com/
      Fixes: e7096c13
      
       ("net: WireGuard secure network tunnel")
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      c31b14d8
    • Lukas Bulwahn's avatar
      wireguard: selftests: update config fragments · 2a8f91d2
      Lukas Bulwahn authored
      The kernel.config and debug.config fragments in wireguard selftests mention
      some config symbols that have been reworked:
      
      Commit c5665868 ("mm: kmemleak: use the memory pool for early
      allocations") removes the config DEBUG_KMEMLEAK_EARLY_LOG_SIZE and since
      then, the config's feature is available without further configuration.
      
      Commit 4675ff05 ("kmemcheck: rip it out") removes kmemcheck and the
      corresponding arch config HAVE_ARCH_KMEMCHECK. There is no need for this
      config.
      
      Commit 3bf195ae ("netfilter: nat: merge nf_nat_ipv4,6 into nat core")
      removes the config NF_NAT_IPV4 and since then, the config's feature is
      available without further configuration.
      
      Commit 41a2901e ("rcu: Remove SPARSE_RCU_POINTER Kconfig option")
      removes the config SPARSE_RCU_POINTER and since then, the config's feature
      is enabled by default.
      
      Commit dfb4357d ("time: Remove CONFIG_TIMER_STATS") removes the feature
      and config CONFIG_TIMER_STATS without any replacement.
      
      Commit 3ca17b1f
      
       ("lib/ubsan: remove null-pointer checks") removes the
      check and config UBSAN_NULL without any replacement.
      
      Adjust the config fragments to those changes in configs.
      
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      2a8f91d2
    • Jason A. Donenfeld's avatar
      wireguard: ratelimiter: use hrtimer in selftest · 151c8e49
      Jason A. Donenfeld authored
      Using msleep() is problematic because it's compared against
      ratelimiter.c's ktime_get_coarse_boottime_ns(), which means on systems
      with slow jiffies (such as UML's forced HZ=100), the result is
      inaccurate. So switch to using schedule_hrtimeout().
      
      However, hrtimer gives us access only to the traditional posix timers,
      and none of the _COARSE variants. So now, rather than being too
      imprecise like jiffies, it's too precise.
      
      One solution would be to give it a large "range" value, but this will
      still fire early on a loaded system. A better solution is to align the
      timeout to the actual coarse timer, and then round up to the nearest
      tick, plus change.
      
      So add the timeout to the current coarse time, and then
      schedule_hrtimer() until the absolute computed time.
      
      This should hopefully reduce flakes in CI as well. Note that we keep the
      retry loop in case the entire function is running behind, because the
      test could still be scheduled out, by either the kernel or by the
      hypervisor's kernel, in which case restarting the test and hoping to not
      be scheduled out still helps.
      
      Fixes: e7096c13
      
       ("net: WireGuard secure network tunnel")
      Suggested-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      151c8e49
  2. Aug 02, 2022
  3. Aug 01, 2022
  4. Jul 30, 2022