Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1143166pxb; Fri, 22 Jan 2021 08:09:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxkK/kCLwYI9Epg0hovYGRVHNhUypjL3/FcW+A/jqrVDQp7FkdkCORboPJ5B+0MPbCotFFX X-Received: by 2002:a05:6402:b2f:: with SMTP id bo15mr3921723edb.146.1611331740765; Fri, 22 Jan 2021 08:09:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611331740; cv=none; d=google.com; s=arc-20160816; b=RUCmo9ceUM/jYes2koOXPsJ6rupYwQHV45gobZzWa3iAZzw7pOXUmCisBSuF6yVdJ3 wx4em8stgQeFOg7RSm0tnQMg1HRK8z6EQruFozaAForLC2boQM2FOgsfLeJ8rH/luVZj hubch6WcE/qH83i9mwS6CNBZdOZFneFQHMejeunlRkrdvphbemhGVs1qvEANTpp0oGKf p5M5AR2S/27DJ7YkFOJ9PhRNcTj/h+O0h/wXvOc+kxrcDCTafUXF9ZOC/oDdiE3Iks0y YFzeVqci73OaAlzqKuqkoeQty+0Z6sDU4mzJ1dJVjtA/XOvHqUDbz5e4n1J3cFAeQATR BG6A== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=uOcDAQTvbMFsGW2wN4EW2b9gto6d910RnbvMcnDkd/c=; b=We7NFO6bqnSU1yMT4tyf5UQ32rxKoNtmc415CGmEZ3ANe9F5b9PlzMSfgBUpIL5+8H D1BIg1rV4e+EE2c8NQayPYGrXJlp159xnzb7CgDV2uZAPE5cVYGGmqatsasYxvRDDYZ2 08n+ernf5msp8TpXZpqpXt39mQbFM4PmABGBQX7M6oRgAvgTDGfKaJv4ek6h+SWlvaZJ ebG47gTt9ubLzVu9VPJwctnO6qiHX4g4nRq6DldQNfaX8HO+44ShWmGq+YHBQU7yE2CR 2NLw4CQb4jmme6hRr2Gt9r9Cn4adyoMYctqd5zU7gqmXino7Quzi+K8IKr5FpwHjr0Xo kcJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tyhicks-com.20150623.gappssmtp.com header.s=20150623 header.b=bXsPFrB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f21si4007841edj.483.2021.01.22.08.08.36; Fri, 22 Jan 2021 08:09:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@tyhicks-com.20150623.gappssmtp.com header.s=20150623 header.b=bXsPFrB1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729498AbhAVQFw (ORCPT + 99 others); Fri, 22 Jan 2021 11:05:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729504AbhAVQFT (ORCPT ); Fri, 22 Jan 2021 11:05:19 -0500 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19E01C061786 for ; Fri, 22 Jan 2021 08:04:39 -0800 (PST) Received: by mail-oo1-xc2c.google.com with SMTP id k9so1515966oop.6 for ; Fri, 22 Jan 2021 08:04:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tyhicks-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uOcDAQTvbMFsGW2wN4EW2b9gto6d910RnbvMcnDkd/c=; b=bXsPFrB1DV10D190ze4iNrrBtwxSSmGn8GrafBPD8BtyliQHqw2ujTyLDkoZ5OWg96 6mipU1MFOuHREzL57e6Q38tAtdqs11tzO6y7rYligD0OnUaG7xcUlS0KmEkfAM0Yswgu l++pDvDOnvP/GdecS4qp8nK7kjhRgr4yIBykvRURR76yz2BEwPVLZ3CX8agwcxDDHSFr QiXBIbhIQPDcMg2oRqrarqb5vDUym50sSShT5GnuyVhklzDs16MyaduLffdt/dXgdOnO Xk4kYv3OylnZ5xhixhBLqJ58EZw1FUQbqz4w08kgeUSkYT3jgBjpggdnOyWhVRE7Czu1 kV7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uOcDAQTvbMFsGW2wN4EW2b9gto6d910RnbvMcnDkd/c=; b=NZI9D/R762W3UeKf41Zni5GHKWRJuPRhMyU2WOQCq2ju9Dd4eIB+3jzxpMdaujI9WN 5OM13MvEPSwM9dRlvnbTB22nNWr2eLEA7DIN5VtNYvsju3+5YK3IgCTTFnGK0DIzaYtr fss4u+NZ9gPVzbYmMWKuWCWeiwS/NXIRmCq2WkhoQ/jRMN9DPG2UTRBCmiX22WHFWBfz SDcs4z2qCaPRk1CxpkkdFkdWqU2aunm4EnO8t4Q3GRAoWqE/pgYPsyz1Q/eMFkd/BM3Z d35oWlSK6EiNBNgc/YUsl1NJ772NSYDO6bpqjcb8sOi8N+u3Y9au6kT51mXvatbT8BoJ o9sA== X-Gm-Message-State: AOAM530AIUeWzVPeW0i7Qp9BHk/SHPRLFZ6jPmOquXKCCxpxtlhfMdkb onkNqOkdUS0ITz8wQIMeVUlXyA== X-Received: by 2002:a4a:94cc:: with SMTP id l12mr4259445ooi.70.1611331478531; Fri, 22 Jan 2021 08:04:38 -0800 (PST) Received: from sequoia (162-237-133-238.lightspeed.rcsntx.sbcglobal.net. [162.237.133.238]) by smtp.gmail.com with ESMTPSA id q6sm1743948otm.68.2021.01.22.08.04.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 08:04:37 -0800 (PST) Date: Fri, 22 Jan 2021 10:04:19 -0600 From: Tyler Hicks To: Miklos Szeredi Cc: "Eric W. Biederman" , Miklos Szeredi , linux-fsdevel@vger.kernel.org, overlayfs , LSM , linux-kernel@vger.kernel.org, "Serge E . Hallyn" Subject: Re: [PATCH 1/2] ecryptfs: fix uid translation for setxattr on security.capability Message-ID: <20210122160419.GA81247@sequoia> References: <20210119162204.2081137-1-mszeredi@redhat.com> <20210119162204.2081137-2-mszeredi@redhat.com> <87a6t4ab7h.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-01-20 08:52:27, Miklos Szeredi wrote: > On Tue, Jan 19, 2021 at 10:11 PM Eric W. Biederman > wrote: > > > > Miklos Szeredi writes: > > > > > Prior to commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into > > > vfs_setxattr()") the translation of nscap->rootid did not take stacked > > > filesystems (overlayfs and ecryptfs) into account. > > > > > > That patch fixed the overlay case, but made the ecryptfs case worse. > > > > > > Restore old the behavior for ecryptfs that existed before the overlayfs > > > fix. This does not fix ecryptfs's handling of complex user namespace > > > setups, but it does make sure existing setups don't regress. > > > > Today vfs_setxattr handles handles a delegated_inode and breaking > > leases. Code that is enabled with CONFIG_FILE_LOCKING. So unless > > I am missing something this introduces a different regression into > > ecryptfs. > > This is in line with all the other cases of ecryptfs passing NULL as > delegated inode. > > I'll defer this to the maintainer of ecryptfs. eCryptfs cannot be exported so I do not think this proposed fix to ecryptfs_setxattr() creates a new regression wrt inode delegation. Tyler > > Thanks, > Miklos