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 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 DB346C43468 for ; Sun, 20 Sep 2020 02:57:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id ECB382220C for ; Sun, 20 Sep 2020 02:57:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ECB382220C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zeniv.linux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0702B6B0003; Sat, 19 Sep 2020 22:57:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0433C6B0055; Sat, 19 Sep 2020 22:57:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E756B6B0003; Sat, 19 Sep 2020 22:57:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0206.hostedemail.com [216.40.44.206]) by kanga.kvack.org (Postfix) with ESMTP id C0EAD6B0055 for ; Sat, 19 Sep 2020 22:57:57 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6B2151EF3 for ; Sun, 20 Sep 2020 02:57:57 +0000 (UTC) X-FDA: 77281930194.08.mom85_260b3fb27139 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 3E4711819E798; Sun, 20 Sep 2020 02:57:57 +0000 (UTC) X-HE-Tag: mom85_260b3fb27139 X-Filterd-Recvd-Size: 2984 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [195.92.253.2]) by imf47.hostedemail.com (Postfix) with ESMTP; Sun, 20 Sep 2020 02:57:56 +0000 (UTC) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kJpXt-0026Rb-Iq; Sun, 20 Sep 2020 02:57:45 +0000 Date: Sun, 20 Sep 2020 03:57:45 +0100 From: Al Viro To: Andy Lutomirski Cc: Christoph Hellwig , Andrew Morton , Jens Axboe , Arnd Bergmann , David Howells , linux-arm-kernel , X86 ML , LKML , "open list:MIPS" , Parisc List , linuxppc-dev , linux-s390 , sparclinux , linux-block , Linux SCSI List , Linux FS Devel , linux-aio@kvack.org, io-uring@vger.kernel.org, linux-arch , Linux-MM , Network Development , keyrings@vger.kernel.org, LSM List Subject: Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag Message-ID: <20200920025745.GL3421308@ZenIV.linux.org.uk> References: <20200919224122.GJ3421308@ZenIV.linux.org.uk> <36CF3DE7-7B4B-41FD-9818-FDF8A5B440FB@amacapital.net> <20200919232411.GK3421308@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Sep 19, 2020 at 05:14:41PM -0700, Andy Lutomirski wrote: > > 2) have you counted the syscalls that do and do not need that? > > No. Might be illuminating... > > 3) how many of those realistically *can* be unified with their > > compat counterparts? [hint: ioctl(2) cannot] > > There would be no requirement to unify anything. The idea is that > we'd get rid of all the global state flags. _What_ global state flags? When you have separate SYSCALL_DEFINE3(ioctl...) and COMPAT_SYSCALL_DEFINE3(ioctl...), there's no flags at all, global or local. They only come into the play when you try to share the same function for both, right on the top level. > For ioctl, we'd have a new file_operation: > > long ioctl(struct file *, unsigned int, unsigned long, enum syscall_arch); > > I'm not saying this is easy, but I think it's possible and the result > would be more obviously correct than what we have now. No, it would not. Seriously, from time to time a bit of RTFS before grand proposals turns out to be useful.