Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp464619pxb; Wed, 8 Sep 2021 05:24:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKFNiUgTPA+Fx4Vmdy7fIA7YHh3KwimqqhHQtXF6ONBOGfYehhPvlFgwvHqwYw+AIb6PSc X-Received: by 2002:a5d:848a:: with SMTP id t10mr3057980iom.82.1631103882851; Wed, 08 Sep 2021 05:24:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631103882; cv=none; d=google.com; s=arc-20160816; b=MLjaYZHnKvdq28s7BFoMoaTE7yRcavWUCfK9Eo0VtG9mXTTNvMAb0e4XJQlaQuLOHu ADvuRXycHhWUneLZZ0V3nINBYNrlwTre7sgLpkhtoCBKl+ZtksbcVRbWR3c8qiR8LmEa 8p8q2ziSQVllWXBENs1m+Bo8+6zAvHOesK8hvo30+N+Nh79MTvqDDhj8t4A156jPLYPg zc2Cs3IoUca0KL1zTJbFbsaFdfPy6b9Ml0KEdA/w+HsUvo2ElH+SL8QLZC7vCVRFW1N8 IW0yajQTMDdZM1eVeWsEpmGbHPsG4w0M5Zddr7ckQ8NBk0y89v6mhesxpGKhe02ES7A5 igPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a1wqLRAjQGQbL5Ky9793jaFJYPOWY+qCKsygcQkNMnU=; b=n+KxJADgZypiDM3vysHVINuS1i44uRJ4MHh+KgJp8i6Ow3wI6qUQs1AP+e7yvkZpav SZJjx2++NWzA+fIjglaJLlomGFO/Ltpt5lWFI3Wv5XVQhXiertIrLFrkSba61b61jWFB 1A7AdvzxBBARa82L5SvA4odvJA3p8xoNrhm+on6PP4Q5fSzEOAFTQ9BZU6t55ZPU81fK fD1z26yP4wiG5a3DehyZ5Q65zbplh6y29c4aAUymZYbNVGQzhlx0acXgTeY+FVVCYogi yVXlVvkD/vivau69g/ENngL9cG3IFmdNSZoLTqNnyuXvxAZ6/NuH6cujxmZxhV5sAje8 CV6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="I/1fwZMJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x4si1780312ilj.121.2021.09.08.05.24.31; Wed, 08 Sep 2021 05:24:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b="I/1fwZMJ"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348342AbhIHL2k (ORCPT + 99 others); Wed, 8 Sep 2021 07:28:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:33198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235210AbhIHL2e (ORCPT ); Wed, 8 Sep 2021 07:28:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ABE67610C8; Wed, 8 Sep 2021 11:27:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="I/1fwZMJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1631100444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a1wqLRAjQGQbL5Ky9793jaFJYPOWY+qCKsygcQkNMnU=; b=I/1fwZMJdlrivF4T0fRC+1O8hYK77EBb2N4NVvyYGHbPX8WW1XKimJmPWjQ7c9rYqIYXtc ZgdnSOcycX6q2wF80uwkilKf8cHvqF+Qd5pdkABP+3FGm8Y4g4/qnRdFm7tqonj7DBTxa7 8jCybFdXdgE5h0Hq2vpJfPM57S5HPyc= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id bfbfb799 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 8 Sep 2021 11:27:24 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id r4so3530254ybp.4; Wed, 08 Sep 2021 04:27:24 -0700 (PDT) X-Gm-Message-State: AOAM531F1dtzf5fsfT+IlIaQXjP5WJv9CtDkoT8SYP7gLvcS9K0l6Y7+ cCPI3LpLOkvE9BZ+/Aa4Q7kCJYVgxgW8w7AbLPU= X-Received: by 2002:a25:938d:: with SMTP id a13mr4754369ybm.62.1631100442956; Wed, 08 Sep 2021 04:27:22 -0700 (PDT) MIME-Version: 1.0 References: <20210806044315.169657-1-someguy@effective-light.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Wed, 8 Sep 2021 13:27:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] wireguard: convert index_hashtable and pubkey_hashtable into rhashtables To: someguy@effective-light.com Cc: LKML , "David S. Miller" , Jakub Kicinski , WireGuard mailing list , Netdev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hamza, Thanks for this patch. I have a few concerns/questions about it: - What's performance like? Does the abstraction of rhashtable introduce overhead? These are used in fast paths -- for every packet -- so being quick is important. - How does this interact with the timing side channel concerns in the comment of the file? Will the time required to find an unused index leak the number of items in the hash table? Do we need stochastic masking? Or is the construction of rhashtable such that we always get ball-park same time? Thanks, Jason