Article View: linux.kernel.netdev
Article #2400Re: [PATCH net-next v3 2/9] tls: Check for a pending signal after an empty record
From: "Chuck Lever"
Date: Mon, 12 Oct 2026 15:26
Date: Mon, 12 Oct 2026 15:26
25 lines
8366 bytes
8366 bytes
> [Severity: Medium] > > Should a nonblocking reader get -EAGAIN here instead of -EINTR? With > MSG_DONTWAIT, sock_rcvtimeo(sk, true) returns 0, so sock_intr_errno(0) > returns -EINTR. This check also runs before any !timeo test. Yes. The v4 repost will return -EAGAIN when the receive timeout is zero, as tls_rx_reader_acquire() does, here and in the splice check. > [Severity: High] > > Does this put a limit on a run of empty records when the reader has > copied nothing? The patch does not claim to. The reader runs in its own syscall context, holds only its own socket's lock, and reschedules on each backlog flush. A budget exit from recvmsg() or splice() returns zero, and these readers take zero as EOF, which is the bug the series fixes. That bound belongs only in tls_sw_read_sock(), whose callers never return to userspace. The per-call rcvtimeo restart predates this series and applies to non-empty records too. -- Chuck Lever (Come to NFS bake-a-thon! https://nfsv4bat.org)
Technical Details
Message-ID:
<9b3ea5df-0387-4101-9c04-77396c3403e1@slotpi15m67>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345066-linux-kernel-netdev=dewy.ruReferences:
<20261007-tls-follow-on-v3-2-6d52d98389b3@kernel.org> <179175091986.434549.854005976353552945@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345066-linux-kernel-netdev=dewy.ru
From: cel@kernel.org ("Chuck Lever")
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 2/9] tls: Check for a pending signal after an empty
record
Date: Mon, 12 Oct 2026 11:26:23 -0400
Organization: Usenet Network
Message-ID: <9b3ea5df-0387-4101-9c04-77396c3403e1@slotpi15m67>
References: <20261007-tls-follow-on-v3-2-6d52d98389b3@kernel.org>
<179175091986.434549.854005976353552945@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
logging-data="1814800"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:41NY0zMJL1PHqcfkxkGvYc2Cc6M= sha256:xMdud+vAc8wEYnhs5ZArVPJHsm72PvgFelszA9TVO4Q=
sha1:ColRKd0L1ou5xt0cTmzOl6v1f+U= sha256:RWOlNCi1Xi5gmkAQBD2xjgR96cK3Sg9p+Yk/TXS4ZlQ=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id A938510FC3E; Mon, 12 Oct 2026 18:48:38 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id Il-RzkzOxFU3;
Mon, 12 Oct 2026 18:48:32 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-345066-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 6B21810FC25; Mon, 12 Oct 2026 18:48:23 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by tor.lore.kernel.org (Postfix) with ESMTP id 78C0935700; Mon, 12 Oct 2026 15:28:04 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 42E4F4A3840;
Mon, 12 Oct 2026 15:26:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D1UIKTDZ"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
(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 28D3F4A2A6A
for <netdev@vger.kernel.org>; Mon, 12 Oct 2026 15:26:45 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791818806; cv=none; b=uk02LgYB5QmgEeUDYQbVOaDptoVftnfCCTHNIR3/7kM80aSbhGyfzHoFMJhFw99yncKWxAMzSSr/k3qt/W4JCv6VbEqgskXpJ+DXGrD0oCT4N4Dp3yo7DG8I8H8ufsU39GxUTQRtHzj8xn8GkZzTgZAbdTs3fkoEV+9fvbQgX0Y=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791818806; c=relaxed/simple;
bh=Saq0h4XHevG6Hg/27Hi4ub9YmFDCGUY9UEFqzA+pYMw=;
h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References:
Subject:Content-Type; b=pF4z5h92roYOCBFzQDgw099k++5WhFJWsh4V6R8aJTQZTKz0z67UYLndG8xMhVQBpvL9hni6uQc/AvGj12eCuXmPU6NuNP/EhvhATej9dHuCT8y9amaYK2ECqd6B4AQhVq1FuQLu9CylJWv5AxRUS7ey67jQPwXaiyDjO9jymCs=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D1UIKTDZ; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A3B901F0089D;
Mon, 12 Oct 2026 15:26:44 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1791818805;
bh=oD9NeAHRbg96T+N0ML5mMOiRllCQ+2AR2W6jQic66FA=;
h=Date:From:To:Cc:In-Reply-To:References:Subject;
b=D1UIKTDZ5pieeKMjlqjaGIla/C0krjDszWa3qcciJQnqDp8lDbCksVJre/RnQGNjd
T1/ZUk3AxRIb1aYgwx+RtNL6oKOZnZpmJcAYuXdfa8qEw4uNUoLnLGyvrrjq2EDgYZ
yzHjq5FkhbL9UM89kfxZrS6pRjdYnJxXhYjHM4r7D7/wUdRHDMAQsVPrQUR3Mk4r1B
/okACJpG+fsAdDUisB3QTOJmibBoPsWPji7Fn7NNdzU8LWAiJOI3BR2HFz5mmHhksl
3aUsu9gyrSSOpn9dVYXkbzl2nLJxfDZ976Jw7ZTW+Tb1Q5gibbDU/y37HQBsuDWYqQ
3w/R3Z8+7oRnw==
X-Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50])
by mailfauth.phl.internal (Postfix) with ESMTP id EFD6BF40066;
Mon, 12 Oct 2026 11:26:43 -0400 (EDT)
X-Received: from phl-imap-15 ([10.202.2.104])
by phl-compute-10.internal (MEProxy); Mon, 12 Oct 2026 11:26:43 -0400
X-ME-Sender: <xms:M_zMar0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
<xmx:M_zMajCMsnVY_bYaPFpzGovltIQmUuooNtMJWGDILPCYkPQY2Nv1_Q>
<xmx:M_zMagwesCpH5m4kJGERkVcQwVxFbhvZwPF4M0frouF6AB8dUFOi0v95>
X-Feedback-ID: ifa6e4810:Fastmail
X-Received: by mailuser.phl.internal (Postfix, from userid 501)
id D621B782738; Mon, 12 Oct 2026 11:26:43 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-ThreadId: A_R-6tCn933Z
X-Cc: john.fastabend@gmail.com, kuba@kernel.org, sd@queasysnail.net,
davem@davemloft.net, pabeni@redhat.com, horms@kernel.org, davejwatson@fb.com,
shuah@kernel.org, qingfang.deng@linux.dev, edumazet@kernel.org,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org
X-In-Reply-To: <179175091986.434549.854005976353552945@kernel.org>