From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kees Cook Subject: Re: [PATCH v3 1/4] fs, net: Standardize on file_receive helper to move fds across processes Date: Tue, 9 Jun 2020 22:27:54 -0700 Message-ID: <202006092227.D2D0E1F8F@keescook> References: <20200603011044.7972-1-sargun@sargun.me> <20200603011044.7972-2-sargun@sargun.me> <20200604012452.vh33nufblowuxfed@wittgenstein> <202006031845.F587F85A@keescook> <20200604125226.eztfrpvvuji7cbb2@wittgenstein> <20200605075435.GA3345@ircssh-2.c.rugged-nimbus-611.internal> <202006091235.930519F5B@keescook> <20200609200346.3fthqgfyw3bxat6l@wittgenstein> <202006091346.66B79E07@keescook> <037A305F-B3F8-4CFA-B9F8-CD4C9EF9090B@ubuntu.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=YuvdGzIyUzej8b6gdTa5D7P2JhC6M3cmDi3clfShF/E=; b=PIgAxHYrxUvRr9+6B+Y6rNbCq5cYmCyrWJFoGVB5vsnqF1cxlaBH0TdQtEogAZhAkK 0IZo+oyIm9PFRRK9u2lfat+U9IAqccCDhsh4QXM2Gz3Qz/v7cJ50lWwTlK+oRjnhtS65 WPTyN5BUNxT9qFvRvz655OCTZSSLHH3QKWdPg= Content-Disposition: inline In-Reply-To: <037A305F-B3F8-4CFA-B9F8-CD4C9EF9090B-GeWIH/nMZzLQT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christian Brauner Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Giuseppe Scrivano , Robert Sesek , Chris Palmer , Jann Horn , Greg Kroah-Hartman , Daniel Wagner , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Matt Denton , John Fastabend , linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tejun Heo , Al Viro , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "David S . Miller" On Tue, Jun 09, 2020 at 11:27:30PM +0200, Christian Brauner wrote: > On June 9, 2020 10:55:42 PM GMT+02:00, Kees Cook wrote: > >LOL. And while we were debating this, hch just went and cleaned stuff up: > > > >2618d530dd8b ("net/scm: cleanup scm_detach_fds") > > > >So, um, yeah, now my proposal is actually even closer to what we already > >have there. We just add the replace_fd() logic to __scm_install_fd() and > >we're done with it. > > Cool, you have a link? :) How about this: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?h=devel/seccomp/addfd/v3.1&id=bb94586b9e7cc88e915536c2e9fb991a97b62416 -- Kees Cook