lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <201806281858.9MnrQzDI%fengguang.wu@intel.com>
Date:   Thu, 28 Jun 2018 18:30:44 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Lianbo Jiang <lijiang@...hat.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org, mingo@...hat.com,
        tglx@...utronix.de, hpa@...or.com, ebiederm@...ssion.com,
        joro@...tes.org, thomas.lendacky@....com, dyoung@...hat.com,
        kexec@...ts.infradead.org, iommu@...ts.linux-foundation.org,
        bhe@...hat.com
Subject: Re: [PATCH 5/5 V4] Help to dump the old memory encrypted into vmcore
 file

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: s390-allyesconfig (attached as .config)
compiler: s390x-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=s390 

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 'ioremap'? [-Werror=implicit-function-declaration]
     kbuf = memremap(offset, count, MEMREMAP_WB);
            ^~~~~~~~
            ioremap
>> 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

Download attachment ".config.gz" of type "application/gzip" (50510 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ