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 24492D531; Fri, 24 Oct 2025 00:51: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=1761267083; cv=none; b=iv2dq3DDz+j7HAyGgZky/OJL5EHzGzp4JUJIHPrNQi96rO7z86HOJ8+FvfiDNeESjcw/gy0YQToGM7ghHuKECrRzPq2KY5a5UhCCMI6x2xRnLizG0lT9fPmx+9Sg/d5/naIl14iMOA8NNlMDZIQh8Ts247m03U8FtNtlTHflghc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761267083; c=relaxed/simple; bh=oPQyCu2DoTiorLQwblo0d65fpGXmOp1ueh4Tr5T66js=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ktoLCt1FPd4A0QtUqcgGCiQ7MC4yiFY+zLoo585r9dWe8+yZ83L5qp/SqKouHXOY2FbhiUnh2ItIAVmfiPQlAYMvXCcFhnHC05/d9sw6P9QQZqMoHafpD3i5izYzVEGV3BrySOI0vkl09MZd0XZNUrFB3gPe8mgW5cGQAC7IsBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tt0P0Ljs; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tt0P0Ljs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6AEBC4CEE7; Fri, 24 Oct 2025 00:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761267081; bh=oPQyCu2DoTiorLQwblo0d65fpGXmOp1ueh4Tr5T66js=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tt0P0LjsA781/aI5C+q4CpNgYO8lFV5QuMnRtEbZKTsaWPrXm+HgP49wYztjwqse4 xj6ZqQTuDE6f3VPLaj6QA1sk6127TXWiGs3s6w5tkhbFMOfB3kWu/kNQRie0YcPhOU aWejPOWl+55gW8Rt56SPT6aAClVc6AoExa8bcadVOZVs6KAcKe9fG/s39dW1aDwWmn 0kSYq+6G6Djq+9Tt4V+pg7HbdX5Zp6xzhpId2rBnbd6AyIgdFFPFslwSg0LJ06eO4T tGFqOw46EnuKUDfRy47EeyqmkPenM8SIvwJ7BA0hfEgMxlGt1xBUNM6+c3YKNjito0 fH2hHb2uOrT9g== Date: Thu, 23 Oct 2025 17:51:19 -0700 From: Jakub Kicinski To: Jakub Sitnicki Cc: bpf@vger.kernel.org, "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Martin KaFai Lau , Daniel Borkmann , John Fastabend , Stanislav Fomichev , Alexei Starovoitov , Andrii Nakryiko , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Hao Luo , Jiri Olsa , Arthur Fabre , netdev@vger.kernel.org, kernel-team@cloudflare.com Subject: Re: [PATCH bpf-next v2 01/15] net: Preserve metadata on pskb_expand_head Message-ID: <20251023175119.62785270@kernel.org> In-Reply-To: <20251019-skb-meta-rx-path-v2-1-f9a58f3eb6d6@cloudflare.com> References: <20251019-skb-meta-rx-path-v2-0-f9a58f3eb6d6@cloudflare.com> <20251019-skb-meta-rx-path-v2-1-f9a58f3eb6d6@cloudflare.com> Precedence: bulk X-Mailing-List: netdev@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 Sun, 19 Oct 2025 14:45:25 +0200 Jakub Sitnicki wrote: > pskb_expand_head() copies headroom, including skb metadata, into the newly > allocated head, but then clears the metadata. As a result, metadata is lost > when BPF helpers trigger an skb head reallocation. True, then again if someone is reallocating headroom they may very well push a header after, shifting metadata into an uninitialized part of the headroom. Not sure we can do much about that, but perhaps worth being more explicit in the commit msg?