Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752813AbdF3AGm (ORCPT ); Thu, 29 Jun 2017 20:06:42 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:43080 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751701AbdF3AGk (ORCPT ); Thu, 29 Jun 2017 20:06:40 -0400 Date: Fri, 30 Jun 2017 01:06:29 +0100 From: Al Viro To: Kees Cook Cc: Solar Designer , "Serge E. Hallyn" , Andy Lutomirski , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: Reorder inode_owner_or_capable() to avoid needless Message-ID: <20170630000629.GP10672@ZenIV.linux.org.uk> References: <20170620214024.GA121654@beast> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170620214024.GA121654@beast> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 293 Lines: 6 On Tue, Jun 20, 2017 at 02:40:24PM -0700, Kees Cook wrote: > Checking for capabilities should be the last operation when performing > access control tests so that PF_SUPERPRIV is set only when it was required > for success (implying that the capability was needed for the operation). Applied