Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp22833918rwd; Fri, 30 Jun 2023 13:24:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlErs0k28vyEe/G5RMEYsEUEFZePPgspp3dcmYouyCn5Pjo8VFADzaeTWAwqBZ256tjNJ+M/ X-Received: by 2002:a17:90a:10c1:b0:262:d6e9:208b with SMTP id b1-20020a17090a10c100b00262d6e9208bmr2855623pje.4.1688156672701; Fri, 30 Jun 2023 13:24:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688156672; cv=none; d=google.com; s=arc-20160816; b=uAsjhO6zck/kJEyymGeHF/0qAM54RHsWj3ZZsbTGqL/b5U88Zw+Pd7TwlSxZ3q7hRY cKCDWqYBAhuqHS0V/2Cr5CNqG8rDqybB2+xpy5vF35bI241X8jGh/rdWwVL5IG6UpB3M Gdfkj8qu4vj7XJhqx2WERb8GOztekD/OKa+ZB2ebdgC0sTLxNCReJLTuZ5LWK+uBO6GK dYK/FmNQlQ9WKWI17YWVC3lGuh7p82HLC1k+DnfJEOGhaO/bHCUHZlvZV38oK/jU2p8F HchZVwWtCb6BvQm+WszV8ek4ojHo1MEr+/1WFRmpPd9KfcKv3rs9NoVSUPWNJutGImZa Uo2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:date; bh=GUbfFX4ieS21q51+v876fkvs3wCOxqm6LWhirMM8tDQ=; fh=kT3LrtA0GbsAcSaCbVjFT1EzJoQUipV30Cyt0Tr25Fc=; b=sM9JvSjWgCF8z6sl5Tf0ZaOkMabfOPKaqbYXOexOYv7h2WQUqFee9UHd08fT9TkPzQ ZotRKaAB7Ib+cO4TnfXsGgX7lai9cmdLRLE26I0M18N/S3SV2PpBN/bgsC8ZFELQ6OxS 37Aw1ds5dlDbju0yektsSxPWty6OECp0e5ESqg005IJAnn59u7zUZ4oH/zHISV2xYAlN 7Tlf6JUhmXZHEHTvRAXTRIYb34L/yTrgDj8HS21wJqgDaenL/AZPY0VoVf+bpWG9ez0Q zc4PTDpgcJq3Cp+6mXavnhevVQSUKBrG5Zx7NyirNR9ZrE4E3lpeR2gFG/PcD8g/A/77 k8ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=W7jHlr6Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a17090aa88d00b00262e81f612esi10867050pjq.139.2023.06.30.13.24.20; Fri, 30 Jun 2023 13:24:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@t-8ch.de header.s=mail header.b=W7jHlr6Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230015AbjF3Tz6 (ORCPT + 99 others); Fri, 30 Jun 2023 15:55:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230235AbjF3Tzz (ORCPT ); Fri, 30 Jun 2023 15:55:55 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3595719AF; Fri, 30 Jun 2023 12:55:51 -0700 (PDT) Date: Fri, 30 Jun 2023 21:55:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=t-8ch.de; s=mail; t=1688154949; bh=qO2t88Qohwhj2xIJpyQRKbtASY9ZCj2av7m7ovm4rCc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W7jHlr6ZvfqHkHfCM7qxuvEZBCyGZWZp0h7lhmKP7eq62Pq8RWEhgKhdO8VrrD7e2 fA0ESdp+sJ5lR1fRjIn4XAvXZDqRNdGvkzaCPNgSRKcAsz+LE1sO8HJZ6iqM3BRJsz 5jycqMz6TJ4hJs5IeHH8nLrAnZz4uip7lFQyYpBQ= From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: "Darrick J. Wong" Cc: Alexander Viro , Christian Brauner , Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Willy Tarreau , Zhangjin Wu Subject: Re: [PATCH] mm: make MEMFD_CREATE into a selectable config option Message-ID: <534f113b-546b-4795-83a1-b87b67727302@t-8ch.de> References: <20230630-config-memfd-v1-1-9acc3ae38b5a@weissschuh.net> <20230630153236.GD11423@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230630153236.GD11423@frogsfrogsfrogs> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-06-30 08:32:36-0700, Darrick J. Wong wrote: > On Fri, Jun 30, 2023 at 11:08:53AM +0200, Thomas Weißschuh wrote: > > The memfd_create() syscall, enabled by CONFIG_MEMFD_CREATE, is useful on > > its own even when not required by CONFIG_TMPFS or CONFIG_HUGETLBFS. > > If you don't have tmpfs or hugetlbfs enabled, then what fs ends up > backing the file returned by memfd_create()? ramfs? ramfs, correct. It goes via mm/memfd.c -> mm/shmem.c -> fs/ramfs/ . Thomas > (Not an objection, I'm just curious...) > > --D > > > Split it into its own proper bool option that can be enabled by users. > > > > Move that option into mm/ where the code itself also lies. > > Also add "select" statements to CONFIG_TMPFS and CONFIG_HUGETLBFS so > > they automatically enable CONFIG_MEMFD_CREATE as before. > > > > Signed-off-by: Thomas Weißschuh > > --- > > fs/Kconfig | 5 ++--- > > mm/Kconfig | 3 +++ > > 2 files changed, 5 insertions(+), 3 deletions(-) > [..]