Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp937588imn; Tue, 26 Jul 2022 13:35:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tBr3avEZsVnTGUUOKFnmTBTPMQUvIs3X17nX9iXCEASJrxmwUWBCob6OV2zXrVn/3wsYet X-Received: by 2002:a05:6402:34d4:b0:43c:b244:c6a0 with SMTP id w20-20020a05640234d400b0043cb244c6a0mr177653edc.268.1658867753093; Tue, 26 Jul 2022 13:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658867753; cv=none; d=google.com; s=arc-20160816; b=DJBd0q3TRn6+0nind2qkvpaOzn8rilLGYAygTBoKibJkv0K7Jx/gH3as05kCaWDiU3 Jcm+kfkXD5eTjNufhLxWiS2BpRnH+bSnBdQpMOBuUNq0Hm13Oxo3T31hbon3EbAPuaVv EFwV/23sYoxmnIl41dEk65s9yht0X6GLaTBsM0q6zq+i936l8YPVE3oFCCi5rb0eKZJ6 H8DOy3jyCmPH6rWvXdKVJ08adw5IQdI5gPaXfd89NBwqHd0YonJbQxoLWaWCNged5UYQ kI0TKAaxUTlulJcS2kw4cCiBZ3DiN/X8zt4W89lz+yD2G6bycVTlHXrTezTcnEqzwJBU wkCg== 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:sender:dkim-signature; bh=yv3KulA6SXC2d8qM1b4VH3vnSrCIQuVcceAGzMpyLq8=; b=tDtoP6sAy7/BxppYWJmuVxGdlMlg7yvrAha/GzUrvCHZsVzzFpJdg0nQoMcOBm9ETF mprXp03edo6vq+WsL16AsJi1Z8GXAk1vFhTAqhzc1ijifl7i5NcCFngjKaXOiL4bxeZO CrHKHPmvM173jB5sztcmV67tbjflr7UHThmRoMyfZdOycTxvCsTrFp0AAidlh4MBaCwS ZFjNs8+AsRcCGM8Oartk/CxH6Y9w263Vh3/5DpjDzOi5VQ9m7BkEyZ1erwFLUni1+K+Q O2nEH9OEPV43YFiFaBFBiiaAk11JmTnSbIZNoseFh4ApAlFw8YEgC7Op2hVJyaivtz8K zgfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WbRPhU62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd6-20020a1709076e0600b0072f1cccbc62si18021009ejc.641.2022.07.26.13.35.18; Tue, 26 Jul 2022 13:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=WbRPhU62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239657AbiGZUBL (ORCPT + 99 others); Tue, 26 Jul 2022 16:01:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239511AbiGZUBI (ORCPT ); Tue, 26 Jul 2022 16:01:08 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97EC6326ED; Tue, 26 Jul 2022 13:01:07 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id p1so5795280plr.11; Tue, 26 Jul 2022 13:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=yv3KulA6SXC2d8qM1b4VH3vnSrCIQuVcceAGzMpyLq8=; b=WbRPhU62l5iVyr4AcFYCotiJR0a3zh4yuvzp5Pd70CDeFQKGfrxYJbWXPGYF6U77pc h5Xmz9Dx5kcvff7vnNyIjlyxmGcdBUEi/f/SeyWO3qqTx+jnReUp57Sg5fkReqxh+3Q+ sUUp3ZGpYVjB27BiFwPry4pwxt2+Jdo28gB3WuTk0BYAtVge24qHNPNGAPZeKZZNuOez xorfG80VYE2snEUfiEvGCLZHBc20QLBe0gjtW3e7PuYRDH9f62HUnO2qsNdTIYT8igpI 2BvIX5HHGwgInkdtHjsrpWV+HMu4nzq3YnxNOarw1Mbmh9sBvPPd2gr54eaPXvm5qXCR tPtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=yv3KulA6SXC2d8qM1b4VH3vnSrCIQuVcceAGzMpyLq8=; b=rTExuknG5sQP0NcuZPRRipl0KQhntoRc0WLS1yvva7c84ASEU02tT3kORODN0A/VQQ R776swRTemGeCw/Rr4SttFxn/PVR2Mh1SjDodEFiLmiG2QgzZc4sX7bJsWNZ+iFunMj0 kOwGUtHbB8fCmZYWDxGVDEsKJpOZJkNcyh4pxOGYqx7JgMiilBpyqkxLVgUltW5EB5xu wQc6bDTLgkRXDceKKKHwLjUOEnb9JojD11k5UHt6UgZTkF/zUjMmR1E6eo68whUWEEuU wrqsnNa/fB/ueX3bhbaRwsfbcpnF+DDFpof4DyiMOs/S5B5yq12J8MSCFe6ZSJFtms1C tYHQ== X-Gm-Message-State: AJIora8we/vIrnzN1CfO5fCWSlvyM1eD9ufDMVT/kqM+O24E08rZM8WL UOBpdSduUrwqBTZI6pX09n0= X-Received: by 2002:a17:90b:2c02:b0:1f2:fdb2:dc23 with SMTP id rv2-20020a17090b2c0200b001f2fdb2dc23mr744968pjb.182.1658865666856; Tue, 26 Jul 2022 13:01:06 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:370d]) by smtp.gmail.com with ESMTPSA id e15-20020a17090a280f00b001f2f301fd6bsm1840795pjd.38.2022.07.26.13.01.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 13:01:06 -0700 (PDT) Sender: Tejun Heo Date: Tue, 26 Jul 2022 10:01:04 -1000 From: Tejun Heo To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Peter Zijlstra , John Stultz , Dmitry Shmidt , Oleg Nesterov , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH 2/3 cgroup/for-5.20] cgroup: Add "no" prefixed mount options Message-ID: References: <20220726143246.GA23794@blackbody.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220726143246.GA23794@blackbody.suse.cz> X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Tue, Jul 26, 2022 at 04:32:46PM +0200, Michal Koutn? wrote: > On Thu, Jul 14, 2022 at 06:38:43PM -1000, Tejun Heo wrote: > > We allow modifying these mount options via remount. Let's add "no" prefixed > > variants so that they can be turned off too. > > They can be turned off: > > > // on v5.19-rc? > > :~ # grep cg /proc/mounts > > cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0 > > :~ # mount -t cgroup2 cgroup2 /sys/fs/cgroup/ -oremount > > :~ # grep cg /proc/mounts > > cgroup2 /sys/fs/cgroup cgroup2 rw,relatime 0 0 > > The mount(2) says about remounting: > > The mountflags and data arguments should match the values used in > > the original mount() call, except for those parameters that are being > > deliberately changed. > > Or is this a provision for the fsconfig(2) API? It's just me not knowing how these things work. I just looked at other real filesystems and copied. > > + fsparam_flag("memory_nolocalevents", Opt_memory_nolocalevents), > > + fsparam_flag("memory_norecursiveprot", Opt_memory_norecursiveprot), > > These are not 'no' prefixes of the option :-) Oh, I tried that first but nomemory_recursiveprot looked really weird. The thing is that the underbar is added to separate the subsystem from the actual option and we're now prepending no to the subsystem part of the name. I'm not super attached to the current names tho. > I.e. it seem more consistent to prefix whole boolean option name (in > accordance with other FS options but I know limited subset of them). > In the end, this should be handled generically for boolean options in > the VFS and not via custom options. > > Also, this allows both > 'nsdelegate,nonsdelegate' > and > 'nonsdelegate,nsdelegate' > (nsdelegate is just an example) where the 'no' always overrides being a > hidden implementation detail. > > I find this patch a bit weird. It is a bit weird. Lemme play a bit with turning off the options and I'll remove the no options if they can be turned off without explicitly specifying them. Thanks. -- tejun