Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2256727pxk; Sat, 19 Sep 2020 19:59:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyS3HTcQQJbSmLdKnCnW5SGUEp5jI+qBssSyprbrL03a48tvKhvjx35HbQVAiejsw0e8vmS X-Received: by 2002:a17:906:9353:: with SMTP id p19mr42929210ejw.403.1600570756686; Sat, 19 Sep 2020 19:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600570756; cv=none; d=google.com; s=arc-20160816; b=EycqB2KHozf/3JY56jnyh0yTBFwWBG9lWzg3Rf9CPqGTz3qH9USyqAvQp9G9RGmt6N OkBccP62404crlY2Jn4ox3CoMsz0cJVOPKvDYUwEHiewoQP2tma35/yXAN3m4UhVJ1jn NNaHfdcoy3d0XjGdfEAsWIl5zp7Yc0bUOJwKNC4+zT0aDuIjNBP3i/Av4EK2A+biX8UM 1k85nrdEMohbwnqU4s11oIuISGxwbB3AwXeO+8gKwdodaHCybR0YBjG0eTjvweYapyrk QXHfmKlnRpd+jnz54jEuMCdPocVlWBfqatRIUm0X7tYxF6TCY05nFJ9/wBA5Rof3H8dq cW+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hsp1QXe3Wk965Al61N2Zv6iQzKvRn+WmMPcJefDLILc=; b=ml/QfB+2eFZm9IccTxxk7lr4xnmbVYUkKn+I7lggVvQJ66DfJMiSHJH80jKkaRwWd6 vXcX0T8WZkVP4N//6MhdodJKaZWqq0+npDgYdheRx3NKxdADeIWJvBu8AapB7UQqQ+Fh HzsppVFWHXZAYjrU3auzIakQQxPDHfPZ2mOyKPnI2szJlfLsgO06RmFqSqkuZ633Eqbg PJW8Y6H1xaO3VffSjNjWAHFHuQxa5uu9Vcll8B5sacgU6Jk94r/akmgZlbEamcKRjqoR ljrvFlmiukG1H1C96lbOU/yuFDR2vw7NEZLlQESb5o4AwuFUvJOwIuvs5Vi6ZRmWkiLc /F/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo17si5197751ejb.391.2020.09.19.19.58.54; Sat, 19 Sep 2020 19:59:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbgITC54 (ORCPT + 99 others); Sat, 19 Sep 2020 22:57:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726760AbgITC5z (ORCPT ); Sat, 19 Sep 2020 22:57:55 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F8DAC061755; Sat, 19 Sep 2020 19:57:55 -0700 (PDT) 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: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.