From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f169.google.com (mail-yw1-f169.google.com [209.85.128.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAF34248867 for ; Sat, 22 Aug 2026 20:58:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787432303; cv=none; b=nPy2B/6fwE28JvlQQkoRlpP7zN41yja2ZaSRSYxsKIYd5FG3dRW0HkD4iXwHKDVXByH2PgF8qauSdKxLWnxY+/eFMv7hrmeBE4bu5bf9S+d60eJpodlDiSS2DQ2eFOLgO/7zS2gsZ7jOlvZpNL1qD09bjIY19u7FWgLDUA0YCM4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787432303; c=relaxed/simple; bh=oFI6RWSi8gCXVBUVsnMtRZ+RMtr/ud7vdRETxYQzABE=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=JfVpE6iZHBXjC+Fg5m0PpLkBH6bgeGQMSLA4sPLuH3Gjs5cX/EU3yXAL96rj1aBFh2svgpn1LkgPc3LNwAasW3S2WNR1H3crIgHwhXr7zHVjzXTpW4VRo+M1SjbR8ju6eheiQ/X5pYdrUbE7boZatM2O7raSfpb3QbSj8bWhqTI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=otxKvGcA; arc=none smtp.client-ip=209.85.128.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="otxKvGcA" Received: by mail-yw1-f169.google.com with SMTP id 00721157ae682-836c718715fso21770087b3.0 for ; Sat, 22 Aug 2026 13:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787432301; x=1788037101; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=tSv5OaXOkTNhvVg6RpW8LgIgc5fPTE2CwL1kgRbvrb0=; b=otxKvGcAiczffAyit1dIf0mBDKxtPyNGekBpllTMeSx/ZpkMN2WRxH0/MtKCIwSNDq ePqlcAR+LGH7tq4A4k4cv2ayjrLuujLlF/xr0uN+533uXWgzU2vDJZvLNjP2HUAXXFA/ ZG3F6JP95w98s+4YYkBfxgRfSqX297VWd1VL1ynibU0puU+e3J1VbhlrXGgu/Hsy77fe GxHcrsw5Ky1PpRK+uDJoGHsVmDel91VRwYVg8eDvn0dBeEdLsbbyYY7q4UzYhTM33lH5 SwU++1Vr3mXVojggFANT16CeNpYix4wPUInSb8PcwAhRpCq+Ctr7rppi8KNQrB5gY88J BCpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787432301; x=1788037101; h=content-transfer-encoding:content-type:mime-version:subject :references:in-reply-to:message-id:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=tSv5OaXOkTNhvVg6RpW8LgIgc5fPTE2CwL1kgRbvrb0=; b=oDcPdMlY0FsoCpq5iKGecQgTkDHfsr6xMMu4QoOffaqkn1lghSkpO37wSntli1KGmO ZSRMEw1fup55Wsr4Jv8T4ZfwrH9JW0ZsMA1Sqa8oXGYVAODLCUZpFdzLvJP3uD/9VOJI FQBJgPOI1qOfHOJFRv6fww97wJsn/SK/SLcQdhZLn/9ftSIEwaQzdNIuGpIREvR8A9B2 lDKYfFw+vwJl1ezS0vwy42aDJBKNjbKZTNLO1h5Kj2GQDYIRX5kbLcSNkKuhwMYjACJn aXeok7qWadmA0LldjXndK5H7UGurg0ugugTCe/efD0Zvdncn8aDv0PaVAMqarfzStavt xUjw== X-Forwarded-Encrypted: i=1; AHgh+RpOFb2tdl4r4RtP1dsq1gzNvCiZ8Z/1TNx7tz2cJ3aYD+sztE5ROhDM073kE7VDu9d6uELuC4268Zy+5+c=@vger.kernel.org X-Gm-Message-State: AFuF++nVtQZi0XL4dddruUbr7ykroLvSe7sdPyFjMVWvsnjkQZ7xaAqU YETb1S1ADoC8BRto5/97+R5ihFpWgyWxtv/c42R5bicSqWX3JuwJ0Y/J X-Gm-Gg: AR+sD109JqvceSWlNl3mWn3yLQEyyjILs9fiaYsnNzhwBzcBQC8tcbe+kkITd4V8D4S keQH44KIH/oXdqbFSNk/R+VyTj7pbPQmZ/XKZUyzEeBVOedptzCQ8RAqshYxs1vEsSKCP/3csaz ULJ+ijK/GvJC3FrqG2b3E4kwXseW/M5VqzAH7JBgWfjuwVX0DDv+MF3m/vtWRrUgcZHsnMLkHoC lMBxPImeWbB+WRnrOR39utI0HK0EvIs6qJO7Tz6HwpvBho0I4UDEXe7DQYxduHoOpIhZxgZlDef x+M//uAWcoon2TH2VoKaDQVzdEtZcz/V8XmELMnkBzFG9IVCHkqfpGRmT4k0hfQoGSuQY+cvlwr kk040ghdymEy+aBwlC9nfOegNsCxln//zdjfwyBaHwELMhTl9vUL9zSY9uSVSPVVXe6aTbspobc Lc6cAyW57ehF2JrqOe18WMmabt/ajuyqtNlKUaCd6v1SqV5vQVbb2b+Lm33Ueqr4yifFgaLVezS uTztJBh4+8FFK4slNjsFRY9eUmWzrriZPFI9iSZHw== X-Received: by 2002:a05:690e:4891:10b0:66c:fec4:dd7b with SMTP id 956f58d0204a3-66cfec4df7amr42554d50.6.1787432300903; Sat, 22 Aug 2026 13:58:20 -0700 (PDT) Received: from gmail.com (234.207.85.34.bc.googleusercontent.com. [34.85.207.234]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-66cf4624eacsm1286196d50.3.2026.08.22.13.58.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Aug 2026 13:58:20 -0700 (PDT) Date: Sat, 22 Aug 2026 16:58:19 -0400 From: Willem de Bruijn To: Norbert Szetei , netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Aaron Conole , Eelco Chaudron , Ilya Maximets , Steffen Klassert , Kuan-Ting Chen , "Michael S. Tsirkin" , Willem de Bruijn , linux-kernel@vger.kernel.org, dev@openvswitch.org, Jongmin Jang Message-ID: In-Reply-To: <6E3A780D-FB87-421F-9964-B1D457D7D106@doyensec.com> References: <4B5CCA6E-2C49-4F86-8C4E-E1BE15C16C0A@doyensec.com> <6E3A780D-FB87-421F-9964-B1D457D7D106@doyensec.com> Subject: Re: [PATCH net v4 2/3] net: skbuff: don't skb_tx_error() the source skb in skb_zerocopy() 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=utf-8 Content-Transfer-Encoding: 7bit Norbert Szetei wrote: > skb_zerocopy() copies frags from @from into @to. On an > skb_orphan_frags() failure it calls skb_tx_error(@from), a destructive > operation on the source skb the copy helper does not own. That completes > @from's zerocopy uarg and clears SKBFL_ALL_ZEROCOPY, including the > SKBFL_SHARED_FRAG page-ownership marker. > > Both callers already report the failure on their own drop path. > nfnetlink_queue does it at nla_put_failure, and Open vSwitch does it in > the flow-miss drop arm of ovs_dp_process_packet(), so nothing is lost by > dropping it here. > > On Open vSwitch's OVS_ACTION_ATTR_USERSPACE path the skb is not freed on > this error: do_execute_actions() ignores output_userspace()'s return > value and, unless the upcall was the last action, keeps forwarding the > same skb through the flow's remaining actions. The uarg is completed > while that skb is still in flight, telling the producer its buffers are > free, and SKBFL_SHARED_FRAG is cleared on an skb the rest of the stack > still handles. That flag is what makes esp_input() call skb_cow_data() > instead of decrypting in place, so a later local ESP delivery can > decrypt over frags the skb does not own privately. > > Leave error reporting to the callers. > > Fixes: 36d5fe6a0007 ("core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors") > Cc: stable@vger.kernel.org > Suggested-by: Ilya Maximets > Signed-off-by: Norbert Szetei > Reviewed-by: Ilya Maximets Reviewed-by: Willem de Bruijn