From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.74.67.75 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796043148; b=XiSu5ZDgHuMfyZH57VXVfKJc2dE1VgsJVop1taKSiELjIFFsi/CsFHHrut4WDt1mB0JJ aFwE79varG8z9GN+8IlzgjRYZXH/3u4f5cccq3KTaUgW5FtvWUlrr+R+rKl7cflbG38Ly VYfYaBaTyqidUYO2UHtH3YNCdEOoYkFb2JyagAMYBSyua2hpXrfgtMHcOBnWeehZQi48f a786WFsHJD4A+V9Su6Cpf6MXyoTQD7I2Pa5xniXxTFyPlkHokBJyoII49XE1x5aWhEOOP Cc7etpQHAfO9tbSQxi+ZnQInaHoRvsbjDHDe6ekXwXoalSNHH+nKOf5toJOiG+bn3Ng== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796043148; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To:DKIM-Signature; bh=xhh7nAr/jt+cDu6RG+58l8W5d9HbVdY0V1wY6BVxxjE=; b=S6DPyqW/MhgZa5wGls1Gre7AW73u3kK6EdLUstg0w2/pKTz5C+QeaY6wAz8w+vrRW8Eg 0l5C1wRAYyaSQkxCDkm98WJhyqjQIE7ojASs0JVGSOpIAX+QdT5nryxTW4NQqA7caxjym /k+x9fvNotGDA9QyMgqQmqc5ClWI/i29qUUk4wnA00Qhop0oajTOkDXyVJO8qiQHy/RFQ wHWCzOFJfgHL5SrZrHPbMPtLfG0ytNKkMTkFiBNDKarNWjkWpy6AV05T7fIQFK5nOLTLP X04zaltxzkDn3+BZLtDkfmauK2WP01/PwI4YfDM+ZopsQlCmsV2HyjDZm3wgVTapqsA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=poczta.fm; spf=pass smtp.mailfrom=poczta.fm; dkim=pass header.d=poczta.fm header.i=@poczta.fm header.a=rsa-sha256 header.s=dk header.b=oPBUBMOc; arc=none smtp.remote-ip=217.74.67.75 Received: from smtpo75.interia.pl (smtpo75.interia.pl [217.74.67.75]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128B8606A325 for ; Mon, 30 Nov 2026 12:52:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 128B8606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=poczta.fm Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=poczta.fm Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=poczta.fm header.i=@poczta.fm header.a=rsa-sha256 header.s=dk header.b=oPBUBMOc Received: from nr200 (unknown [80.68.231.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by poczta.interia.pl (INTERIA.PL) with ESMTPSA; Mon, 30 Nov 2026 13:52:14 +0100 (CET) Date: Mon, 30 Nov 2026 13:52:11 +0100 From: Slawomir Stepien To: netdev-bot+sashiko@kernel.org Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, sdf@fomichev.me, bpf@vger.kernel.org, netdev@vger.kernel.org, jiayuan.chen@linux.dev, phx0fer@gmail.com, maciej.fijalkowski@intel.com, tianyi@cloudflare.com, tavip@google.com, toke@redhat.com, aleksander.lobakin@intel.com, lorenzo@kernel.org, lorenzo.bianconi@oss.qualcomm.com, ihor.solodrai@linux.dev, andrew+netdev@lunn.ch, willemb@google.com, horms@kernel.org, andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com, song@kernel.org, yonghong.song@linux.dev, jolsa@kernel.org, memxor@gmail.com, emil@etsalapatis.com, shuah@kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH net v9 4/6] veth: use the page_pool mem type when running XDP on an skb Message-ID: References: <20261127100132.1977890-5-sst@poczta.fm> <179586023747.3135.10147454988994351806@kernel.org> X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <179586023747.3135.10147454988994351806@kernel.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poczta.fm; s=dk; t=1796043138; bh=xhh7nAr/jt+cDu6RG+58l8W5d9HbVdY0V1wY6BVxxjE=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=oPBUBMOcwbG0FjD1zQT4hIZET38v8iW+9hv+lPEXT3Lj8F5D0C/OPNv8t5xJgxODG Ec/IYg5aWNBM6y0aNUH/1QPOXC/yLPA3fkrwepYM83Zig23dpyfuSozy6epAeaAMju 3khhNQlvZcmZ7u4J7KQ5GVGY4B9uE2KzUc4GNXe0= On lis 28, 2026 10:03, netdev-bot+sashiko@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 1 potential > issue(s) to consider. > > Critical: 0 · High: 0 · Medium: 1 · Low: 0 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [Medium] In drivers/net/veth.c, veth_convert_skb_to_xdp_buff() now > always sets rxq->mem.type = MEM_TYPE_PAGE_POOL. This is true, but with this condition: > Take an skb that is unshared and unlocked, has enough headroom, and has > nr_frags > 0 but data_len == 0 (all frags are zero-length). It skips > skb_pp_cow_data() and keeps its original frag pages, which are not > page_pool pages. It still gets XDP_FLAGS_HAS_FRAGS and runs with > MEM_TYPE_PAGE_POOL. I wonder how possible is this anyway? I guess an easy prevention for this case, would be to also check for nr_frags in here: if (skb_shared(skb) || skb_head_is_locked(skb) || - skb_is_nonlinear(skb) || + skb_is_nonlinear(skb) || skb_shinfo(skb)->nr_frags || skb_headroom(skb) < XDP_PACKET_HEADROOM) { if (skb_pp_cow_data(rq->page_pool, pskb, XDP_PACKET_HEADROOM)) goto drop; skb = *pskb; } With this, the frags will not be copied when data_len == 0, so the output skb would have nr_frags == 0, so the flag would not be set. -- Slawomir Stepien