Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219AbdGFToE (ORCPT ); Thu, 6 Jul 2017 15:44:04 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:38718 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751916AbdGFToC (ORCPT ); Thu, 6 Jul 2017 15:44:02 -0400 Subject: Re: [PATCH] integrity: get rid of unneeded initializations in integrity_iint_cache entries From: Mimi Zohar To: "Serge E. Hallyn" , Jeff Layton Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Date: Thu, 06 Jul 2017 15:43:46 -0400 In-Reply-To: <20170706150424.GA21489@mail.hallyn.com> References: <20170706145421.13223-1-jlayton@kernel.org> <20170706150424.GA21489@mail.hallyn.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17070619-0040-0000-0000-000003407C97 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17070619-0041-0000-0000-00000CBBADE7 Message-Id: <1499370226.3130.36.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-06_12:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=2 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707060337 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1495 Lines: 47 On Thu, 2017-07-06 at 10:04 -0500, Serge E. Hallyn wrote: > 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 Thanks, queued. Mimi > > > --- > > 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@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >