Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1234943rdb; Wed, 20 Sep 2023 03:44:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7/45/xMBTc70JxwfUePbG6JNu7uwZ8KlDND6tSBpPr35vSssS9CB2bUyvwwEoLG4bGmAr X-Received: by 2002:a05:6808:d6:b0:3a7:5557:16ba with SMTP id t22-20020a05680800d600b003a7555716bamr1744463oic.27.1695206643772; Wed, 20 Sep 2023 03:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695206643; cv=none; d=google.com; s=arc-20160816; b=HUBMkqzp95ubuLvFakdMZlay0azcbcovIxDSk00F8hn1pytO4Tea1MmE2+0JqNU+Tb WpRNQeFqeOsaPIc9oSqjBuumN5ZGV2fgVHGIcGl0dupSZXgXWMX2sYZZNzTHNl8DEF2u 2kpRIe24ifZWxY+NldTO7rEbi0HhX67rK6rDNG38qGpEN3/OHLEI0sdcEfmK+HSBHSDh ubZYh6TKWOLrv3Rr+HhQdm6EZNX4JpiK2PhP+o1j92l8GA+V10dNuPdHMUcXZTJi2YEK V/sB0/9nYlXrAX49HP/cWfBNEdL+/AX9eRlc+s+gmS30FtnVjxKuMdwbp0Q/2s+9MoBY NycA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=onvifn4EmaGkkkgWjEaiT4GPX/0kOP6Z1t+LK17kF5U=; fh=9PnFxh+L1kG2HjuYovsgoOxFNJfqIBz4QWLlMfhPMfM=; b=GRMMinFct2+70DXk6hZA5u6gUwFWoF56bS7zuZ/iFubydil3upP8DnG53rLLnQE6n6 DUP1FsqeQ/lYj5xb8lDvixHzswGcxgtMnAoIsvLvC9GsnYTDhvt9S5t1Kr8jTb4VVBUy lCwxJPJ6FpKhLJsoSp/PR6dkNttUyJVodoZZRzgfF3Tn4IQSF9jNHcMM/aS7sQLzO/Td q1rCy5+WaAIxPiuItqVCLHkRGq9g7xGfRpw2/XumcUtu7cz2Uc7sbUvbPFDYfC3sOoWz 0TIBYSBspZJ5fJ4McSimOUjG1YV0uvTcQ5zEMAFiA+t30A+aVx5i6hDbtWRpgkbRPvoW RFxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id bv5-20020a056a00414500b0068ff3927553si11264262pfb.35.2023.09.20.03.44.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 03:44:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7ED66802957B; Wed, 20 Sep 2023 02:43:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbjITJno convert rfc822-to-8bit (ORCPT + 99 others); Wed, 20 Sep 2023 05:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234063AbjITJnm (ORCPT ); Wed, 20 Sep 2023 05:43:42 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F92AB for ; Wed, 20 Sep 2023 02:43:35 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-126-4uoMlHilNA-pwi2ct8LJgQ-1; Wed, 20 Sep 2023 10:43:18 +0100 X-MC-Unique: 4uoMlHilNA-pwi2ct8LJgQ-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 20 Sep 2023 10:43:14 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Wed, 20 Sep 2023 10:43:14 +0100 From: David Laight To: 'Jeff Layton' , Christian Brauner , Miklos Szeredi CC: Miklos Szeredi , Linus Torvalds , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-api@vger.kernel.org" , "linux-man@vger.kernel.org" , "linux-security-module@vger.kernel.org" , Karel Zak , "Ian Kent" , David Howells , Al Viro , Christian Brauner , "Amir Goldstein" Subject: RE: [RFC PATCH 2/3] add statmnt(2) syscall Thread-Topic: [RFC PATCH 2/3] add statmnt(2) syscall Thread-Index: AQHZ6lITJ6lmDHl4dUW3VQsauHaorbAjeA4A Date: Wed, 20 Sep 2023 09:43:13 +0000 Message-ID: References: <20230913152238.905247-1-mszeredi@redhat.com> <20230913152238.905247-3-mszeredi@redhat.com> <20230914-salzig-manifest-f6c3adb1b7b4@brauner> <20230914-lockmittel-verknallen-d1a18d76ba44@brauner> <3183d8b21e78dce2c1d5cbc8a1304f2937110621.camel@kernel.org> In-Reply-To: <3183d8b21e78dce2c1d5cbc8a1304f2937110621.camel@kernel.org> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 02:43:49 -0700 (PDT) From: Jeff Layton > Sent: 18 September 2023 15:30 .... > A bit tangential to this discussion, but one thing we could consider is > adding something like a mnt_change_cookie field that increments on any > significant changes on the mount: i.e. remounts with new options, > changes to parentage or propagation, etc. > > That might make it more palatable to do something with separate syscalls > for the string-based fields. You could do: > > statmnt(...); > getmntattr(mnt, "mnt.fstype", ...); > statmnt(...); > > ...and then if the mnt_change_cookie hasn't changed, you know that the > string option was stable during that window. That would also help with the problem of the mount options being changed while processing a page fault on the user buffer. Of, with a call to just get the cookie, could find that nothing has changed so there is no point looking again. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)