Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Lianbo Jiang <lijiang@redhat.com>
Cc: thomas.lendacky@amd.com, bhe@redhat.com, joro@8bytes.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux-foundation.org, mingo@redhat.com,
	ebiederm@xmission.com, hpa@zytor.com, tglx@linutronix.de,
	dyoung@redhat.com, kbuild-all@01.org
Subject: Re: [PATCH 5/5 V4] Help to dump the old memory encrypted into vmcore file
Date: Thu, 28 Jun 2018 20:15:30 +0800	[thread overview]
Message-ID: <201806281952.Blg7dfHT%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180628085806.9280-6-lijiang@redhat.com>

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

Hi Lianbo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.18-rc2 next-20180628]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lianbo-Jiang/Add-a-function-ioremap_encrypted-for-kdump-when-AMD-sme-enabled/20180628-173357
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        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
        GCC_VERSION=7.2.0 make.cross ARCH=arm64 

All errors (new ones prefixed by >>):

   fs/proc/vmcore.c: In function 'elfcorehdr_read':
>> fs/proc/vmcore.c:180:9: error: implicit declaration of function 'memremap'; did you mean 'memset_p'? [-Werror=implicit-function-declaration]
     kbuf = memremap(offset, count, MEMREMAP_WB);
            ^~~~~~~~
            memset_p
   fs/proc/vmcore.c:180:33: error: 'MEMREMAP_WB' undeclared (first use in this function)
     kbuf = memremap(offset, count, MEMREMAP_WB);
                                    ^~~~~~~~~~~
   fs/proc/vmcore.c:180:33: note: each undeclared identifier is reported only once for each function it appears in
   fs/proc/vmcore.c:185:2: error: implicit declaration of function 'memunmap'; did you mean 'vm_munmap'? [-Werror=implicit-function-declaration]
     memunmap(kbuf);
     ^~~~~~~~
     vm_munmap
   cc1: some warnings being treated as errors

vim +180 fs/proc/vmcore.c

   158	
   159	/*
   160	 * Architectures may override this function to read from ELF header.
   161	 * The kexec-tools will allocated the memory and build the elf header
   162	 * in the first kernel, subsequently, we will copy the data in the
   163	 * memory to the reserved crash memory. In kdump mode, we will read the
   164	 * elf header from the reserved crash memory, from this point of view,
   165	 * which is not an old memory, the original function called may mislead
   166	 * and do unnecessary things.
   167	 * For SME, it copies the elf header from the memory encrypted(user space)
   168	 * to the memory unencrypted(kernel space) when SME is activated in the
   169	 * first kernel, this operation just leads to decryption.
   170	 */
   171	ssize_t __weak elfcorehdr_read(char *buf, size_t count, u64 *ppos)
   172	{
   173		char *kbuf;
   174		resource_size_t offset;
   175	
   176		if (!count)
   177			return 0;
   178	
   179		offset = (resource_size_t)*ppos;
 > 180		kbuf = memremap(offset, count, MEMREMAP_WB);
   181		if (!kbuf)
   182			return 0;
   183	
   184		memcpy(buf, kbuf, count);
   185		memunmap(kbuf);
   186	
   187		return count;
   188	}
   189	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      parent reply	other threads:[~2018-06-28 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28  8:58 [PATCH 0/5 V4] Support kdump for AMD secure memory encryption(SME) Lianbo Jiang
2018-06-28  8:58 ` [PATCH 1/5 V4] Add a function(ioremap_encrypted) for kdump when AMD sme enabled Lianbo Jiang
2018-06-28  8:58 ` [PATCH 2/5 V4] Allocate pages for kdump without encryption when SME is enabled Lianbo Jiang
2018-06-28  8:58 ` [PATCH 3/5 V4] Remap the device table of IOMMU in encrypted manner for kdump Lianbo Jiang
2018-06-28  8:58 ` [PATCH 4/5 V4] Adjust some permanent mappings in unencrypted ways for kdump when SME is enabled Lianbo Jiang
2018-06-28  8:58 ` [PATCH 5/5 V4] Help to dump the old memory encrypted into vmcore file Lianbo Jiang
2018-06-28 10:30   ` kbuild test robot
2018-06-28 12:15   ` kbuild test robot [this message]

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=201806281952.Blg7dfHT%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=bhe@redhat.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kbuild-all@01.org \
    --cc=kexec@lists.infradead.org \
    --cc=lijiang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    /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