Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp234925ybg; Tue, 9 Jun 2020 22:30:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLt1IVyqrFiwTC/O8vC3vyi+CF5nGyrd4gIS/HBA/rJ3PXO8VwrF1ABpZ5F5K4xytLlc+U X-Received: by 2002:a17:906:fa86:: with SMTP id lt6mr1866230ejb.148.1591767028100; Tue, 09 Jun 2020 22:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591767028; cv=none; d=google.com; s=arc-20160816; b=Ncbjgz9YCHlKsrot9gHS9DOnw+8ngPFKv//9yZalwQUKvZoL/fqI5BRagn5aHjdT6U jurlFM2lfxnrNK/mMb4pYJcSTG+4LDjGI0IPIkmlox09s9lqDJgnL7eZcljClEF00n1K k8PZyQ1y74TFYGkyBTS3FHHfiJrtOpW3FS+3ZyoiEoE0xMGwWQUvlCJ8cKCS1KZMf9FV /sDSoD+tOqza2nvAhvxqII63xlG0YkvTCKpFtflqS7He8IsOwwlGSWxPnrPIs37PGbCG LZoWTQCp5bliZsN9MeIttqhs1crU5zStONJhfq23FL7yJIEACEO4OlmRSzMfTVoL7zJH u+sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YuvdGzIyUzej8b6gdTa5D7P2JhC6M3cmDi3clfShF/E=; b=wZIQ6J+p0RE/yAao/pw5ZmS8I5C08oXGnhMCLIjpN1Wo9pax+X6iODXbrwimbnWIiX FOu/0lC91M+CUPR+i3qcHvJ/25hdmV58thAIaiyE7ZARb2jMP0h2OYW7x24GSg00mpFY dHtqE3UneQjNyie+NJNlh/3k1qFm217Ki5fayhHu/qNSmLYHAnrYzvvcjVlgDsNFg+6d e1mXygmpBZeSrIbSHMCXn5e5xtiUt4KRWQQaL8k2XsWBJQ4mpk3I0aS4VSvGj0sQMHwO kpgwYDLYlC6zcHkcWQ8XyblMyO/5n3T71Lk4oFGV7wJvDiWcGjreSOONONJLnCXV3FZx 5hRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PIgAxHYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si12963580edr.605.2020.06.09.22.30.05; Tue, 09 Jun 2020 22:30:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PIgAxHYr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726142AbgFJF2A (ORCPT + 99 others); Wed, 10 Jun 2020 01:28:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726046AbgFJF16 (ORCPT ); Wed, 10 Jun 2020 01:27:58 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48CA7C05BD1E for ; Tue, 9 Jun 2020 22:27:57 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id u5so478971pgn.5 for ; Tue, 09 Jun 2020 22:27:57 -0700 (PDT) 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= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=YuvdGzIyUzej8b6gdTa5D7P2JhC6M3cmDi3clfShF/E=; b=fmZ4ksJIMXULCRayuV2YVIEph0Modp1M7xdLw1DJi/CgIBP2Rc3zdL0gncXC9sMg6C xNBgEz1/JXX9hOWfQ8P1tNvdG/TwRlfr63R8fozM4IN8naIJDBgxXY2rRwdg8nD75FGx csHwtnJ21EcgLGpTZHizAW6ZfBv3Bx7aGAomyE6JcqhkdAb024PGLpps4foINHqkKXth YkU2TAHbtMxzfpSkcV/FoYm07Oov76ZlljjW4Br3dX4Yyi+O7zebeUSEH8DgwCDajs4Q q/aV0eTQUvvnosmM9vixSrMXrTmfxA7WCDvy4FsV2w9aPYuwWYh+/72xgKs8Q4ycP9UQ 4wiw== X-Gm-Message-State: AOAM530iYIzMJENbvYyLLn39M2Yx7fmoywqHLfEexz6D2Z/jv5mATLOE wyr25pmkmnYwJutYOBACGXWqzA== X-Received: by 2002:a62:1917:: with SMTP id 23mr1215614pfz.272.1591766876846; Tue, 09 Jun 2020 22:27:56 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id x3sm11513892pfi.57.2020.06.09.22.27.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 22:27:55 -0700 (PDT) Date: Tue, 9 Jun 2020 22:27:54 -0700 From: Kees Cook To: Christian Brauner Cc: containers@lists.linux-foundation.org, Giuseppe Scrivano , Robert Sesek , Chris Palmer , Jann Horn , Greg Kroah-Hartman , Daniel Wagner , linux-kernel@vger.kernel.org, Matt Denton , John Fastabend , linux-fsdevel@vger.kernel.org, Tejun Heo , Al Viro , cgroups@vger.kernel.org, stable@vger.kernel.org, "David S . Miller" Subject: Re: [PATCH v3 1/4] fs, net: Standardize on file_receive helper to move fds across processes 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <037A305F-B3F8-4CFA-B9F8-CD4C9EF9090B@ubuntu.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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