1. 03 8月, 2022 2 次提交
    • L
      wireguard: selftests: update config fragments · 2a8f91d2
      Lukas Bulwahn 提交于
      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: NLukas Bulwahn <lukas.bulwahn@gmail.com>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      2a8f91d2
    • J
      wireguard: ratelimiter: use hrtimer in selftest · 151c8e49
      Jason A. Donenfeld 提交于
      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: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      151c8e49
  2. 02 8月, 2022 13 次提交
  3. 01 8月, 2022 13 次提交
  4. 30 7月, 2022 12 次提交