Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp835699rdg; Wed, 11 Oct 2023 06:59:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGItUEUS2i0AALlOLdcXG2bdZLMg1tJqVAxFtu8Rjt8zV1WloNFtY7dJJD0WDFGBOL+oY0g X-Received: by 2002:a05:6358:2484:b0:141:8c:75ad with SMTP id m4-20020a056358248400b00141008c75admr27292827rwc.28.1697032774129; Wed, 11 Oct 2023 06:59:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697032774; cv=none; d=google.com; s=arc-20160816; b=rSGnTLXeUytWVwL3+lh5yGehufCcpPkP2xm4tGmhU6lGiMh4IxfN0t5ajeW0V0/sK7 /4nClmV0WMISQpSsJEkIaOPV+9ZjJq+qQlsLzK3orNw7aONWIqZ/9wLU/THo+GBB/VFK CgWhxIeif43CI+c2yuyTHJJtTj2FM02xAKWupHTKpHS9uU/H2a1CQkYQ1x+yL8/Ji8r7 O8V/cTIJKE3MP6MqYjRD3q6KyIGBTznA4obs8bgzuSuoPde97WSqivz8Rn9AjsAWpqJd Y6ua5QMW2Ed9QxLbhXU0N492j44g4VJTtV4zerznyHmaM+VlcwMdL6xDUoskod1TccCn 87Pw== 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:date:dkim-signature:dkim-signature; bh=zDxQm9+A2hHDdkBqBnjxp+FzgrU9wEMk6rAhmb/Kp9s=; fh=L/CT3DlwAf4FBuHkpx3rhtZ70jQMEjcY7oV78sto2tA=; b=zy+LoAUHNL9K7F8asklzALIWmswDgiaWTXphXTheAeUuqg4umap9Zp6Ycb2hIDvQFS ZWZBHVgWC7VdXoj6dv5Bkm5Cf4Xjl85tDGtkCxB/1VG6/pulPaHBtpp8MQFxT7hTas95 dzAeGJIgaXMIO/elXJ78/ceho8O51rI+nAKZFMO8SZR+kCGcdYad7uKT5xYL4EPa1KQ/ Iq1tt707QuFfOmkLU5EsyA8KnbSZKcZWpjujPaNvVCPuEhLPkfZn+TU6Momejgj3td34 nbaoMpzvheJbRqgbwtsAKaQNGEOvIPYEo+Q62B5WWPr7zc3rFA0SYpsuqowSMPHV0ZY9 D/NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MX4GRXwe; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id a72-20020a63904b000000b0057744d09d1bsi14732124pge.251.2023.10.11.06.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 06:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=MX4GRXwe; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5F5DA812E001; Wed, 11 Oct 2023 06:59:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234951AbjJKN71 (ORCPT + 99 others); Wed, 11 Oct 2023 09:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232575AbjJKN70 (ORCPT ); Wed, 11 Oct 2023 09:59:26 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A48DC93; Wed, 11 Oct 2023 06:59:24 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 336291FEC2; Wed, 11 Oct 2023 13:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1697032763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zDxQm9+A2hHDdkBqBnjxp+FzgrU9wEMk6rAhmb/Kp9s=; b=MX4GRXweEU3+XM4fNlEs3A+BqRtzzpgxMiAftXX6g9ZLS7hPaiN+NUwB7O5nTNbKpYHb32 U2Ic/NoBvQHpy8Sp5DZKfmeZu81zDEqY07sNYBpyp1bl1n5s5KVSwg4rpKjfCv/ym0im0G 22H6oXZpsKvuGNOGhE5Gg45Aib50FlU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1697032763; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zDxQm9+A2hHDdkBqBnjxp+FzgrU9wEMk6rAhmb/Kp9s=; b=ap3Cb6XIdQHU9oUjKWllUwJlGo0UHKGx1/ng4FjeRG8qvIt+eT1khKU6uQlMCvzv9NGAp1 8vfCNRaX2LGHl6AA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 1E436134F5; Wed, 11 Oct 2023 13:59:23 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 3XNmBzuqJmWcXQAAMHmgww (envelope-from ); Wed, 11 Oct 2023 13:59:23 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 78020A05BC; Wed, 11 Oct 2023 15:59:22 +0200 (CEST) Date: Wed, 11 Oct 2023 15:59:22 +0200 From: Jan Kara To: Max Kellermann Cc: Jan Kara , Xiubo Li , Ilya Dryomov , Jeff Layton , Jan Kara , Dave Kleikamp , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, Christian Brauner , Yang Xu , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2] fs/{posix_acl,ext2,jfs,ceph}: apply umask if ACL support is disabled Message-ID: <20231011135922.4bij3ittlg4ujkd7@quack3> References: <69dda7be-d7c8-401f-89f3-7a5ca5550e2f@oracle.com> <20231009144340.418904-1-max.kellermann@ionos.com> <20231010131125.3uyfkqbcetfcqsve@quack3> <20231011100541.sfn3prgtmp7hk2oj@quack3> <20231011120655.ndb7bfasptjym3wl@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Wed, 11 Oct 2023 06:59:29 -0700 (PDT) X-Spam-Level: ** On Wed 11-10-23 14:27:49, Max Kellermann wrote: > On Wed, Oct 11, 2023 at 2:18 PM Max Kellermann wrote: > > But without the other filesystems. I'll resend it with just the > > posix_acl.h hunk. > > Thinking again, I don't think this is the proper solution. This may > server as a workaround so those broken filesystems don't suffer from > this bug, but it's not proper. > > posix_acl_create() is only supposed to appy the umask if the inode > supports ACLs; if not, the VFS is supposed to do it. But if the > filesystem pretends to have ACL support but the kernel does not, it's > really a filesystem bug. Hacking the umask code into > posix_acl_create() for that inconsistent case doesn't sound right. > > A better workaround would be this patch: > https://patchwork.kernel.org/project/linux-nfs/patch/151603744662.29035.4910161264124875658.stgit@rabbit.intern.cm-ag/ > I submitted it more than 5 years ago, it got one positive review, but > was never merged. > > This patch enables the VFS's umask code even if the filesystem > prerents to support ACLs. This still doesn't fix the filesystem bug, > but makes VFS's behavior consistent. OK, that solution works for me as well. I agree it seems a tad bit cleaner. Christian, which one would you prefer? Honza -- Jan Kara SUSE Labs, CR