From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:45514 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725970AbeJMLbp (ORCPT ); Sat, 13 Oct 2018 07:31:45 -0400 Date: Sat, 13 Oct 2018 04:56:11 +0100 From: Al Viro To: Andreas =?iso-8859-1?Q?Gr=FCnbacher?= Cc: Andreas Dilger , Andreas Gruenbacher , Linux FS-devel Mailing List Subject: Re: posix_acl_permission() and MAY_* flags Message-ID: <20181013035611.GL32577@ZenIV.linux.org.uk> References: <1254FD78-8392-4B97-A191-EDA01B719635@whamcloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Oct 12, 2018 at 11:09:38AM +0200, Andreas Gr�nbacher wrote: > The ACL_{READ,WRITE,EXECUTE} and MAY_{READ,WRITE,EXEC} values must > definitely have the same values. This wouldn't be true for higher > bits, but POSIX ACLs don't support anything beyond rwx. Yes. What's more, nobody is going to change the values for any of those - consider them tied to pretty much universal encoding going through all Unix filesystem layouts and all Unix ABIs. Not all uses of symbolic constants mean that the values can be redefined. In particular, MAY_READ == R_OK, etc. - the names are not directly exposed to userland, but attempt to change the values will immediately break access(2) or demand remapping in it. They are also tied to on-disk layouts. If you want BUILD_BUG_ON() on those, we could add such, but I really don't see the point - anyone changing any of those will get instant breakage as soon as they try to boot. Or the patch will have a very heavy footprint and raise obvious red flags on review (along the lines of "WTF do you insert that crap on a lot of hot paths? You are changing what, again? What for?")