Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4758112ioa; Wed, 27 Apr 2022 10:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlzhquUKWmMsYvCtt+R0jUGuhtrtfUdjx3e3sn6iWD4H8YObYGKZ6SpUaRnCs1fmyVANpG X-Received: by 2002:a17:90b:314a:b0:1d9:5ccf:baab with SMTP id ip10-20020a17090b314a00b001d95ccfbaabmr21726976pjb.110.1651080345796; Wed, 27 Apr 2022 10:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651080345; cv=none; d=google.com; s=arc-20160816; b=GrR6+kJKtJNf1hkMKLMUSwvGlMA5u6zisn/iOih/7d5vzCcRLwI1PrWV5n95oqhH5o sCZeG9+RscSmLEeMSPktH0tcEv/281Gi4fTypdy8jMtkFrUZeSQwZQ4Cwfaxf2VHZa0J 6ucPxyGihJb6Pi6S/ZykAyCliUC+Y6TKImyejMYW+W+dOMFQ/5/GyOcOmy40aHUR5C08 cQzcIzY0mqvbU5WfdndZ/e4ryjP0TQYIXP2+tx2D2XOmiyjrWcHUANHgynHHvh9QguCV 7ykf6exynVXwtQOMQZdqrCB5+l5qnjoVTuR/I8YAoLxteFWsTdxW9UFkZ7wcPy6eM582 wx8g== 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=P1sE+s+UV4nCuNKvFIfv4qJB1hT8UiY235k1YUzro6c=; b=rMdPkaCdm61evl2x7qLlALPiwbGQWL54JEWtxhhYJVXe+ex1iTxTZub1MLLAOAtjIh e66kyTR/OocPTGSnOvsFiCms27vX2E2/ngMjmb0LDRT4oPt4yyuUEiiuoXqbRg7zNlb5 hOhSVDUGG238OvPR7bwx7GclWCtOBET6HsetmoxzQc+s5filw4nf8QzMTyUqe/wWsiit cqMqK3EA6/fP44xYExYqxolyR3cQCVvGLpflmJnTczMrWFBPsSy8tDC2brWujxFT0SHB GpTambooEPchrcxmRjNcj2WUlOt+R/oeyevglJANfRR+vvNsjCB7mwjyZijcOEY9H5vi QglQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 5-20020a630905000000b0039d91c7f0c6si2086709pgj.16.2022.04.27.10.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 10:25: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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3F7E5517F3; Wed, 27 Apr 2022 09:58:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243648AbiD0RBn (ORCPT + 99 others); Wed, 27 Apr 2022 13:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243639AbiD0RAX (ORCPT ); Wed, 27 Apr 2022 13:00:23 -0400 Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C939638B; Wed, 27 Apr 2022 09:57:03 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 23RGunuo003835; Wed, 27 Apr 2022 18:56:49 +0200 Date: Wed, 27 Apr 2022 18:56:49 +0200 From: Willy Tarreau To: Eric Dumazet Cc: kernel test robot , netdev , kbuild-all@lists.01.org, Jakub Kicinski , Moshe Kol , Yossi Gilad , Amit Klein , LKML , "Jason A . Donenfeld" Subject: Re: [PATCH net 1/7] secure_seq: return the full 64-bit of the siphash Message-ID: <20220427165649.GA3756@1wt.eu> References: <20220427065233.2075-2-w@1wt.eu> <202204271705.VrWNPv7n-lkp@intel.com> <20220427100714.GC1724@1wt.eu> <20220427163554.GA3746@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 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 Wed, Apr 27, 2022 at 09:50:06AM -0700, Eric Dumazet wrote: > On Wed, Apr 27, 2022 at 9:35 AM Willy Tarreau wrote: > > > > On Wed, Apr 27, 2022 at 12:07:14PM +0200, Willy Tarreau wrote: > > > On Wed, Apr 27, 2022 at 05:56:41PM +0800, kernel test robot wrote: > > > > Hi Willy, > > > > > > > > I love your patch! Yet something to improve: > > > > > > > > [auto build test ERROR on net/master] > > > > > > > > url: https://github.com/intel-lab-lkp/linux/commits/Willy-Tarreau/insufficient-TCP-source-port-randomness/20220427-145651 > > > > base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 71cffebf6358a7f5031f5b208bbdc1cb4db6e539 > > > > config: i386-randconfig-r026-20220425 (https://download.01.org/0day-ci/archive/20220427/202204271705.VrWNPv7n-lkp@intel.com/config) > > > > compiler: gcc-11 (Debian 11.2.0-20) 11.2.0 > > > > reproduce (this is a W=1 build): > > > > # https://github.com/intel-lab-lkp/linux/commit/01b26e522b598adf346b809075880feab3dcdc08 > > > > git remote add linux-review https://github.com/intel-lab-lkp/linux > > > > git fetch --no-tags linux-review Willy-Tarreau/insufficient-TCP-source-port-randomness/20220427-145651 > > > > git checkout 01b26e522b598adf346b809075880feab3dcdc08 > > > > # save the config file > > > > mkdir build_dir && cp config build_dir/.config > > > > make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash > > > > > > > > If you fix the issue, kindly add following tag as appropriate > > > > Reported-by: kernel test robot > > > > > > > > All errors (new ones prefixed by >>): > > > > > > > > ld: net/ipv4/inet_hashtables.o: in function `__inet_hash_connect': > > > > >> inet_hashtables.c:(.text+0x187d): undefined reference to `__umoddi3' > > > > > > Argh! indeed, we spoke about using div_u64_rem() at the beginning and > > > that one vanished over time. Will respin it. > > > > I fixed it, built it for i386 and x86_64, tested it on x86_64 and confirmed > > that it still does what I need. The change is only this: > > > > - offset = (READ_ONCE(table_perturb[index]) + (port_offset >> 32)) % remaining; > > + div_u64_rem(READ_ONCE(table_perturb[index]) + (port_offset >> 32), remaining, &offset); > > > > I'll send a v2 series in a few hours if there are no more comments. > > We really do not need 33 bits here. > > I would suggest using a 32bit divide. > > offset = READ_ONCE(table_perturb[index]) + (port_offset >> 32)); > offset %= remaining; Yeah much better indeed, I'll do that. Thanks Eric! Willy