Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp80553lqb; Thu, 14 Mar 2024 06:08:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUEpWtvAJOUdqCB1n+ks/rGsMqZzxIJXCaL01rKnjOa+2cibsvhL/l7mlbvNCWY1S/4x/zIX2yQyqIJOpH57lbHDiNfIpUeUDQiubz11A== X-Google-Smtp-Source: AGHT+IFiWGck4Q11lSQ1bxsuD3gucChlZFSOX3KF1DyS1lO2D4VP+Wtn8mGRjMaq6Wr/bq266s0O X-Received: by 2002:a17:906:fb0d:b0:a45:c05a:c539 with SMTP id lz13-20020a170906fb0d00b00a45c05ac539mr590111ejb.2.1710421714362; Thu, 14 Mar 2024 06:08:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710421714; cv=pass; d=google.com; s=arc-20160816; b=fMmQPnUu5Jjk7DXwd8d/f5T0yfvRxWr9PDkKzXlKlDP06H2e/DEDFlx75A+GtIHbwq gafwpgMI45sM4MBd9jOc+E9CXN4gmmLh2bIGx4YK0MKGC7YxbHySe3kzsatugEKcNDJi zpdNYpf8fIMXQeb5E5TE1XXrnhiPE/cb3kpmlGrGXgphwGiBRT1hfvkk0RWh3pp4Cl/c NJ4fsfHYyOuwwZo1oHC6zDQMI1A0LALiGZMXTHzsBrPhPpGX7+q7bc0486mT4PaiXMS9 gBwmwVO7WLu8bkyBnbTJHp2AOdHu11d8fV9bZnvWVrvlr2gSArD7ZAP5/hHQx3T9qyjP TVKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7F+GMfmTIeHQjgM+fN0XugEriGVcEET+uvRlxfdDDkg=; fh=l6SUnpcAF02pm40PiSVmetwgrmfw+kl93G392ZxL4HI=; b=LmkrerYt1Ef3Ea8IlMp98IBSbbGOxWzegqCwkrvJoE3iPPuG1EPPLX14w3FHBjX/wq QBsglctHBG9vENcdaGL2rlXCpwu9O8Pg6I+tqAjiTU9oCIlx/WctRIcWXCKV1Bwy96BT S91ll0ZAjDfZ/A4K6l523mGka1YUqjKCe0dwMO1IBZ22mepotS6PSzIq7y3YLg1xWg3D NzCDEoYMUBz+Y7goKMm1TM+BtfC6VHzC/JoNmZQ/stkjqKitsiDuS09zn5/1aR3EQG/g 80Spjsg7HbiD6K/YlobXQpQUnJEUh1vSUUjgF8raWBKSNEldU05rWlAtGi29fCUWGWM1 9pKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=AdKXiqpb; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-103271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n16-20020a170906689000b00a464ec6ad42si705497ejr.352.2024.03.14.06.08.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 06:08:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ionos.com header.s=google header.b=AdKXiqpb; arc=pass (i=1 spf=pass spfdomain=ionos.com dkim=pass dkdomain=ionos.com dmarc=pass fromdomain=ionos.com); spf=pass (google.com: domain of linux-kernel+bounces-103271-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103271-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=ionos.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0E1001F22128 for ; Thu, 14 Mar 2024 13:08:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 80A225B696; Thu, 14 Mar 2024 13:08:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="AdKXiqpb" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB70C5A4C0 for ; Thu, 14 Mar 2024 13:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710421699; cv=none; b=eSuiDVRxfdYEGd1vKooQhGVUY8jnMHMaWPWLXNH4BAI8bhjwJRZNEZRv/kcj7EYMTzXnYGbz3eEB3Nsiql1u488xDFlFOqfNb9VGqinD8F+T3MmXBJm7MOeW0NZOtCec9nZKrejC/iaJMD/f4asdyfJQKQDMDDBl6Ibc+V+rrjw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710421699; c=relaxed/simple; bh=f1RjpYk+wUVGcUzWsEOUuhMJaZVlrsH0nJwtARIVQis=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=MxTJhqbXZa9XoDB31+ZoWPKGYd7RHLQHPNnhJIzM4aFtwuzjOmfRyiZJ+Rc3spILj+saQo+hAN5OCCPz/KQ5AAbi710MmGzlq4y4D7YRq4FKQB+K2xSM3Q7HXbKx3c8UaiFIur/OduK6rZjX9tA0bEQLBUmeCCaR0Ve/5zGFeIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=AdKXiqpb; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-513d212f818so609271e87.2 for ; Thu, 14 Mar 2024 06:08:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1710421696; x=1711026496; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7F+GMfmTIeHQjgM+fN0XugEriGVcEET+uvRlxfdDDkg=; b=AdKXiqpbZbTRHaHNMUfFQIz7Cos0PIjajNXdkrEmCIer4vIXHcyZm9IIwDrOhv8RIz NHcV2ARyBMypBYLHttp9otFiT7wszy9N2U0UbX77I6hPBoUH9BflyydkFgGEjj9rOljo sH4oE2gfBTnNQqQiWC7v+s1hdf6bBzIi8hK7yKVDaPrkmwEHzmWY/VSePDH/g7afRl9d Oqrcg3MUpsu3Gd9tbaiNIEhrS0ixRDv1zjIels9DnZuZmrA1JfIaoCKMlooI6WOcx9x3 5uQuTETc/ZSy9iN4PsL3XAjox3HCGuShOPQEmQWGs4+rRrv74dmYhtcDrNraSVlzLxdV BCVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710421696; x=1711026496; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7F+GMfmTIeHQjgM+fN0XugEriGVcEET+uvRlxfdDDkg=; b=G7DhCM5ePOJtg8fmQxM3VW1PC8qhlsyaxu6YTiZtWK+1FFwNYzS2168nd0XE2gS5yh FTtDCgB2WybizWj9E2qEHqfTuwMK81vwJ3N2AebVXIY64qs9ieus+FkjTaIkZfWTcNV0 Z3sm9i52Yd3D88OP18UkSUsh6kRCIYDqk4vEsHgZ6T94yPcYVa3rJ55RkUUkn2SviHfV Nbyi3qCjEhN/+mAUgHGA47fVVIS70Y6cp+l+BW45yo03NEZB13HYb8iipC/XdNmEzuZM 6qOrX0b3xEwtBgeR0eNkL+lMi2l94Vexwv2ypbg3Ou4LXj2RnSqOkdvSlgEHbQqF6SLI a64w== X-Forwarded-Encrypted: i=1; AJvYcCXGt8fzfkh9rPiUVKSk+Ds+2iIiFkTWn18ZIc+qrUQMHQgbUGNVvQLvfYriakx68ObliCIwL+ltPmAvXDrVLnfPuu2GOIK0ZANCdLvC X-Gm-Message-State: AOJu0Ywc9N1VPBdAzVviN8tuaR/CH+zcENxU1F7N+HyCMPX81VTE+oSQ p5lFEEgCLE3Zocvycz7L6+SMLV9BYK75K+vFZvO6UXB6ynIDkAUd0Fz6LBqVcc2zL7nfOZAxre9 r6EywMC7jmvuka35m0sZDFczAMTtU0CL0l2j6NQ== X-Received: by 2002:a2e:be90:0:b0:2d4:6aba:f1a3 with SMTP id a16-20020a2ebe90000000b002d46abaf1a3mr1474815ljr.6.1710421695825; Thu, 14 Mar 2024 06:08:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231011100541.sfn3prgtmp7hk2oj@quack3> <20231011120655.ndb7bfasptjym3wl@quack3> <20231011135922.4bij3ittlg4ujkd7@quack3> <20231011-braumeister-anrufen-62127dc64de0@brauner> <20231011170042.GA267994@mit.edu> <20231011172606.mztqyvclq6hq2qa2@quack3> <20231012142918.GB255452@mit.edu> <20231012144246.h3mklfe52gwacrr6@quack3> <28DSITL9912E1.2LSZUVTGTO52Q@mforney.org> In-Reply-To: <28DSITL9912E1.2LSZUVTGTO52Q@mforney.org> From: Max Kellermann Date: Thu, 14 Mar 2024 14:08:04 +0100 Message-ID: Subject: Re: [PATCH v2] fs/{posix_acl,ext2,jfs,ceph}: apply umask if ACL support is disabled To: Michael Forney Cc: Jan Kara , "Theodore Ts'o" , Christian Brauner , 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, Yang Xu , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Mar 13, 2024 at 9:39=E2=80=AFPM Michael Forney wrote: > Turns out that symlinks are inheriting umask on my system (which > has CONFIG_EXT4_FS_POSIX_ACL=3Dn): > > $ umask 022 > $ ln -s target symlink > $ ls -l symlink > lrwxr-xr-x 1 michael michael 6 Mar 13 13:28 symlink -> targ= et > $ > > Looking at the referenced functions, posix_acl_create() returns > early before applying umask for symlinks, but ext4_init_acl() now > applies the umask unconditionally. Indeed, I forgot to exclude symlinks from this - sorry for the breakage. > After reverting this commit, it works correctly. I am also unable > to reproduce the mentioned issue with O_TMPFILE after reverting the > commit. It seems that the bug was fixed properly in ac6800e279a2 > ('fs: Add missing umask strip in vfs_tmpfile'), and all branches > that have this ext4_init_acl patch already had ac6800e279a2 backported. I can post a patch that adds the missing check or a revert - what do the FS maintainers prefer? (There was a bug with O_TMPFILE ignoring umasks years ago - I first posted the patch in 2018 or so - but by the time my patch actually got merged, the bug had already been fixed somewhere else IIRC.) Max