Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751869AbdHAArU (ORCPT ); Mon, 31 Jul 2017 20:47:20 -0400 Received: from namei.org ([65.99.196.166]:40588 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751822AbdHAArS (ORCPT ); Mon, 31 Jul 2017 20:47:18 -0400 Date: Tue, 1 Aug 2017 10:46:59 +1000 (AEST) From: James Morris To: Kees Cook cc: Andrew Morton , Casey Schaufler , David Howells , "Eric W. Biederman" , John Johansen , "Serge E. Hallyn" , Paul Moore , Stephen Smalley , 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 v4 06/15] smack: Refactor to remove bprm_secureexec hook In-Reply-To: <1501545093-56634-7-git-send-email-keescook@chromium.org> Message-ID: References: <1501545093-56634-1-git-send-email-keescook@chromium.org> <1501545093-56634-7-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: 839 Lines: 25 On Mon, 31 Jul 2017, Kees Cook wrote: > The Smack 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, the test can just happen at the end of the bprm_set_creds hook, > and the bprm_secureexec hook can be dropped. > > Cc: Casey Schaufler > Signed-off-by: Kees Cook > Acked-by: Serge Hallyn > --- > security/smack/smack_lsm.c | 21 ++++----------------- > 1 file changed, 4 insertions(+), 17 deletions(-) Reviewed-by: James Morris -- James Morris