From mboxrd@z Thu Jan 1 00:00:00 1970 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 C7D681C86F2; Tue, 27 Aug 2024 14:58:03 +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=1724770683; cv=none; b=PQ+mhd2ct4im4tHgcFELxwklvyi501EKNhQFf7YkuBAg0BdiAVm3O1PIVcDXEz5GKdLoksWISluwViEBgcFADQv4DUd2ZT9FRe93bZP/kviQ1qQ3mJmICLWUqRB4OzwCGw2iDnvr7R/URqZQHRIVzuNY8Apjh5cMcwusAtjSyP8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724770683; c=relaxed/simple; bh=RveLwkQizGakuy5Uxn0WEQYIZsFn6D7nZgufaD2Uq8o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=m96/ln9r7eW2chh8g3I5gHYAhfZma4+zze9NhN8+ZQKlqXMwY0LujDLEv7BZrhlyRuCG8epE5HS4eUxNbucbpDqgofBaevgrBfwRJjdhPcZTSVnh2paSrXCGpAHjXvdB8GxljJtlJhQ23jIDrjLNuz2WM0a30Pn56Usqywg7/vs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iV4p26Pz; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="iV4p26Pz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFE37C61044; Tue, 27 Aug 2024 14:58:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1724770683; bh=RveLwkQizGakuy5Uxn0WEQYIZsFn6D7nZgufaD2Uq8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iV4p26PzGJ20LIC4FU5kM8TcxY6b+/T69Kgyr/1R0En1hKXm4U1tTRVYncjlO8Tzg WImd83Rl2P3jSuAkDMLWd3Kx8ie8tfo9sSuM5l1q5TJ1spLxov1mcm+8MW0h1v42B6 nPDlFM+4aVbIgMYZWlscvjl4QPdrAEvDKHXX9PqA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Nikolay Kuratov , Simon Horman , Jacob Keller , Jakub Kicinski Subject: [PATCH 6.6 303/341] cxgb4: add forgotten u64 ivlan cast before shift Date: Tue, 27 Aug 2024 16:38:54 +0200 Message-ID: <20240827143854.920580342@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240827143843.399359062@linuxfoundation.org> References: <20240827143843.399359062@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nikolay Kuratov commit 80a1e7b83bb1834b5568a3872e64c05795d88f31 upstream. It is done everywhere in cxgb4 code, e.g. in is_filter_exact_match() There is no reason it should not be done here Found by Linux Verification Center (linuxtesting.org) with SVACE Signed-off-by: Nikolay Kuratov Cc: stable@vger.kernel.org Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Reviewed-by: Simon Horman Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20240819075408.92378-1-kniv@yandex-team.ru Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c @@ -1244,7 +1244,8 @@ static u64 hash_filter_ntuple(struct ch_ * in the Compressed Filter Tuple. */ if (tp->vlan_shift >= 0 && fs->mask.ivlan) - ntuple |= (FT_VLAN_VLD_F | fs->val.ivlan) << tp->vlan_shift; + ntuple |= (u64)(FT_VLAN_VLD_F | + fs->val.ivlan) << tp->vlan_shift; if (tp->port_shift >= 0 && fs->mask.iport) ntuple |= (u64)fs->val.iport << tp->port_shift;