Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1397529lqb; Thu, 30 May 2024 09:02:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX0jNh7IbgGrrpjVBe+hx8i8g/v9itP5/q6ZSBLoV7+BhY+yQZ74W2lIQTZBWQHHbjz5SsffE65XRLUd8tN7Q81XzBUmBzLbz6SmHlHAQ== X-Google-Smtp-Source: AGHT+IE3mSaUOOFzGbEmyjdCBpipX04x4sRnpZ9YhMHSLU6lLjLvY2Es2R8tMwbO52qWvoOO3er3 X-Received: by 2002:a17:903:244e:b0:1f4:a04e:8713 with SMTP id d9443c01a7336-1f61bfa1527mr31587515ad.28.1717084934399; Thu, 30 May 2024 09:02:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717084934; cv=pass; d=google.com; s=arc-20160816; b=tS3+LR2FGQz5pDZDMu1/N9Hn2SIX5YVOM8kwOQ5lPE0PgmTvlfYZAK1dLG4Svbk6dQ 2pHtwHHLDlIfqmrtTkEglpXofKoEVDK4t5aI5KnRKir1XxGTwcFIy3J6pKgfMajs6McV SM/C52YulWImgfo//qiZXZeUkpmlyAMBbUbGokmmVuMoN1QO6F6Dbi/Ww0dYgqxG4P+4 S/GrprRF9Q2LY3Kys1FcGVsg/boXKRL7jfsqY08UP0ptiqtr7lgEmFqJU+6UwZ7L4iPJ CocHcbTb5+bkYAr2T1im5P3UPiJ53nZBn62TwqpdJbCnBNt35VKtO+LonhH1LYxPDmi1 slCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=1vV6EjvLjFtsJJd+5hzUJ9ENTSYg06/GVhLIwx8BrhA=; fh=yUvTr5pYaK+6j3K+2VKicqIYKAKUaJYvSitxClsxohY=; b=FOiP2XaZaY8GuH8XDU4KBCaw9FKUE0U6Ot1pKZU/ogzu0MpFI/SdJD+sJ/ADuiF4Se Ch15Hqq94kUSUr1R6Y0/k3zHFDN5/WzTADPD/IlMzlSMxgMXm6v3BR0mNxo9in6sZtbV hLTsb9zrraYI8WzGRqsu/LVSGOEleOqQoI7XyOh4ug4MB3j3xQ7NFcZByoZfnZIkS7xR eZ67GIh/GFOvdev0GwVrvxJlJ47IMHAB7iJWc94kTBZJuTIvPFqE9WEX8RClJsPs0/w6 0Bl3N2MiA5AMaznr/icqnYPuJA4TZIXJH9AoU33Alf6x8q1ulIHwKxAolrdBMT18ZCFV XVDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sot9rohC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195611-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6226fd03asi10563785ad.292.2024.05.30.09.02.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 09:02:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sot9rohC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195611-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195611-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id CA54AB21A8A for ; Thu, 30 May 2024 15:41:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DF5D183097; Thu, 30 May 2024 15:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sot9rohC" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B44CB187543; Thu, 30 May 2024 15:41:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717083681; cv=none; b=ISdjkT5Ir54+h9h/Wum9R4Ba0D5a/Xj18CWj2pVoR09csK2Bkuz596zHAlHSqQwRPQg+DDAsHvS27SONfcTCkwq89fAH/B66nM/JIIotHeLUCkX/knNbg4F9Lsf7JiPhjAIxJw31QCUOhxC1Cf2dCxM5VitOa5Vb3ses/eAr/y4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717083681; c=relaxed/simple; bh=NwfGqdfxzjzjhOXdJq835OhUNndnxLH4UuU7x1o2AL8=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XU7LbncKQ3NfgLj+TjhTOWX+pFe9qgWymJPzvJiKdNVL/CV6gSrTmwYodWMLLB/HVQjX3eSnFFBxzNkbtgSzQX6VVwZidWbAE9+r9zTFjwAeOU7kUgbnW5Q4OPOiDQ1yuSwqGSMgBzdrsDIhYDVDKTgvpghaoss8qUbM3jD0/Qg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sot9rohC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B849C2BBFC; Thu, 30 May 2024 15:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717083681; bh=NwfGqdfxzjzjhOXdJq835OhUNndnxLH4UuU7x1o2AL8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sot9rohCiNWd6ooi8uxRP4cd/ft0bRvarq7GQ1AYbxkLH09GCCCYRivqbbrPXkXSq qO8Y3qbvZMwYIBhBh5IEaqJSX+9IcCUB6z+5M/gwlRdsFJIdmDTe52/7wtUUVQNH59 ga8kVq+X0113fWtY9xNa13vgchtDg+YS5kK9UqH8c/Bhrt2oAq1ezI5zM7HX4UMzRo NGW8kVuYj0SrjNzDo1N/iZ55ncGxgbCV2wZhh3EU1BII1JkIehOtDWcnS3y6ADF3qg 7x7DaZkXDhrwlUMis+lXhiMTgQypDvtUgOiVl7BKcJf3wDcKaCYzRBsCYIT9aLLIdK OI+R1wGhQpGFw== Date: Thu, 30 May 2024 08:41:19 -0700 From: Jakub Kicinski To: Shradha Gupta Cc: linux-hardening@vger.kernel.org, netdev@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Colin Ian King , Ahmed Zaki , Pavan Chebbi , Souradeep Chakrabarti , Konstantin Taranov , Kees Cook , Paolo Abeni , Eric Dumazet , "David S. Miller" , Dexuan Cui , Wei Liu , Haiyang Zhang , "K. Y. Srinivasan" , Leon Romanovsky , Jason Gunthorpe , Ajay Sharma , Long Li , Shradha Gupta Subject: Re: [PATCH net-next v2] net: mana: Allow variable size indirection table Message-ID: <20240530084119.684e2783@kernel.org> In-Reply-To: <1716960955-3195-1-git-send-email-shradhagupta@linux.microsoft.com> References: <1716960955-3195-1-git-send-email-shradhagupta@linux.microsoft.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 28 May 2024 22:35:55 -0700 Shradha Gupta wrote: > + save_table = kcalloc(apc->indir_table_sz, sizeof(u32), GFP_KERNEL); > + if (!save_table) > + return -ENOMEM; > + > if (rxfh->indir) { > - for (i = 0; i < MANA_INDIRECT_TABLE_SIZE; i++) > + for (i = 0; i < apc->indir_table_sz; i++) > if (rxfh->indir[i] >= apc->num_queues) > return -EINVAL; leaks save_table