Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4316860imj; Tue, 12 Feb 2019 13:43:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IanVDr5vWT+Dna08/Q5SrZ1qy/zlhucPYwOVUVLmiMkLPf+i3svxGNx0pqeH8mYOb8VwcF/ X-Received: by 2002:a63:fa48:: with SMTP id g8mr5575668pgk.203.1550007821343; Tue, 12 Feb 2019 13:43:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550007821; cv=none; d=google.com; s=arc-20160816; b=AehBxJDnh3ud3d9EmYKhH75zmDmLtCaQmr+vLq3DfT7hhB8AQDh99EY8jawrUoP351 9wuM4/ONgVJkCJaD8VzCKiqLnOPch2kJv93NLzY3aWoWrmFZiPCHMaEJrfNXeIYy3g7K 86f3Wgv/6sSj1iAD7+r8NMJhTt3Bw5fU8/0o8jSzuKU5u1RTiaZT9E5RsvEm2BEfJOnc 5Gd/2GtLawf1u/1WT+VQgq8p1ukQVzhPM+q4AcsNxXy96BYDN8kRyPR4Rq0sgQJ1j95w 8pjydvB6sp9mYmsCjCSo8SyD6xlKBHN56DPPIoykE1Iufa9uun56Pe7R/KU1a/ARSmo5 i40w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4Adyh9m4wuSaIrejpBLKi9D+adpfLDJB69Zj5+jD+Fo=; b=Js4XqUTqQpU84Bb0j0re3OMiSSpNF2G9WjplhNALe7cv5PDWXFOhV23b+Iwc4VC6Nr dARkxdZeFHG4UWkQcwaFLrViUqoBd4HlGSdSAiOQQWV5LiqvtuliJ4pFQVwumGhvny2M auGq6u/HiJoIWmYA5lV1BTfdIX6l/7qF5qKnI7Vk6kiHUnPHeXlMqcPt+PUTPUVu3yLZ qEdRJrjO6fteiITjv8aeZ7u6wEMMf3JiLkx7uHN7NzftX1A44LqBeFFpX8n1eHPlSQ/K 16VQsPcGSMLD5FzdQ4gbzcUB5F8s1l77Pb3UpXhJSJvDF7u5di9iOzM1EJPq+QRbh2ke KK3A== 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 f9si11181460pge.414.2019.02.12.13.43.13; Tue, 12 Feb 2019 13:43:41 -0800 (PST) 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 S1731431AbfBLUiM (ORCPT + 99 others); Tue, 12 Feb 2019 15:38:12 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:42354 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbfBLUiL (ORCPT ); Tue, 12 Feb 2019 15:38:11 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.91 #2 (Red Hat Linux)) id 1gteoj-0006pu-AW; Tue, 12 Feb 2019 20:38:09 +0000 Date: Tue, 12 Feb 2019 20:38:09 +0000 From: Al Viro To: demiobenour@gmail.com Cc: "open list:FILESYSTEMS (VFS and infrastructure)" , open list Subject: Re: [PATCH 4/4] Return -EINVAL if userspace passes bogus flags to open() Message-ID: <20190212203809.GK2217@ZenIV.linux.org.uk> References: <20190212145450.2200-1-demiobenour@gmail.com> <20190212145450.2200-4-demiobenour@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190212145450.2200-4-demiobenour@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 12, 2019 at 09:54:47AM -0500, demiobenour@gmail.com wrote: > From: "Demi M. Obenour" > > While testing the O_PATHSTATIC patch, I discovered that Linux does not > return any error if an invalid flag is passed to open(2). This prevents > adding new flags without a (minor) risk of breaking userspace. > Therefore, add a check for invalid flags, and return -EINVAL if any are > found. ... which would qualtify as userland ABI breakage all by itself.