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=-3.8 required=3.0 tests=BAYES_00, 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 0EDE2C43463 for ; Sun, 20 Sep 2020 16:05:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5CBA20EDD for ; Sun, 20 Sep 2020 16:05:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726316AbgITQFc (ORCPT ); Sun, 20 Sep 2020 12:05:32 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:39439 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbgITQFc (ORCPT ); Sun, 20 Sep 2020 12:05:32 -0400 X-Greylist: delayed 305 seconds by postgrey-1.27 at vger.kernel.org; Sun, 20 Sep 2020 12:05:29 EDT Received: from mail-qk1-f178.google.com ([209.85.222.178]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MkHIV-1kmRhc3esD-00kdPN; Sun, 20 Sep 2020 18:00:22 +0200 Received: by mail-qk1-f178.google.com with SMTP id n133so12380961qkn.11; Sun, 20 Sep 2020 09:00:20 -0700 (PDT) X-Gm-Message-State: AOAM533qKODglS4xYl9kvQmhZXZaVTIiXwaJgVF2yRB76sPP90XoTjCw kj9TpYQGvekzM+ISXbnVYovs8FTeynGFIH15g70= X-Google-Smtp-Source: ABdhPJxWyfvCzQQBAWL//h6npTn88fQ05xaOWJspiDrXO43nFmdBtx69etP6R9R9/pXauFf/MfRV57t9JJqYkZya4Ms= X-Received: by 2002:a37:5d8:: with SMTP id 207mr42809575qkf.352.1600617619461; Sun, 20 Sep 2020 09:00:19 -0700 (PDT) MIME-Version: 1.0 References: <20200918124533.3487701-1-hch@lst.de> <20200918124533.3487701-2-hch@lst.de> <20200920151510.GS32101@casper.infradead.org> In-Reply-To: <20200920151510.GS32101@casper.infradead.org> From: Arnd Bergmann Date: Sun, 20 Sep 2020 18:00:03 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag To: Matthew Wilcox Cc: Christoph Hellwig , Alexander Viro , Andrew Morton , Jens Axboe , David Howells , Linux ARM , "the arch/x86 maintainers" , "linux-kernel@vger.kernel.org" , "open list:BROADCOM NVRAM DRIVER" , Parisc List , linuxppc-dev , linux-s390 , sparclinux , linux-block , linux-scsi , Linux FS-devel Mailing List , linux-aio , io-uring@vger.kernel.org, linux-arch , Linux-MM , Networking , keyrings@vger.kernel.org, LSM List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:lNDlWc0Buitw3L4uhuGtwQ92/NRgJbW9dL1xVEoFiwPKF+Mna8g BdP2KanFhFZuk3fOTGN57tEkQzL1ph3WKs2AcSgU+CeX+Ab2aERPVddznUdHaAMJppuee5s VIzbmjWQQ6+7BmTHrEHpxP7MhzZM11lo/1SLP22iLAA/opCSIrmhMpGbvqQGIi5najpAfXU +us3JHjWmqydWqbJaik7g== X-UI-Out-Filterresults: notjunk:1;V03:K0:koVQKgDw1ps=:5DnzZQRl1EHXfqQOtB9AEO 8LsJA55f4BHxbC8gAoxD+kRjupir2dQuMbIC8KqnCdIH+kvYSiSkIinTU9xpxUOeb+g32taG7 zgq6lmW7E5alsrjFHoOQQKogd0w0mc2OGa4QK6KvH3LQo12fLACLCOBRI2wn24vJjLsbxkxRb 4oYL2jKyvvhL2VnVwPpBwsuSplYCc3GxF+GDG5vQ1yi9F81STd0Poo6xk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wrote: > > On Fri, Sep 18, 2020 at 02:45:25PM +0200, Christoph Hellwig wrote: > > Add a flag to force processing a syscall as a compat syscall. This is > > required so that in_compat_syscall() works for I/O submitted by io_uring > > helper threads on behalf of compat syscalls. > > Al doesn't like this much, but my suggestion is to introduce two new > opcodes -- IORING_OP_READV32 and IORING_OP_WRITEV32. The compat code > can translate IORING_OP_READV to IORING_OP_READV32 and then the core > code can know what that user pointer is pointing to. How is that different from the current approach of storing the ABI as a flag in ctx->compat? Arnd