Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp98364ybi; Thu, 13 Jun 2019 12:18:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjOJkAAp7Ox5nNjCoUggGwjetkH/CweasVm2L9cIUxTx71ImL0hYcY4og5G6Tmub8CdtJv X-Received: by 2002:aa7:8dcc:: with SMTP id j12mr29295446pfr.137.1560453491340; Thu, 13 Jun 2019 12:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560453491; cv=none; d=google.com; s=arc-20160816; b=SDMC9FUQ5EuISue34O7Tz3SKtgzIP3pkSZgtUdPrbtcFeP0Ne4KXp7SOHzIA131SqR ptekKIOkpHPDjJ19s+FogSSOFqhdJ4Om0T8XSW628htpHh5KZM+UNLEyhVuMratmYGua cKBggk8jNdWfz2NA5UCSsubi55b2tjQgEgocw/Uwmc+93fvD4hWRCoRRQOHsvHQQOCdf wRUTayEds+IROlum97NI+qKukQgGQjr+NXwotIRlAn3KqyCpRyXk833irmmgDZ+DfxgL fyKc5q8MdkPYpMsPxRHuD0Ogb8RC8iWMWizf3cE+ZYeAgvMFthA/Aj17UIiaHXjgylxl FdKg== 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=RY5hRImg5en5qT9RTiggRuiqhohuM2ua7MHpbbgQA/U=; b=NHc9F92W+yUB3a5P7xkAOYF75WbJOFfJfH4m1oeW9bIdBxbpHOap5Iph6mHveEwHhJ JZ7xsUiHqUS1S6o1KSfJNbhyVVdT+ioQA5YtlREqgOkF+rzKaw8DI0kaeQDNrKcwM3lN 8QrpLPyEZ2loZKSjFoZKHUyzFO2MiXCn2d9Z5w5zgedP1xMJfs0jqW12T4bWsIz6hoes gvkR6bPULvlC9klNB3pX7gPLcTkiM/Q/Clqr3BMMfJK+D4tqp4Xdw+L2oTm3JaR5Trok 1DH2foAzc6w3FwyxfMQXEmyC2eDydYIpPVyyKkJ9QbFCYuGKQGc1CwIEasMP+mC3btov SiCg== 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 j5si388371pjn.1.2019.06.13.12.17.55; Thu, 13 Jun 2019 12:18:11 -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 S1728610AbfFMTRY (ORCPT + 99 others); Thu, 13 Jun 2019 15:17:24 -0400 Received: from namei.org ([65.99.196.166]:39008 "EHLO namei.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbfFMTRY (ORCPT ); Thu, 13 Jun 2019 15:17:24 -0400 Received: from localhost (localhost [127.0.0.1]) by namei.org (8.14.4/8.14.4) with ESMTP id x5DJGx5W022889; Thu, 13 Jun 2019 19:16:59 GMT Date: Fri, 14 Jun 2019 05:16:59 +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 3/3] Call ima_kexec_cmdline to measure the cmdline args In-Reply-To: <20190612221549.28399-4-prsriva02@gmail.com> Message-ID: References: <20190612221549.28399-1-prsriva02@gmail.com> <20190612221549.28399-4-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: > During soft reboot(kexec_file_load) boot cmdline args > are not measured.Thus the new kernel on load boots with > an assumption of cold reboot. > > This patch makes a call to the ima hook ima_kexec_cmdline, > added in "Define a new IMA hook to measure the boot command > line arguments" > to measure the boot cmdline args into the ima log. > > - call ima_kexec_cmdline from kexec_file_load. > - move the call ima_add_kexec_buffer after the cmdline > args have been measured. > > Signed-off-by: Prakhar Srivastava > --- > kernel/kexec_file.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: James Morris -- James Morris