Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1421693rdh; Mon, 25 Sep 2023 12:14:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEd2VrX3CgipYp4jJpu2Vdgm5f1RiXm0LPWDJ11/VbbMhbsJf6zgm1KGD1hGmNX5hPSj3+6 X-Received: by 2002:a92:d085:0:b0:345:e438:7381 with SMTP id h5-20020a92d085000000b00345e4387381mr8676442ilh.2.1695669274612; Mon, 25 Sep 2023 12:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695669274; cv=none; d=google.com; s=arc-20160816; b=ctWaAOa7ZFU64yy/dCwdMKGAXj+sdQr0T+zmLQyOy5T+rUvdudqIXZ0kq9sncBhQJ2 3J7qEh055U/JvY9BMr8UoNQ23a6H7VQqaPSecc0RFgpQjxat7bFsnOrqo2dE7BLxAOaj mdj7gwIUseCrNnpxtym3GL8yvB26idC0AySS+oG/qxH9MAjT6/TNLK6A7WkaqTLx30hp u3+VDyt08G50vnWX3/fsr/uhXBlotXaifRoyWiDu1z3iYcYvOoeKHmuDUcx3eB8CmUDW 66OVCFK+eMNj2twjSrWMgbZCK9APCamBZli3khbFEbaoPZKmYv4vuQHypZzqoGVbFxCl zbbQ== 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=1lwODLqUWlwVEvdiGIdLnyDf2x4p+uZT2UEpf4goid8=; fh=HHDaYfG8vvrt/S1473tKuoaIAmt+xEj/AszDt9ShGmQ=; b=NHy3x4s874Wg7nqNAeHclMKdi6TkoCBL+L/9XEYveGANyYxWwSUAVcDMqQbZRA3jYh Xb/RYbO61ik8yqcqaaA0LXUmB0DyEs6XAvySRo2F9YIItRdQx/nGBjqCF/xKd7wuZhP9 CpWSs5uCj35MmQ7/ZEm/5L6oLo04UUgObQVSCMr+m6N8dGhYOUmsAHB8Um8c4ABv4P8u Loj8kp0Fhlgz9zbqBo4zbRzxmgFQmVWjKWmlTms1TnsfVDRA4iZhnxhTWSW3x3RL0Ehb YpYCNV/9qX/jVJxKIHXSrTBQkxoMGm/EGaTJZNTkjrmR3QoQVwaPdP13IjoFnZKaKdtt Rtpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=Ov6jBBUG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id v3-20020a655c43000000b00577fc59373fsi4200433pgr.296.2023.09.25.12.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 12:14:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b=Ov6jBBUG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 9A8D8816EBC6; Mon, 25 Sep 2023 06:14:06 -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 S231719AbjIYNN7 (ORCPT + 99 others); Mon, 25 Sep 2023 09:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231706AbjIYNN6 (ORCPT ); Mon, 25 Sep 2023 09:13:58 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2C0783 for ; Mon, 25 Sep 2023 06:13:49 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9a64619d8fbso803651166b.0 for ; Mon, 25 Sep 2023 06:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1695647628; x=1696252428; 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=1lwODLqUWlwVEvdiGIdLnyDf2x4p+uZT2UEpf4goid8=; b=Ov6jBBUGS6sz7LIqW+HTOsWvi1ubbU4C/zz0wJGiS4PxDxnqtvQBnolIAjMqZdueE3 7KI8s6lSR2AdOiFjEre4JxlqvSFSEV4no+/v0i09WT1mPggR5PrhQExV/h1dliJG/l8m MlqI9w8OsrteEwbHMptTLxnAQaV6RltTbyobk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695647628; x=1696252428; 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=1lwODLqUWlwVEvdiGIdLnyDf2x4p+uZT2UEpf4goid8=; b=obMD0FPtSOBeLetR6uJV7/5l9Lyn8XyV3W0JbcAmCG0aK4kX2U33WgA5ATLtvqDX2f G0/yEt0L/yvpI5BZLnrU4xTjaw8Tv7spVJJ9CkU4/sP7Nzdr2Shcyu8M3HvGxgsTjhY7 kkz5eA+3mOfum+fDYYEmF9wksohDw+XoBVtc/1wSrYDIfFqBtVIyLfHxPJPOJh6PxZxd dOtoXlZ5vguch+pLHBU5iROZrqZK/Md0h8sqma5HC0i5HPavQzOg4k8kotgRPbWq0KN1 ZWtGLfDH/S6VlCrKPezn3F13q9LBAIvC2hzzc8+bqNe+/BTx8tPQRZuf07Fny5fqARtZ bGWw== X-Gm-Message-State: AOJu0YzIYEQlLEfaZWEBE/IAqlOpmVbKsyFxwLxntPKU2ZbL5nm8qSOY omWVOj9FdCnvpv0NsreWUE9sX5dignpLKTaqy37PYw== X-Received: by 2002:a17:906:97:b0:9a9:f042:dec0 with SMTP id 23-20020a170906009700b009a9f042dec0mr5718418ejc.38.1695647628061; Mon, 25 Sep 2023 06:13:48 -0700 (PDT) MIME-Version: 1.0 References: <20230913152238.905247-1-mszeredi@redhat.com> <20230913152238.905247-3-mszeredi@redhat.com> <44631c05-6b8a-42dc-b37e-df6776baa5d4@app.fastmail.com> <20230925-total-debatten-2a1f839fde5a@brauner> In-Reply-To: <20230925-total-debatten-2a1f839fde5a@brauner> From: Miklos Szeredi Date: Mon, 25 Sep 2023 15:13:36 +0200 Message-ID: Subject: Re: [RFC PATCH 2/3] add statmnt(2) syscall To: Christian Brauner Cc: Arnd Bergmann , 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 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 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]); Mon, 25 Sep 2023 06:14:06 -0700 (PDT) On Mon, 25 Sept 2023 at 15:04, Christian Brauner wrote: > > 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. Let's not mix in and out args, please. How about passing u64 *? Thanks, Miklos