From: Sasha Levin <sashal@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Sascha Hauer <s.hauer@pengutronix.de>,
borisp@nvidia.com, john.fastabend@gmail.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 6.6 054/139] net: tls: wait for async completion on last message
Date: Sat, 5 Oct 2024 20:31:15 -0400 [thread overview]
Message-ID: <ZwHaU1RSwk_7zOpy@sashalap> (raw)
In-Reply-To: <20241002055025.5d9ee0a4@kernel.org>
On Wed, Oct 02, 2024 at 05:50:25AM -0700, Jakub Kicinski wrote:
>On Wed, 25 Sep 2024 08:07:54 -0400 Sasha Levin wrote:
>> From: Sascha Hauer <s.hauer@pengutronix.de>
>>
>> [ Upstream commit 54001d0f2fdbc7852136a00f3e6fc395a9547ae5 ]
>>
>> When asynchronous encryption is used KTLS sends out the final data at
>> proto->close time. This becomes problematic when the task calling
>> close() receives a signal. In this case it can happen that
>> tcp_sendmsg_locked() called at close time returns -ERESTARTSYS and the
>> final data is not sent.
>>
>> The described situation happens when KTLS is used in conjunction with
>> io_uring, as io_uring uses task_work_add() to add work to the current
>> userspace task. A discussion of the problem along with a reproducer can
>> be found in [1] and [2]
>>
>> Fix this by waiting for the asynchronous encryption to be completed on
>> the final message. With this there is no data left to be sent at close
>> time.
>
>I wouldn't backport this, it may cause perf regressions.
Dropped, thanks!
--
Thanks,
Sasha
next prev parent reply other threads:[~2024-10-06 0:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240925121137.1307574-1-sashal@kernel.org>
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 007/139] ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 010/139] wifi: cfg80211: Set correct chandef when starting CAC Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 011/139] net/xen-netback: prevent UAF in xenvif_flush_hash() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 012/139] net: hisilicon: hip04: fix OF node leak in probe() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 013/139] net: hisilicon: hns_dsaf_mac: fix OF node leak in hns_mac_get_info() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 014/139] net: hisilicon: hns_mdio: fix OF node leak in probe() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 018/139] e1000e: avoid failing the system during pm_suspend Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 020/139] net: sched: consistently use rcu_replace_pointer() in taprio_change() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 030/139] l2tp: don't use tunnel socket sk_user_data in ppp procfs output Sasha Levin
2024-09-25 14:27 ` James Chapman
2024-10-11 13:52 ` Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 033/139] tipc: guard against string buffer overrun Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 034/139] net: mvpp2: Increase size of queue_name buffer Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 035/139] bnxt_en: Extend maximum length of version string by 1 byte Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 036/139] ipv4: Check !in_dev earlier for ioctl(SIOCSIFADDR) Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 038/139] netfilter: nf_tables: don't initialize registers in nft_do_chain() Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 039/139] ipv4: Mask upper DSCP bits and ECN bits in NETLINK_FIB_LOOKUP family Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 040/139] net: atlantic: Avoid warning about potential string truncation Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 042/139] netpoll: Ensure clean state on setup failures Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 043/139] tcp: avoid reusing FIN_WAIT2 when trying to find port in connect() process Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 046/139] wifi: mac80211: fix RCU list iterations Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 050/139] can: netlink: avoid call to do_set_data_bittiming callback with stale can_priv::ctrlmode Sasha Levin
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 054/139] net: tls: wait for async completion on last message Sasha Levin
2024-10-02 12:50 ` Jakub Kicinski
2024-10-06 0:31 ` Sasha Levin [this message]
2024-09-25 12:07 ` [PATCH AUTOSEL 6.6 056/139] nfp: Use IRQF_NO_AUTOEN flag in request_irq() Sasha Levin
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=ZwHaU1RSwk_7zOpy@sashalap \
--to=sashal@kernel.org \
--cc=borisp@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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=s.hauer@pengutronix.de \
--cc=stable@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).