Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1209127pxk; Fri, 18 Sep 2020 06:45:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLStsLuG1aN0hm0a3XmWz03yQS1EYu4C0gD2UzlqkBMeIFDDhOg7kLoi0YSYcPrN2rOe+J X-Received: by 2002:a17:907:213b:: with SMTP id qo27mr35141165ejb.441.1600436738531; Fri, 18 Sep 2020 06:45:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600436738; cv=none; d=google.com; s=arc-20160816; b=erXZUWoqfTOHW1E43CQyIM6xe6k/O0QLRQI24CLnGBb1RgcyrLhUOw8oG0ZPelQgRJ K1GVNEBPng9MQ7imTs89fnoMuJpFnjulrHcdu5IeDoQX0hHBg1dzyRIAVQWQlbj25Lnb V6sQcSQ5cV+t8BtVS+W6ToaP/rsPoS41dNvhNZigxVwc5y7DcX/VmfGrAbi5766FBULG Ewx3lqUjAqDLffx0Dx18lU1vq7DBPVQJUS5g7Q4n+bHHkNp8oT18seOFIODCX+Q8M/A8 CLbNU5Yb+pKGy+Tt87sC7w5YBm9nJ6kTw55KahMiiFdRiUNTse+hZMuAo6/jZEBDWnpO PP7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tAowaz8BeVtHk4OMM3x+hTaUSbrXx85p0zrUtMAQH9w=; b=lsTliZuH2BTb8DQW3LCOsEdjeqsNEe61LUpSQgPLYxjjAjJM8WxBov8kujcpj2f17u F5ddIzzDboPvoF1+2PWCcrmpI/PNm4ISGHuEKLZoAn+zVhv97YBJUXv1+E67UBDFAjqG JOvAYL/4do2arsj5ppMqm5VXdO7DxPljtrsTM8sRa0p9/AGP4vuA0Brxtq3uHV9tEtmB 99ksADe+pzCposPMWXRykegHB189Ac/zU7YBLfrLtOYrip76rPqT1DK1fuJvSe1Wbs7l N5U0B7kruiR9e4sM3K9poEkTTcXWDokMqS6YcqAxFfAgWCJS8CcykdsGwsM88PW8abmq Kxlg== 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 p34si1997509edd.53.2020.09.18.06.45.14; Fri, 18 Sep 2020 06:45:38 -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 S1726565AbgIRNoN (ORCPT + 99 others); Fri, 18 Sep 2020 09:44:13 -0400 Received: from verein.lst.de ([213.95.11.211]:32784 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgIRNoM (ORCPT ); Fri, 18 Sep 2020 09:44:12 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 8EEFA68B05; Fri, 18 Sep 2020 15:44:06 +0200 (CEST) Date: Fri, 18 Sep 2020 15:44:06 +0200 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , Andrew Morton , Jens Axboe , Arnd Bergmann , David Howells , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-aio@kvack.org, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, netdev@vger.kernel.org, keyrings@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH 1/9] kernel: add a PF_FORCE_COMPAT flag Message-ID: <20200918134406.GA17064@lst.de> References: <20200918124533.3487701-1-hch@lst.de> <20200918124533.3487701-2-hch@lst.de> <20200918134012.GY3421308@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200918134012.GY3421308@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 18, 2020 at 02:40:12PM +0100, Al Viro wrote: > > /* Vector 0x110 is LINUX_32BIT_SYSCALL_TRAP */ > > - return pt_regs_trap_type(current_pt_regs()) == 0x110; > > + return pt_regs_trap_type(current_pt_regs()) == 0x110 || > > + (current->flags & PF_FORCE_COMPAT); > > Can't say I like that approach ;-/ Reasoning about the behaviour is much > harder when it's controlled like that - witness set_fs() shite... I don't particularly like it either. But do you have a better idea how to deal with io_uring vs compat tasks?