Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp93146ybi; Thu, 13 Jun 2019 12:12:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAyBoALfL9lJSFFtLoAJtUVJ2tK2fsdGNuoMBbdIQu5exkvvz9WWFZ23tz2etRyckWQ0As X-Received: by 2002:a63:d103:: with SMTP id k3mr14049715pgg.189.1560453170963; Thu, 13 Jun 2019 12:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560453170; cv=none; d=google.com; s=arc-20160816; b=jXqXQhrCgTKFojpRLorjL/Sp+8Se2AsrxvFi4QWxw919By9/m/fVcG4DKA2Evbj6zn Q8miEKH9v+0VbZAS0NErv8Rxe4BioVlQaKKGYvyFD60ZB1kv4YzWhudnnHmPN63kDFLi FWmyPlgC3f87Q1Pqbul3V4YAbbQ2yLd+AifSQtFafxS/ctDzrBdIgiAg39KhGHAgc6tG PiulNDnUT5w76JjXohp59PcT/P0mirIuO0B0tA3bGGaO08ueHSvDK3CrWJxGzf6ZnUhB WGXHlfeTij1mtCfGe7c7NN0mT1ZoDT5R+GSHzlMyvpmCkEaRk+tAb9i9StO6AKSFswk2 km1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=iEejEXYU1bHpXHKG7KFGSWl8NFmF2E2Iffw3vZq+vd0=; b=ME6INhlln2pLYuBGenRXK+PzgsMiH728pMrXaBadfXHsve1i5NH3ZTrI0chAzO1Y84 Bl/WgdVDCrn82+9au5wIG+6LvY1Iu3SoH9UUfxcmhtUHjgOjfDWsxy4eLU5zTqr2+ANI PN5KYFYroJGnz/C3OP2SxtqHHAX1oKLaBI+FTNPxu2aHqdbVoSQDuI6HCheS9Ze9O+dp YpKvWNUDK+PIYrXa+1HsWN2dpswQwbFpzEs33oq6tsmi4lTz4uaEPpmP9jns+7Na/urN zQI86A+19T9ENadfSaHkOZYgDuVQKhWTq+vyRYyqCKjYY158x+xXUsHRkGNUXZJipj1/ e81Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si367269pjn.74.2019.06.13.12.12.35; Thu, 13 Jun 2019 12:12:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727194AbfFMTLN (ORCPT + 99 others); Thu, 13 Jun 2019 15:11:13 -0400 Received: from namei.org ([65.99.196.166]:38978 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfFMTLM (ORCPT ); Thu, 13 Jun 2019 15:11:12 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x5DJAmSG022560; Thu, 13 Jun 2019 19:10:48 GMT Date: Fri, 14 Jun 2019 05:10:48 +1000 (AEST) From: James Morris To: Prakhar Srivastava cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, zohar@linux.ibm.com, roberto.sassu@huawei.com, vgoyal@redhat.com Subject: Re: [PATCH V8 1/3] Define a new IMA hook to measure the boot command line arguments In-Reply-To: <20190612221549.28399-2-prsriva02@gmail.com> Message-ID: References: <20190612221549.28399-1-prsriva02@gmail.com> <20190612221549.28399-2-prsriva02@gmail.com> User-Agent: Alpine 2.21 (LRH 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jun 2019, Prakhar Srivastava wrote: > This patch adds support in ima to measure kexec cmdline args > during soft reboot(kexec_file_load). > > - A new ima hook ima_kexec_cmdline is defined to be called by the > kexec code. > - A new function process_buffer_measurement is defined to measure > the buffer hash into the ima log. > - A new func policy KEXEC_CMDLINE is defined to control the > measurement.[Suggested by Mimi] > > Signed-off-by: Prakhar Srivastava > + struct integrity_iint_cache tmp_iint, *iint = &tmp_iint; > + struct ima_event_data event_data = {.iint = iint }; Minor nit: looks like this could be simplified to: struct integrity_iint_cache iint = {}; struct ima_event_data event_data = {.iint = &iint }; which also saves the later memset. 'hash' can also be initialized with '= {}'. -- James Morris