Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp10767826rwd; Thu, 22 Jun 2023 04:44:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ot0ineyIpMt8yWNb1gB+aWDuNrt+nFV47N5zzMmfdFWMml5DptcJl6QyO7LQfArF0P2pc X-Received: by 2002:a17:902:6902:b0:1b3:d608:899a with SMTP id j2-20020a170902690200b001b3d608899amr16885820plk.68.1687434291326; Thu, 22 Jun 2023 04:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687434291; cv=none; d=google.com; s=arc-20160816; b=LX7RooqtQI6ti90/T8xtsu2iGckZT40UcgxW1uVxMO4lCsZaBLMu6l4Z6HF1oKw8aa lNV1xeAziCJqLhKbpmtncaV51KTtF+b8grI/Cr9+vNpnEN/d2DXkbAQpDNFdulJHUcZ9 n4qBIFO2d9DoMv6pZFz4TdJGLsGvHwFsUviw6BGAyWEEDVujGBQZtY9zZo2RHI8LW4KR EmPvWYTlYY//oq9ApnCBhaCggUeWcZ7yhf49zgdSGowWQrjPg9cpGGRdcouVMjaImXse Boz4PPfSxY/wPmEgNqrUqEJsbNTo6oV4GFg4oo7TUL0JfFNmwYB12f+hS34OToWiuvUS My6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=VQb5HqyYhYn4AL2jVh9Pn6Gc88Ux8RWGJJ1CyS/IapY=; b=icDaMzWho8r/HhBDKPCzHFyDr6gCjFfjzJU91jd7JE8YQGhNRje9asG9ktB7CPFuL/ 6CwC3Mx9pAMviu0sRtqw6/SFpNiy8hkN2HQeyf1tzg8fc0xx4fWON8WCgfEAYqu5VKr2 uj+kjzp0x8sRSR7ceiptc1497FSgai51pzrhShTlCastqvfDx7bqhvDVxOmw+YSPA4Kj j/0J5tr+NoJy/JJGzCleqTIGuJ0caLw0xnMbqXnDC+ouVPTt99gWkzDCnJ/bDK5ID5jA YXT3ROS9lBgtgtxYJAp1X74FtbmASRPWG3aj1fISVI0ke2Eg5URnNp9JOsjiQGprHlSA hFwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=Tek+suiE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=C6NqYb+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a17090311c300b001b3d5fdd1c3si7038040plh.188.2023.06.22.04.44.39; Thu, 22 Jun 2023 04:44:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=Tek+suiE; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=C6NqYb+T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjFVL2s (ORCPT + 99 others); Thu, 22 Jun 2023 07:28:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbjFVL2r (ORCPT ); Thu, 22 Jun 2023 07:28:47 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 446B919A9; Thu, 22 Jun 2023 04:28:46 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id AA9415C00C9; Thu, 22 Jun 2023 07:28:45 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 22 Jun 2023 07:28:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1687433325; x=1687519725; bh=VQ b5HqyYhYn4AL2jVh9Pn6Gc88Ux8RWGJJ1CyS/IapY=; b=Tek+suiEQ9ZBzcqjUm V8S7vH6WVaK8nf1rxA85R+4BmTGkbJU89n1NZW1ME2PpMZ0ZnPWdxv4wbczIT3nr R5d0bwFVuwTf6OS2xiFtkKOxE4qviWmotownu5eUAOzxWxqcK9ncZJX6mFM+Abxz cVGxHwSCqi55K9ws7OKmSYulj7SS+dk50+dEwhc7xVjr0PESRswQkXWeI6pHVpHn ZNhTqbOP4LRStM6cqcSMK1mat134Owpkb3XIVCyHvB/XYb9kiRdiBif926S3suE7 iEwggYNce6x4gb9lG3Wc4C41LXyYc6YtwzAeLtRwmzE2tP7KEbRBD6BXZwfMgwm2 jUzg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1687433325; x=1687519725; bh=VQb5HqyYhYn4A L2jVh9Pn6Gc88Ux8RWGJJ1CyS/IapY=; b=C6NqYb+TRTAdq+Db9zHXNiABHSPNl lF/pTUmF3pGyRps7r1kuQ3KDtHx5yQUveHXICn4fCtMt2rB1nwNsRQPT0r+LFzKo tGSiMyjw05OJ7Pr/ZF/ObaeC3qyMjrWJRRl9JRD36LxwotK84nUC5D2hzMYVla5i fF9XHcBB+oEYs09JIZbXOtlj9rQVT4YWgg/PlpgVf3lvTii9PtEGZFJ65IyBVKlS 633fEOqrAd2yJYAa2JhWVhIHgdFVJfsTLkeZ4vFdumKvqoSgRcyCjdt7F4ZrY9qa hqkTFTCZwmIVTMihLqN0t/4STe9alt65EAciC4cIjc9T/fhq2nAY09A3Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgeeguddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepvefhffeltdegheeffffhtdegvdehjedtgfekueevgfduffettedtkeekueef hedunecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6BE07B60086; Thu, 22 Jun 2023 07:28:45 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-499-gf27bbf33e2-fm-20230619.001-gf27bbf33 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230622101525.3321642-1-arnd@kernel.org> Date: Thu, 22 Jun 2023 13:28:25 +0200 From: "Arnd Bergmann" To: "Maxim Mikityanskiy" , "Arnd Bergmann" Cc: "Saeed Mahameed" , "Leon Romanovsky" , "David S . Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , "Nathan Chancellor" , "Nick Desaulniers" , "Tom Rix" , "Tariq Toukan" , "Adham Faris" , Netdev , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] mlx5: avoid integer overflow warning for large page size Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Jun 22, 2023, at 13:23, Maxim Mikityanskiy wrote: > On Thu, 22 Jun 2023 at 12:15:02 +0200, Arnd Bergmann wrote: > > I recall you already sent a fix to silence this warning before: > > https://lore.kernel.org/netdev/20211015152056.2434853-1-arnd@kernel.org/ > > I prefer that old one, as it's more future-proof to cast to size_t here > in place (chunk_size won't be bigger than size_t for sure). With your > new patch, if chunk_size is ever changed from u16 to u32, it's likely > that this place will be unnoticed, and a bug will be introduced. > >> mlx5_core_err(mdev, "XSK chunk size %u out of bounds [%u, %lu]\n", xsk->chunk_size, >> MLX5E_MIN_XSK_CHUNK_SIZE, PAGE_SIZE); Indeed, I don't know why I no longer had the old patch in my randconfig tree, I completely forgot about that. The old patch is also ok. Arnd