Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4772367ioa; Wed, 27 Apr 2022 10:45:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEj8H5akBSg5k4zxR9ex39nOosVMwCmkzSV5F/q74lJEYtbGPzwfaSaP6wd9jBx3GZGnYc X-Received: by 2002:a17:90a:e7d1:b0:1da:30d0:9327 with SMTP id kb17-20020a17090ae7d100b001da30d09327mr5798972pjb.144.1651081545664; Wed, 27 Apr 2022 10:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651081545; cv=none; d=google.com; s=arc-20160816; b=YoNuncTTRuFbUzVk5TXk1oB84gmraKZk+rqpCPaA6pUjvGX21ImPKtnlbyPoOjV5u2 SG2YjoibUKh9hUdB+abi0tZFAkdrMiXMwXFbukZjRnc+VGPOjZVxLJWF+NsJt96GiIkY +70O5mUWHu4PhFheNKvlwsXj0srSgBvt3QzTTUgBGqEqopRTQvl65hpsUgkMOdP4z/Fy Z3JO4RUx5uyU1rg8TOPGXzXsCdFO7b+Z8vwjBUifeyi174BdJFYPPezuTAdfjzPszmOn +Yf76158JTVjtKWGvUKYFbXU1OCJ2yQhOFWYfbg0cfb00QnquOpyDw1/y6y3Mf0DYRvm 9JNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IqWbKO2Ia/STBFbkXAEOKtQNiXVUT5pLqnszdw+gft0=; b=YFgzu8lOiD9p6weLu6y/CCsGJ1hw4dPf1ACEtttIjzq2QSRtQ2TBHTJYK428p7q2hm ja38qI8Jr64GrXeXHxwZvRKHOZ5MHrqgn6zgr6Kupy5YoROuHBpRZR+eo/jdDKXWmGeK 2OEupeJ7OZjC6RXR2HlQPYHwiJ89Rbr/GckkJ0MN62zexkE3Ayc7CbE57CmEKJfvFqeK BZZsuQrgnUXTZ/oNz0vRHNNJMpn8kioxsa10c6g603LbvqWUc2env9XG1eFTicJWj6+8 2zXY1F15L87TpsH0n+UiL6ehdm4DRnxZLLe1rElD+gN4XGgWMi9V2wlfvGv6rtQPXK9l Tpog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=p09l6Q7k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b17-20020a170902d89100b00156bddf0f3csi2089109plz.53.2022.04.27.10.45.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 10:45:45 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=p09l6Q7k; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 93A2C43EE1; Wed, 27 Apr 2022 10:19:08 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243944AbiD0RWP (ORCPT + 99 others); Wed, 27 Apr 2022 13:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234530AbiD0RWM (ORCPT ); Wed, 27 Apr 2022 13:22:12 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B91843AEA; Wed, 27 Apr 2022 10:19:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id E7141CE268F; Wed, 27 Apr 2022 17:18:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDC4DC385A9; Wed, 27 Apr 2022 17:18:55 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="p09l6Q7k" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1651079933; 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=IqWbKO2Ia/STBFbkXAEOKtQNiXVUT5pLqnszdw+gft0=; b=p09l6Q7kc1sMO44s2uZU3iEupjKNc188wYKquK0wKgnm1ZSxw3Sd4RKNItff4gd4bvmn1K 7wN10NMegomBMrXSgvzCMM+YmFNvjlGFPLuKbvGhjLFwrk6r9wdc84pNepaox5C1/Ypxtg WcdcohwwbK0JjILJvMEn1WGbOaho+M0= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 3cdbf562 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Wed, 27 Apr 2022 17:18:53 +0000 (UTC) Date: Wed, 27 Apr 2022 19:18:48 +0200 From: "Jason A. Donenfeld" To: Willy Tarreau Cc: netdev@vger.kernel.org, David Miller , Jakub Kicinski , Eric Dumazet , Moshe Kol , Yossi Gilad , Amit Klein , linux-kernel@vger.kernel.org Subject: Re: [PATCH net 1/7] secure_seq: return the full 64-bit of the siphash Message-ID: References: <20220427065233.2075-1-w@1wt.eu> <20220427065233.2075-2-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220427065233.2075-2-w@1wt.eu> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Willy, On Wed, Apr 27, 2022 at 08:52:27AM +0200, Willy Tarreau wrote: > diff --git a/include/net/secure_seq.h b/include/net/secure_seq.h > index d7d2495f83c2..5cea9ed9c773 100644 > --- a/include/net/secure_seq.h > +++ b/include/net/secure_seq.h > @@ -4,7 +4,7 @@ > > #include > > -u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); > +u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport); > u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, > __be16 dport); > u32 secure_tcp_seq(__be32 saddr, __be32 daddr, > diff --git a/net/core/secure_seq.c b/net/core/secure_seq.c > index 9b8443774449..2cdd43a63f64 100644 > --- a/net/core/secure_seq.c > +++ b/net/core/secure_seq.c > @@ -142,7 +142,7 @@ u32 secure_tcp_seq(__be32 saddr, __be32 daddr, > } > EXPORT_SYMBOL_GPL(secure_tcp_seq); > > -u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) > +u64 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) > { > net_secret_init(); > return siphash_3u32((__force u32)saddr, (__force u32)daddr, Should you be doing the same with secure_ipv6_port_ephemeral() too? Why the asymmetry? Jason