Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2250501ybe; Sat, 7 Sep 2019 11:48:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZVTR+w5xmbh2Y19CGkMxYgolbteN1YOam8yJ2aqo48TD1zLkAL2Bsyd42BiYyQpcunnTu X-Received: by 2002:a63:590f:: with SMTP id n15mr2623833pgb.190.1567882130247; Sat, 07 Sep 2019 11:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567882130; cv=none; d=google.com; s=arc-20160816; b=xN0B49z+9z18NuFCNIXrH06GzBsycXyX6e2YXbTdWxK0cQNQi3SrtHbZ3Isi/elCni lUJ0e7QQlzkqqyyxlyecQSkwEmx5lvDQlK9dFOdHo0LK8Fm2crC2Q29oML2QfYInw3r6 1cEcUAD7eWXAA9C7qvop4oZjKMvbk3Lvjk9jV1LxfRs4ZfwsGfLDp9DcYSPK3TXXPYxP oa9OEnQPaRBAEUD0IL4scnPtrKXj3OPyNJ/mClgQ/oW5flDyakDQpihsYqCI3C1U9Ma3 sSDMRR7P/UIpKf5/GmES7NA4LsyCsMi+PQj15IlPuPkZbTgLi4lawacR5kf8w/UId3An WB3Q== 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:message-id :in-reply-to:date:references:subject:cc:to:from; bh=Jpp83FMfhpUjj7OpUFjuu1B9aBCuqVC8xEVglvLS7so=; b=hP1AcTNW3sYIn1JfVVJ4ZdKxEsTx37PhTR7ZeM3YQ/Vbdr24hlU5IvQdQ0pnKfmejN nNDAvc9tg0/CdsYUAei2B5pQnStx99T9hPlXDpYHf3CkutyQIY8iDhhKPwTZrv5JHsg+ Ab+xNfwHg9NVkmdrZJQ5Pya21+qD3IwCqYe+eyw/kPOxLdvuBJUcx0PEKogGgr0lAk3D 3rEEUU/C3WnHih6ISun/XPjN2ivf98Gop0lL6/yvsjZnuLO2UImdxLBtOrrumTDqXtYj ZLbNLJ+B+HNK2hnL2IxgFEdtxhmdBCDmyMZGKeROYMpIKO6Npy/tXoYszl4sezOeSQxL hihQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o76si9758049pfg.246.2019.09.07.11.48.34; Sat, 07 Sep 2019 11:48:50 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406117AbfIFSoO (ORCPT + 99 others); Fri, 6 Sep 2019 14:44:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41070 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406106AbfIFSoO (ORCPT ); Fri, 6 Sep 2019 14:44:14 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 350D018CE073; Fri, 6 Sep 2019 18:44:13 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93B9C60BF1; Fri, 6 Sep 2019 18:44:05 +0000 (UTC) From: Florian Weimer To: Jeff Layton Cc: =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-kernel@vger.kernel.org, Aleksa Sarai , Alexei Starovoitov , Al Viro , Andy Lutomirski , Christian Heimes , Daniel Borkmann , Eric Chiang , James Morris , Jan Kara , Jann Horn , Jonathan Corbet , Kees Cook , Matthew Garrett , Matthew Wilcox , Michael Kerrisk , Mimi Zohar , Philippe =?utf-8?Q?Tr=C3=A9buchet?= , 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() 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> Date: Fri, 06 Sep 2019 20:44:03 +0200 In-Reply-To: <5a59b309f9d0603d8481a483e16b5d12ecb77540.camel@kernel.org> (Jeff Layton's message of "Fri, 06 Sep 2019 14:38:11 -0400") Message-ID: <87r24tcljg.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.63]); Fri, 06 Sep 2019 18:44:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Jeff Layton: > Even better would be to declare the new flag in some openat2-only flag > space, so there's no confusion about it being supported by legacy open > calls. Isn't that desirable anyway because otherwise fcntl with F_GETFL will give really confusing results? > If glibc wants to implement an open -> openat2 wrapper in userland > later, it can set that flag in the wrapper implicitly to emulate the old > behavior. I see us rather doing the opposite, i.e. implement openat2 with non-exotic flags using openat. But we've bitten by this in the past, so maybe that's not such a great idea. It's tempting to make the same mistake again for every new system call. Thanks, Florian