[PATCH 2/2 V2] Support kdump when AMD secure memory encryption is active

lijiang lijiang at redhat.com
Thu Jun 14 06:59:06 PDT 2018


在 2018年06月14日 20:55, kbuild test robot 写道:
> Hi Lianbo,
> 
> Thank you for the patch! Yet something to improve:
> 
> [auto build test ERROR on linus/master]
> [also build test ERROR on v4.17 next-20180614]
> [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/Support-kdump-for-AMD-secure-memory-encryption-sme/20180614-164938
> config: i386-randconfig-c0-06141337 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> All errors (new ones prefixed by >>):
> 
>    fs/proc/vmcore.o: In function `read_from_oldmem':
>>> fs/proc/vmcore.c:127: undefined reference to `copy_oldmem_page_encrypted'
> 
It is strange, it doesn't have this error in my test. I will look for another environment to test
and see whether it can be reproduced.
Maybe the compile error will be fixed in the patch V3.

Thanks.
Lianbo 
> vim +127 fs/proc/vmcore.c
> 
>    100	
>    101	/* Reads a page from the oldmem device from given offset. */
>    102	static ssize_t read_from_oldmem(char *buf, size_t count,
>    103					u64 *ppos, int userbuf,
>    104					bool encrypted)
>    105	{
>    106		unsigned long pfn, offset;
>    107		size_t nr_bytes;
>    108		ssize_t read = 0, tmp;
>    109	
>    110		if (!count)
>    111			return 0;
>    112	
>    113		offset = (unsigned long)(*ppos % PAGE_SIZE);
>    114		pfn = (unsigned long)(*ppos / PAGE_SIZE);
>    115	
>    116		do {
>    117			if (count > (PAGE_SIZE - offset))
>    118				nr_bytes = PAGE_SIZE - offset;
>    119			else
>    120				nr_bytes = count;
>    121	
>    122			/* If pfn is not ram, return zeros for sparse dump files */
>    123			if (pfn_is_ram(pfn) == 0)
>    124				memset(buf, 0, nr_bytes);
>    125			else {
>    126				if (encrypted)
>  > 127					tmp = copy_oldmem_page_encrypted(pfn, buf,
>    128						       nr_bytes, offset, userbuf);
>    129				else
>    130					tmp = copy_oldmem_page(pfn, buf, nr_bytes,
>    131							offset, userbuf);
>    132	
>    133				if (tmp < 0)
>    134					return tmp;
>    135			}
>    136			*ppos += nr_bytes;
>    137			count -= nr_bytes;
>    138			buf += nr_bytes;
>    139			read += nr_bytes;
>    140			++pfn;
>    141			offset = 0;
>    142		} while (count);
>    143	
>    144		return read;
>    145	}
>    146	
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 



More information about the kexec mailing list