Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbdHANZG (ORCPT ); Tue, 1 Aug 2017 09:25:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54874 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751933AbdHANZE (ORCPT ); Tue, 1 Aug 2017 09:25:04 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5941F22CB5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org MIME-Version: 1.0 In-Reply-To: <1501545093-56634-6-git-send-email-keescook@chromium.org> References: <1501545093-56634-1-git-send-email-keescook@chromium.org> <1501545093-56634-6-git-send-email-keescook@chromium.org> From: Andy Lutomirski Date: Tue, 1 Aug 2017 06:24:42 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 05/15] selinux: Refactor to remove bprm_secureexec hook To: Kees Cook Cc: Andrew Morton , Stephen Smalley , David Howells , "Eric W. Biederman" , John Johansen , "Serge E. Hallyn" , Paul Moore , Casey Schaufler , Tetsuo Handa , James Morris , Andy Lutomirski , Linus Torvalds , Linux FS Devel , LSM List , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 798 Lines: 17 On Mon, Jul 31, 2017 at 4:51 PM, Kees Cook wrote: > The SELinux 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: Stephen Smalley > Signed-off-by: Kees Cook > Acked-by: Paul Moore > Tested-by: Paul Moore > Acked-by: Serge Hallyn Reviewed-by: Andy Lutomirski