From mboxrd@z Thu Jan 1 00:00:00 1970 From: serge@hallyn.com (Serge E. Hallyn) Date: Thu, 6 Jul 2017 10:04:24 -0500 Subject: [PATCH] integrity: get rid of unneeded initializations in integrity_iint_cache entries In-Reply-To: <20170706145421.13223-1-jlayton@kernel.org> References: <20170706145421.13223-1-jlayton@kernel.org> Message-ID: <20170706150424.GA21489@mail.hallyn.com> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Quoting Jeff Layton (jlayton at kernel.org): > From: Jeff Layton > > The init_once routine memsets the whole object to 0, and then > explicitly sets some of the fields to 0 again. Just remove the explicit > initializations. > > Signed-off-by: Jeff Layton Reviewed-by: Serge Hallyn > --- > security/integrity/iint.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/security/integrity/iint.c b/security/integrity/iint.c > index 6fc888ca468e..187b7cb378be 100644 > --- a/security/integrity/iint.c > +++ b/security/integrity/iint.c > @@ -153,14 +153,11 @@ static void init_once(void *foo) > struct integrity_iint_cache *iint = foo; > > memset(iint, 0, sizeof(*iint)); > - iint->version = 0; > - iint->flags = 0UL; > iint->ima_file_status = INTEGRITY_UNKNOWN; > iint->ima_mmap_status = INTEGRITY_UNKNOWN; > iint->ima_bprm_status = INTEGRITY_UNKNOWN; > iint->ima_read_status = INTEGRITY_UNKNOWN; > iint->evm_status = INTEGRITY_UNKNOWN; > - iint->measured_pcrs = 0; > } > > static int __init integrity_iintcache_init(void) > -- > 2.13.0 -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752296AbdGFPE1 (ORCPT ); Thu, 6 Jul 2017 11:04:27 -0400 Received: from h2.hallyn.com ([78.46.35.8]:33914 "EHLO h2.hallyn.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751801AbdGFPE0 (ORCPT ); Thu, 6 Jul 2017 11:04:26 -0400 Date: Thu, 6 Jul 2017 10:04:24 -0500 From: "Serge E. Hallyn" To: Jeff Layton Cc: Mimi Zohar , "Serge E. Hallyn" , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH] integrity: get rid of unneeded initializations in integrity_iint_cache entries Message-ID: <20170706150424.GA21489@mail.hallyn.com> References: <20170706145421.13223-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment In-Reply-To: <20170706145421.13223-1-jlayton@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jeff Layton (jlayton@kernel.org): > From: Jeff Layton > > The init_once routine memsets the whole object to 0, and then > explicitly sets some of the fields to 0 again. Just remove the explicit > initializations. > > Signed-off-by: Jeff Layton Reviewed-by: Serge Hallyn > --- > security/integrity/iint.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/security/integrity/iint.c b/security/integrity/iint.c > index 6fc888ca468e..187b7cb378be 100644 > --- a/security/integrity/iint.c > +++ b/security/integrity/iint.c > @@ -153,14 +153,11 @@ static void init_once(void *foo) > struct integrity_iint_cache *iint = foo; > > memset(iint, 0, sizeof(*iint)); > - iint->version = 0; > - iint->flags = 0UL; > iint->ima_file_status = INTEGRITY_UNKNOWN; > iint->ima_mmap_status = INTEGRITY_UNKNOWN; > iint->ima_bprm_status = INTEGRITY_UNKNOWN; > iint->ima_read_status = INTEGRITY_UNKNOWN; > iint->evm_status = INTEGRITY_UNKNOWN; > - iint->measured_pcrs = 0; > } > > static int __init integrity_iintcache_init(void) > -- > 2.13.0