Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751789AbdHAPYK (ORCPT ); Tue, 1 Aug 2017 11:24:10 -0400 Received: from nm10-vm3.bullet.mail.ne1.yahoo.com ([98.138.91.140]:39451 "EHLO nm10-vm3.bullet.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751828AbdHAPYG (ORCPT ); Tue, 1 Aug 2017 11:24:06 -0400 X-Yahoo-Newman-Id: 737526.52886.bm@smtp105.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: fu09X7gVM1mxKiqEPhj_NsJfgbPjeNe9ek1H6Dogpr7vaMJ vAw.QBw6dVSKQRuUHRp9IuRhSCh5KFp_7bByZqWtzd8Srr3VDoQUzoq45FAV hzz3ehDVWwmgS9zYX4w5fObx1_ZBIXaL_f6D1QrQN4aDCSLJ4OgCHQPAB3.o 6KN.fGN4W_Tb0Dc6ERiI57cLrD58l6TutgvWCSY1K2goZzxQypLs.zLUOzwy CoATPgX5ua1FLooZ6kdv7eVarbZppkaZd0efi9ZL_DjjAfyc9nJahRhF2NQ8 FH8PonKkyPGCl6mthoAzcOVjJNGCX7kIpfZ1X0l.7RJzJm83YGMK4Q52KOUx N2QyWyEYvxUEsoMDlz_761SXYqj_dDkT5Ci5XZ4BNe4QVvNGzVCKHfqinQOO m8ZeAXFJ7Tl4sIchmBwjcvdMzdM5QHE_ifeKLxwq43U1zvzyPAj1GLd1VYUS NmP_WJJk8uh.74w8mxQIrC1iPQjQsyv0HmxQPrWqKnPrjimSaUSMLCpJyg68 De4SRYAfcwKrg1wlZgKzWpMTvzIXpleJs X-Yahoo-SMTP: OIJXglSswBDfgLtXluJ6wiAYv6_cnw-- Subject: Re: [PATCH v4 12/15] smack: Remove redundant pdeath_signal clearing To: Kees Cook , Andrew Morton Cc: 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 References: <1501545093-56634-1-git-send-email-keescook@chromium.org> <1501545093-56634-13-git-send-email-keescook@chromium.org> From: Casey Schaufler Message-ID: <7732a031-6603-7f9d-232c-cb8311be74e4@schaufler-ca.com> Date: Tue, 1 Aug 2017 08:24:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1501545093-56634-13-git-send-email-keescook@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1770 Lines: 50 On 7/31/2017 4:51 PM, Kees Cook wrote: > This removes the redundant pdeath_signal clearing in Smack: the check in > smack_bprm_committing_creds() matches the check in smack_bprm_set_creds() > (which used to be in the now-removed smack_bprm_securexec() hook) and > since secureexec is now being checked for clearing pdeath_signal, this > is redundant to the common exec code. > > Cc: Casey Schaufler > Signed-off-by: Kees Cook > Acked-by: Serge Hallyn Reviewed-by: Casey Schaufler > --- > security/smack/smack_lsm.c | 15 --------------- > 1 file changed, 15 deletions(-) > > diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c > index 4f1967be3d20..4e33c650b224 100644 > --- a/security/smack/smack_lsm.c > +++ b/security/smack/smack_lsm.c > @@ -957,20 +957,6 @@ static int smack_bprm_set_creds(struct linux_binprm *bprm) > return 0; > } > > -/** > - * smack_bprm_committing_creds - Prepare to install the new credentials > - * from bprm. > - * > - * @bprm: binprm for exec > - */ > -static void smack_bprm_committing_creds(struct linux_binprm *bprm) > -{ > - struct task_smack *bsp = bprm->cred->security; > - > - if (bsp->smk_task != bsp->smk_forked) > - current->pdeath_signal = 0; > -} > - > /* > * Inode hooks > */ > @@ -4633,7 +4619,6 @@ static struct security_hook_list smack_hooks[] __lsm_ro_after_init = { > LSM_HOOK_INIT(sb_parse_opts_str, smack_parse_opts_str), > > LSM_HOOK_INIT(bprm_set_creds, smack_bprm_set_creds), > - LSM_HOOK_INIT(bprm_committing_creds, smack_bprm_committing_creds), > > LSM_HOOK_INIT(inode_alloc_security, smack_inode_alloc_security), > LSM_HOOK_INIT(inode_free_security, smack_inode_free_security),