linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Prakhar Srivastava <prsriva@linux.microsoft.com>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org
Cc: kbuild-all@lists.01.org, catalin.marinas@arm.com,
	will@kernel.org, mpe@ellerman.id.au, benh@kernel.crashing.org,
	paulus@samba.org, robh+dt@kernel.org, frowand.list@gmail.com
Subject: Re: [PATCH V3 5/6] Update the Kconfig to support carrying forward the IMA Measurement log and and update the setup_dtb call to add the linux,ima-kexec-buffer property to the DTB.
Date: Tue, 21 Jul 2020 04:18:47 +0800	[thread overview]
Message-ID: <202007210425.xDtCwhUA%lkp@intel.com> (raw)
In-Reply-To: <20200720152342.337990-6-prsriva@linux.microsoft.com>

[-- Attachment #1: Type: text/plain, Size: 5758 bytes --]

Hi Prakhar,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on arm64/for-next/core]
[also build test WARNING on powerpc/next integrity/next-integrity v5.8-rc6 next-20200720]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Prakhar-Srivastava/Add-support-to-carry-forward-the-IMA-measurement-logs/20200720-232521
base:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> security/integrity/ima/ima_kexec.c:49:5: warning: no previous prototype for 'ima_get_kexec_buffer' [-Wmissing-prototypes]
      49 | int ima_get_kexec_buffer(void **addr, size_t *size)
         |     ^~~~~~~~~~~~~~~~~~~~
>> security/integrity/ima/ima_kexec.c:73:5: warning: no previous prototype for 'ima_free_kexec_buffer' [-Wmissing-prototypes]
      73 | int ima_free_kexec_buffer(void)
         |     ^~~~~~~~~~~~~~~~~~~~~
   security/integrity/ima/ima_kexec.c:161:6: warning: no previous prototype for 'ima_add_kexec_buffer' [-Wmissing-prototypes]
     161 | void ima_add_kexec_buffer(struct kimage *image)
         |      ^~~~~~~~~~~~~~~~~~~~

vim +/ima_get_kexec_buffer +49 security/integrity/ima/ima_kexec.c

0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  41  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  42  /**
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  43   * ima_get_kexec_buffer - get IMA buffer from the previous kernel
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  44   * @addr:	On successful return, set to point to the buffer contents.
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  45   * @size:	On successful return, set to the buffer size.
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  46   *
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  47   * Return: 0 on success, negative errno on error.
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  48   */
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20 @49  int ima_get_kexec_buffer(void **addr, size_t *size)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  50  {
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  51  	int ret, len;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  52  	unsigned long tmp_addr;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  53  	size_t tmp_size;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  54  	const void *prop;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  55  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  56  	prop = of_get_property(of_chosen, "linux,ima-kexec-buffer", &len);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  57  	if (!prop)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  58  		return -ENOENT;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  59  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  60  	ret = do_get_kexec_buffer(prop, len, &tmp_addr, &tmp_size);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  61  	if (ret)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  62  		return ret;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  63  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  64  	*addr = __va(tmp_addr);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  65  	*size = tmp_size;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  66  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  67  	return 0;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  68  }
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  69  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  70  /**
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  71   * ima_free_kexec_buffer - free memory used by the IMA buffer
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  72   */
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20 @73  int ima_free_kexec_buffer(void)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  74  {
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  75  	int ret;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  76  	unsigned long addr;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  77  	size_t size;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  78  	struct property *prop;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  79  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  80  	prop = of_find_property(of_chosen, "linux,ima-kexec-buffer", NULL);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  81  	if (!prop)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  82  		return -ENOENT;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  83  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  84  	ret = do_get_kexec_buffer(prop->value, prop->length, &addr, &size);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  85  	if (ret)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  86  		return ret;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  87  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  88  	ret = of_remove_property(of_chosen, prop);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  89  	if (ret)
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  90  		return ret;
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  91  
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  92  	return memblock_free(addr, size);
0cc3b50ba7b5c5 Prakhar Srivastava 2020-07-20  93  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 73582 bytes --]

  parent reply	other threads:[~2020-07-20 20:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 15:23 [PATCH V3 0/6] Add support to carry forward the IMA measurement logs Prakhar Srivastava
2020-07-20 15:23 ` [PATCH V3 1/6] Refactoring powerpc code to be made available to other architectures Prakhar Srivastava
2020-07-20 15:23 ` [PATCH V3 2/6] Update remove_ima_buffer code to use functions from libfdt reducing wrappers functions Prakhar Srivastava
2020-07-20 15:32   ` Greg KH
2020-07-20 15:23 ` [PATCH V3 3/6] Update function do_get_kexec_buffer to use of_* functions, and reducing wrapper functions Prakhar Srivastava
2020-07-20 15:23 ` [PATCH V3 4/6] Add support in arm64 to store the memory information of the IMA measurement log in the kimage used for kexec Prakhar Srivastava
2020-07-20 19:24   ` kernel test robot
2020-07-20 15:23 ` [PATCH V3 5/6] Update the Kconfig to support carrying forward the IMA Measurement log and and update the setup_dtb call to add the linux,ima-kexec-buffer property to the DTB Prakhar Srivastava
2020-07-20 15:32   ` Greg KH
2020-07-20 20:18   ` kernel test robot [this message]
2020-07-20 15:23 ` [PATCH V3 6/6] Add the property used for carrying forward the IMA measurement logs and update the code to use the defined property string Prakhar Srivastava
2020-07-20 15:34   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202007210425.xDtCwhUA%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=prsriva@linux.microsoft.com \
    --cc=robh+dt@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).