Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1352716pxb; Thu, 24 Mar 2022 18:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrZxfHKKP6EgRdxaZbu3FPqF/NzvE3PFWu3OfvbxY2oBCw9Rp8DpJLePl2Kq5Li2e/RECz X-Received: by 2002:a17:902:f605:b0:154:aa89:bd13 with SMTP id n5-20020a170902f60500b00154aa89bd13mr8981793plg.112.1648171853976; Thu, 24 Mar 2022 18:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648171853; cv=none; d=google.com; s=arc-20160816; b=XzDFiahMPXBLt1LLAH5vu8Ngt3Q5GxTpXLuAnLsxfTxRHvvNMMwI/YzDHIHmGSsRIK aQ8gYF8pLMI8Yy3VTthp5hV/vWTxeZkmOp+rzYiDu8ABSz/dIWfRnzmXFcM/+N9ngT9a BgiAHUiJ4BKfYvsA/GaF78IEELTfsV5Eh6sECoqUYVIVppXhaMhSzSl5k/1W+9S3i1G3 yRPmSMj1L5eQaIrGmXISGfzPlFkAiFNcMl0r4Xyu0mH8r6gSiBlPZNqD59+3VSPSKfdB bV/4049YdjljIY4hEBrFLjuuQBT0dGEBDQsKcaD0HO4ttKA2bgC+v9/uweeRYo5ipY3l FIUw== 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=S0W5gGr2eKGizazM2Yi7T6R381PLEAE/LRKsqT6l+UU=; b=U6G0wrNN7eWAlIYGJFyvP268MIiE/Ww1eAhzAjHZau+Xm8PdKaueEK2wEqM0OPokEy 5xD8FpfQU8kn8QLawGOSet0rj2NVJC/xOJ7gPWvG7NbWD+hKG0jzyJi8Gp/gZ4Yn1NhY m9/OYITPqQzHoW2i1e2smXyES96MtVjFuTQNDMFkenIun53b3XNuCu/H6H39fc0gOHWV 3qQI3JrpRSUbjImFB6DPkTDUqC+oR20Zmga+Duf6wYpcMGXtRySwMEXxUcD3puAsP1St zCBod3b9yI8Bryqd9jKW4QtPasuZGfoE4YivL8ufFu/NLKvM0l97n5fIuizBlI40oLn5 tLWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p+2mxlDm; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f3-20020a635103000000b003823b02959dsi971847pgb.34.2022.03.24.18.30.38; Thu, 24 Mar 2022 18:30: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=@linuxfoundation.org header.s=korg header.b=p+2mxlDm; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348282AbiCXG6J (ORCPT + 99 others); Thu, 24 Mar 2022 02:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230331AbiCXG6H (ORCPT ); Thu, 24 Mar 2022 02:58:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD74797284; Wed, 23 Mar 2022 23:56:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 68C91B81DDE; Thu, 24 Mar 2022 06:56:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57068C340F0; Thu, 24 Mar 2022 06:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1648104993; bh=t7ZJC+nb03OJhruyjJMshPqBsDPc27EJQOvu6/pKRwY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p+2mxlDm/Y1xr/p0OUWJrcZ66gIMW04Vgb7md5J0s7MAJoIPQB+VZsH+halolMzp/ hnhPaJffyBkZusGuTOcc0JXhpOCDyIJaQlwNDwN7Vl5iTULbpmBqY0GMwdb4iZKEXA fNXyI8STxgYWAMryldGFDv9mv/5p8eJasA19T3IM= Date: Thu, 24 Mar 2022 07:56:30 +0100 From: Greg KH To: Miklos Szeredi Cc: Christian Brauner , Miklos Szeredi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Linux API , linux-man , LSM , Karel Zak , Ian Kent , David Howells , Linus Torvalds , Al Viro , Christian Brauner , Amir Goldstein , James Bottomley Subject: Re: [RFC PATCH] getvalues(2) prototype Message-ID: References: <20220322192712.709170-1-mszeredi@redhat.com> <20220323114215.pfrxy2b6vsvqig6a@wittgenstein> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Wed, Mar 23, 2022 at 04:23:34PM +0100, Miklos Szeredi wrote: > On Wed, 23 Mar 2022 at 14:38, Greg KH wrote: > > > This has been proposed in the past a few times. Most recently by the > > KVM developers, which tried to create a "generic" api, but ended up just > > making something to work for KVM as they got tired of people ignoring > > their more intrusive patch sets. See virt/kvm/binary_stats.c for what > > they ended up with, and perhaps you can just use that same type of > > interface here as well? > > So this looks like a fixed set of statistics where each one has a > descriptor (a name, size, offset, flags, ...) that tells about the > piece of data to be exported. The stats are kept up to date in kernel > memory and copied to userspace on read. The copy can be selective, > since the read can specify the offset and size of data it would like > to retrieve. > > The interface is self descriptive and selective, but its structure is > fixed for a specific object type, there's no way this could be > extended to look up things like extended attributes. Maybe that's not > a problem, but the lack of a hierarchical namespace could turn out to > be a major drawback. > > I think people underestimate the usefulness of hierarchical > namespaces, even though we use them extensively in lots of well > established interfaces. I like the namespaces, they work well. If you want self-describing interfaces (which I think your patch does), then why not just use the varlink protocol? It's been implemented for the kernel already many years ago: https://github.com/varlink and specifically: https://github.com/varlink/linux-varlink It doesn't need a new syscall. thanks, greg k-h