Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp123650rdb; Mon, 18 Sep 2023 09:53:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYTezPctbJefvwt/d3MFMt8P4ZW7AxWlcrs4xN7slbKFxeyjdaCSJWsLMuIx/TVd3KvMVl X-Received: by 2002:a54:4e0a:0:b0:3a7:8f94:743a with SMTP id a10-20020a544e0a000000b003a78f94743amr10923515oiy.10.1695055996502; Mon, 18 Sep 2023 09:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695055996; cv=none; d=google.com; s=arc-20160816; b=zbCDK5W3toI+jHwyWl8PUtNH53U/B86nJjLs38Gd+5hSOj2Cd5ipZtU0NW1as/e52+ fgzdEBpgBo7dtxdjTW7J1BC/e4T6Pvow4Ja0+huwUr1dlbqFpHxk8+GIqg2eupV8W1Tc Cb96cdMZM2X+d5U4KgwYvWxHV054w+CFQTZj9vkEP+kLQEq/rr2YiglkLPoz3PTp5JcK yq1TYooR9xxCtEt3EHZYomVIadMUK4UkmmQn2Vo6kMlIbaKeQBbVtCUc5mATOSRQu1qZ 2j0rriuMbDxhM+MhqbLfoSha/YCCkXu0PiRRygLauRaPWNc5llsOwFO5KOFvLOlJGEwL 1WmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pnZOaaX9WnOq4XyS/JjlYL/avJUHH7HaI21NKLakfeo=; fh=8G8DDOWeXTrynpwGxRU6+UU65RCHDEs7NE1+CluhaKI=; b=KXga17Phu/35BvplGuZf7SnOGjiBIB9zYFOARLDc10pD/S27wdDsNd7Yw5gsrQHgpa Qy52NjF9s/FUQ3O9l4VQiIkJvG6C3Okp3Qz6EzcVp3289jXaMQFR7AdmQkFD+bH7nek+ qTz1DlLHySnyBxYBWqAo++igYj8pF9TRwUO0BUKRnDRFZI42CAVVqEPzA92jPmuIaITR Z0LuG8FD7fKWCeZvUvxjkniYjJjOHF11iYS9BQHTV6h28i1lUMcp1gq+RXuFEqvmuzRP DfQReRMqupc6DlgxnR1Apneoi+6SdMTCoPYdIJO7luCoDaWapTwZtc2sbx2TzyxVKpkD yHKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=j2GRKG1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n5-20020a637205000000b00565eedb1cf8si8142198pgc.825.2023.09.18.09.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 09:53:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=j2GRKG1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5B0638087268; Mon, 18 Sep 2023 08:46:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbjIRPpz (ORCPT + 99 others); Mon, 18 Sep 2023 11:45:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbjIRPpx (ORCPT ); Mon, 18 Sep 2023 11:45:53 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A874710EB for ; Mon, 18 Sep 2023 08:44:32 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2bffe2840adso24458371fa.2 for ; Mon, 18 Sep 2023 08:44:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1695051579; x=1695656379; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=pnZOaaX9WnOq4XyS/JjlYL/avJUHH7HaI21NKLakfeo=; b=j2GRKG1OrY8I2YM8MQSp7QaPVHyfcJ1cxWabVqejxTFe/rumngpv2Xh5GJEM4qlOqp AGaTzcEoKarx7J+8GklEgXEicZLy1bM1gwfq/7rHqUS06BN1pTKYs1SNEpk1heWVDkah 7//RA224XGoGJXOLRtre6RmNw//FN3cmAfSm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695051579; x=1695656379; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pnZOaaX9WnOq4XyS/JjlYL/avJUHH7HaI21NKLakfeo=; b=hsTIjS+EWfGp5AMzhJLU/XB/fuRxcI2gjEIMh8saiUg4cm+pe5en2gJKxtzypz/ryh hFatSLgDNHy7NdFThpQT/CsKkLzjxLZKjD6Cq8uvVdtOmZ3aVHL/Ve8vwuDz+qPK/bpv kPRQrKi+xCNarXkPSfBKyNxQEhofMOuMWSDalLtlABang08TZkmranCstNBGqwS6uRy/ TBp5ub1IIH4Cg43nVLYMXdZbQNLMemnzQcEoXVayn1Wch1ZZOX7JJNJtYCqM20IaLNMY PrtVj+Nc5es2F+lQE6lTGtLPEbM6C/rQizYsBY281Mjzyz68IPY5Wq4olXFnn9mXLOiK rLdA== X-Gm-Message-State: AOJu0YxtJV8BdiEHE7vu6Xjr7LDUs2M8T7YxIR79NE78cN1Q6m0cYclz ADnn1I4N5iGCOtRzToOGMA96t/xij3c355VrQu7B5w== X-Received: by 2002:a2e:8751:0:b0:2bd:1f81:fc47 with SMTP id q17-20020a2e8751000000b002bd1f81fc47mr8984284ljj.22.1695051579729; Mon, 18 Sep 2023 08:39:39 -0700 (PDT) MIME-Version: 1.0 References: <20230914-salzig-manifest-f6c3adb1b7b4@brauner> <20230914-lockmittel-verknallen-d1a18d76ba44@brauner> <20230918-grafik-zutreffen-995b321017ae@brauner> <20230918-hierbei-erhielten-ba5ef74a5b52@brauner> <20230918-stuhl-spannend-9904d4addc93@brauner> <20230918-bestialisch-brutkasten-1fb34abdc33c@brauner> In-Reply-To: <20230918-bestialisch-brutkasten-1fb34abdc33c@brauner> From: Miklos Szeredi Date: Mon, 18 Sep 2023 17:39:28 +0200 Message-ID: Subject: Re: [RFC PATCH 2/3] add statmnt(2) syscall To: Christian Brauner 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 18 Sep 2023 08:46:05 -0700 (PDT) On Mon, 18 Sept 2023 at 17:22, Christian Brauner wrote: > > > So to be clear about your proposal: .mnt_root and .mountpoint are > > initialized by the caller to buffers that the kernel can copy paths > > into? > > Yeah, u64 pointer to a buffer and a size (see e.g., @set_tid and > @set_tid_size for struct clone_args, @log_buf and @log_size and other > args in there). > > > > > If there's an overflow (one of the buffers was too small) the syscall > > returns -EOVERFLOW? > > Yeah, I mean we have to make some things their problem. > > To me that is an acceptable compromise. Okay, so there are now (at least) two buffers, and on overflow the caller cannot know which one got overflown. It can resize both, but that doesn't make the caller any simpler to implement. Also the interface is kind of weird in that some struct members are out, some are in (the pointers and the lengths). I'd prefer the single buffer interface, which has none of the above issues. Thanks, Miklos