Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1200826lqo; Thu, 9 May 2024 07:28:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJmPXjKH4IPi2RtsQ0BAbo3H8euTHWx7iqDnxnTBKkhRgFoUkhkvfUZcE/mX/9GNyJzyP0m2nLqlV1umT/d9jnv90s9+LizuzmyJh0aA== X-Google-Smtp-Source: AGHT+IFlD9NBJIWW8tPOHZRORuaovwJ9NJ40E0FWiF/jRbEg4VAT8nSx2iPoDVLVva0Ffrf189kV X-Received: by 2002:a17:90a:fb96:b0:2b2:6339:b1a7 with SMTP id 98e67ed59e1d1-2b6165a0edfmr5923533a91.11.1715264906911; Thu, 09 May 2024 07:28:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715264906; cv=pass; d=google.com; s=arc-20160816; b=lSEdZDiRhHUandhBeP0MJWf+xUp4Wu3dwALYvskPmZU0tr9wFACnf/eOQelMmHBVIj dpSCBsgXjxO7n3UVgFug+MHuoJ1h8nC0c8KsmY3FuS0TcPmpf3xMpcz3h1658BpC/IQO HY+XXORU8L6ewfc8RmGVISOauroyBeAm0IZU1ZFiMJ939k02QG5jjxO0DxVVKke0I/wu irzAToctV7WnZ20jdRQ7h7R9lW4M9KtE/PNJnBfbVYlHwpicNuSYmwoNTX2isN6bfUXm IZUQntzmUfyV1DkLfqWWRhATszn90GyneIapZaqwVmfSnRz3NjEkjgZ/P1uUx4KnR5Ts sNaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jq0TZsLOmYSoh8JU0VF8GO2rVGj9OrG945KmZdEE1S0=; fh=4JCMSbJFAGQKGW/Fbx3HVp8kIo86E3IQNy+w+9oBvbk=; b=t2BySx1X6iU773TTAwowXt/FoYjUTV2tqbI2Ryg/D6RPFDYuzTcdmHyYi6jeZXwTw9 C1Nq2c/7BBFWTV7hyjOHs7M7md2MtacKE042Vp/2Xq8+pmfujkZ281Sd54/YMisWJ/8v sQPkt7BfaORfXVZ+ZWljYvi1B6ArBsFgYeWUUzVm+0xNB4IxQUZTUHYnI7/yYwE7EvNe C1FEglrPgKzbTrJycdUsiQLejXY623ExIJ0Vz68eDJFIddhu9Te8Om4hXMGArNCeWtt5 MOWR7bSo9URkvZQbuOYJ4TK8Jv/vhlv+VPYDG+ynXRPEnIMs7RagYtVFr/g2monUpX7S a1oA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=cawJGNe+; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b67177e750si1585084a91.176.2024.05.09.07.28.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 07:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=cawJGNe+; arc=pass (i=1 spf=pass spfdomain=mit.edu dkim=pass dkdomain=mit.edu dmarc=pass fromdomain=mit.edu); spf=pass (google.com: domain of linux-ext4+bounces-2418-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2418-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 78E56B21822 for ; Thu, 9 May 2024 14:28:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 216AE15E5C4; Thu, 9 May 2024 14:28:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b="cawJGNe+" X-Original-To: linux-ext4@vger.kernel.org Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0FCB15E1E3 for ; Thu, 9 May 2024 14:28:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.9.28.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715264894; cv=none; b=pX5B2R7ggUNmCSZ7YU4XAYVmmr+PbQsiv5Jp1zh4oXMrKhETxQ5PVZvf3FnHPdBhN7DYAMDP0dk74cbwSXSVkNDadbOR2wvK/jl2VuJif6HkWPv5HEbP1VybWnN/Qw/wEimwp7ROoMDUd0Fr01fIOcnp+NLtzoUdlOwXS5W0okI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715264894; c=relaxed/simple; bh=+YPP9+BggJFoYB3OD65EZx6HjxZ1o2jxBDWw0R+cqj4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sKvQ8r65OEMHmngJXJ55mO8AYGRkMb2Od2lpGujOL8/RVsyDq3hwF0ycYG90goGsaBvu4TIGLHId7po+FB/N7r9vDSSsJ77SbuWlVPTGtwgaWkdqMEJH+bdquN7vPfDQQ060OwC2tFXs3Fdo6qL0RNVEt5OI0UUoGIecgigTefs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu; spf=pass smtp.mailfrom=mit.edu; dkim=pass (2048-bit key) header.d=mit.edu header.i=@mit.edu header.b=cawJGNe+; arc=none smtp.client-ip=18.9.28.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mit.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mit.edu Received: from cwcc.thunk.org (pool-173-48-113-2.bstnma.fios.verizon.net [173.48.113.2]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 449ERwoB009927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 May 2024 10:27:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1715264880; bh=jq0TZsLOmYSoh8JU0VF8GO2rVGj9OrG945KmZdEE1S0=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=cawJGNe+z/IfsOLNwFcgyS8ipx4KDElwEt9kw+xuqgMqCrQohCvrQanuHF2/zZkQ6 9n9vN2q/VCEfnCl2ex8XgqOxBrZZNL02MYTGhCco/eWvNMCqngXYlAnysWIK4pqX1y map4HFbDzZDV98i+Y1aG/wqMvhJIH8MTJy7sZPyW866DVJ3ikzgLBd9PTRwBG5Ad6K Rni94ZWtJcJjNnr2799gE0lUl1LnU0kR4zC/8xVGYAfRJgssJkvhnYZOdrnmS8iJZv Ah2oHqEbAbtKamUHbchimfQAzocxKGuyi1H2CdEttp/3a92J2N82xFWBldrnww40fm LaZMYhb2BANXw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 1F5D815C026D; Thu, 09 May 2024 10:27:58 -0400 (EDT) Date: Thu, 9 May 2024 10:27:58 -0400 From: "Theodore Ts'o" To: Miklos Szeredi Cc: David Howells , Max Kellermann , Jan Kara , Christian Brauner , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: Don't reduce symlink i_mode by umask if no ACL support Message-ID: <20240509142758.GG3620298@mit.edu> References: <1553599.1715262072@warthog.procyon.org.uk> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, May 09, 2024 at 03:47:27PM +0200, Miklos Szeredi wrote: > On Thu, 9 May 2024 at 15:41, David Howells wrote: > > > diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h > > index ef4c19e5f570..566625286442 100644 > > --- a/fs/ext4/acl.h > > +++ b/fs/ext4/acl.h > > @@ -71,7 +71,8 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir) > > /* usually, the umask is applied by posix_acl_create(), but if > > ext4 ACL support is disabled at compile time, we need to do > > it here, because posix_acl_create() will never be called */ > > - inode->i_mode &= ~current_umask(); > > + if (!S_ISLNK(inode->i_mode)) > > + inode->i_mode &= ~current_umask(); > > I think this should just be removed unconditionally, since the VFS now > takes care of mode masking in vfs_prepare_mode(). The following is in the ext4 tree: commit c77194965dd0dcc26f9c1671d2e74e4eb1248af5 Author: Max Kellermann Date: Fri Mar 15 15:29:56 2024 +0100 Revert "ext4: apply umask if ACL support is disabled" This reverts commit 484fd6c1de13b336806a967908a927cc0356e312. The commit caused a regression because now the umask was applied to symlinks and the fix is unnecessary because the umask/O_TMPFILE bug has been fixed somewhere else already. Fixes: https://lore.kernel.org/lkml/28DSITL9912E1.2LSZUVTGTO52Q@mforney.org/ Signed-off-by: Max Kellermann Reviewed-by: Christian Brauner Tested-by: Michael Forney Link: https://lore.kernel.org/r/20240315142956.2420360-1-max.kellermann@ionos.com Signed-off-by: Theodore Ts'o