From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34210C4727F for ; Wed, 23 Sep 2020 18:47:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C309E20637 for ; Wed, 23 Sep 2020 18:47:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XTotku3C" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C309E20637 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SyhxSEWwBz/JJyRs/j5gPMbK56VxOBkL9K8pcFQuvFY=; b=XTotku3CXz4FUh227d6a9WN0j Db9vlrk3P16bFWDXZjT358W61xjx0XPCwuTQOUwrQyoJ9+vki2dcD0Ryn9/mEO0bUv+EZX9whjq7V MMAkmgbH+X5axQdfSwWhDX3JYnrFIRL6R5kJUtupri0iVJ9yDs1vyAvSPv/D8dKqlR+7dWKHtlaDl 7eR/nyDwLEbrDu0soTCoVpiFf883bPNajKq1Mx3q/4eVoGWYjJP5/ntsLZbRbcEb/oWkFGIv5WICA gDYZonsIk/kWV/iYEflSROUrspt5x+VBgT5xTzc2ToeVwC3o9cEAf3h8EJgxu2gnWZ69jbF68Xg6D vfA3b4VDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kL9mb-0003FU-0D; Wed, 23 Sep 2020 18:46:25 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kL9mY-0003F6-EK for linux-arm-kernel@lists.infradead.org; Wed, 23 Sep 2020 18:46:23 +0000 Received: from mail-qt1-f177.google.com ([209.85.160.177]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mvs2R-1kcxBP0t3n-00syhb for ; Wed, 23 Sep 2020 20:46:16 +0200 Received: by mail-qt1-f177.google.com with SMTP id g3so769470qtq.10 for ; Wed, 23 Sep 2020 11:46:09 -0700 (PDT) X-Gm-Message-State: AOAM5317jzlUAaqjAAR5fcJT64Pmul1ZcriiOqJt7EmRVwHGDFSx0UHI 4InzyiL8pw4yasCFu5ckm9TaO0I65nlifSYabVI= X-Google-Smtp-Source: ABdhPJwsvaOBWtaZA0D/OVEHB/gCWu247kr3QZZFrdP10NBc4wqx9Hcp+T5ZYDolhQMYUd20W7JjEkRUKsdbgp0ivyQ= X-Received: by 2002:ac8:64a:: with SMTP id e10mr1527617qth.142.1600886767946; Wed, 23 Sep 2020 11:46:07 -0700 (PDT) MIME-Version: 1.0 References: <20200923060547.16903-1-hch@lst.de> <20200923060547.16903-6-hch@lst.de> <20200923142549.GK3421308@ZenIV.linux.org.uk> <20200923143251.GA14062@lst.de> <20200923145901.GN3421308@ZenIV.linux.org.uk> <20200923163831.GO3421308@ZenIV.linux.org.uk> In-Reply-To: <20200923163831.GO3421308@ZenIV.linux.org.uk> From: Arnd Bergmann Date: Wed, 23 Sep 2020 20:45:51 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 5/9] fs: remove various compat readv/writev helpers To: Al Viro X-Provags-ID: V03:K1:EDkMpf/9S5M4VEBOmyAipIClHjzi8UFL7qAvothjmYmtbzO+ABM oH3spNi5zm+aZmIGM0tyaoW0P5rv/BwFN9vASZBKHRjTM9bjusrTkQubvIEWgYm45vj2JPv aX7NHAlBCXH6hHVk4HxJcQqBI/MX35hsA+3gHn0tDa+5Eq46/hO2TPzHOHQ8x6HmbhItIPO lrL0kuFIVKT0hnvd6BLjQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:IhKKXbuijVE=:ItXhCy1eWibsota5v5rah1 RFbFS3Cotcj3nxC1ntLRlysnNAAkKNbj1mIUEAgOMQTjtEQ5p76IueCNOiLAnsjdd6zM6S+TM n20MTfKpQwREew1bkGGi1JnGHLOwHVN/6cBI9yHiIzpZA4Y+v+TA11JftqQ0Tg5rRCQGnUtDi bMwf3gTu1NBOwzSPyQf2fhwTj1D2FH4vJKizq3taQzaNYVbdqZ+cHeVn9C5DTd1C9H13XprSQ 3K+4sm9g6Mk3o6i4euYQPJnf6sQG/rRJp73ogknUGhSL6hScGTo+ozVHc1zVK4moXW3zHYCDC Fbr+USWC9g/WtTwvrd7cdIFgY/a7ZQmUI75MPdLPtgn9Vbc9ho3jymLYzqHDTbVHGzkRoUk0w O5CvHcEj7fyFvU3UoqXFH7E8B0j13rkZM+/LN2/Eb4Z5DI7YVpExWR1bFkSSG0tbZy+x1rU5/ vfgLh3uPYoj0u1kqAHIupzt99LX28+KBcbtcrgtVhMUcPm5cvjstPqgTIa0fp1EA+VL4qYiQ/ X4d2BTcZLMeHMXtmc7XvZr8kBnann8fFaCwf7UjREZoa9KcGr5Jx2N1mgjFXhGrkQbgtC89FD 54mnI844xfiA8LZa7EAwN4DIgPo8wLxgk/bRqGyby1nuGZl2LWEw8uQovLhiu8v0Ze0R+JVu3 QQGTBCs402Kjgvc46f54I5wdrw6ZYmuAidO4i6B2/k1x1Te+Vc6GYDrZG9ExPlmeeGWaChYPI Ea86AXjvFOCu5TqBrH82I74ktrZY9xFYV4HvEXUk/B5xVE7/g/iMZWOf64XRAMyKUC95l+8Ym lBHxjY+dptRgxtHDEobVqUSnpFSVtTlbvYfRaQoQW/Ow3m62VKq5xErMyGUh44Y9gtB3CIIJ1 aY06M3QQHa+gte3snYw7CyDNDAQjzkAJePse02b63+WXJyV2A3k50PulDyRKFs8S5gilPCu7/ 1AY/qCKUd3yQQbRlu5f+6jlqxXG3OE10ZR1Z3D9XNlZWNywDmYr1I X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200923_144622_705604_C0BAA00D X-CRM114-Status: GOOD ( 21.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aio , "open list:BROADCOM NVRAM DRIVER" , David Howells , Linux-MM , keyrings@vger.kernel.org, sparclinux , Christoph Hellwig , linux-arch , linux-s390 , linux-scsi , linux-block , io-uring@vger.kernel.org, Linux ARM , Jens Axboe , Parisc List , Networking , "linux-kernel@vger.kernel.org" , LSM List , David Laight , Linux FS-devel Mailing List , Andrew Morton , linuxppc-dev Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 23, 2020 at 6:38 PM Al Viro wrote: > > I wonder if we should do something like > > SYSCALL_DECLARE3(readv, unsigned long, fd, const struct iovec __user *, vec, > unsigned long, vlen); > in syscalls.h instead, and not under that ifdef. > > Let it expand to declaration of sys_...() in generic case and, on x86, into > __do_sys_...() and __ia32_sys_...()/__x64_sys_...(), with types matching > what SYSCALL_DEFINE ends up using. > > Similar macro would cover compat_sys_...() declarations. That would > restore mismatch checking for x86 and friends. AFAICS, the cost wouldn't > be terribly high - cpp would have more to chew through in syscalls.h, > but it shouldn't be all that costly. Famous last words, of course... > > Does anybody see fundamental problems with that? I've had some ideas along those lines in the past and I think it should work. As a variation of this, the SYSCALL_DEFINEx() macros could go away entirely, leaving only the macro instantiations from the header to require that syntax. It would require first changing the remaining architectures to build the syscall table from C code instead of assembler though. Regardless of that, another advantage of having the SYSCALL_DECLAREx() would be the ability to include that header file from elsewhere with a different macro definition to create a machine-readable version of the interface when combined with the syscall.tbl files. This could be used to create a user space stub for calling into the low-level syscall regardless of the libc interfaces, or for synchronizing the interfaces with strace, qemu-user, or anything that needs to deal with the low-level interface. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel