Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753487AbdGSJWY (ORCPT ); Wed, 19 Jul 2017 05:22:24 -0400 Received: from namei.org ([65.99.196.166]:39645 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbdGSJWV (ORCPT ); Wed, 19 Jul 2017 05:22:21 -0400 Date: Wed, 19 Jul 2017 19:21:55 +1000 (AEST) From: James Morris To: Kees Cook cc: Andrew Morton , John Johansen , David Howells , "Eric W. Biederman" , "Serge E. Hallyn" , Paul Moore , Stephen Smalley , Casey Schaufler , Tetsuo Handa , James Morris , Andy Lutomirski , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 03/15] apparmor: Refactor to remove bprm_secureexec hook In-Reply-To: <1500416736-49829-4-git-send-email-keescook@chromium.org> Message-ID: References: <1500416736-49829-1-git-send-email-keescook@chromium.org> <1500416736-49829-4-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: 791 Lines: 21 On Tue, 18 Jul 2017, Kees Cook wrote: > The AppArmor bprm_secureexec hook can be merged with the bprm_set_creds > hook since it's dealing with the same information, and all of the details > are finalized during the first call to the bprm_set_creds hook via > prepare_binprm() (subsequent calls due to binfmt_script, etc, are ignored > via bprm->called_set_creds). > > Here, all the comments describe how secureexec is actually calculated > during bprm_set_creds, so this actually does it, drops the bprm flag that > was being used internally by AppArmor, and drops the bprm_secureexec hook. > > Cc: John Johansen > Signed-off-by: Kees Cook Reviewed-by: James Morris -- James Morris