All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v17 02/10] of: Add a common kexec FDT setup function
Date: Fri, 12 Feb 2021 00:50:20 +0800	[thread overview]
Message-ID: <202102120032.Bv0MoYv7-lkp@intel.com> (raw)
In-Reply-To: <20210209182200.30606-3-nramas@linux.microsoft.com>

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

Hi Lakshmi,

I love your patch! Yet something to improve:

[auto build test ERROR on integrity/next-integrity]
[also build test ERROR on v5.11-rc7 next-20210211]
[cannot apply to powerpc/next robh/for-next arm64/for-next/core]
[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/Lakshmi-Ramasubramanian/Carry-forward-IMA-measurement-log-on-kexec-on-ARM64/20210211-071924
base:   https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity
config: x86_64-randconfig-m001-20210211 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/12ae86067d115b84092353109e8798693d102f0d
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Lakshmi-Ramasubramanian/Carry-forward-IMA-measurement-log-on-kexec-on-ARM64/20210211-071924
        git checkout 12ae86067d115b84092353109e8798693d102f0d
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

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

All errors (new ones prefixed by >>):

   drivers/of/kexec.c: In function 'of_kexec_alloc_and_setup_fdt':
>> drivers/of/kexec.c:183:17: error: 'const struct kimage_arch' has no member named 'elf_headers_mem'; did you mean 'elf_headers_sz'?
     183 |     image->arch.elf_headers_mem,
         |                 ^~~~~~~~~~~~~~~
         |                 elf_headers_sz
   drivers/of/kexec.c:192:42: error: 'const struct kimage_arch' has no member named 'elf_headers_mem'; did you mean 'elf_headers_sz'?
     192 |   ret = fdt_add_mem_rsv(fdt, image->arch.elf_headers_mem,
         |                                          ^~~~~~~~~~~~~~~
         |                                          elf_headers_sz


vim +183 drivers/of/kexec.c

    65	
    66	/*
    67	 * of_kexec_alloc_and_setup_fdt - Alloc and setup a new Flattened Device Tree
    68	 *
    69	 * @image:		kexec image being loaded.
    70	 * @initrd_load_addr:	Address where the next initrd will be loaded.
    71	 * @initrd_len:		Size of the next initrd, or 0 if there will be none.
    72	 * @cmdline:		Command line for the next kernel, or NULL if there will
    73	 *			be none.
    74	 *
    75	 * Return: fdt on success, or NULL errno on error.
    76	 */
    77	void *of_kexec_alloc_and_setup_fdt(const struct kimage *image,
    78					   unsigned long initrd_load_addr,
    79					   unsigned long initrd_len,
    80					   const char *cmdline)
    81	{
    82		void *fdt;
    83		int ret, chosen_node;
    84		const void *prop;
    85		unsigned long fdt_size;
    86	
    87		fdt_size = fdt_totalsize(initial_boot_params) +
    88			   (cmdline ? strlen(cmdline) : 0) +
    89			   FDT_EXTRA_SPACE;
    90	
    91		fdt = kvmalloc(fdt_size, GFP_KERNEL);
    92		if (!fdt)
    93			return NULL;
    94	
    95		ret = fdt_open_into(initial_boot_params, fdt, fdt_size);
    96		if (ret < 0) {
    97			pr_err("Error %d setting up the new device tree.\n", ret);
    98			goto out;
    99		}
   100	
   101		/* Remove memory reservation for the current device tree. */
   102		ret = fdt_find_and_del_mem_rsv(fdt, __pa(initial_boot_params),
   103					       fdt_totalsize(initial_boot_params));
   104		if (ret == -EINVAL) {
   105			pr_err("Error removing memory reservation.\n");
   106			goto out;
   107		}
   108	
   109		chosen_node = fdt_path_offset(fdt, "/chosen");
   110		if (chosen_node == -FDT_ERR_NOTFOUND)
   111			chosen_node = fdt_add_subnode(fdt, fdt_path_offset(fdt, "/"),
   112						      "chosen");
   113		if (chosen_node < 0) {
   114			ret = chosen_node;
   115			goto out;
   116		}
   117	
   118		ret = fdt_delprop(fdt, chosen_node, FDT_PROP_KEXEC_ELFHDR);
   119		if (ret && ret != -FDT_ERR_NOTFOUND)
   120			goto out;
   121		ret = fdt_delprop(fdt, chosen_node, FDT_PROP_MEM_RANGE);
   122		if (ret && ret != -FDT_ERR_NOTFOUND)
   123			goto out;
   124	
   125		/* Did we boot using an initrd? */
   126		prop = fdt_getprop(fdt, chosen_node, "linux,initrd-start", NULL);
   127		if (prop) {
   128			u64 tmp_start, tmp_end, tmp_size;
   129	
   130			tmp_start = fdt64_to_cpu(*((const fdt64_t *) prop));
   131	
   132			prop = fdt_getprop(fdt, chosen_node, "linux,initrd-end", NULL);
   133			if (!prop) {
   134				ret = -EINVAL;
   135				goto out;
   136			}
   137	
   138			tmp_end = fdt64_to_cpu(*((const fdt64_t *) prop));
   139	
   140			/*
   141			 * kexec reserves exact initrd size, while firmware may
   142			 * reserve a multiple of PAGE_SIZE, so check for both.
   143			 */
   144			tmp_size = tmp_end - tmp_start;
   145			ret = fdt_find_and_del_mem_rsv(fdt, tmp_start, tmp_size);
   146			if (ret == -ENOENT)
   147				ret = fdt_find_and_del_mem_rsv(fdt, tmp_start,
   148							       round_up(tmp_size, PAGE_SIZE));
   149			if (ret == -EINVAL)
   150				goto out;
   151		}
   152	
   153		/* add initrd-* */
   154		if (initrd_load_addr) {
   155			ret = fdt_setprop_u64(fdt, chosen_node, FDT_PROP_INITRD_START,
   156					      initrd_load_addr);
   157			if (ret)
   158				goto out;
   159	
   160			ret = fdt_setprop_u64(fdt, chosen_node, FDT_PROP_INITRD_END,
   161					      initrd_load_addr + initrd_len);
   162			if (ret)
   163				goto out;
   164	
   165			ret = fdt_add_mem_rsv(fdt, initrd_load_addr, initrd_len);
   166			if (ret)
   167				goto out;
   168	
   169		} else {
   170			ret = fdt_delprop(fdt, chosen_node, FDT_PROP_INITRD_START);
   171			if (ret && (ret != -FDT_ERR_NOTFOUND))
   172				goto out;
   173	
   174			ret = fdt_delprop(fdt, chosen_node, FDT_PROP_INITRD_END);
   175			if (ret && (ret != -FDT_ERR_NOTFOUND))
   176				goto out;
   177		}
   178	
   179		if (image->type == KEXEC_TYPE_CRASH) {
   180			/* add linux,elfcorehdr */
   181			ret = fdt_appendprop_addrrange(fdt, 0, chosen_node,
   182					FDT_PROP_KEXEC_ELFHDR,
 > 183					image->arch.elf_headers_mem,

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

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

  parent reply	other threads:[~2021-02-11 16:50 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 18:21 [PATCH v17 00/10] Carry forward IMA measurement log on kexec on ARM64 Lakshmi Ramasubramanian
2021-02-09 18:21 ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` [PATCH v17 01/10] powerpc: Rename kexec elfcorehdr_addr to elf_headers_mem Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` [PATCH v17 02/10] of: Add a common kexec FDT setup function Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-10 17:23   ` Rob Herring
2021-02-10 17:23     ` Rob Herring
2021-02-10 17:23     ` Rob Herring
2021-02-10 17:59     ` Lakshmi Ramasubramanian
2021-02-10 17:59       ` Lakshmi Ramasubramanian
2021-02-10 17:59       ` Lakshmi Ramasubramanian
2021-02-10 23:24   ` Thiago Jung Bauermann
2021-02-10 23:24     ` Thiago Jung Bauermann
2021-02-10 23:24     ` Thiago Jung Bauermann
2021-02-11 16:50   ` kernel test robot [this message]
2021-02-11 17:42     ` Fwd: " Lakshmi Ramasubramanian
2021-02-11 17:42       ` Lakshmi Ramasubramanian
2021-02-11 17:47       ` Lakshmi Ramasubramanian
2021-02-11 17:47         ` Lakshmi Ramasubramanian
2021-02-11 23:59         ` Thiago Jung Bauermann
2021-02-11 23:59           ` Thiago Jung Bauermann
2021-02-11 23:59           ` Thiago Jung Bauermann
2021-02-12  1:09           ` Lakshmi Ramasubramanian
2021-02-12  1:09             ` Lakshmi Ramasubramanian
2021-02-12  1:09             ` Lakshmi Ramasubramanian
2021-02-12  2:11             ` Thiago Jung Bauermann
2021-02-12  2:11               ` Thiago Jung Bauermann
2021-02-12  2:11               ` Thiago Jung Bauermann
2021-02-12  2:28               ` Lakshmi Ramasubramanian
2021-02-12  2:28                 ` Lakshmi Ramasubramanian
2021-02-12  2:28                 ` Lakshmi Ramasubramanian
2021-02-12  3:21                 ` Thiago Jung Bauermann
2021-02-12  3:21                   ` Thiago Jung Bauermann
2021-02-12  3:21                   ` Thiago Jung Bauermann
2021-02-12  1:09   ` Thiago Jung Bauermann
2021-02-12  1:09     ` Thiago Jung Bauermann
2021-02-12  1:09     ` Thiago Jung Bauermann
2021-02-12  1:17     ` Lakshmi Ramasubramanian
2021-02-12  1:17       ` Lakshmi Ramasubramanian
2021-02-12  1:17       ` Lakshmi Ramasubramanian
2021-02-12  1:39       ` Thiago Jung Bauermann
2021-02-12  1:39         ` Thiago Jung Bauermann
2021-02-12  1:39         ` Thiago Jung Bauermann
2021-02-12 14:38       ` Rob Herring
2021-02-12 14:38         ` Rob Herring
2021-02-12 14:38         ` Rob Herring
2021-02-12 17:19         ` Lakshmi Ramasubramanian
2021-02-12 17:19           ` Lakshmi Ramasubramanian
2021-02-12 17:19           ` Lakshmi Ramasubramanian
2021-02-12 18:24           ` Rob Herring
2021-02-12 18:24             ` Rob Herring
2021-02-12 18:24             ` Rob Herring
2021-02-12 18:27             ` Lakshmi Ramasubramanian
2021-02-12 18:27               ` Lakshmi Ramasubramanian
2021-02-12 18:27               ` Lakshmi Ramasubramanian
2021-02-12 19:39               ` Thiago Jung Bauermann
2021-02-12 19:39                 ` Thiago Jung Bauermann
2021-02-12 19:39                 ` Thiago Jung Bauermann
2021-02-09 18:21 ` [PATCH v17 03/10] arm64: Use common of_kexec_alloc_and_setup_fdt() Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-10 17:26   ` Will Deacon
2021-02-10 17:26     ` Will Deacon
2021-02-10 17:26     ` Will Deacon
2021-02-10 23:30   ` Thiago Jung Bauermann
2021-02-10 23:30     ` Thiago Jung Bauermann
2021-02-10 23:30     ` Thiago Jung Bauermann
2021-02-09 18:21 ` [PATCH v17 04/10] powerpc: " Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-11  1:42   ` Thiago Jung Bauermann
2021-02-11  1:42     ` Thiago Jung Bauermann
2021-02-11  1:42     ` Thiago Jung Bauermann
2021-02-11  1:50     ` Lakshmi Ramasubramanian
2021-02-11  1:50       ` Lakshmi Ramasubramanian
2021-02-11  1:50       ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` [PATCH v17 05/10] powerpc: Move ima buffer fields to struct kimage Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-10 17:20   ` Rob Herring
2021-02-10 17:20     ` Rob Herring
2021-02-10 17:20     ` Rob Herring
2021-02-10 18:00     ` Lakshmi Ramasubramanian
2021-02-10 18:00       ` Lakshmi Ramasubramanian
2021-02-10 18:00       ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` [PATCH v17 06/10] powerpc: Enable passing IMA log to next kernel on kexec Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-11  1:51   ` Thiago Jung Bauermann
2021-02-11  1:51     ` Thiago Jung Bauermann
2021-02-11  1:51     ` Thiago Jung Bauermann
2021-02-09 18:21 ` [PATCH v17 07/10] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-11  5:07   ` Thiago Jung Bauermann
2021-02-11  5:07     ` Thiago Jung Bauermann
2021-02-11  5:07     ` Thiago Jung Bauermann
2021-02-09 18:21 ` [PATCH v17 08/10] kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21 ` [PATCH v17 09/10] powerpc: Delete unused function delete_fdt_mem_rsv() Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-09 18:21   ` Lakshmi Ramasubramanian
2021-02-11  5:11   ` Thiago Jung Bauermann
2021-02-11  5:11     ` Thiago Jung Bauermann
2021-02-11  5:11     ` Thiago Jung Bauermann
2021-02-09 18:22 ` [PATCH v17 10/10] arm64: Enable passing IMA log to next kernel on kexec Lakshmi Ramasubramanian
2021-02-09 18:22   ` Lakshmi Ramasubramanian
2021-02-09 18:22   ` Lakshmi Ramasubramanian
2021-02-11  5:13   ` Thiago Jung Bauermann
2021-02-11  5:13     ` Thiago Jung Bauermann
2021-02-11  5:13     ` Thiago Jung Bauermann
2021-02-10 17:15 ` [PATCH v17 00/10] Carry forward IMA measurement log on kexec on ARM64 Rob Herring
2021-02-10 17:15   ` Rob Herring
2021-02-10 17:15   ` Rob Herring
2021-02-10 17:33   ` Lakshmi Ramasubramanian
2021-02-10 17:33     ` Lakshmi Ramasubramanian
2021-02-10 17:33     ` Lakshmi Ramasubramanian
2021-02-10 20:42     ` Rob Herring
2021-02-10 20:42       ` Rob Herring
2021-02-10 20:42       ` Rob Herring
2021-02-10 20:55       ` Mimi Zohar
2021-02-10 20:55         ` Mimi Zohar
2021-02-10 20:55         ` Mimi Zohar
2021-02-10 21:39         ` Mimi Zohar
2021-02-10 21:39           ` Mimi Zohar
2021-02-10 21:39           ` Mimi Zohar
2021-02-10 22:34           ` Lakshmi Ramasubramanian
2021-02-10 22:34             ` Lakshmi Ramasubramanian
2021-02-10 22:34             ` Lakshmi Ramasubramanian

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=202102120032.Bv0MoYv7-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.