Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp231480iob; Mon, 2 May 2022 17:58:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9xo8shZiOuwgV/mp9Z0itMYWF8Ea0rA6ycLdZmPqkLaofZGpkjeai5GE1qYun+6wJYCev X-Received: by 2002:a17:90b:384b:b0:1d2:df41:3213 with SMTP id nl11-20020a17090b384b00b001d2df413213mr2057352pjb.164.1651539480409; Mon, 02 May 2022 17:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651539480; cv=none; d=google.com; s=arc-20160816; b=waFKj6FN6BZ7n36aN66rkAdCDrpMtCphiwOEw4Pwfv0nqcHvyBl+2iCv9Lv6vUO8ZP qYmvNshCTdvopoDEUJdJ1JdZTItyZ75YaII/yiK19ZFIJ4Nmu+vZj3V/KAHsnvPrRpyS h5HoRS6Lu0ZtCUwQCDk3uaXJgNK4USdRSuSfqvGbY3LZmaVWBvQLcgKyelPJW8aaeD4L G3wVw/Kb3aKOs3rw2lUF6Ac15jeuAinMIselCvFnbYUrpyYWPCk+GLeth2M4sffi4Zp6 YeZzE14kr74Rt216rviIjzxkCqw40OV7j2i211KJJWsJY+00PkC/jq/GF1swpcv+zKhi 1U+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kioLzih6EixDY2a48CeGeRp7c7boRtllfMtLKrba6hg=; b=MXwCofgfmq0vcEnpv287bbt0x+Eh5AaSpZ0FQdBGnll/IGiVnoUnby47fAH5UrX1Je qBMNeJ9XfMRKNENenPHLU6ZZoKqruyiU5DRpCOhM1crBxUd9pS1Lm33JNvs5DGtXJvjl /5rfD8ZMhv388AJqnz+TA121MDW2TQ1WyWyY5XoWM132h1j5SzXeJ0wh8XuKRC7pa/ET 9a8mWuVkBgpQ7Pz7SYeJQ7MHvCbnqii9/tDs335ddd3Gf4OWAUlvtcckfk0LoFE/lff+ U3Elk3q7aLifNfdAQ+u95BkhRPDTuYS23mEcrLsDCDjCvaLMfqap4XvoLuka6LJIedop uwOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h30-20020a63531e000000b003ab61f99e6dsi15353722pgb.300.2022.05.02.17.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 16BFA3B2AA; Mon, 2 May 2022 17:43:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378478AbiD2PeT (ORCPT + 99 others); Fri, 29 Apr 2022 11:34:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346797AbiD2PeS (ORCPT ); Fri, 29 Apr 2022 11:34:18 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B870DEC; Fri, 29 Apr 2022 08:30:59 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 23TFUoWs012305; Fri, 29 Apr 2022 17:30:50 +0200 Date: Fri, 29 Apr 2022 17:30:50 +0200 From: Willy Tarreau To: "Jason A. Donenfeld" Cc: Netdev , David Miller , Jakub Kicinski , Eric Dumazet , Moshe Kol , Yossi Gilad , Amit Klein , LKML Subject: Re: [PATCH v2 net 3/7] tcp: resalt the secret every 10 seconds Message-ID: <20220429153050.GD11224@1wt.eu> References: <20220428124001.7428-1-w@1wt.eu> <20220428124001.7428-4-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 On Fri, Apr 29, 2022 at 04:48:52PM +0200, Jason A. Donenfeld wrote: > On Thu, Apr 28, 2022 at 2:40 PM Willy Tarreau wrote: > > @@ -101,10 +103,12 @@ u64 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, > > struct in6_addr saddr; > > struct in6_addr daddr; > > __be16 dport; > > + unsigned int timeseed; > > Also, does the struct packing (or lack thereof) lead to problems here? > Uninitialized bytes might not make a stable hash. Hmmm, I didn't notice, and I think you're right indeed. I did test in IPv6 without noticing any problem but it doesn't mean that the hash is perfectly stable. I'll send an update for this one, thank you! Willy