Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1051213lqt; Fri, 7 Jun 2024 06:53:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpyHW5mKz7/l3/6G0aHcwT73J+4kAZH0amYakpc7MmSzhvd0q83M5lG02PybQTZ4HKXZPLH6kpVzCLjb6Pl3uWEdlBWMYl0HEZebnrcg== X-Google-Smtp-Source: AGHT+IGyR6JTOBdcKveHu6f5nimI8wy25EItHrta/MNy6/Pc4nIqzowlaOn3SH/i6kk/zVKDcqU7 X-Received: by 2002:a17:90a:f606:b0:2bd:faef:e862 with SMTP id 98e67ed59e1d1-2c2bcc0b39bmr2678251a91.23.1717768415563; Fri, 07 Jun 2024 06:53:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717768415; cv=pass; d=google.com; s=arc-20160816; b=DFj8p5AgnO1ibxTlSjqE1b9x0e/I16f9pikEeYDUWYhNzQ28yTaZ4qJrRhvSXGpuaG iYxRJagx7RULI48VEaVsBjNqysUgClREj42CI8G8/Vd2J0lN2HKPTTMPd11QVG84eMMM cKw/eclHO1VJEfzQ7KIzNTucSEN8lwXCnqhpTJPcVUwE/ObB8X8Qg+9U6SEQM+R0vs8s nGypBO7vuEAhWjbf2mQ6t5ylgBYm9e/E7sHH/hcySE2nnXS0ZjGihUAxmdc3sdTDLZ5y pBXAEXie66rp/IiSTJDI4P3A8s0maN0DYUjeSdAuROn/nAh44QVdpQTznu20IlVtf1Uq mIhw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:date:message-id:from:subject :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=7BkLxu2FmKNiHr19EM1x1tXKQ1mkYqlzcqwXo7WObD4=; fh=MhTuqTm/gV/5mwNG34Rl40ldqkLV+P3qLfQXlvWWehE=; b=u7zVHPQX6q9p9j+x3esjmJDw9Q/8buZGgsueeOoDDhgP7JyB5VNTCVmIFPn7++cunU MTJm3qKqg4BkekixJBzBxxbpM6d3Uo2HC144d5Y26eC++FKeq+bQiNbvX3JBBeRBn+tR WbDL5WpmGfPrXU/QjFWlUqThWYFyeECE4M8E4OIdHTc7LBzfP+ZLp/yk6v76Yk45bUxS uBmt6cGnG3RySKrKocaTeeX4kcTbuyQpDEBW9CPB/BLOleC09Qt1gosIpeGP53octMyQ EX9CQWMODmd1z2Tz146IySGTX5mRuYYJAS7v6fy0bub0PDd00d7uhiZfjcet5Y+9muPF cGOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F2JAi9iz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206168-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. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2d0e57b06si365000a91.62.2024.06.07.06.53.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:53:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=F2JAi9iz; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206168-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206168-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 E9421B2705D for ; Fri, 7 Jun 2024 13:35:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AB9D1993B0; Fri, 7 Jun 2024 13:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="F2JAi9iz" 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 316261922F9; Fri, 7 Jun 2024 13:32:43 +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=1717767164; cv=none; b=Bmmm1A7GbmOye5UVLIKf+Ocyb+KWTsp3Xk2rGcQ4CAGf5m4MQ2liF8oPBhuJ03ENpp+my1pX6BJcBTJOTz6/DhF4uSFSEckqX1paAZiEXDpgjBDRFivtb+qQJy2B4bZdy8p6LhX7UmuZJOC0LktFHnBjMH4B7DkRCHhEasa9d0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717767164; c=relaxed/simple; bh=6bVomJeklHfwq6dyxfuwrhU6D4+V79v408gXjcqI/WE=; h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; b=i25ZV5a1OiNNZ7x8VfGKiuTCvTrw6Rvbx03pHpfyk/CTkvPE5BdhUlJiiwEG5ePWDEt5yzQ+gKUB0qmd8UOlVS3ux45PSLKCjkwvxOL2kYUZFkyVpciGfh7B7LfSjA/eCs9ABPhW2xR5dfHZi/cQQgS31h8aT7fuZVbFK6wCOD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=F2JAi9iz; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id A041CC32782; Fri, 7 Jun 2024 13:32:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717767163; bh=6bVomJeklHfwq6dyxfuwrhU6D4+V79v408gXjcqI/WE=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=F2JAi9izIP49nv1hbYQBXEoeMzNjjpvKLhmSMs9KWcvRREQUNWZBw4UDuNjdWftY7 5RKwLxI1/f62DRJc2KFRg//tdnWsd8ip7Dihro57bf8WhaE4Re4cdNuKySnDP4Cllb baErUghfMyZggdOTf13cBzHOMytklcnR3Ok066BKNNvUChK90y6Ev0bPIzy4+i5gQy 2hyYBH6F3+5aTyKbxACGzWAHpDz/Yxccy5IWELock/0J14xw3Zn+AQkdnPkJyqD98R +zYojWURTbDePkIbq+lLsUPnjBfn4zoFzlnQtRF2YvY7MGbEh40EcjMtCfTsyD0HX3 /Bqjt88w+Watg== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 9178DCF3BA3; Fri, 7 Jun 2024 13:32:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH net v3] liquidio: Adjust a NULL pointer handling path in lio_vf_rep_copy_packet From: patchwork-bot+netdevbpf@kernel.org Message-Id: <171776716359.27999.7521949706547651629.git-patchwork-notify@kernel.org> Date: Fri, 07 Jun 2024 13:32:43 +0000 References: <20240605101135.11199-1-amishin@t-argos.ru> In-Reply-To: <20240605101135.11199-1-amishin@t-argos.ru> To: Aleksandr Mishin Cc: davem@davemloft.net, horms@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, keescook@chromium.org, justinstitt@google.com, felix.manlunas@cavium.com, satananda.burla@cavium.com, raghu.vatsavayi@cavium.com, vijaya.guvva@cavium.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Wed, 5 Jun 2024 13:11:35 +0300 you wrote: > In lio_vf_rep_copy_packet() pg_info->page is compared to a NULL value, > but then it is unconditionally passed to skb_add_rx_frag() which looks > strange and could lead to null pointer dereference. > > lio_vf_rep_copy_packet() call trace looks like: > octeon_droq_process_packets > octeon_droq_fast_process_packets > octeon_droq_dispatch_pkt > octeon_create_recv_info > ...search in the dispatch_list... > ->disp_fn(rdisp->rinfo, ...) > lio_vf_rep_pkt_recv(struct octeon_recv_info *recv_info, ...) > In this path there is no code which sets pg_info->page to NULL. > So this check looks unneeded and doesn't solve potential problem. > But I guess the author had reason to add a check and I have no such card > and can't do real test. > In addition, the code in the function liquidio_push_packet() in > liquidio/lio_core.c does exactly the same. > > [...] Here is the summary with links: - [net,v3] liquidio: Adjust a NULL pointer handling path in lio_vf_rep_copy_packet https://git.kernel.org/netdev/net/c/c44711b78608 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html