Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753759AbdGSJ27 (ORCPT ); Wed, 19 Jul 2017 05:28:59 -0400 Received: from namei.org ([65.99.196.166]:39672 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753389AbdGSJ24 (ORCPT ); Wed, 19 Jul 2017 05:28:56 -0400 Date: Wed, 19 Jul 2017 19:28:31 +1000 (AEST) From: James Morris To: Kees Cook cc: Andrew Morton , Serge Hallyn , Andy Lutomirski , David Howells , "Eric W. Biederman" , John Johansen , Paul Moore , Stephen Smalley , Casey Schaufler , Tetsuo Handa , James Morris , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 07/15] commoncap: Move cap_elevated calculation into bprm_set_creds In-Reply-To: <1500416736-49829-8-git-send-email-keescook@chromium.org> Message-ID: References: <1500416736-49829-1-git-send-email-keescook@chromium.org> <1500416736-49829-8-git-send-email-keescook@chromium.org> User-Agent: Alpine 2.20 (LRH 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 519 Lines: 18 On Tue, 18 Jul 2017, Kees Cook wrote: > Instead of a separate function, open-code the cap_elevated test, which > lets us entirely remove bprm->cap_effective (to use the local "effective" > variable instead), and more accurately examine euid/egid changes via the > existing local "is_setid". > > Cc: Serge Hallyn > Cc: Andy Lutomirski > Signed-off-by: Kees Cook Reviewed-by: James Morris -- James Morris