From: Maximilian Immanuel Brandtner <maxbr@linux.ibm.com>
To: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>
Cc: john.fastabend@gmail.com, sd@queasysnail.net,
davem@davemloft.net, edumazet@google.com, horms@kernel.org,
bcodding@redhat.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, svens@linux.ibm.com,
brueckner@linux.ibm.com
Subject: Re: [PATCH] tls: don't abort the connection on signal-interrupted sends
Date: Mon, 27 Jul 2026 22:39:59 +0200 [thread overview]
Message-ID: <2a48a680b9b15cf6567a2d5e5993db816797d9aa.camel@linux.ibm.com> (raw)
In-Reply-To: <fa33ce0b-d040-4c4f-9bcf-4ccddb127b92@redhat.com>
On Fri, 2026-07-24 at 09:40 +0200, Paolo Abeni wrote:
> On 7/23/26 6:26 PM, Jakub Kicinski wrote:
> > On Mon, 20 Jul 2026 11:08:47 +0200 Maximilian Immanuel Brandtner
> > wrote:
> > > When a signal interrupts a blocking send, tls_tx_records() treats
> > > the
> > > resulting -ERESTARTSYS as a transmission failure and marks the
> > > socket
> > > errored via tls_err_abort() with the raw error code. Later
> > > syscalls
> > > return the kernel-internal errno 512 (ERESTARTSYS) to userspace,
> > > as the
> > > signal it stems from is no longer pending during syscall exit and
> > > thus
> > > never translated.
> >
> > Can we just add ERESTARTSYS handling? I never heard of the other
> > codes
> > you're checking TBH, can they actually surface?
>
> FTR, I think only EAGAIN and ERESTARTSYS can be observed in the
> network
> stack, and the latter only after sock_intr_errno() translation, i.e.
> on
> sendmsg()/recvmsg() return path.
>
> I would not add additional error code handling, until we have some
> proof
> that it's needed.
>
> /P
I have a v2 ready that only checks for EAGAIN, EINTR, and ERESTARTSYS.
Before I send it though I would like to receive some feedback whether I
should really remove the other error codes.
prev parent reply other threads:[~2026-07-27 21:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 9:08 [PATCH] tls: don't abort the connection on signal-interrupted sends Maximilian Immanuel Brandtner
2026-07-23 16:26 ` Jakub Kicinski
2026-07-23 18:38 ` Maximilian Immanuel Brandtner
2026-07-23 18:44 ` Jakub Kicinski
2026-07-24 7:40 ` Paolo Abeni
2026-07-25 3:09 ` Maximilian Immanuel Brandtner
2026-07-25 3:39 ` Maximilian Immanuel Brandtner
2026-07-27 20:39 ` Maximilian Immanuel Brandtner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a48a680b9b15cf6567a2d5e5993db816797d9aa.camel@linux.ibm.com \
--to=maxbr@linux.ibm.com \
--cc=bcodding@redhat.com \
--cc=brueckner@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox