From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEB4FC433C1 for ; Thu, 25 Mar 2021 08:31:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 972CB61931 for ; Thu, 25 Mar 2021 08:31:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229576AbhCYIan (ORCPT ); Thu, 25 Mar 2021 04:30:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:54250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbhCYIaU (ORCPT ); Thu, 25 Mar 2021 04:30:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D53A161A16; Thu, 25 Mar 2021 08:30:18 +0000 (UTC) Date: Thu, 25 Mar 2021 09:30:16 +0100 From: Christian Brauner To: Christoph Hellwig Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Kees Cook , Andy Lutomirski , Will Drewry Subject: Re: split receive_fd_replace from __receive_fd Message-ID: <20210325083016.nwn2dbtuyearrxfd@wittgenstein> References: <20210325082209.1067987-1-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210325082209.1067987-1-hch@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Mar 25, 2021 at 09:22:08AM +0100, Christoph Hellwig wrote: > The receive_fd_replace case shares almost no logic with the more general > __receive_fd case, so split it into a separate function. > > BTW, I'm not sure if receive_fd_replace is such a useful primitive to > start with, why not just open code it in seccomp? I tend to agree and argued in a similar fashion back when we added this but we ultimately decided to add it. So now we're back to the original argument. :) Christian