Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5113802ybe; Mon, 9 Sep 2019 21:33:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzeahcb2AuHZhBgJU7GEjFhAy12aURXelmPL4Gan46Db2Pz3KG80pxVCj91S531bOnWmESn X-Received: by 2002:aa7:da01:: with SMTP id r1mr28243481eds.87.1568090029728; Mon, 09 Sep 2019 21:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568090029; cv=none; d=google.com; s=arc-20160816; b=szsBrbRgIO+e3VUju0pRbso2+VrzuIiViIMXMa9ETULDy2cPpnu1rKm+SHfadNansZ zXRPB2MSPmlKsziOrZ9S1pQOiI4+5K+U6Ir5ll+nRoiglpYXDMuxrQG+zTl6KX5XgxwF niNj2aYjw9dTHNq+Q0lkW4iQCkO/V3nciMcM6Z+Z48rHZZCJ1tsFbayy87rmkaLKjVgD 4CJyYGqt9pVLQ7PqcUOgGcpmTMA3CnJ76TJj3dydb12/NuFPE5cBTJigieScr6shqyPm +gKJWccB2pI7V7qdquE5/jgfDoqA3vIfoPVBCPPm/SOZsxqGFN3OlJMBFh2sYJoHIg0E UZxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=WEr6CeA9m2ZqrpmAr9wPAXk7w63S7k/j/XNJhXkH7eY=; b=MJBNHUL3ttOoSi8Xpn+OFPq7R9m3KEkaEeaumuHnYsxFmHhSnlTpdpB9aizAElOz0r bUswtB1tLp3pXDK7+lT3MGdrfcADqBWyIRjOQ0CHn6pldimb82iaPD2oXUihXU3DIzAT hkUpu8c/aZTTs8BEZiT//jq7IZTXIbnaRUxj5MDHdmff3cN9sYX/FmkO35+Lo2LPXOUx 0xDkgt4mwX09RCVAykUVztOGUtk23bzOLT+LwQP62exHqfII2hoGVvHz0rW1xMn87ysY chN8KNVGGSGc89uilNhIY9TPS5bXTkzkyQj4iz5Ow4jtITSEvd2vG8FM3TmeRHw/vuuG gjIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si8429997ejf.153.2019.09.09.21.33.25; Mon, 09 Sep 2019 21:33:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729904AbfIIKOV (ORCPT + 99 others); Mon, 9 Sep 2019 06:14:21 -0400 Received: from namei.org ([65.99.196.166]:43402 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728358AbfIIKOU (ORCPT ); Mon, 9 Sep 2019 06:14:20 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x89ACcnh028363; Mon, 9 Sep 2019 10:12:39 GMT Date: Mon, 9 Sep 2019 03:12:38 -0700 (PDT) From: James Morris To: =?ISO-8859-15?Q?Micka=EBl_Sala=FCn?= cc: Jeff Layton , Florian Weimer , =?ISO-8859-15?Q?Micka=EBl_Sala=FCn?= , linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Al Viro , Andy Lutomirski , Christian Heimes , Daniel Borkmann , Eric Chiang , Jan Kara , Jann Horn , Jonathan Corbet , Kees Cook , Matthew Garrett , Matthew Wilcox , Michael Kerrisk , Mimi Zohar , =?ISO-8859-15?Q?Philippe_Tr=E9buchet?= , Scott Shell , Sean Christopherson , Shuah Khan , Song Liu , Steve Dower , Steve Grubb , Thibaut Sautereau , Vincent Strubel , Yves-Alexis Perez , kernel-hardening@lists.openwall.com, linux-api@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2 1/5] fs: Add support for an O_MAYEXEC flag on sys_open() In-Reply-To: <49e98ece-e85f-3006-159b-2e04ba67019e@ssi.gouv.fr> Message-ID: References: <20190906152455.22757-1-mic@digikod.net> <20190906152455.22757-2-mic@digikod.net> <87ef0te7v3.fsf@oldenburg2.str.redhat.com> <75442f3b-a3d8-12db-579a-2c5983426b4d@ssi.gouv.fr> <1fbf54f6-7597-3633-a76c-11c4b2481add@ssi.gouv.fr> <5a59b309f9d0603d8481a483e16b5d12ecb77540.camel@kernel.org> <49e98ece-e85f-3006-159b-2e04ba67019e@ssi.gouv.fr> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1665246916-912656596-1568023960=:27895" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1665246916-912656596-1568023960=:27895 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT On Mon, 9 Sep 2019, Mickaël Salaün wrote: > > On 06/09/2019 21:03, James Morris wrote: > > On Fri, 6 Sep 2019, Jeff Layton wrote: > > > >> The fact that open and openat didn't vet unknown flags is really a bug. > >> > >> Too late to fix it now, of course, and as Aleksa points out, we've > >> worked around that in the past. Now though, we have a new openat2 > >> syscall on the horizon. There's little need to continue these sorts of > >> hacks. > >> > >> New open flags really have no place in the old syscalls, IMO. > > > > Agree here. It's unfortunate but a reality and Linus will reject any such > > changes which break existing userspace. > > Do you mean that adding new flags to open(2) is not possible? > > Does it means that unspecified behaviors are definitely part of the > Linux specification and can't be fixed? This is my understanding. > > As I said, O_MAYEXEC should be ignored if it is not supported by the > kernel, which perfectly fit with the current open(2) flags behavior, and > should also behave the same with openat2(2). The problem here is programs which are already using the value of O_MAYEXEC, which will break. Hence, openat2(2). -- James Morris --1665246916-912656596-1568023960=:27895--