Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1198334rdh; Mon, 25 Sep 2023 06:13:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2d1ynZqfDMPpnuOJIVTMN99zQwco6txNG8pOpTtlSpen34/GLsOV2lOXu/IQoNQbugD0w X-Received: by 2002:a05:6808:1486:b0:3ab:843f:76fd with SMTP id e6-20020a056808148600b003ab843f76fdmr10490991oiw.19.1695647586974; Mon, 25 Sep 2023 06:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695647586; cv=none; d=google.com; s=arc-20160816; b=0Z1nc6kXn+grFPuYVqPRRSxuAb1ViMmQTtEJjjVFyxM4KZFRVutfPxOyoGHe0QAw/A C+xRQBpEB5JskvPqvZlM3GZSICRGPjGN1IRXe7GpDXALsYlHrGf4leNxwhAuCiMiWa9w 0rn6uPw9A43Jdr6jO5c8B/Y1gvvF41w64v5f9leU/988xcYnTD8lmuJGIFmCN8UhJS0Z Fxl4DXRMi46YlAodxFsmO0mSNuTvMjCUj2y5nQtAFcGk+G+K/yxSgBGm4uH3Lc8tvAZc 4/DB9+VPGFKSa6l+kURTjn2Xbmg7nLV/7sZwsnYsu2w6CKID7NzT8fIORD4OhvPent5V GXQg== 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=RRMp5X1HLHKFF86US/JY6JZooJ4CwlNlKlxCmDNVFDg=; fh=OEnn5GepBYFSlWZXguAG5lQlSw6sigP7rlcyaHxVcaM=; b=eaTNypWG9WGPlhilvERziQzRIre4TYvxX0+SI3MaASskWnTy1Icac52Y5vL3/VsgIv fQkxMjgEfd18lCMlhk5bk9Rrs8Z5PZJoEw99EuXca1jPy8pWxWqw1ansPjUuDF/eYs06 YNqf56KDVdiy0/A1Zmv2exHem/dBe868NjbT+ECqO9MDTnEH1n5Sx2o6GZ5g8HSdI7If tC7UDKpDIdpHo6ruqXg/fJ2b8XfX+YcnP+X/s5aMSJZwPvmT9AOMzpJg5SJHeUwcMafy 3cyOcZyN3ZelIitkHQBPOwE58Bjh9USAsdE+CUrgtSNsDdkKk6+WS49sQJtcXPEOBdvq d4uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pv1CXqBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h9-20020a056a00230900b0068fba70d25dsi10887103pfh.33.2023.09.25.06.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 06:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Pv1CXqBn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C41DC802DD14; Mon, 25 Sep 2023 06:04:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231506AbjIYNEy (ORCPT + 99 others); Mon, 25 Sep 2023 09:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjIYNEw (ORCPT ); Mon, 25 Sep 2023 09:04:52 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 264729F; Mon, 25 Sep 2023 06:04:46 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFABFC433C7; Mon, 25 Sep 2023 13:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695647085; bh=5GuHghoJcw0TFo6RZTpC3p1AZANQLw1yiRSTt3ti8yE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pv1CXqBn5nTrzr0t9MFnlsVhtGHOK0QSh3H/lQVxM4MdRWJtvXnJTGjVDdxcA1KzW /vBix8pFtolV+cpyTWnQ8knvCMsM68JpCyWHOnqP9Tnrr+CsU9Tsa/PnkGNq8CKqru uyQ+i1SxAk/TuxunEmiou35oYvjd0fTbavpl9yMZ5lh5xhCPYmf6cSDGR4wn/1D1Ta FA5f/i+DIzV4hy49Ohei2TQFkRc0OlPSZrS6qxp0NR8Ki7uRyyWJt2yjDr17hokIK7 M0YEDvRPu3o96x8vP39dGDNzL45Znjz8R9mGP5a2MZcROyQ5uArRlqiRDlvtaPOxEl L4yshaJhKj7fA== Date: Mon, 25 Sep 2023 15:04:40 +0200 From: Christian Brauner To: Arnd Bergmann Cc: Miklos Szeredi , 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 , Linus Torvalds , Alexander Viro , Christian Brauner , Amir Goldstein Subject: Re: [RFC PATCH 2/3] add statmnt(2) syscall Message-ID: <20230925-total-debatten-2a1f839fde5a@brauner> References: <20230913152238.905247-1-mszeredi@redhat.com> <20230913152238.905247-3-mszeredi@redhat.com> <44631c05-6b8a-42dc-b37e-df6776baa5d4@app.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <44631c05-6b8a-42dc-b37e-df6776baa5d4@app.fastmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:04:53 -0700 (PDT) On Mon, Sep 25, 2023 at 02:57:31PM +0200, Arnd Bergmann wrote: > On Wed, Sep 13, 2023, at 17:22, Miklos Szeredi wrote: > > > asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, > > struct statfs64 __user *buf); > > +asmlinkage long sys_statmnt(u64 mnt_id, u64 mask, > > + struct statmnt __user *buf, size_t bufsize, > > + unsigned int flags); > > This definition is problematic on 32-bit architectures for two > reasons: > > - 64-bit register arguments are passed in pairs of registers > on two architectures, so anything passing those needs to > have a separate entry point for compat syscalls on 64-bit > architectures. I would suggest also using the same one on > 32-bit ones, so you don't rely on the compiler splitting > up the long arguments into pairs. > > - There is a limit of six argument registers for system call > entry points, but with two pairs and three single registers > you end up with seven of them. > > The listmnt syscall in patch 3 also has the first problem, > but not the second. Both fields could also just be moved into the struct itself just like we did for clone3() and others.