Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp428915rdb; Thu, 21 Dec 2023 13:29:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKcJZFDqD4JavzndFU/55QJxlUvZq05OmjdvS9COLYaZvbFvGnQV8DhCzR5nonFtH0p0kh X-Received: by 2002:a05:6214:21ce:b0:679:f25a:8ff0 with SMTP id d14-20020a05621421ce00b00679f25a8ff0mr394461qvh.26.1703194197585; Thu, 21 Dec 2023 13:29:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703194197; cv=none; d=google.com; s=arc-20160816; b=aRdAnLy+gXobQwbYWDRYU5QjVOT5x0lgPP28T6GNmnE1KT+sAqTlf83Va9FQyNDjdG MuVjBBh0ydkdy4yzBFIl26utsulUDfnra9iFZqnlVPCVHprbl3dHnd8rqC7o/DF5xIx/ P1dIMWqF+/cHpcczbffYWMiaSJ8+i5ndS8CyXTYGQIs55s55mVafV392wn+AfiWumRnV c3UrheM77eZk6jgy137iMu8Ngc0ndKxOuzG8BldGED/UVzQVVXT7gzb/MVR1+rIeFAbi lKoXS1NTYKLNqi7N5Kew0DU7WEDz/AytNgQiOB4zO1gfS3lodh4A9M2Oq3ZB84Vq4QVI PaXw== ARC-Message-Signature: i=1; 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:sender:dkim-signature; bh=/FoyXaoazdlVrEVfsSEbWKqzLBhmPjBBZnxMuGcpkmE=; fh=ESj3a1bPaMZofCob3Zg2wCUrMbBCyf71hD1iMGJRrAg=; b=fUKW2hOh9SQjQd5c7JAdVc122Bau70ME4tkH3vDvFrSrfCMhmETsbXoaSHaKRg5+H7 kc1h/rP7iOkVZiYyX04GtbkmFPsrttlXCcXxGtTNfBqtPL54OM6SyHksPbt5AY6b4f6x ONLCg2WRIdcOoARY3NzIq8DnnXOOaLlMPAxjJjngL0bn3epbFfe5XSZNuNWjWaYwVhNM zzy/83RONseSZrW5cAYR715OEKAQDHjJgy06rqIDsylU48q7zkdsljYrVqhlBm98tINX 8if7Q784D9syhXYxEwJAwLeas9jW+56/qDQz8k4G97wZQ1jgHJQyr1u+6TCj+0crdZmj Bwsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=B04ChrDX; spf=pass (google.com: domain of linux-kernel+bounces-9082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q17-20020a05620a0c9100b00781161d6d91si2706573qki.317.2023.12.21.13.29.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 13:29:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=B04ChrDX; spf=pass (google.com: domain of linux-kernel+bounces-9082-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9082-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 31C821C2481F for ; Thu, 21 Dec 2023 21:29:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C0A276DB9; Thu, 21 Dec 2023 21:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B04ChrDX" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 8EB7B76909; Thu, 21 Dec 2023 21:29:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1d3536cd414so10441315ad.2; Thu, 21 Dec 2023 13:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703194186; x=1703798986; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=/FoyXaoazdlVrEVfsSEbWKqzLBhmPjBBZnxMuGcpkmE=; b=B04ChrDXIl8YGa0LVlqHMuPj4Gmca8M9EQqYajPHlW/zv0VkNsw7f8525gYW68QYb4 lWqIcznvt6+6UzT+rdIBfDTJapEkUA/0HmXLTaKmRIROdfef4C7XFTZYb3kRdXwI9MES wmBZ47lV8cEFLJeqgX9aemfEW55e/rS1FrAIgult4E9B7Pipkx8JKVWe0wyg4V0My4vW 3clKZRrEg+4G3cHwtBmACZ3rgDcwQgGwaU0Mu7O+O77jXIxCySD1p3CXZYPKAh+1krEO SWWWIxAOM85naVeaMq7PhqvhbVoWC11v1OECzNpAZkzIKio1D+2Qv+iIY1tSCQMsz4B+ ashw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703194186; x=1703798986; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/FoyXaoazdlVrEVfsSEbWKqzLBhmPjBBZnxMuGcpkmE=; b=m3x02p3btH71QRTy6qX06RxIEO0cndClxQhd+seZWYYVCr9/L8pns/AAoLotvHrwBc 0n9YFeqg/smXgSlNEvq78UKNuiyZDzzxjPE/kcvC8W2Jcq+zVe+Lh39r2voxqSIjazXm bH9C+BePDlVuuSCrzTLkYbP8yBfaGeheNu/wR3g4tFjvtdNF4xOjqSY313MlWy2KzOqw 1J+o/MSWJEjwiAZA7Kw70Snil+0J7r7kOaOOeVacgUnZfJC00Vq6xg0oV3idM+H0VkVL 0MFAgJ8Q++VNezHgtjp48ExX9HiCuKDRPzp2UDQnFxx7RC2uVKOASU7UZ6aGZGME2FKm KM8Q== X-Gm-Message-State: AOJu0YyfGTAKoeQ0qJTJl1lxTUEydW1rGPguTE9BDVBC1nHgka3KC3z5 +7Q7D6YRGz3xSdtEDRHLgrl0HuiqViW2mw== X-Received: by 2002:a17:903:124b:b0:1d3:d0da:254f with SMTP id u11-20020a170903124b00b001d3d0da254fmr270751plh.128.1703194185705; Thu, 21 Dec 2023 13:29:45 -0800 (PST) Received: from localhost ([121.167.227.144]) by smtp.gmail.com with ESMTPSA id y8-20020a17090264c800b001d1cd7e4ad2sm2131848pli.125.2023.12.21.13.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 13:29:45 -0800 (PST) Sender: Tejun Heo Date: Fri, 22 Dec 2023 06:29:43 +0900 From: Tejun Heo To: Max Kellermann Cc: Greg Kroah-Hartman , Zefan Li , Johannes Weiner , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH v2 1/2] kernel/cgroup: use kernfs_create_dir_ns() Message-ID: References: <20231208093310.297233-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20231208093310.297233-1-max.kellermann@ionos.com> On Fri, Dec 08, 2023 at 10:33:09AM +0100, Max Kellermann wrote: > By passing the fsugid to kernfs_create_dir_ns(), we don't need > cgroup_kn_set_ugid() any longer. That function was added for exactly > this purpose by commit 49957f8e2a43 ("cgroup: newly created dirs and > files should be owned by the creator"). > > Eliminating this piece of duplicate code means we benefit from future > improvements to kernfs_create_dir_ns(); for example, both are lacking > S_ISGID support currently, which my next patch will add to > kernfs_create_dir_ns(). It cannot (easily) be added to > cgroup_kn_set_ugid() because we can't dereference struct kernfs_iattrs > from there. > > Signed-off-by: Max Kellermann > Acked-by: Tejun Heo Applied to cgroup/for-6.8. Greg, can you please take the second patch? Thanks. -- tejun