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 CCF6C136C; Sat, 9 Dec 2023 01:40:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CfMpESn4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAFB5C433C7; Sat, 9 Dec 2023 01:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702086043; bh=QTTMy1y8OdOXVPFao0z+PqxfVUfwnOwJIHTnC62pLO4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CfMpESn4OZrSiVqt4ghNyP7H5mKmZaOxJHddpFXLikFAER1zWvTMUqRNqRrJ6uLdo VcFLr/7dQBQbMsAQESjWNVaib0mchj8tO8KljDkXJP+ag7swrimhzqv0Im2NbBLGMZ AzrbksVEbgeC1p4W7szyyXnGRKuc2M9pY5LVb0FR4bGlL0qYzsIqX3u1nRDSw8LHYo tSDVst+26Fmr2TtRDy1VKIZkms+RJE8IfV3daeMj352hXUVohwRDVG2Bfe7e3LKWGR OS41Nk7eteb/3MHs3vRmMW2AYIVp4/qe2TRFIW1QhgC/7YBMxu28WzDw0PaZZwggQp m3uYoz7THKfjg== Date: Fri, 8 Dec 2023 17:40:41 -0800 From: Jakub Kicinski To: Pavel Begunkov Cc: io-uring@vger.kernel.org, Jens Axboe , jannh@google.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: Re: [PATCH RESEND] io_uring/af_unix: disable sending io_uring over sockets Message-ID: <20231208174041.3eddcc6b@kernel.org> In-Reply-To: References: Precedence: bulk X-Mailing-List: io-uring@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 Wed, 6 Dec 2023 13:55:19 +0000 Pavel Begunkov wrote: > File reference cycles have caused lots of problems for io_uring > in the past, and it still doesn't work exactly right and races with > unix_stream_read_generic(). The safest fix would be to completely > disallow sending io_uring files via sockets via SCM_RIGHT, so there > are no possible cycles invloving registered files and thus rendering > SCM accounting on the io_uring side unnecessary. > > Cc: stable@vger.kernel.org > Fixes: 0091bfc81741b ("io_uring/af_unix: defer registered files gc to io_uring release") > Reported-and-suggested-by: Jann Horn > Signed-off-by: Pavel Begunkov Acked-by: Jakub Kicinski FWIW