Re: [PATCH 1/2 v7] x86/kdump: always reserve the low 1MiB when the crashkernel option is specified
Hi Lianbo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.4-rc5 next-20191030] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Lianbo-Jiang/x86-kdump-Fix-kmem-s-reported-an-invalid-freepointer-when-SME-was-active/20191031-001903 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 32e72ec0613e164ce9608d865396fb2da278 config: i386-defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): In file included from arch/x86/realmode/init.c:11:0: >> arch/x86/include/asm/crash.h:5:32: warning: 'struct kimage' declared inside >> parameter list will not be visible outside of this definition or declaration int crash_load_segments(struct kimage *image); ^~ arch/x86/include/asm/crash.h:6:37: warning: 'struct kimage' declared inside parameter list will not be visible outside of this definition or declaration int crash_copy_backup_region(struct kimage *image); ^~ arch/x86/include/asm/crash.h:7:39: warning: 'struct kimage' declared inside parameter list will not be visible outside of this definition or declaration int crash_setup_memmap_entries(struct kimage *image, ^~ vim +5 arch/x86/include/asm/crash.h dd5f726076cc76 Vivek Goyal 2014-08-08 4 dd5f726076cc76 Vivek Goyal 2014-08-08 @5 int crash_load_segments(struct kimage *image); dd5f726076cc76 Vivek Goyal 2014-08-08 6 int crash_copy_backup_region(struct kimage *image); dd5f726076cc76 Vivek Goyal 2014-08-08 7 int crash_setup_memmap_entries(struct kimage *image, dd5f726076cc76 Vivek Goyal 2014-08-08 8 struct boot_params *params); 89f579ce99f7e0 Yi Wang 2018-11-22 9 void crash_smp_send_stop(void); dd5f726076cc76 Vivek Goyal 2014-08-08 10 :: The code at line 5 was first introduced by commit :: dd5f726076cc7639d9713b334c8c133f77c6757a kexec: support for kexec on panic using new system call :: TO: Vivek Goyal :: CC: Linus Torvalds --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] x86/kdump: always reserve the low 1MiB when the crashkernel
Hi lijiang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.4-rc4 next-20191024] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/lijiang/x86-kdump-always-reserve-the-low-1MiB-when-the-crashkernel/20191025-030439 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f116b96685a046a89c25d4a6ba2da489145c config: i386-defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): >> WARNING: vmlinux.o(.text+0xe39b7): Section mismatch in reference from the >> function kexec_reserve_low_1MiB() to the variable >> .init.data:boot_command_line The function kexec_reserve_low_1MiB() references the variable __initdata boot_command_line. This is often because kexec_reserve_low_1MiB lacks a __initdata annotation or the annotation of boot_command_line is wrong. -- >> WARNING: vmlinux.o(.text+0xe39d0): Section mismatch in reference from the >> function kexec_reserve_low_1MiB() to the function >> .meminit.text:memblock_reserve() The function kexec_reserve_low_1MiB() references the function __meminit memblock_reserve(). This is often because kexec_reserve_low_1MiB lacks a __meminit annotation or the annotation of memblock_reserve is wrong. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v6 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c
Hi Chen, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc6 next-20190830] [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/Chen-Zhou/support-reserving-crashkernel-above-4G-on-arm64-kdump/20190901-053351 config: um-i386_defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-11) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=um SUBARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): In file included from include/linux/crash_core.h:9:0, from kernel//printk/printk.c:37: arch/x86/include/asm/kexec.h: In function 'crash_setup_regs': arch/x86/include/asm/kexec.h:88:46: error: 'struct pt_regs' has no member named 'bx' asm volatile("movl %%ebx,%0" : "=m"(newregs->bx)); ^~ arch/x86/include/asm/kexec.h:89:46: error: 'struct pt_regs' has no member named 'cx' asm volatile("movl %%ecx,%0" : "=m"(newregs->cx)); ^~ arch/x86/include/asm/kexec.h:90:46: error: 'struct pt_regs' has no member named 'dx' asm volatile("movl %%edx,%0" : "=m"(newregs->dx)); ^~ arch/x86/include/asm/kexec.h:91:46: error: 'struct pt_regs' has no member named 'si' asm volatile("movl %%esi,%0" : "=m"(newregs->si)); ^~ arch/x86/include/asm/kexec.h:92:46: error: 'struct pt_regs' has no member named 'di' asm volatile("movl %%edi,%0" : "=m"(newregs->di)); ^~ arch/x86/include/asm/kexec.h:93:46: error: 'struct pt_regs' has no member named 'bp' asm volatile("movl %%ebp,%0" : "=m"(newregs->bp)); ^~ arch/x86/include/asm/kexec.h:94:46: error: 'struct pt_regs' has no member named 'ax' asm volatile("movl %%eax,%0" : "=m"(newregs->ax)); ^~ arch/x86/include/asm/kexec.h:95:46: error: 'struct pt_regs' has no member named 'sp' asm volatile("movl %%esp,%0" : "=m"(newregs->sp)); ^~ arch/x86/include/asm/kexec.h:96:49: error: 'struct pt_regs' has no member named 'ss' asm volatile("movl %%ss, %%eax;" :"=a"(newregs->ss)); ^~ arch/x86/include/asm/kexec.h:97:49: error: 'struct pt_regs' has no member named 'cs' asm volatile("movl %%cs, %%eax;" :"=a"(newregs->cs)); ^~ >> arch/x86/include/asm/kexec.h:98:49: error: 'struct pt_regs' has no member >> named 'ds' asm volatile("movl %%ds, %%eax;" :"=a"(newregs->ds)); ^~ >> arch/x86/include/asm/kexec.h:99:51: error: 'struct pt_regs' has no member >> named 'es'; did you mean 'regs'? asm volatile("movl %%es, %%eax;" :"=a"(newregs->es)); ^~ regs arch/x86/include/asm/kexec.h:100:47: error: 'struct pt_regs' has no member named 'flags' asm volatile("pushfl; popl %0" :"=m"(newregs->flags)); ^~ arch/x86/include/asm/kexec.h:122:10: error: 'struct pt_regs' has no member named 'ip' newregs->ip = _THIS_IP_; ^~ vim +98 arch/x86/include/asm/kexec.h dd5f726076cc76 arch/x86/include/asm/kexec.h Vivek Goyal 2014-08-08 75 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 76 /* 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 77 * This function is responsible for capturing register states if coming 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 78 * via panic otherwise just fix up the ss and sp if coming via kernel 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 79 * mode exception. 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 80 */ 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 81 static inline void crash_setup_regs(struct pt_regs *newregs, 3c233d1334ffc8 include/asm-x86/kexec.h Harvey Harrison 2008-01-30 82 struct pt_regs *oldregs) 3c233d1334ffc8
Re: [PATCH v6 1/4] x86: kdump: move reserve_crashkernel_low() into crash_core.c
Hi Chen, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc6 next-20190830] [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/Chen-Zhou/support-reserving-crashkernel-above-4G-on-arm64-kdump/20190901-053351 config: x86_64-randconfig-s0-09010004 (attached as .config) compiler: gcc-7 (Debian 7.4.0-11) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): ld: kernel/crash_core.o: in function `reserve_crashkernel_low': >> kernel/crash_core.c:354: undefined reference to `crashk_low_res' >> ld: kernel/crash_core.c:355: undefined reference to `crashk_low_res' vim +354 kernel/crash_core.c 296 297 int __init reserve_crashkernel_low(void) 298 { 299 #if defined(CONFIG_X86_64) || defined(CONFIG_ARM64) 300 unsigned long long base, low_base = 0, low_size = 0; 301 unsigned long total_low_mem; 302 int ret; 303 304 total_low_mem = memblock_mem_size(1UL << (32 - PAGE_SHIFT)); 305 306 /* crashkernel=Y,low */ 307 ret = parse_crashkernel_low(boot_command_line, total_low_mem, _size, 308 ); 309 if (ret) { 310 #ifdef CONFIG_X86_64 311 /* 312 * two parts from lib/swiotlb.c: 313 * -swiotlb size: user-specified with swiotlb= or default. 314 * 315 * -swiotlb overflow buffer: now hardcoded to 32k. We round it 316 * to 8M for other buffers that may need to stay low too. Also 317 * make sure we allocate enough extra low memory so that we 318 * don't run out of DMA buffers for 32-bit devices. 319 */ 320 low_size = max(swiotlb_size_or_default() + (8UL << 20), 321 256UL << 20); 322 #else 323 /* 324 * in arm64, reserve low memory if and only if crashkernel=X,low 325 * specified. 326 */ 327 return -EINVAL; 328 #endif 329 } else { 330 /* passed with crashkernel=0,low ? */ 331 if (!low_size) 332 return 0; 333 } 334 335 low_base = memblock_find_in_range(0, 1ULL << 32, low_size, CRASH_ALIGN); 336 if (!low_base) { 337 pr_err("Cannot reserve %ldMB crashkernel low memory, please try smaller size.\n", 338 (unsigned long)(low_size >> 20)); 339 return -ENOMEM; 340 } 341 342 ret = memblock_reserve(low_base, low_size); 343 if (ret) { 344 pr_err("%s: Error reserving crashkernel low memblock.\n", 345 __func__); 346 return ret; 347 } 348 349 pr_info("Reserving %ldMB of low memory at %ldMB for crashkernel (System low RAM: %ldMB)\n", 350 (unsigned long)(low_size >> 20), 351 (unsigned long)(low_base >> 20), 352 (unsigned long)(total_low_mem >> 20)); 353 > 354 crashk_low_res.start = low_base; > 355 crashk_low_res.end = low_base + low_size - 1; 356 #endif 357 return 0; 358 } 359 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 3/4] x86/smp: send capped cpus to a stable state when smp_init()
Hi Pingfan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc3 next-20190807] [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/Pingfan-Liu/x86-mce-protect-nr_cpus-from-rebooting-by-broadcast-mce/20190806-101748 config: i386-randconfig-a004-201931 (attached as .config) compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): ld: arch/x86/kernel/smpboot.o: in function `do_stable_cpu': >> arch/x86/kernel/smpboot.c:1057: undefined reference to `initial_gs' vim +1057 arch/x86/kernel/smpboot.c 1048 1049 static void __init do_stable_cpu(int cpu) 1050 { 1051 static char capped_tmp_stack[512]; 1052 int cpu0_nmi_registered = 0, apicid = cpuid_to_apicid[cpu]; 1053 unsigned long start_ip = real_mode_header->trampoline_start; 1054 unsigned long timeout, boot_error = 0; 1055 1056 /* invalid percpu area */ > 1057 initial_gs = 0; 1058 /* 1059 * Borrow the value of cpu 0. Since capped cpu segment shadow register 1060 * can cache the content, and keep it unchanged. 1061 */ 1062 early_gdt_descr.address = (unsigned long)get_cpu_gdt_rw(0); 1063 initial_code = (unsigned long)make_capped_cpu_stable; 1064 initial_stack = (unsigned long)_tmp_stack; 1065 1066 if (apic->wakeup_secondary_cpu) 1067 boot_error = apic->wakeup_secondary_cpu(apicid, start_ip); 1068 else 1069 boot_error = wakeup_cpu_via_init_nmi(cpu, start_ip, apicid, 1070 _nmi_registered); 1071 if (cpu0_nmi_registered) 1072 unregister_nmi_handler(NMI_LOCAL, "wake_cpu0"); 1073 1074 if (!boot_error) { 1075 /* Wait 10s total for first sign of life from capped cpu */ 1076 boot_error = -1; 1077 timeout = jiffies + 10*HZ; 1078 while (time_before(jiffies, timeout)) { 1079 if (cpumask_test_cpu(cpu, cpu_capped_done_mask)) 1080 break; 1081 schedule(); 1082 } 1083 } 1084 } 1085 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH 3/4] x86/smp: send capped cpus to a stable state when smp_init()
Hi Pingfan, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc3 next-20190807] [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/Pingfan-Liu/x86-mce-protect-nr_cpus-from-rebooting-by-broadcast-mce/20190806-101748 config: i386-defconfig (attached as .config) compiler: gcc-7 (Debian 7.4.0-10) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): ld: arch/x86/kernel/smpboot.o: in function `bring_capped_cpu_stable': >> smpboot.c:(.init.text+0x172): undefined reference to `initial_gs' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[RFC PATCH] x86/smp: __cpu_capped_done_mask can be static
Fixes: 946eeafe59c7 ("x86/smp: send capped cpus to a stable state when smp_init()") Signed-off-by: kbuild test robot --- common.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 1a62b37a36256..00374883fb842 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -69,7 +69,7 @@ cpumask_var_t cpu_callin_mask; /* size of NR_CPUS is required. */ struct cpumask __cpu_capped_mask __initdata; struct cpumask *cpu_capped_mask; -struct cpumask __cpu_capped_done_mask __initdata; +static struct cpumask __cpu_capped_done_mask __initdata; struct cpumask *cpu_capped_done_mask; /* representing cpus for which sibling maps can be computed */
Re: [PATCH 3/4] x86/smp: send capped cpus to a stable state when smp_init()
Hi Pingfan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.3-rc3 next-20190807] [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/Pingfan-Liu/x86-mce-protect-nr_cpus-from-rebooting-by-broadcast-mce/20190806-101748 reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) arch/x86/kernel/cpu/common.c:70:16: sparse: sparse: symbol '__cpu_capped_mask' was not declared. Should it be static? >> arch/x86/kernel/cpu/common.c:72:16: sparse: sparse: symbol >> '__cpu_capped_done_mask' was not declared. Should it be static? arch/x86/kernel/cpu/common.c:138:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:139:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:140:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:141:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:168:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:169:43: sparse: sparse: cast truncates bits from constant value (f becomes ) Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
[RFC PATCH] x86/apic: __cpu_capped_mask can be static
Fixes: 294b1ea98966 ("x86/apic: record capped cpu in generic_processor_info()") Signed-off-by: kbuild test robot --- common.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 4d87df5be9124..b95721e7376d4 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -67,7 +67,7 @@ cpumask_var_t cpu_initialized_mask; cpumask_var_t cpu_callout_mask; cpumask_var_t cpu_callin_mask; /* size of NR_CPUS is required. */ -struct cpumask __cpu_capped_mask __initdata; +static struct cpumask __cpu_capped_mask __initdata; struct cpumask *cpu_capped_mask; /* representing cpus for which sibling maps can be computed */ ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/4] x86/apic: record capped cpu in generic_processor_info()
Hi Pingfan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [cannot apply to v5.3-rc3 next-20190807] [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/Pingfan-Liu/x86-mce-protect-nr_cpus-from-rebooting-by-broadcast-mce/20190806-101748 reproduce: # apt-get install sparse # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty make ARCH=x86_64 allmodconfig make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> arch/x86/kernel/cpu/common.c:70:16: sparse: sparse: symbol >> '__cpu_capped_mask' was not declared. Should it be static? arch/x86/kernel/cpu/common.c:135:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:136:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:137:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:138:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:165:43: sparse: sparse: cast truncates bits from constant value (f becomes ) arch/x86/kernel/cpu/common.c:166:43: sparse: sparse: cast truncates bits from constant value (f becomes ) Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v2] lockdown: allow kexec_file of unsigned images when not under lockdown
Hi Thadeu, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.20-rc1 next-20181106] [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/Thadeu-Lima-de-Souza-Cascardo/lockdown-allow-kexec_file-of-unsigned-images-when-not-under-lockdown/20181106-081252 config: x86_64-fedora-25 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): kernel/kexec_file.c: In function 'kimage_file_prepare_segments': >> kernel/kexec_file.c:220:13: error: implicit declaration of function >> 'kernel_is_locked_down'; did you mean 'kernel_sigaction'? >> [-Werror=implicit-function-declaration] if (ret && kernel_is_locked_down("kexec of unsigned images")) ^ kernel_sigaction cc1: some warnings being treated as errors vim +220 kernel/kexec_file.c 180 181 /* 182 * In file mode list of segments is prepared by kernel. Copy relevant 183 * data from user space, do error checking, prepare segment list 184 */ 185 static int 186 kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, 187 const char __user *cmdline_ptr, 188 unsigned long cmdline_len, unsigned flags) 189 { 190 int ret = 0; 191 void *ldata; 192 loff_t size; 193 194 ret = kernel_read_file_from_fd(kernel_fd, >kernel_buf, 195 , INT_MAX, READING_KEXEC_IMAGE); 196 if (ret) 197 return ret; 198 image->kernel_buf_len = size; 199 200 /* IMA needs to pass the measurement list to the next kernel. */ 201 ima_add_kexec_buffer(image); 202 203 /* Call arch image probe handlers */ 204 ret = arch_kexec_kernel_image_probe(image, image->kernel_buf, 205 image->kernel_buf_len); 206 if (ret) 207 goto out; 208 209 #ifdef CONFIG_KEXEC_VERIFY_SIG 210 ret = arch_kexec_kernel_verify_sig(image, image->kernel_buf, 211 image->kernel_buf_len); 212 if (ret) { 213 pr_debug("kernel signature verification failed.\n"); 214 } else { 215 pr_debug("kernel signature verification successful.\n"); 216 } 217 #else 218 ret = -EPERM; 219 #endif > 220 if (ret && kernel_is_locked_down("kexec of unsigned images")) 221 goto out; 222 else 223 ret = 0; 224 225 /* It is possible that there no initramfs is being loaded */ 226 if (!(flags & KEXEC_FILE_NO_INITRAMFS)) { 227 ret = kernel_read_file_from_fd(initrd_fd, >initrd_buf, 228 , INT_MAX, 229 READING_KEXEC_INITRAMFS); 230 if (ret) 231 goto out; 232 image->initrd_buf_len = size; 233 } 234 235 if (cmdline_len) { 236 image->cmdline_buf = memdup_user(cmdline_ptr, cmdline_len); 237 if (IS_ERR(image->cmdline_buf)) { 238 ret = PTR_ERR(image->cmdline_buf); 239 image->cmdline_buf = NULL; 240 goto out; 241 } 242 243 image->cmdline_buf_len = cmdline_len; 244 245 /* command line should be a string with last byte null */ 246 if (image->cmdline_buf[cmdline_len - 1] != '\0') { 247 ret = -EINVAL; 248 goto out; 249 } 250 } 251 252 /* Call arch image load handlers */ 253 ldata = arch_kexec_kernel_image_load(image); 254 255 if (IS_ERR(ldata)) { 256 ret = PTR_ERR(ldata); 257 goto out; 258 } 259 260 image->image_loader_data = ldata; 261 out: 262 /* In case of error, free up all allocated memory in this function */ 263 if (ret) 264 kimage_file_post_load_cleanup(image); 265 return ret; 266 } 267 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
Re: [PATCH] lockdown: allow kexec_file of unsigned images when not under lockdown
Hi Thadeu, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19 next-20181102] [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/Thadeu-Lima-de-Souza-Cascardo/lockdown-allow-kexec_file-of-unsigned-images-when-not-under-lockdown/20181102-123838 config: x86_64-randconfig-x002-201843 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): In file included from include/asm-generic/bug.h:5:0, from arch/x86/include/asm/bug.h:47, from include/linux/bug.h:5, from include/linux/mmdebug.h:5, from include/linux/mm.h:9, from kernel/kexec_file.c:15: kernel/kexec_file.c: In function 'kimage_file_prepare_segments': >> kernel/kexec_file.c:222:13: error: implicit declaration of function >> 'kernel_is_locked_down'; did you mean 'kernel_sigaction'? >> [-Werror=implicit-function-declaration] if (ret && kernel_is_locked_down("kexec of unsigned images")) ^ include/linux/compiler.h:58:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> kernel/kexec_file.c:222:2: note: in expansion of macro 'if' if (ret && kernel_is_locked_down("kexec of unsigned images")) ^~ cc1: some warnings being treated as errors vim +222 kernel/kexec_file.c 182 183 /* 184 * In file mode list of segments is prepared by kernel. Copy relevant 185 * data from user space, do error checking, prepare segment list 186 */ 187 static int 188 kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, 189 const char __user *cmdline_ptr, 190 unsigned long cmdline_len, unsigned flags) 191 { 192 int ret = 0; 193 void *ldata; 194 loff_t size; 195 196 ret = kernel_read_file_from_fd(kernel_fd, >kernel_buf, 197 , INT_MAX, READING_KEXEC_IMAGE); 198 if (ret) 199 return ret; 200 image->kernel_buf_len = size; 201 202 /* IMA needs to pass the measurement list to the next kernel. */ 203 ima_add_kexec_buffer(image); 204 205 /* Call arch image probe handlers */ 206 ret = arch_kexec_kernel_image_probe(image, image->kernel_buf, 207 image->kernel_buf_len); 208 if (ret) 209 goto out; 210 211 #ifdef CONFIG_KEXEC_VERIFY_SIG 212 ret = arch_kexec_kernel_verify_sig(image, image->kernel_buf, 213 image->kernel_buf_len); 214 if (ret) { 215 pr_debug("kernel signature verification failed.\n"); 216 } else { 217 pr_debug("kernel signature verification successful.\n"); 218 } 219 #elif 220 ret = -EPERM; 221 #endif > 222 if (ret && kernel_is_locked_down("kexec of unsigned images")) 223 goto out; 224 else 225 ret = 0; 226 227 /* It is possible that there no initramfs is being loaded */ 228 if (!(flags & KEXEC_FILE_NO_INITRAMFS)) { 229 ret = kernel_read_file_from_fd(initrd_fd, >initrd_buf, 230 , INT_MAX, 231 READING_KEXEC_INITRAMFS); 232 if (ret) 233 goto out; 234 image->initrd_buf_len = size; 235 } 236 237 if (cmdline_len) { 238 image->cmdline_buf = memdup_user(cmdline_ptr, cmdline_len); 239 if (IS_ERR(image->cmdline_buf)) { 240 ret = PTR_ERR(image->cmdline_buf); 241 image->cmdline_buf = NULL; 242 goto out; 243 } 244 245 image->cmdline_buf_len = cmdline_len; 246 247 /* command line should be a string with last byte null */ 248 if (image->cmdline_buf[cmdline_len - 1] != '\0') { 249 ret = -EINVAL; 250 goto out; 251 } 252 } 253 254 /* Call arch image load handlers */ 255 ldata = arch_kexec_kernel_image_load(image); 256 257 if (IS_ERR(ldata)) { 258
Re: [PATCH] lockdown: allow kexec_file of unsigned images when not under lockdown
Hi Thadeu, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19 next-20181102] [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/Thadeu-Lima-de-Souza-Cascardo/lockdown-allow-kexec_file-of-unsigned-images-when-not-under-lockdown/20181102-123838 config: x86_64-randconfig-x009-201843 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): kernel/kexec_file.c: In function 'kimage_file_prepare_segments': >> kernel/kexec_file.c:219:6: error: #elif with no expression #elif ^ kernel/kexec_file.c:222:13: error: implicit declaration of function 'kernel_is_locked_down'; did you mean 'kernel_sigaction'? [-Werror=implicit-function-declaration] if (ret && kernel_is_locked_down("kexec of unsigned images")) ^ kernel_sigaction cc1: some warnings being treated as errors vim +219 kernel/kexec_file.c 182 183 /* 184 * In file mode list of segments is prepared by kernel. Copy relevant 185 * data from user space, do error checking, prepare segment list 186 */ 187 static int 188 kimage_file_prepare_segments(struct kimage *image, int kernel_fd, int initrd_fd, 189 const char __user *cmdline_ptr, 190 unsigned long cmdline_len, unsigned flags) 191 { 192 int ret = 0; 193 void *ldata; 194 loff_t size; 195 196 ret = kernel_read_file_from_fd(kernel_fd, >kernel_buf, 197 , INT_MAX, READING_KEXEC_IMAGE); 198 if (ret) 199 return ret; 200 image->kernel_buf_len = size; 201 202 /* IMA needs to pass the measurement list to the next kernel. */ 203 ima_add_kexec_buffer(image); 204 205 /* Call arch image probe handlers */ 206 ret = arch_kexec_kernel_image_probe(image, image->kernel_buf, 207 image->kernel_buf_len); 208 if (ret) 209 goto out; 210 211 #ifdef CONFIG_KEXEC_VERIFY_SIG 212 ret = arch_kexec_kernel_verify_sig(image, image->kernel_buf, 213 image->kernel_buf_len); 214 if (ret) { 215 pr_debug("kernel signature verification failed.\n"); 216 } else { 217 pr_debug("kernel signature verification successful.\n"); 218 } > 219 #elif 220 ret = -EPERM; 221 #endif 222 if (ret && kernel_is_locked_down("kexec of unsigned images")) 223 goto out; 224 else 225 ret = 0; 226 227 /* It is possible that there no initramfs is being loaded */ 228 if (!(flags & KEXEC_FILE_NO_INITRAMFS)) { 229 ret = kernel_read_file_from_fd(initrd_fd, >initrd_buf, 230 , INT_MAX, 231 READING_KEXEC_INITRAMFS); 232 if (ret) 233 goto out; 234 image->initrd_buf_len = size; 235 } 236 237 if (cmdline_len) { 238 image->cmdline_buf = memdup_user(cmdline_ptr, cmdline_len); 239 if (IS_ERR(image->cmdline_buf)) { 240 ret = PTR_ERR(image->cmdline_buf); 241 image->cmdline_buf = NULL; 242 goto out; 243 } 244 245 image->cmdline_buf_len = cmdline_len; 246 247 /* command line should be a string with last byte null */ 248 if (image->cmdline_buf[cmdline_len - 1] != '\0') { 249 ret = -EINVAL; 250 goto out; 251 } 252 } 253 254 /* Call arch image load handlers */ 255 ldata = arch_kexec_kernel_image_load(image); 256 257 if (IS_ERR(ldata)) { 258 ret = PTR_ERR(ldata); 259 goto out; 260 } 261 262 image->image_loader_data = ldata; 263 out: 264 /* In case of error, free up all allocated memory in this function */ 265 if (ret) 266 kimage_file_post_load_cleanup(image); 267 return ret; 268 } 269 --- 0-DAY kernel test infrastructureOpen Source Technology Center
Re: [PATCH] x86_64, vmcoreinfo: Append 'page_offset_base' to vmcoreinfo
Hi Bhupesh, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/x86/core] [also build test ERROR on v4.19 next-20181030] [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/Bhupesh-Sharma/x86_64-vmcoreinfo-Append-page_offset_base-to-vmcoreinfo/20181027-075816 config: x86_64-randconfig-s4-10301649 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): arch/x86/kernel/machine_kexec_64.o: In function `arch_crash_save_vmcoreinfo': >> arch/x86/kernel/machine_kexec_64.c:359: undefined reference to >> `page_offset_base' >> arch/x86/kernel/machine_kexec_64.c:359: undefined reference to >> `page_offset_base' vim +359 arch/x86/kernel/machine_kexec_64.c 352 353 void arch_crash_save_vmcoreinfo(void) 354 { 355 VMCOREINFO_NUMBER(phys_base); 356 VMCOREINFO_SYMBOL(init_top_pgt); 357 vmcoreinfo_append_str("NUMBER(pgtable_l5_enabled)=%d\n", 358 pgtable_l5_enabled()); > 359 VMCOREINFO_NUMBER(page_offset_base); 360 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v8 RESEND 4/4] kdump/vmcore: support encrypted old memory with SME enabled
Hi Lianbo, Thank you for the patch! Yet something to improve: [auto build test ERROR on sof-driver-fuweitax/master] [also build test ERROR on v4.19-rc5 next-20180928] [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/20180930-112044 base: https://github.com/fuweitax/linux master config: x86_64-randconfig-x005-201839 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> arch/x86//kernel/crash_dump_64.c:93:9: error: redefinition of >> 'copy_oldmem_page_encrypted' ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, ^~ In file included from arch/x86//kernel/crash_dump_64.c:10:0: include/linux/crash_dump.h:34:9: note: previous definition of 'copy_oldmem_page_encrypted' was here ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, ^~ vim +/copy_oldmem_page_encrypted +93 arch/x86//kernel/crash_dump_64.c 78 79 /** 80 * copy_oldmem_page_encrypted - copy one page from "old memory encrypted" 81 * @pfn: page frame number to be copied 82 * @buf: target memory address for the copy; this can be in kernel address 83 * space or user address space (see @userbuf) 84 * @csize: number of bytes to copy 85 * @offset: offset in bytes into the page (based on pfn) to begin the copy 86 * @userbuf: if set, @buf is in user address space, use copy_to_user(), 87 * otherwise @buf is in kernel address space, use memcpy(). 88 * 89 * Copy a page from "old memory encrypted". For this page, there is no pte 90 * mapped in the current kernel. We stitch up a pte, similar to 91 * kmap_atomic. 92 */ > 93 ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 4/4 v8] kdump/vmcore: support encrypted old memory with SME enabled
Hi Lianbo, Thank you for the patch! Yet something to improve: [auto build test ERROR on sof-driver-fuweitax/master] [also build test ERROR on v4.19-rc5 next-20180928] [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/20180930-001539 base: https://github.com/fuweitax/linux master config: i386-randconfig-x0-09300051 (attached as .config) compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010 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:115: undefined reference to `copy_oldmem_page_encrypted' vim +115 fs/proc/vmcore.c 88 89 /* Reads a page from the oldmem device from given offset. */ 90 static ssize_t read_from_oldmem(char *buf, size_t count, 91 u64 *ppos, int userbuf, 92 bool encrypted) 93 { 94 unsigned long pfn, offset; 95 size_t nr_bytes; 96 ssize_t read = 0, tmp; 97 98 if (!count) 99 return 0; 100 101 offset = (unsigned long)(*ppos % PAGE_SIZE); 102 pfn = (unsigned long)(*ppos / PAGE_SIZE); 103 104 do { 105 if (count > (PAGE_SIZE - offset)) 106 nr_bytes = PAGE_SIZE - offset; 107 else 108 nr_bytes = count; 109 110 /* If pfn is not ram, return zeros for sparse dump files */ 111 if (pfn_is_ram(pfn) == 0) 112 memset(buf, 0, nr_bytes); 113 else { 114 if (encrypted) > 115 tmp = copy_oldmem_page_encrypted(pfn, > buf, 116 nr_bytes, 117 offset, 118 userbuf); 119 else 120 tmp = copy_oldmem_page(pfn, buf, nr_bytes, 121 offset, userbuf); 122 123 if (tmp < 0) 124 return tmp; 125 } 126 *ppos += nr_bytes; 127 count -= nr_bytes; 128 buf += nr_bytes; 129 read += nr_bytes; 130 ++pfn; 131 offset = 0; 132 } while (count); 133 134 return read; 135 } 136 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v15 06/16] of/fdt: add helper functions for handling properties
Hi AKASHI, Thank you for the patch! Yet something to improve: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on v4.19-rc5 next-20180928] [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/AKASHI-Takahiro/arm64-kexec-add-kexec_file_load-support/20180928-151042 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: i386-randconfig-s0-201838 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/of/fdt.o: In function `fdt_setprop_reg': >> drivers/of/fdt.c:1358: undefined reference to `fdt_address_cells' >> drivers/of/fdt.c:1361: undefined reference to `fdt_size_cells' vim +1358 drivers/of/fdt.c 1348 1349 int fdt_setprop_reg(void *fdt, int nodeoffset, const char *name, 1350 u64 addr, u64 size) 1351 { 1352 int addr_cells, size_cells; 1353 char buf[sizeof(__be32) * 2 * 2]; 1354 /* assume dt_root_[addr|size]_cells <= 2 */ 1355 void *prop; 1356 size_t buf_size; 1357 > 1358 addr_cells = fdt_address_cells(fdt, 0); 1359 if (addr_cells < 0) 1360 return addr_cells; > 1361 size_cells = fdt_size_cells(fdt, 0); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.18-rc3 next-20180704] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180704-121402 config: ia64-allnoconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 8.1.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=8.1.0 make.cross ARCH=ia64 All errors (new ones prefixed by >>): arch/ia64/sn/kernel/io_init.c: In function 'sn_io_slot_fixup': >> arch/ia64/sn/kernel/io_init.c:195:19: error: invalid operands to binary && >> (have 'int' and 'struct list_head') if (res->parent && res->parent->child) ~~~ ^~ ~~ vim +195 arch/ia64/sn/kernel/io_init.c ^1da177e Linus Torvalds 2005-04-16 142 3ec829b6 John Keller 2005-11-29 143 /* 6f09a925 John Keller 2007-01-30 144 * sn_io_slot_fixup() - We are not running with an ACPI capable PROM, 8ea6091f John Keller 2006-10-04 145 * and need to convert the pci_dev->resource 8ea6091f John Keller 2006-10-04 146 * 'start' and 'end' addresses to mapped addresses, 8ea6091f John Keller 2006-10-04 147 * and setup the pci_controller->window array entries. ^1da177e Linus Torvalds 2005-04-16 148 */ 8ea6091f John Keller 2006-10-04 149 void 6f09a925 John Keller 2007-01-30 150 sn_io_slot_fixup(struct pci_dev *dev) ^1da177e Linus Torvalds 2005-04-16 151 { ^1da177e Linus Torvalds 2005-04-16 152int idx; ab97b8cc Bjorn Helgaas 2016-03-02 153struct resource *res; 18c25526 Matt Fleming2016-05-04 154unsigned long size; 6f09a925 John Keller 2007-01-30 155struct pcidev_info *pcidev_info; 6f09a925 John Keller 2007-01-30 156struct sn_irq_info *sn_irq_info; 6f09a925 John Keller 2007-01-30 157int status; 6f09a925 John Keller 2007-01-30 158 6f09a925 John Keller 2007-01-30 159pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL); 6f09a925 John Keller 2007-01-30 160if (!pcidev_info) d4ed8084 Harvey Harrison 2008-03-04 161panic("%s: Unable to alloc memory for pcidev_info", __func__); 6f09a925 John Keller 2007-01-30 162 6f09a925 John Keller 2007-01-30 163sn_irq_info = kzalloc(sizeof(struct sn_irq_info), GFP_KERNEL); 6f09a925 John Keller 2007-01-30 164if (!sn_irq_info) d4ed8084 Harvey Harrison 2008-03-04 165panic("%s: Unable to alloc memory for sn_irq_info", __func__); 6f09a925 John Keller 2007-01-30 166 6f09a925 John Keller 2007-01-30 167/* Call to retrieve pci device information needed by kernel. */ 6f09a925 John Keller 2007-01-30 168status = sal_get_pcidev_info((u64) pci_domain_nr(dev), 6f09a925 John Keller 2007-01-30 169(u64) dev->bus->number, 6f09a925 John Keller 2007-01-30 170dev->devfn, 6f09a925 John Keller 2007-01-30 171(u64) __pa(pcidev_info), 6f09a925 John Keller 2007-01-30 172(u64) __pa(sn_irq_info)); 6f09a925 John Keller 2007-01-30 173 80a03e29 Stoyan Gaydarov 2009-03-10 174BUG_ON(status); /* Cannot get platform pci device information */ 6f09a925 John Keller 2007-01-30 175 3ec829b6 John Keller 2005-11-29 176 ^1da177e Linus Torvalds 2005-04-16 177/* Copy over PIO Mapped Addresses */ ^1da177e Linus Torvalds 2005-04-16 178for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) { ab97b8cc Bjorn Helgaas 2016-03-02 179if (!pcidev_info->pdi_pio_mapped_addr[idx]) ^1da177e Linus Torvalds 2005-04-16 180continue; ^1da177e Linus Torvalds 2005-04-16 181 ab97b8cc Bjorn Helgaas 2016-03-02 182res = >resource[idx]; ab97b8cc Bjorn Helgaas 2016-03-02 183 ab97b8cc Bjorn Helgaas 2016-03-02 184size = res->end - res->start; ab97b8cc Bjorn Helgaas 2016-03-02 185if (size == 0) 3ec829b6 John Keller 2005-11-29 186continue; ab97b8cc Bjorn Helgaas 2016-03-02 187 240504ad Bjorn Helgaas 2016-03-02 188res->start = pcidev_info->pdi_pio_mapped_addr[idx]; 18c25526 Matt Fleming2016-05-04 189res->end = res->start + size; 64715725 Bernhard Walle 2007-03-18 190 64715725 Bernhard Walle 2007-03-18 191/* 64715725 Bernhard Walle 2007-03-18 192 * if it's already in the device structure, remove it before 64715725 Bernhard Walle 2007-03-18
Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.18-rc3 next-20180704] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180704-121402 config: mips-rb532_defconfig (attached as .config) compiler: mipsel-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=mips All error/warnings (new ones prefixed by >>): >> arch/mips/pci/pci-rc32434.c:57:11: error: initialization from incompatible >> pointer type [-Werror=incompatible-pointer-types] .child = _res_pci_mem2 ^ arch/mips/pci/pci-rc32434.c:57:11: note: (near initialization for 'rc32434_res_pci_mem1.child.next') >> arch/mips/pci/pci-rc32434.c:51:47: warning: missing braces around >> initializer [-Wmissing-braces] static struct resource rc32434_res_pci_mem1 = { ^ arch/mips/pci/pci-rc32434.c:60:47: warning: missing braces around initializer [-Wmissing-braces] static struct resource rc32434_res_pci_mem2 = { ^ cc1: some warnings being treated as errors vim +57 arch/mips/pci/pci-rc32434.c 73b4390f Ralf Baechle 2008-07-16 50 73b4390f Ralf Baechle 2008-07-16 @51 static struct resource rc32434_res_pci_mem1 = { 73b4390f Ralf Baechle 2008-07-16 52.name = "PCI MEM1", 73b4390f Ralf Baechle 2008-07-16 53.start = 0x5000, 73b4390f Ralf Baechle 2008-07-16 54.end = 0x5FFF, 73b4390f Ralf Baechle 2008-07-16 55.flags = IORESOURCE_MEM, 73b4390f Ralf Baechle 2008-07-16 56.sibling = NULL, 73b4390f Ralf Baechle 2008-07-16 @57.child = _res_pci_mem2 73b4390f Ralf Baechle 2008-07-16 58 }; 73b4390f Ralf Baechle 2008-07-16 59 :: The code at line 57 was first introduced by commit :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: Support for base system :: TO: Ralf Baechle :: CC: Ralf Baechle --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v5 4/8] firmware: add call to LSM hook before firmware sysfs fallback
Hi Mimi, I love your patch! Yet something to improve: [auto build test ERROR on integrity/next-integrity] [also build test ERROR on v4.18-rc3 next-20180702] [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/Mimi-Zohar/kexec-firmware-support-system-wide-policy-requiring-signatures/20180703-04 base: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity config: x86_64-randconfig-ws0-07031240 (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=x86_64 All errors (new ones prefixed by >>): >> ERROR: "security_kernel_load_data" >> [drivers/base/firmware_loader/firmware_class.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v5 8/8] module: replace the existing LSM hook in init_module
Hi Mimi, I love your patch! Perhaps something to improve: [auto build test WARNING on integrity/next-integrity] [also build test WARNING on v4.18-rc3 next-20180702] [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/Mimi-Zohar/kexec-firmware-support-system-wide-policy-requiring-signatures/20180703-04 base: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git next-integrity reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> security/loadpin/loadpin.c:178:40: sparse: mixing different enum types security/loadpin/loadpin.c:178:40: int enum kernel_load_data_id versus security/loadpin/loadpin.c:178:40: int enum kernel_read_file_id vim +178 security/loadpin/loadpin.c 175 176 static int loadpin_load_data(enum kernel_load_data_id id) 177 { > 178 return loadpin_read_file(NULL, id); 179 } 180 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
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: 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 infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
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 infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/2 V2] Support kdump when AMD secure memory encryption is active
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: arm-sa1100 (attached as .config) compiler: arm-linux-gnueabi-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=arm All errors (new ones prefixed by >>): fs/proc/vmcore.o: In function `read_from_oldmem.part.0': >> vmcore.c:(.text+0x1b4): undefined reference to `copy_oldmem_page_encrypted' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/2 V2] Support kdump when AMD secure memory encryption is active
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' 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 infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/2 V2] Support kdump when AMD secure memory encryption is active
Hi Lianbo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING 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 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ vim +904 drivers/iommu/amd_iommu_init.c 854 855 856 static bool copy_device_table(void) 857 { 858 u64 int_ctl, int_tab_len, entry = 0, last_entry = 0; 859 struct dev_table_entry *old_devtb = NULL; 860 u32 lo, hi, devid, old_devtb_size; 861 phys_addr_t old_devtb_phys; 862 struct amd_iommu *iommu; 863 u16 dom_id, dte_v, irq_v; 864 gfp_t gfp_flag; 865 u64 tmp; 866 867 if (!amd_iommu_pre_enabled) 868 return false; 869 870 pr_warn("Translation is already enabled - trying to copy translation structures\n"); 871 for_each_iommu(iommu) { 872 /* All IOMMUs should use the same device table with the same size */ 873 lo = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET); 874 hi = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET + 4); 875 entry = (((u64) hi) << 32) + lo; 876 if (last_entry && last_entry != entry) { 877 pr_err("IOMMU:%d should use the same dev table as others!\n", 878 iommu->index); 879 return false; 880 } 881 last_entry = entry; 882 883 old_devtb_size = ((entry & ~PAGE_MASK) + 1) << 12; 884 if (old_devtb_size != dev_table_size) { 885 pr_err("The device table size of IOMMU:%d is not expected!\n", 886 iommu->index); 887 return false; 888 } 889 } 890 891 old_devtb_phys = entry & PAGE_MASK; 892 /* 893 * When sme enable in the first kernel, old_devtb_phys includes the 894 * memory encryption mask(sme_me_mask), we must remove the memory 895 * encryption mask to obtain the true physical address in kdump mode. 896 */ 897 if (mem_encrypt_active() && is_kdump_kernel()) 898 old_devtb_phys = __sme_clr(old_devtb_phys); 899 if (old_devtb_phys >= 0x1ULL) { 900 pr_err("The address of old device table is above 4G, not trustworthy!\n"); 901 return false; 902 } 903 if (mem_encrypt_active() && is_kdump_kernel()) > 904 old_devtb = (void *)ioremap_encrypted(old_devtb_phys, 905 dev_table_size); 906 else 907 old_devtb = memremap(old_devtb_phys, 908 dev_table_size, MEMREMAP_WB); 909 if (!old_devtb) 910 return false; 911 912 gfp_flag = GFP_KERNEL | __GFP_ZERO | GFP_DMA32; 913 old_dev_tbl_cpy = (void *)__get_free_pages(gfp_flag, 914 get_order(dev_table_size)); 915 if (old_dev_tbl_cpy == NULL) { 916 pr_err("Failed to allocate memory for copying old device table!\n"); 917 return false; 918 } 919 920 for (devid = 0; devid <= amd_iommu_last_bdf; ++devid) { 921 old_dev_tbl_cpy[devid] = old_devtb[devid]; 922 dom_id = old_devtb[devid].data[1] & DEV_DOMID_MASK; 923 dte_v = old_devtb[devid].data[0] & DTE_FLAG_V; 924 925 if (dte_v && dom_id) { 926 old_dev_tbl_cpy[devid].data[0] = old_devtb[devid].data[0]; 927 old_dev_tbl_cpy[devid].data[1] = old_devtb[devid].data[1]; 928 __set_bit(dom_id, amd_iommu_pd_alloc_bitmap); 929 /* If gcr3 table existed, mask it out */ 930 if (old_devtb[devid].data[0] & DTE_FLAG_GV) { 931 tmp = DTE_GCR3_VAL_B(~0ULL) << DTE_GCR3_SHIFT_B; 932 tmp |= DTE_GCR3_VAL_C(~0ULL) << DTE_GCR3_SHIFT_C; 933 old_dev_tbl_cpy[devid].data[1] &= ~tmp; 934 tmp = DTE_GCR3_VAL_A(~0ULL) << DTE_GCR3_SHIFT_A; 935 tmp |= DTE_FLAG_GV; 936
Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17 next-20180608] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 config: i386-tinyconfig (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 >>): kernel/resource.c: In function 'reparent_resources': >> kernel/resource.c:1005:26: error: passing argument 2 of 'list_add' from >> incompatible pointer type [-Werror=incompatible-pointer-types] list_add(>sibling, >sibling.prev); ^ In file included from include/linux/ioport.h:15:0, from kernel/resource.c:14: include/linux/list.h:77:20: note: expected 'struct list_head *' but argument is of type 'struct list_head **' static inline void list_add(struct list_head *new, struct list_head *head) ^~~~ In file included from include/linux/list.h:9:0, from include/linux/ioport.h:15, from kernel/resource.c:14: >> kernel/resource.c:1013:26: error: 'new' undeclared (first use in this >> function); did you mean 'net'? list_for_each_entry(p, >child, sibling) { ^ include/linux/kernel.h:963:26: note: in definition of macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/list.h:377:2: note: in expansion of macro 'list_entry' list_entry((ptr)->next, type, member) ^~ include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~ kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(p, >child, sibling) { ^~~ kernel/resource.c:1013:26: note: each undeclared identifier is reported only once for each function it appears in list_for_each_entry(p, >child, sibling) { ^ include/linux/kernel.h:963:26: note: in definition of macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/list.h:377:2: note: in expansion of macro 'list_entry' list_entry((ptr)->next, type, member) ^~ include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~ kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(p, >child, sibling) { ^~~ cc1: some warnings being treated as errors vim +/list_add +1005 kernel/resource.c 983 984 /* 985 * Reparent resource children of pr that conflict with res 986 * under res, and make res replace those children. 987 */ 988 int reparent_resources(struct resource *parent, struct resource *res) 989 { 990 struct resource *p, *first = NULL; 991 992 list_for_each_entry(p, >child, sibling) { 993 if (p->end < res->start) 994 continue; 995 if (res->end < p->start) 996 break; 997 if (p->start < res->start || p->end > res->end) 998 return -1; /* not completely contained */ 999 if (first == NULL) 1000 first = p; 1001 } 1002 if (first == NULL) 1003 return -1; /* didn't find any conflicting entries? */ 1004 res->parent = parent; > 1005 list_add(>sibling, >sibling.prev); 1006 INIT_LIST_HEAD(>child); 1007 1008 /* 1009 * From first to p's previous sibling, they all fall into 1010 * res's region, change them as res's children. 1011 */ 1012 list_cut_position(>child, first->sibling.prev, res->sibling.prev); > 1013 list_for_each_entry(p, >child, sibling) { 1014 p->parent = new; 1015 pr_debug("PCI: Reparented %s %pR under %s\n", 1016 p->name, p, res->name); 1017 } 1018 return 0; 1019 } 1020 EXPORT_SYMBOL(reparent_resources); 1021 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org
Re: [PATCH v5 2/4] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.17 next-20180608] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 config: x86_64-randconfig-x011-201823 (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=x86_64 All warnings (new ones prefixed by >>): kernel/resource.c: In function 'reparent_resources': kernel/resource.c:1005:26: error: passing argument 2 of 'list_add' from incompatible pointer type [-Werror=incompatible-pointer-types] list_add(>sibling, >sibling.prev); ^ In file included from include/linux/ioport.h:15:0, from kernel/resource.c:14: include/linux/list.h:77:20: note: expected 'struct list_head *' but argument is of type 'struct list_head **' static inline void list_add(struct list_head *new, struct list_head *head) ^~~~ In file included from include/linux/list.h:9:0, from include/linux/ioport.h:15, from kernel/resource.c:14: kernel/resource.c:1013:26: error: 'new' undeclared (first use in this function); did you mean 'net'? list_for_each_entry(p, >child, sibling) { ^ include/linux/kernel.h:963:26: note: in definition of macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/list.h:377:2: note: in expansion of macro 'list_entry' list_entry((ptr)->next, type, member) ^~ include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~ >> kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(p, >child, sibling) { ^~~ kernel/resource.c:1013:26: note: each undeclared identifier is reported only once for each function it appears in list_for_each_entry(p, >child, sibling) { ^ include/linux/kernel.h:963:26: note: in definition of macro 'container_of' void *__mptr = (void *)(ptr); \ ^~~ include/linux/list.h:377:2: note: in expansion of macro 'list_entry' list_entry((ptr)->next, type, member) ^~ include/linux/list.h:464:13: note: in expansion of macro 'list_first_entry' for (pos = list_first_entry(head, typeof(*pos), member); \ ^~~~ >> kernel/resource.c:1013:2: note: in expansion of macro 'list_for_each_entry' list_for_each_entry(p, >child, sibling) { ^~~ cc1: some warnings being treated as errors vim +/list_for_each_entry +1013 kernel/resource.c 983 984 /* 985 * Reparent resource children of pr that conflict with res 986 * under res, and make res replace those children. 987 */ 988 int reparent_resources(struct resource *parent, struct resource *res) 989 { 990 struct resource *p, *first = NULL; 991 992 list_for_each_entry(p, >child, sibling) { 993 if (p->end < res->start) 994 continue; 995 if (res->end < p->start) 996 break; 997 if (p->start < res->start || p->end > res->end) 998 return -1; /* not completely contained */ 999 if (first == NULL) 1000 first = p; 1001 } 1002 if (first == NULL) 1003 return -1; /* didn't find any conflicting entries? */ 1004 res->parent = parent; 1005 list_add(>sibling, >sibling.prev); 1006 INIT_LIST_HEAD(>child); 1007 1008 /* 1009 * From first to p's previous sibling, they all fall into 1010 * res's region, change them as res's children. 1011 */ 1012 list_cut_position(>child, first->sibling.prev, res->sibling.prev); > 1013 list_for_each_entry(p, >child, sibling) { 1014 p->parent = new; 1015 pr_debug("PCI: Reparented %s %pR under %s\n", 1016 p->name, p, res->name); 1017 } 1018 return 0; 1019 } 1020 EXPORT_SYMBOL(reparent_resources); 1021 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org
Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17 next-20180608] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 config: i386-tinyconfig (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 Note: the linux-review/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180612-113600 HEAD 5545e79eef6387857faf41cdffa7be6b1f5d4efe builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): >> kernel/resource.c:990:12: error: static declaration of 'reparent_resources' >> follows non-static declaration static int reparent_resources(struct resource *parent, ^~ In file included from kernel/resource.c:14:0: include/linux/ioport.h:195:5: note: previous declaration of 'reparent_resources' was here int reparent_resources(struct resource *parent, struct resource *res); ^~ kernel/resource.c:990:12: warning: 'reparent_resources' defined but not used [-Wunused-function] static int reparent_resources(struct resource *parent, ^~ vim +/reparent_resources +990 kernel/resource.c 985 986 /* 987 * Reparent resource children of pr that conflict with res 988 * under res, and make res replace those children. 989 */ > 990 static int reparent_resources(struct resource *parent, 991 struct resource *res) 992 { 993 struct resource *p, **pp; 994 struct resource **firstpp = NULL; 995 996 for (pp = >child; (p = *pp) != NULL; pp = >sibling) { 997 if (p->end < res->start) 998 continue; 999 if (res->end < p->start) 1000 break; 1001 if (p->start < res->start || p->end > res->end) 1002 return -1; /* not completely contained */ 1003 if (firstpp == NULL) 1004 firstpp = pp; 1005 } 1006 if (firstpp == NULL) 1007 return -1; /* didn't find any conflicting entries? */ 1008 res->parent = parent; 1009 res->child = *firstpp; 1010 res->sibling = *pp; 1011 *firstpp = res; 1012 *pp = NULL; 1013 for (p = res->child; p != NULL; p = p->sibling) { 1014 p->parent = res; 1015 pr_debug("PCI: Reparented %s %pR under %s\n", 1016 p->name, p, res->name); 1017 } 1018 return 0; 1019 } 1020 EXPORT_SYMBOL(reparent_resources); 1021 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 2/2] support kdump when AMD secure memory encryption is active
Hi Lianbo, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.17-rc5 next-20180514] [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/support-kdump-for-AMD-secure-memory-encryption-sme/20180515-135732 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/iommu/amd_iommu_init.c:899:27: sparse: incorrect type in assignment >> (different address spaces) @@expected struct dev_table_entry *old_devtb >> @@got truct dev_table_entry *old_devtb @@ drivers/iommu/amd_iommu_init.c:899:27:expected struct dev_table_entry *old_devtb drivers/iommu/amd_iommu_init.c:899:27:got void [noderef] * drivers/iommu/amd_iommu_init.c:1740:39: sparse: expression using sizeof(void) drivers/iommu/amd_iommu_init.c:1740:39: sparse: expression using sizeof(void) drivers/iommu/amd_iommu_init.c:1750:49: sparse: expression using sizeof(void) drivers/iommu/amd_iommu_init.c:1750:49: sparse: expression using sizeof(void) drivers/iommu/amd_iommu_init.c:2950:18: sparse: symbol 'get_amd_iommu' was not declared. Should it be static? drivers/iommu/amd_iommu_init.c:2969:4: sparse: symbol 'amd_iommu_pc_get_max_banks' was not declared. Should it be static? drivers/iommu/amd_iommu_init.c:2980:6: sparse: symbol 'amd_iommu_pc_supported' was not declared. Should it be static? drivers/iommu/amd_iommu_init.c:2986:4: sparse: symbol 'amd_iommu_pc_get_max_counters' was not declared. Should it be static? drivers/iommu/amd_iommu_init.c:3035:5: sparse: symbol 'amd_iommu_pc_get_reg' was not declared. Should it be static? drivers/iommu/amd_iommu_init.c:3044:5: sparse: symbol 'amd_iommu_pc_set_reg' was not declared. Should it be static? vim +899 drivers/iommu/amd_iommu_init.c 854 855 856 static bool copy_device_table(void) 857 { 858 u64 int_ctl, int_tab_len, entry = 0, last_entry = 0; 859 struct dev_table_entry *old_devtb = NULL; 860 u32 lo, hi, devid, old_devtb_size; 861 phys_addr_t old_devtb_phys; 862 struct amd_iommu *iommu; 863 u16 dom_id, dte_v, irq_v; 864 gfp_t gfp_flag; 865 u64 tmp; 866 867 if (!amd_iommu_pre_enabled) 868 return false; 869 870 pr_warn("Translation is already enabled - trying to copy translation structures\n"); 871 for_each_iommu(iommu) { 872 /* All IOMMUs should use the same device table with the same size */ 873 lo = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET); 874 hi = readl(iommu->mmio_base + MMIO_DEV_TABLE_OFFSET + 4); 875 entry = (((u64) hi) << 32) + lo; 876 if (last_entry && last_entry != entry) { 877 pr_err("IOMMU:%d should use the same dev table as others!\n", 878 iommu->index); 879 return false; 880 } 881 last_entry = entry; 882 883 old_devtb_size = ((entry & ~PAGE_MASK) + 1) << 12; 884 if (old_devtb_size != dev_table_size) { 885 pr_err("The device table size of IOMMU:%d is not expected!\n", 886 iommu->index); 887 return false; 888 } 889 } 890 891 old_devtb_phys = entry & PAGE_MASK; 892 if (sme_active() && is_kdump_kernel()) 893 old_devtb_phys = __sme_clr(old_devtb_phys); 894 if (old_devtb_phys >= 0x1ULL) { 895 pr_err("The address of old device table is above 4G, not trustworthy!\n"); 896 return false; 897 } 898 if (sme_active() && is_kdump_kernel()) > 899 old_devtb = ioremap_encrypted(old_devtb_phys, 900 dev_table_size); 901 else 902 old_devtb = memremap(old_devtb_phys, 903 dev_table_size, MEMREMAP_WB); 904 if (!old_devtb) 905 return false; 906 907 gfp_flag = GFP_KERNEL | __GFP_ZERO | GFP_DMA32; 908 old_dev_tbl_cpy = (void *)__get_free_pages(gfp_flag, 909 get_order(dev_table_size)); 910 if (old_dev_tbl_cpy == NULL) { 911 pr_err("Failed to allocate memory for copying old device table!\n"); 912 return false; 913 } 914
Re: [PATCH v4 1/3] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc4 next-20180504] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180507-144345 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-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 make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/plat-samsung/pm-check.c: In function 's3c_pm_run_res': >> arch/arm/plat-samsung/pm-check.c:49:18: error: invalid operands to binary != >> (have 'struct list_head' and 'void *') if (ptr->child != NULL) ~~ ^~ >> arch/arm/plat-samsung/pm-check.c:50:19: error: incompatible type for >> argument 1 of 's3c_pm_run_res' s3c_pm_run_res(ptr->child, fn, arg); ^~~ arch/arm/plat-samsung/pm-check.c:46:13: note: expected 'struct resource *' but argument is of type 'struct list_head' static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) ^~ >> arch/arm/plat-samsung/pm-check.c:60:7: error: incompatible types when >> assigning to type 'struct resource *' from type 'struct list_head' ptr = ptr->sibling; ^ vim +49 arch/arm/plat-samsung/pm-check.c 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 45 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 46 static void s3c_pm_run_res(struct resource *ptr, run_fn_t fn, u32 *arg) 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 47 { 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 48 while (ptr != NULL) { 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 @49 if (ptr->child != NULL) 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 @50 s3c_pm_run_res(ptr->child, fn, arg); 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 51 05fee7cf arch/arm/plat-samsung/pm-check.c Toshi Kani 2016-01-26 52 if ((ptr->flags & IORESOURCE_SYSTEM_RAM) 05fee7cf arch/arm/plat-samsung/pm-check.c Toshi Kani 2016-01-26 53 == IORESOURCE_SYSTEM_RAM) { 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 54 S3C_PMDBG("Found system RAM at %08lx..%08lx\n", 840eeeb8 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 55 (unsigned long)ptr->start, 840eeeb8 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 56 (unsigned long)ptr->end); 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 57 arg = (fn)(ptr, arg); 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 58 } 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 59 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 @60 ptr = ptr->sibling; 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 61 } 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 62 } 549c7e33 arch/arm/plat-s3c/pm-check.c Ben Dooks 2008-12-12 63 :: The code at line 49 was first introduced by commit :: 549c7e33aeb9bfe441ecf68639d2227bb90978e7 [ARM] S3C: Split the resume memory check code from pm.c :: TO: Ben Dooks:: CC: Ben Dooks --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v4 1/3] resource: Use list_head to link sibling resource
Hi Baoquan, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.17-rc4 next-20180504] [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/Baoquan-He/resource-Use-list_head-to-link-sibling-resource/20180507-144345 config: powerpc-defconfig (attached as .config) compiler: powerpc64-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 make.cross ARCH=powerpc All errors (new ones prefixed by >>): arch/powerpc/kernel/pci-common.c: In function 'pci_process_bridge_OF_ranges': >> arch/powerpc/kernel/pci-common.c:764:44: error: incompatible types when >> assigning to type 'struct list_head' from type 'void *' res->parent = res->child = res->sibling = NULL; ^ arch/powerpc/kernel/pci-common.c: In function 'reparent_resources': >> arch/powerpc/kernel/pci-common.c:1100:10: error: assignment from >> incompatible pointer type [-Werror=incompatible-pointer-types] for (pp = >child; (p = *pp) != NULL; pp = >sibling) { ^ arch/powerpc/kernel/pci-common.c:1100:50: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types] for (pp = >child; (p = *pp) != NULL; pp = >sibling) { ^ >> arch/powerpc/kernel/pci-common.c:1113:13: error: incompatible types when >> assigning to type 'struct list_head' from type 'struct resource *' res->child = *firstpp; ^ arch/powerpc/kernel/pci-common.c:1114:15: error: incompatible types when assigning to type 'struct list_head' from type 'struct resource *' res->sibling = *pp; ^ >> arch/powerpc/kernel/pci-common.c:1117:9: error: incompatible types when >> assigning to type 'struct resource *' from type 'struct list_head' for (p = res->child; p != NULL; p = p->sibling) { ^ arch/powerpc/kernel/pci-common.c:1117:36: error: incompatible types when assigning to type 'struct resource *' from type 'struct list_head' for (p = res->child; p != NULL; p = p->sibling) { ^ cc1: all warnings being treated as errors vim +764 arch/powerpc/kernel/pci-common.c 13dccb9e Benjamin Herrenschmidt 2007-12-11 642 13dccb9e Benjamin Herrenschmidt 2007-12-11 643 /** 13dccb9e Benjamin Herrenschmidt 2007-12-11 644 * pci_process_bridge_OF_ranges - Parse PCI bridge resources from device tree 13dccb9e Benjamin Herrenschmidt 2007-12-11 645 * @hose: newly allocated pci_controller to be setup 13dccb9e Benjamin Herrenschmidt 2007-12-11 646 * @dev: device node of the host bridge 13dccb9e Benjamin Herrenschmidt 2007-12-11 647 * @primary: set if primary bus (32 bits only, soon to be deprecated) 13dccb9e Benjamin Herrenschmidt 2007-12-11 648 * 13dccb9e Benjamin Herrenschmidt 2007-12-11 649 * This function will parse the "ranges" property of a PCI host bridge device 13dccb9e Benjamin Herrenschmidt 2007-12-11 650 * node and setup the resource mapping of a pci controller based on its 13dccb9e Benjamin Herrenschmidt 2007-12-11 651 * content. 13dccb9e Benjamin Herrenschmidt 2007-12-11 652 * 13dccb9e Benjamin Herrenschmidt 2007-12-11 653 * Life would be boring if it wasn't for a few issues that we have to deal 13dccb9e Benjamin Herrenschmidt 2007-12-11 654 * with here: 13dccb9e Benjamin Herrenschmidt 2007-12-11 655 * 13dccb9e Benjamin Herrenschmidt 2007-12-11 656 * - We can only cope with one IO space range and up to 3 Memory space 13dccb9e Benjamin Herrenschmidt 2007-12-11 657 * ranges. However, some machines (thanks Apple !) tend to split their 13dccb9e Benjamin Herrenschmidt 2007-12-11 658 * space into lots of small contiguous ranges. So we have to coalesce. 13dccb9e Benjamin Herrenschmidt 2007-12-11 659 * 13dccb9e Benjamin Herrenschmidt 2007-12-11 660 * - Some busses have IO space not starting at 0, which causes trouble with 13dccb9e Benjamin Herrenschmidt 2007-12-11 661 * the way we do our IO resource renumbering. The code somewhat deals with 13dccb9e Benjamin Herrenschmidt 2007-12-11 662 * it for 64 bits but I would expect problems on 32 bits. 13dccb9e Benjamin Herrenschmidt 2007-12-11 663 * 13dccb9e Benjamin Herrenschmidt 2007-12-11 664 * - Some 32 bits platforms such as 4xx can have physical space larger than 13dccb9e Benjamin Herrenschmidt 2007-12-11 665 * 32 bits so we need to use 64 bits values for the parsing 13dccb9e Benjamin Herrenschmidt 2007-12-11 666 */ cad5cef6 Greg Kroah-Hartman 2012-12-21 667 void pci_process_bridge_OF_ranges(struct pci_controller *hose, cad5cef6
Re: [PATCH net-next v7 1/3] vmcore: add API to collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/vmcore-add-API-to-collect-hardware-dump-in-second-kernel/20180502-023638 config: i386-tinyconfig (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 warnings (new ones prefixed by >>): >> ./usr/include/linux/vmcore.h:9: found __[us]{8,16,32,64} type without >> #include --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH net-next v3 3/3] cxgb4: collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/kernel-add-support-to-collect-hardware-logs-in-crash-recovery-kernel/20180401-060904 config: sparc64-allyesconfig (attached as .config) compiler: sparc64-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 make.cross ARCH=sparc64 All errors (new ones prefixed by >>): `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o: In function `cxgb4_cudbg_vmcore_add_dump': >> cxgb4_cudbg.c:(.text+0x9ec): undefined reference to `vmcore_add_device_dump' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH net-next v3 3/3] cxgb4: collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/kernel-add-support-to-collect-hardware-logs-in-crash-recovery-kernel/20180401-060904 config: tile-allyesconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 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 make.cross ARCH=tile All errors (new ones prefixed by >>): `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.o: In function `cxgb4_cudbg_vmcore_add_dump': >> (.text+0xed0): undefined reference to `vmcore_add_device_dump' drivers/net/wireless/mediatek/mt76/mac80211.o: In function `mt76_init_stream_cap.isra.1': mac80211.c:(.text+0x8a8): undefined reference to `__sw_hweight8' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
[RFC PATCH] vmcore: __vmcore_add_device_dump() can be static
Fixes: 6bf7e2b7f850 ("vmcore: add API to collect hardware dump in second kernel") Signed-off-by: Fengguang Wu--- vmcore.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index b53698f..fe788dd 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c @@ -1196,7 +1196,7 @@ static void vmcoredd_write_note(const char *name, void *buf, size_t size) * Write Elf note at the beginning of the buffer to indicate vmcore device * dump and add the dump to global list. */ -int __vmcore_add_device_dump(struct vmcoredd_data *data) +static int __vmcore_add_device_dump(struct vmcoredd_data *data) { size_t note_size, data_size; struct vmcoredd_node *dump; ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH net-next v3 1/3] vmcore: add API to collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/kernel-add-support-to-collect-hardware-logs-in-crash-recovery-kernel/20180401-060904 reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> fs/proc/vmcore.c:1199:5: sparse: symbol '__vmcore_add_device_dump' was not >> declared. Should it be static? Please review and possibly fold the followup patch. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH net-next v2 1/2] fs/crashdd: add API to collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/fs-crashdd-add-API-to-collect-hardware-dump-in-second-kernel/20180325-191308 config: i386-randconfig-s0-03251817 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from fs//crashdd/crashdd.c:8:0: fs//crashdd/crashdd_internal.h:13:23: error: field 'bin_attr' has incomplete type struct bin_attribute bin_attr; /* Binary dump file's attributes */ ^~~~ fs//crashdd/crashdd.c: In function 'crashdd_read': fs//crashdd/crashdd.c:19:43: error: dereferencing pointer to incomplete type 'struct bin_attribute' struct crashdd_dump_node *dump = bin_attr->private; ^~ fs//crashdd/crashdd.c: In function 'crashdd_mkdir': fs//crashdd/crashdd.c:27:9: error: implicit declaration of function 'kobject_create_and_add' [-Werror=implicit-function-declaration] return kobject_create_and_add(name, crashdd_kobj); ^~ fs//crashdd/crashdd.c:27:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return kobject_create_and_add(name, crashdd_kobj); ^~ fs//crashdd/crashdd.c: In function 'crashdd_add_file': fs//crashdd/crashdd.c:39:9: error: implicit declaration of function 'sysfs_create_bin_file' [-Werror=implicit-function-declaration] return sysfs_create_bin_file(kobj, >bin_attr); ^ fs//crashdd/crashdd.c: In function 'crashdd_rmdir': fs//crashdd/crashdd.c:44:2: error: implicit declaration of function 'kobject_put' [-Werror=implicit-function-declaration] kobject_put(kobj); ^~~ In file included from include/linux/kernel.h:10:0, from include/linux/list.h:9, from include/linux/preempt.h:11, from include/linux/spinlock.h:51, from include/linux/vmalloc.h:5, from fs//crashdd/crashdd.c:4: fs//crashdd/crashdd.c: In function 'crashdd_get_driver': fs//crashdd/crashdd.c:101:25: error: dereferencing pointer to incomplete type 'struct kobject' if (!strcmp(node->kobj->name, name)) { ^ include/linux/compiler.h:58:30: note: in definition of macro '__trace_if' if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ ^~~~ >> fs//crashdd/crashdd.c:101:3: note: in expansion of macro 'if' if (!strcmp(node->kobj->name, name)) { ^~ fs//crashdd/crashdd.c: In function 'crashdd_init': fs//crashdd/crashdd.c:227:51: error: 'kernel_kobj' undeclared (first use in this function) crashdd_kobj = kobject_create_and_add("crashdd", kernel_kobj); ^~~ fs//crashdd/crashdd.c:227:51: note: each undeclared identifier is reported only once for each function it appears in fs//crashdd/crashdd.c: In function 'crashdd_add_file': fs//crashdd/crashdd.c:40:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors vim +/if +101 fs//crashdd/crashdd.c 3 > 4 #include 5 #include 6 #include 7 8 #include "crashdd_internal.h" 9 10 static LIST_HEAD(crashdd_list); 11 static DEFINE_MUTEX(crashdd_mutex); 12 13 static struct kobject *crashdd_kobj; 14 15 static ssize_t crashdd_read(struct file *filp, struct kobject *kobj, 16 struct bin_attribute *bin_attr, 17 char *buf, loff_t fpos, size_t count) 18 { 19 struct crashdd_dump_node *dump = bin_attr->private; 20 21 memcpy(buf, dump->buf + fpos, count); 22 return count; 23 } 24 25 static struct kobject *crashdd_mkdir(const char *name) 26 { 27 return kobject_create_and_add(name, crashdd_kobj); 28 } 29 30 static int crashdd_add_file(struct kobject *kobj, const char *name, 31 struct crashdd_dump_node *dump) 32 { 33 dump->bin_attr.attr.name = name; 34 dump->bin_attr.attr.mode = 0444; 35 dump->bin_attr.size = dump->size; 36 dump->bin_attr.read = crashdd_read; 37 dump->bin_attr.private = dump; 38 39 return sysfs_create_bin_file(kobj, >bin_attr); 40 } 41 42 static void crashdd_rmdir(struct kobject *kobj) 43 { 44 kobject_put(kobj); 45 } 46 47 /** 48 * crashdd_init_driver -
Re: [PATCH net-next 1/2] fs/crashdd: add API to collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/fs-crashdd-add-API-to-collect-hardware-dump-in-second-kernel/20180324-193856 config: i386-randconfig-n0-201811 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from fs/crashdd/crashdd.c:8:0: >> fs/crashdd/crashdd_internal.h:13:23: error: field 'bin_attr' has incomplete >> type struct bin_attribute bin_attr; /* Binary dump file's attributes */ ^~~~ fs/crashdd/crashdd.c: In function 'crashdd_read': >> fs/crashdd/crashdd.c:20:43: error: dereferencing pointer to incomplete type >> 'struct bin_attribute' struct crashdd_dump_node *dump = bin_attr->private; ^~ fs/crashdd/crashdd.c: In function 'crashdd_mkdir': >> fs/crashdd/crashdd.c:28:9: error: implicit declaration of function >> 'kobject_create_and_add'; did you mean 'proc_create_data'? >> [-Werror=implicit-function-declaration] return kobject_create_and_add(name, crashdd_kobj); ^~ proc_create_data >> fs/crashdd/crashdd.c:28:9: warning: return makes pointer from integer >> without a cast [-Wint-conversion] return kobject_create_and_add(name, crashdd_kobj); ^~ fs/crashdd/crashdd.c: In function 'crashdd_add_file': >> fs/crashdd/crashdd.c:40:9: error: implicit declaration of function >> 'sysfs_create_bin_file' [-Werror=implicit-function-declaration] return sysfs_create_bin_file(kobj, >bin_attr); ^ fs/crashdd/crashdd.c: In function 'crashdd_rmdir': >> fs/crashdd/crashdd.c:45:2: error: implicit declaration of function >> 'kobject_put'; did you mean 'kref_put'? >> [-Werror=implicit-function-declaration] kobject_put(kobj); ^~~ kref_put fs/crashdd/crashdd.c: In function 'crashdd_get_driver': >> fs/crashdd/crashdd.c:102:25: error: dereferencing pointer to incomplete type >> 'struct kobject' if (!strcmp(node->kobj->name, name)) { ^~ fs/crashdd/crashdd.c: In function 'crashdd_init': >> fs/crashdd/crashdd.c:228:51: error: 'kernel_kobj' undeclared (first use in >> this function); did you mean 'kernel_read'? crashdd_kobj = kobject_create_and_add("crashdd", kernel_kobj); ^~~ kernel_read fs/crashdd/crashdd.c:228:51: note: each undeclared identifier is reported only once for each function it appears in fs/crashdd/crashdd.c: In function 'crashdd_add_file': >> fs/crashdd/crashdd.c:41:1: warning: control reaches end of non-void function >> [-Wreturn-type] } ^ cc1: some warnings being treated as errors vim +/bin_attr +13 fs/crashdd/crashdd_internal.h 6 7 /* Binary dump file's context internal to crashdd */ 8 struct crashdd_dump_node { 9 /* Pointer to list of dumps under the driver sysfs entry */ 10 struct list_head list; 11 void *buf; /* Buffer containing device's dump */ 12 unsigned long size;/* Size of the buffer */ > 13 struct bin_attribute bin_attr; /* Binary dump file's attributes */ 14 }; 15 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH net-next 1/2] fs/crashdd: add API to collect hardware dump in second kernel
Hi Rahul, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Rahul-Lakkireddy/fs-crashdd-add-API-to-collect-hardware-dump-in-second-kernel/20180324-193856 config: i386-randconfig-s0-201811 (attached as .config) compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): In file included from fs/crashdd/crashdd.c:8:0: fs/crashdd/crashdd_internal.h:13:23: error: field 'bin_attr' has incomplete type struct bin_attribute bin_attr; /* Binary dump file's attributes */ ^~~~ fs/crashdd/crashdd.c: In function 'crashdd_read': fs/crashdd/crashdd.c:20:43: error: dereferencing pointer to incomplete type 'struct bin_attribute' struct crashdd_dump_node *dump = bin_attr->private; ^~ fs/crashdd/crashdd.c: In function 'crashdd_mkdir': >> fs/crashdd/crashdd.c:28:9: error: implicit declaration of function >> 'kobject_create_and_add' [-Werror=implicit-function-declaration] return kobject_create_and_add(name, crashdd_kobj); ^~ fs/crashdd/crashdd.c:28:9: warning: return makes pointer from integer without a cast [-Wint-conversion] return kobject_create_and_add(name, crashdd_kobj); ^~ fs/crashdd/crashdd.c: In function 'crashdd_add_file': fs/crashdd/crashdd.c:40:9: error: implicit declaration of function 'sysfs_create_bin_file' [-Werror=implicit-function-declaration] return sysfs_create_bin_file(kobj, >bin_attr); ^ fs/crashdd/crashdd.c: In function 'crashdd_rmdir': >> fs/crashdd/crashdd.c:45:2: error: implicit declaration of function >> 'kobject_put' [-Werror=implicit-function-declaration] kobject_put(kobj); ^~~ fs/crashdd/crashdd.c: In function 'crashdd_get_driver': fs/crashdd/crashdd.c:102:25: error: dereferencing pointer to incomplete type 'struct kobject' if (!strcmp(node->kobj->name, name)) { ^~ fs/crashdd/crashdd.c: In function 'crashdd_init': >> fs/crashdd/crashdd.c:228:51: error: 'kernel_kobj' undeclared (first use in >> this function) crashdd_kobj = kobject_create_and_add("crashdd", kernel_kobj); ^~~ fs/crashdd/crashdd.c:228:51: note: each undeclared identifier is reported only once for each function it appears in fs/crashdd/crashdd.c: In function 'crashdd_add_file': fs/crashdd/crashdd.c:41:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ cc1: some warnings being treated as errors vim +/kobject_create_and_add +28 fs/crashdd/crashdd.c 7 > 8 #include "crashdd_internal.h" 9 10 static LIST_HEAD(crashdd_list); 11 static DEFINE_MUTEX(crashdd_mutex); 12 13 #define CRASHDD_SYSFS_MODE 444 /* S_IRUGO */ 14 static struct kobject *crashdd_kobj; 15 16 static ssize_t crashdd_read(struct file *filp, struct kobject *kobj, 17 struct bin_attribute *bin_attr, 18 char *buf, loff_t fpos, size_t count) 19 { 20 struct crashdd_dump_node *dump = bin_attr->private; 21 22 memcpy(buf, dump->buf + fpos, count); 23 return count; 24 } 25 26 static struct kobject *crashdd_mkdir(const char *name) 27 { > 28 return kobject_create_and_add(name, crashdd_kobj); 29 } 30 31 static int crashdd_add_file(struct kobject *kobj, const char *name, 32 struct crashdd_dump_node *dump) 33 { 34 dump->bin_attr.attr.name = name; 35 dump->bin_attr.attr.mode = CRASHDD_SYSFS_MODE; 36 dump->bin_attr.size = dump->size; 37 dump->bin_attr.read = crashdd_read; 38 dump->bin_attr.private = dump; 39 40 return sysfs_create_bin_file(kobj, >bin_attr); 41 } 42 43 static void crashdd_rmdir(struct kobject *kobj) 44 { > 45 kobject_put(kobj); 46 } 47 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCHv5 1/3] powerpc, cpu: partially unbind the mapping between cpu logical id and its seq in dt
Hi Pingfan, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180319] [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/Pingfan-Liu/enable-nr_cpus-for-powerpc/20180318-041117 config: powerpc-tqm8548_defconfig (attached as .config) compiler: powerpc-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 make.cross ARCH=powerpc All errors (new ones prefixed by >>): >> arch/powerpc/kernel/prom.c:79:23: error: 'boot_cpu_count' defined but not >> used [-Werror=unused-variable] static int __initdata boot_cpu_count; ^~ cc1: all warnings being treated as errors vim +/boot_cpu_count +79 arch/powerpc/kernel/prom.c 9b6b563c Paul Mackerras 2005-10-06 71 9b6b563c Paul Mackerras 2005-10-06 72 #ifdef CONFIG_PPC64 28897731 Olof Johansson 2006-04-12 73 int __initdata iommu_is_off; 9b6b563c Paul Mackerras 2005-10-06 74 int __initdata iommu_force_on; cf00a8d1 Paul Mackerras 2005-10-31 75 unsigned long tce_alloc_start, tce_alloc_end; cd3db0c4 Benjamin Herrenschmidt 2010-07-06 76 u64 ppc64_rma_size; 9b6b563c Paul Mackerras 2005-10-06 77 #endif 03bf469a Benjamin Herrenschmidt 2011-05-11 78 static phys_addr_t first_memblock_size; 7ac87abb Matt Evans 2011-05-25 @79 static int __initdata boot_cpu_count; 9b6b563c Paul Mackerras 2005-10-06 80 :: The code at line 79 was first introduced by commit :: 7ac87abb8166b99584149fcfb2efef5773a078e9 powerpc: Fix early boot accounting of CPUs :: TO: Matt Evans:: CC: Benjamin Herrenschmidt --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCHv4 1/3] powerpc, cpu: partially unbind the mapping between cpu logical id and its seq in dt
Hi Pingfan, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180309] [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/Pingfan-Liu/powerpc-cpu-partially-unbind-the-mapping-between-cpu-logical-id-and-its-seq-in-dt/20180313-034420 config: powerpc-pq2fads_defconfig (attached as .config) compiler: powerpc-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 make.cross ARCH=powerpc All errors (new ones prefixed by >>): >> arch/powerpc/kernel/prom.c:79:23: error: 'boot_cpu_count' defined but not >> used [-Werror=unused-variable] static int __initdata boot_cpu_count; ^~ cc1: all warnings being treated as errors vim +/boot_cpu_count +79 arch/powerpc/kernel/prom.c 9b6b563c Paul Mackerras 2005-10-06 71 9b6b563c Paul Mackerras 2005-10-06 72 #ifdef CONFIG_PPC64 28897731 Olof Johansson 2006-04-12 73 int __initdata iommu_is_off; 9b6b563c Paul Mackerras 2005-10-06 74 int __initdata iommu_force_on; cf00a8d1 Paul Mackerras 2005-10-31 75 unsigned long tce_alloc_start, tce_alloc_end; cd3db0c4 Benjamin Herrenschmidt 2010-07-06 76 u64 ppc64_rma_size; 9b6b563c Paul Mackerras 2005-10-06 77 #endif 03bf469a Benjamin Herrenschmidt 2011-05-11 78 static phys_addr_t first_memblock_size; 7ac87abb Matt Evans 2011-05-25 @79 static int __initdata boot_cpu_count; 9b6b563c Paul Mackerras 2005-10-06 80 :: The code at line 79 was first introduced by commit :: 7ac87abb8166b99584149fcfb2efef5773a078e9 powerpc: Fix early boot accounting of CPUs :: TO: Matt Evans:: CC: Benjamin Herrenschmidt --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 07/11] kexec_file: Simplify kexec_purgatory_setup_sechdrs 1
Hi Philipp, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc3 next-20180228] [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/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 config: x86_64-randconfig-s4-03010216 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 Note: the linux-review/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 HEAD 28c77b126e4b2796074bd704e2370a38beb037c1 builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): kernel/kexec_file.c: In function 'kexec_purgatory_setup_sechdrs': >> kernel/kexec_file.c:798:3: error: expected ';' before '}' token } ^ vim +798 kernel/kexec_file.c 713 714 /* 715 * kexec_purgatory_setup_sechdrs - prepares the pi->sechdrs buffer. 716 * @pi: Purgatory to be loaded. 717 * @kbuf: Buffer prepared to store purgatory. 718 * 719 * Allocates the memory needed for the buffer. Caller is responsible to free 720 * the memory after use. 721 * 722 * Return: 0 on success, negative errno on error. 723 */ 724 static int kexec_purgatory_setup_sechdrs(struct purgatory_info *pi, 725 struct kexec_buf *kbuf) 726 { 727 unsigned long curr_load_addr; 728 unsigned long load_addr; 729 unsigned long bss_addr; 730 unsigned long offset; 731 unsigned char *buf_addr; 732 unsigned char *src; 733 Elf_Shdr *sechdrs; 734 int i; 735 736 sechdrs = vzalloc(pi->ehdr->e_shnum * sizeof(Elf_Shdr)); 737 if (!sechdrs) 738 return -ENOMEM; 739 memcpy(sechdrs, (void *)pi->ehdr + pi->ehdr->e_shoff, 740 pi->ehdr->e_shnum * sizeof(Elf_Shdr)); 741 pi->sechdrs = sechdrs; 742 743 /* 744 * We seem to have multiple copies of sections. First copy is which 745 * is embedded in kernel in read only section. Some of these sections 746 * will be copied to a temporary buffer and relocated. And these 747 * sections will finally be copied to their final destination at 748 * segment load time. 749 * 750 * Use ->sh_offset to reflect section address in memory. It will 751 * point to original read only copy if section is not allocatable. 752 * Otherwise it will point to temporary copy which will be relocated. 753 * 754 * Use ->sh_addr to contain final address of the section where it 755 * will go during execution time. 756 */ 757 for (i = 0; i < pi->ehdr->e_shnum; i++) { 758 if (sechdrs[i].sh_type == SHT_NOBITS) 759 continue; 760 761 sechdrs[i].sh_offset = (unsigned long)pi->ehdr + 762 sechdrs[i].sh_offset; 763 } 764 765 /* Load SHF_ALLOC sections */ 766 buf_addr = kbuf->buffer; 767 load_addr = curr_load_addr = kbuf->mem; 768 bss_addr = load_addr + kbuf->bufsz; 769 kbuf->image->start = pi->ehdr->e_entry; 770 771 for (i = 0; i < pi->ehdr->e_shnum; i++) { 772 unsigned long align; 773 774 if (!(sechdrs[i].sh_flags & SHF_ALLOC)) 775 continue; 776 777 align = sechdrs[i].sh_addralign; 778 779 if (sechdrs[i].sh_type == SHT_NOBITS) { 780 bss_addr = ALIGN(bss_addr, align); 781 sechdrs[i].sh_addr = bss_addr; 782 bss_addr += sechdrs[i].sh_size; 783 continue; 784 } 785 786 curr_load_addr = ALIGN(curr_load_addr, align); 787 offset = curr_load_addr - load_addr; 788 /* We already modifed ->sh_offset to keep src addr */ 789 src = (char *)sechdrs[i].sh_offset; 790 memcpy(buf_addr + offset, src, sechdrs[i].sh_size); 791 792 if (sechdrs[i].sh_flags & SHF_EXECINSTR && 793 pi->ehdr->e_entry >= sechdrs[i].sh_addr && 794 pi->ehdr->e_entry < (sechdrs[i].sh_addr 795 + sechdrs[i].sh_size)) { 796 kbuf->image->start -= sechdrs[i].sh_addr; 797
Re: [PATCH 10/11] kexec_file: Allow archs to set purgatory load address
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [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/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 config: x86_64-randconfig-x015-201808 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from arch/x86/kernel/traps.c:30:0: >> include/linux/kexec.h:237:62: warning: 'struct kexec_buf' declared inside >> parameter list will not be visible outside of this definition or declaration extern int kexec_load_purgatory(struct kimage *image, struct kexec_buf *kbuf); ^ include/linux/kexec.h:288:52: warning: 'struct purgatory_info' declared inside parameter list will not be visible outside of this definition or declaration int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi, ^~ include/linux/kexec.h:292:48: warning: 'struct purgatory_info' declared inside parameter list will not be visible outside of this definition or declaration int __weak arch_kexec_apply_relocations(struct purgatory_info *pi, ^~ Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:clear_bit Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit Cyclomatic Complexity 1 include/linux/percpu-defs.h:__this_cpu_preempt_check Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current Cyclomatic Complexity 4 include/linux/string.h:memmove Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_get_debugreg Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:set_debugreg Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:read_cr0 Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:write_cr0 Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_disable Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_enable Cyclomatic Complexity 1 arch/x86/include/asm/ptrace.h:user_mode Cyclomatic Complexity 1 arch/x86/include/asm/ptrace.h:v8086_mode Cyclomatic Complexity 1 include/asm-generic/ptrace.h:instruction_pointer Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:current_top_of_stack Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:on_thread_stack Cyclomatic Complexity 1 include/linux/thread_info.h:set_ti_thread_flag Cyclomatic Complexity 1 include/linux/thread_info.h:clear_ti_thread_flag Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_sub Cyclomatic Complexity 1 include/linux/sched.h:task_pid_nr Cyclomatic Complexity 1 include/linux/sched.h:task_thread_info Cyclomatic Complexity 1 include/linux/sched.h:set_tsk_thread_flag Cyclomatic Complexity 1 include/linux/sched.h:clear_tsk_thread_flag Cyclomatic Complexity 1 arch/x86/include/asm/debugreg.h:debug_stack_usage_inc Cyclomatic Complexity 1 arch/x86/include/asm/debugreg.h:debug_stack_usage_dec Cyclomatic Complexity 3 arch/x86/include/asm/traps.h:get_si_code Cyclomatic Complexity 1 arch/x86/include/asm/vm86.h:handle_vm86_trap Cyclomatic Complexity 1 arch/x86/include/asm/umip.h:fixup_umip_exception Cyclomatic Complexity 2 arch/x86/kernel/traps.c:cond_local_irq_enable Cyclomatic Complexity 2 arch/x86/kernel/traps.c:cond_local_irq_disable Cyclomatic Complexity 4 arch/x86/kernel/traps.c:fill_trap_info Cyclomatic Complexity 1 arch/x86/kernel/traps.c:is_sysenter_singlestep Cyclomatic Complexity 6 arch/x86/kernel/traps.c:do_trap_no_signal Cyclomatic Complexity 6 arch/x86/kernel/traps.c:do_trap Cyclomatic Complexity 6 arch/x86/kernel/traps.c:math_error Cyclomatic Complexity 2 arch/x86/kernel/traps.c:ist_enter Cyclomatic Complexity 2 arch/x86/kernel/traps.c:ist_exit Cyclomatic Complexity 1 arch/x86/kernel/traps.c:ist_begin_non_atomic Cyclomatic Complexity 1 arch/x86/kernel/traps.c:ist_end_non_atomic Cyclomatic Complexity 3 arch/x86/kernel/traps.c:is_valid_bugaddr Cyclomatic Complexity 3 arch/x86/kernel/traps.c:fixup_bug Cyclomatic Complexity 4 arch/x86/kernel/traps.c:do_error_trap Cyclomatic Complexity 1 arch/x86/kernel/traps.c:do_divide_error Cyclomatic Complexity 1 arch/x86/kernel/traps.c:do_overflow Cyclomatic Complexity 1 arch/x86/kernel/traps.c:do_invalid_op Cyclomatic Complexity 1 arch/x86/kernel/traps.c:do_coprocessor_segment_overrun
Re: [PATCH 05/11] kexec_file: Use read-only sections in arch_kexec_apply_relocations*
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [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/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 config: x86_64-randconfig-x015-201808 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from init/initramfs.c:527:0: >> include/linux/kexec.h:293:52: warning: 'struct purgatory_info' declared >> inside parameter list will not be visible outside of this definition or >> declaration int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi, ^~ include/linux/kexec.h:297:48: warning: 'struct purgatory_info' declared inside parameter list will not be visible outside of this definition or declaration int __weak arch_kexec_apply_relocations(struct purgatory_info *pi, ^~ Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64 Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64 Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD Cyclomatic Complexity 1 include/linux/list.h:__list_del Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order Cyclomatic Complexity 1 include/linux/string.h:strnlen Cyclomatic Complexity 4 include/linux/string.h:strlen Cyclomatic Complexity 3 include/linux/string.h:memset Cyclomatic Complexity 4 include/linux/string.h:memcpy Cyclomatic Complexity 4 include/linux/string.h:memcmp Cyclomatic Complexity 2 include/linux/string.h:strcpy Cyclomatic Complexity 1 include/linux/kdev_t.h:new_encode_dev Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large Cyclomatic Complexity 5 include/linux/slab.h:kmalloc Cyclomatic Complexity 2 init/initramfs.c:error Cyclomatic Complexity 1 init/initramfs.c:hash Cyclomatic Complexity 1 init/initramfs.c:eat Cyclomatic Complexity 2 init/initramfs.c:read_into Cyclomatic Complexity 1 init/initramfs.c:do_start Cyclomatic Complexity 3 init/initramfs.c:do_collect Cyclomatic Complexity 2 init/initramfs.c:do_skip Cyclomatic Complexity 5 init/initramfs.c:do_reset Cyclomatic Complexity 2 init/initramfs.c:write_buffer Cyclomatic Complexity 6 init/initramfs.c:flush_buffer Cyclomatic Complexity 2 init/initramfs.c:retain_initrd_param Cyclomatic Complexity 6 init/initramfs.c:find_link Cyclomatic Complexity 3 init/initramfs.c:free_hash Cyclomatic Complexity 1 include/linux/fs.h:vfs_lstat Cyclomatic Complexity 4 init/initramfs.c:clean_path Cyclomatic Complexity 1 init/initramfs.c:do_utime Cyclomatic Complexity 1 init/initramfs.c:do_symlink Cyclomatic Complexity 6 init/initramfs.c:xwrite Cyclomatic Complexity 4 init/initramfs.c:do_copy Cyclomatic Complexity 2 include/linux/list.h:__list_add Cyclomatic Complexity 1 include/linux/list.h:list_add Cyclomatic Complexity 1 init/initramfs.c:dir_add Cyclomatic Complexity 4 init/initramfs.c:maybe_link Cyclomatic Complexity 12 init/initramfs.c:do_name Cyclomatic Complexity 2 init/initramfs.c:parse_header Cyclomatic Complexity 8 init/initramfs.c:do_header Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry Cyclomatic Complexity 1 include/linux/list.h:list_del Cyclomatic Complexity 5 init/initramfs.c:dir_utime Cyclomatic Complexity 14 init/initramfs.c:unpack_to_rootfs Cyclomatic Complexity 6 init/initramfs.c:free_initrd Cyclomatic Complexity 3 init/initramfs.c:populate_rootfs -- In file included from arch/x86/kernel/traps.c:30:0: >> include/linux/kexec.h:293:52: warning: 'struct purgatory_info' declared >> inside parameter list will not be visible outside of this definition or >> declaration int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi, ^~ include/linux/kexec.h:297:48: warning: 'struct purgatory_info' declared inside parameter list will not be visible outside of this definition or declaration int __weak arch_kexec_apply_relocations(struct purgatory_info *pi, ^~ Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit Cyclomatic Complexity 2
Re: [PATCH 10/11] kexec_file: Allow archs to set purgatory load address
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [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/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 config: i386-randconfig-a0-201808 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/linux/crash_dump.h:5:0, from drivers/scsi/aacraid/commsup.c:36: >> include/linux/kexec.h:237:62: warning: 'struct kexec_buf' declared inside >> parameter list extern int kexec_load_purgatory(struct kimage *image, struct kexec_buf *kbuf); ^ include/linux/kexec.h:237:62: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/kexec.h:291:10: warning: 'struct purgatory_info' declared inside parameter list const Elf_Shdr *symtab); ^ include/linux/kexec.h:295:6: warning: 'struct purgatory_info' declared inside parameter list const Elf_Shdr *symtab); ^ vim +237 include/linux/kexec.h 225 226 /* kexec interface functions */ 227 extern void machine_kexec(struct kimage *image); 228 extern int machine_kexec_prepare(struct kimage *image); 229 extern void machine_kexec_cleanup(struct kimage *image); 230 extern asmlinkage long sys_kexec_load(unsigned long entry, 231 unsigned long nr_segments, 232 struct kexec_segment __user *segments, 233 unsigned long flags); 234 extern int kernel_kexec(void); 235 extern struct page *kimage_alloc_control_pages(struct kimage *image, 236 unsigned int order); > 237 extern int kexec_load_purgatory(struct kimage *image, struct kexec_buf > *kbuf); 238 extern int kexec_purgatory_get_set_symbol(struct kimage *image, 239const char *name, void *buf, 240unsigned int size, bool get_value); 241 extern void *kexec_purgatory_get_symbol_addr(struct kimage *image, 242 const char *name); 243 extern void __crash_kexec(struct pt_regs *); 244 extern void crash_kexec(struct pt_regs *); 245 int kexec_should_crash(struct task_struct *); 246 int kexec_crash_loaded(void); 247 void crash_save_cpu(struct pt_regs *regs, int cpu); 248 extern int kimage_crash_copy_vmcoreinfo(struct kimage *image); 249 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 05/11] kexec_file: Use read-only sections in arch_kexec_apply_relocations*
Hi Philipp, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v4.16-rc3 next-20180228] [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/Philipp-Rudo/kexec_file-Clean-up-purgatory-load/20180228-223538 config: i386-randconfig-a0-201808 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): In file included from include/linux/crash_dump.h:5:0, from drivers/scsi/aacraid/commsup.c:36: >> include/linux/kexec.h:296:10: warning: 'struct purgatory_info' declared >> inside parameter list const Elf_Shdr *symtab); ^ >> include/linux/kexec.h:296:10: warning: its scope is only this definition or >> declaration, which is probably not what you want include/linux/kexec.h:300:6: warning: 'struct purgatory_info' declared inside parameter list const Elf_Shdr *symtab); ^ vim +296 include/linux/kexec.h 286 287 int __weak arch_kexec_kernel_image_probe(struct kimage *image, void *buf, 288 unsigned long buf_len); 289 void * __weak arch_kexec_kernel_image_load(struct kimage *image); 290 int __weak arch_kimage_file_post_load_cleanup(struct kimage *image); 291 int __weak arch_kexec_kernel_verify_sig(struct kimage *image, void *buf, 292 unsigned long buf_len); 293 int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi, 294 Elf_Shdr *section, 295 const Elf_Shdr *relsec, > 296 const Elf_Shdr *symtab); 297 int __weak arch_kexec_apply_relocations(struct purgatory_info *pi, 298 Elf_Shdr *section, 299 const Elf_Shdr *relsec, 300 const Elf_Shdr *symtab); 301 void arch_kexec_protect_crashkres(void); 302 void arch_kexec_unprotect_crashkres(void); 303 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v5 03/10] kexec_file: factor out arch_kexec_kernel_*() from x86, powerpc
Hi AKASHI, [auto build test ERROR on arm64/for-next/core] [also build test ERROR on v4.14-rc4 next-20171013] [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/AKASHI-Takahiro/arm64-kexec-add-kexec_file_load-support/20171012-003448 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: powerpc-powernv_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 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 make.cross ARCH=powerpc All errors (new ones prefixed by >>): arch/powerpc/kernel/machine_kexec_file_64.c: In function 'arch_kexec_kernel_image_probe': >> arch/powerpc/kernel/machine_kexec_file_64.c:43:25: error: unused variable >> 'fops' [-Werror=unused-variable] struct kexec_file_ops *fops; ^~~~ >> arch/powerpc/kernel/machine_kexec_file_64.c:42:9: error: unused variable >> 'ret' [-Werror=unused-variable] int i, ret = -ENOEXEC; ^~~ >> arch/powerpc/kernel/machine_kexec_file_64.c:42:6: error: unused variable 'i' >> [-Werror=unused-variable] int i, ret = -ENOEXEC; ^ cc1: all warnings being treated as errors vim +/fops +43 arch/powerpc/kernel/machine_kexec_file_64.c a0458284 Thiago Jung Bauermann 2016-11-29 38 a0458284 Thiago Jung Bauermann 2016-11-29 39 int arch_kexec_kernel_image_probe(struct kimage *image, void *buf, a0458284 Thiago Jung Bauermann 2016-11-29 40 unsigned long buf_len) a0458284 Thiago Jung Bauermann 2016-11-29 41 { a0458284 Thiago Jung Bauermann 2016-11-29 @42 int i, ret = -ENOEXEC; a0458284 Thiago Jung Bauermann 2016-11-29 @43 struct kexec_file_ops *fops; a0458284 Thiago Jung Bauermann 2016-11-29 44 a0458284 Thiago Jung Bauermann 2016-11-29 45 /* We don't support crash kernels yet. */ a0458284 Thiago Jung Bauermann 2016-11-29 46 if (image->type == KEXEC_TYPE_CRASH) a0458284 Thiago Jung Bauermann 2016-11-29 47 return -ENOTSUPP; a0458284 Thiago Jung Bauermann 2016-11-29 48 6b2bef33 AKASHI Takahiro 2017-10-10 49 return _kexec_kernel_image_probe(image, buf, buf_len); a0458284 Thiago Jung Bauermann 2016-11-29 50 } a0458284 Thiago Jung Bauermann 2016-11-29 51 :: The code at line 43 was first introduced by commit :: a0458284f0625ade5eff2118bab89b2d4bbacc3e powerpc: Add support code for kexec_file_load() :: TO: Thiago Jung Bauermann:: CC: Michael Ellerman --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v5 03/10] kexec_file: factor out arch_kexec_kernel_*() from x86, powerpc
Hi AKASHI, [auto build test WARNING on arm64/for-next/core] [also build test WARNING on v4.14-rc4 next-20171013] [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/AKASHI-Takahiro/arm64-kexec-add-kexec_file_load-support/20171012-003448 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: x86_64-randconfig-in0-10141752 (attached as .config) compiler: gcc-4.6 (Debian 4.6.4-7) 4.6.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): >> kernel/kexec_file.o: warning: objtool: _kexec_kernel_image_load()+0x31: >> unsupported stack register modification --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v4 03/10] kexec_file: factor out arch_kexec_kernel_*() from x86, powerpc
Hi AKASHI, [auto build test ERROR on arm64/for-next/core] [also build test ERROR on v4.14-rc3 next-20170929] [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/AKASHI-Takahiro/arm64-kexec-add-kexec_file_load-support/20171004-163130 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: x86_64-randconfig-x000-201740 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): >> arch/x86/kernel/kexec-bzimage64.c:541:29: error: conflicting type qualifiers >> for 'kexec_bzImage64_ops' const struct kexec_file_ops kexec_bzImage64_ops = { ^~~ In file included from arch/x86/kernel/kexec-bzimage64.c:29:0: arch/x86/include/asm/kexec-bzimage64.h:4:30: note: previous declaration of 'kexec_bzImage64_ops' was here extern struct kexec_file_ops kexec_bzImage64_ops; ^~~ vim +/kexec_bzImage64_ops +541 arch/x86/kernel/kexec-bzimage64.c 540 > 541 const struct kexec_file_ops kexec_bzImage64_ops = { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 8/9] arm64: enable KEXEC_FILE config
Hi AKASHI, [auto build test ERROR on arm64/for-next/core] [also build test ERROR on v4.13 next-20170908] [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/AKASHI-Takahiro/kexec-add-kexec_file_load-support/20170910-143930 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core config: arm64-allmodconfig (attached as .config) compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 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 make.cross ARCH=arm64 Note: the linux-review/AKASHI-Takahiro/kexec-add-kexec_file_load-support/20170910-143930 HEAD caf976acefa5a78ad88489581c66b98cbc8f91fa builds fine. It only hurts bisectibility. All errors (new ones prefixed by >>): >> arch/arm64/kernel/machine_kexec_file.c:22:28: fatal error: asm/kexec_file.h: >> No such file or directory #include ^ compilation terminated. vim +22 arch/arm64/kernel/machine_kexec_file.c 423cf6dc9f AKASHI Takahiro 2017-09-08 15 423cf6dc9f AKASHI Takahiro 2017-09-08 16 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 17 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 18 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 19 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 20 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 21 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 @22 #include 423cf6dc9f AKASHI Takahiro 2017-09-08 23 :: The code at line 22 was first introduced by commit :: 423cf6dc9f06d95907902b2b7f84161bdc98f752 arm64: kexec_file: load initrd, device-tree and purgatory segments :: TO: AKASHI Takahiro:: CC: 0day robot --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH] s390/crash: Fix KEXEC_NOTE_BYTES definition
Hi Xunlei, [auto build test ERROR on next-20170605] [also build test ERROR on v4.12-rc4] [cannot apply to linus/master linux/master s390/features v4.9-rc8 v4.9-rc7 v4.9-rc6] [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/Xunlei-Pang/s390-crash-Fix-KEXEC_NOTE_BYTES-definition/20170610-173047 config: arm-sa1100 (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm All error/warnings (new ones prefixed by >>): In file included from arch/arm/include/asm/memory.h:378:0, from arch/arm/include/asm/page.h:165, from arch/arm/include/asm/thread_info.h:17, from include/linux/thread_info.h:37, from include/asm-generic/preempt.h:4, from ./arch/arm/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/efi.h:16, from arch/arm/kernel/setup.c:10: arch/arm/include/asm/kexec.h: In function 'page_to_boot_pfn': >> include/asm-generic/memory_model.h:63:14: error: implicit declaration of >> function 'page_to_section' [-Werror=implicit-function-declaration] int __sec = page_to_section(__pg); \ ^ include/asm-generic/memory_model.h:80:21: note: in expansion of macro '__page_to_pfn' #define page_to_pfn __page_to_pfn ^ arch/arm/include/asm/kexec.h:70:9: note: in expansion of macro 'page_to_pfn' return page_to_pfn(page) + (arch_phys_to_idmap_offset >> PAGE_SHIFT); ^~~ In file included from include/linux/pid_namespace.h:6:0, from include/linux/ptrace.h:9, from include/uapi/linux/elfcore.h:7, from include/linux/elfcore.h:9, from include/linux/crash_core.h:5, from include/linux/kexec.h:27, from arch/arm/kernel/setup.c:24: include/linux/mm.h: At top level: >> include/linux/mm.h:979:29: error: conflicting types for 'page_to_section' static inline unsigned long page_to_section(const struct page *page) ^~~ In file included from arch/arm/include/asm/memory.h:378:0, from arch/arm/include/asm/page.h:165, from arch/arm/include/asm/thread_info.h:17, from include/linux/thread_info.h:37, from include/asm-generic/preempt.h:4, from ./arch/arm/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/efi.h:16, from arch/arm/kernel/setup.c:10: include/asm-generic/memory_model.h:63:14: note: previous implicit declaration of 'page_to_section' was here int __sec = page_to_section(__pg); \ ^ include/asm-generic/memory_model.h:80:21: note: in expansion of macro '__page_to_pfn' #define page_to_pfn __page_to_pfn ^ arch/arm/include/asm/kexec.h:70:9: note: in expansion of macro 'page_to_pfn' return page_to_pfn(page) + (arch_phys_to_idmap_offset >> PAGE_SHIFT); ^~~ cc1: some warnings being treated as errors -- In file included from arch/arm/include/asm/memory.h:378:0, from arch/arm/include/asm/page.h:165, from arch/arm/include/asm/thread_info.h:17, from include/linux/thread_info.h:37, from include/asm-generic/preempt.h:4, from ./arch/arm/include/generated/asm/preempt.h:1, from include/linux/preempt.h:80, from include/linux/spinlock.h:50, from arch/arm/kernel/traps.c:18: arch/arm/include/asm/kexec.h: In function 'page_to_boot_pfn': >> include/asm-generic/memory_model.h:63:14: error: implicit declaration of >> function 'page_to_section' [-Werror=implicit-function-declaration] int __sec = page_to_section(__pg); \ ^ include/asm-generic/memory_model.h:80:21: note: in expansion of macro '__page_to_pfn' #define page_to_pfn __page_to_pfn ^ arch/arm/include/asm/kexec.h:70:9: note: in expansion of macro
Re: [PATCH v7 29/36] x86, drm, fbdev: Do not specify encrypted memory for video mappings
Hi Tom, [auto build test ERROR on next-20170616] [cannot apply to tip/x86/core linus/master linux/master v4.9-rc8 v4.9-rc7 v4.9-rc6 v4.12-rc5] [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/Tom-Lendacky/x86-Secure-Memory-Encryption-AMD/20170617-210824 config: sh-allmodconfig (attached as .config) compiler: sh4-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sh All errors (new ones prefixed by >>): drivers/gpu/drm/drm_gem.c: In function 'drm_gem_mmap_obj': >> drivers/gpu/drm/drm_gem.c:932:22: error: implicit declaration of function >> 'pgprot_decrypted' [-Werror=implicit-function-declaration] vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^~~~ >> drivers/gpu/drm/drm_gem.c:932:20: error: incompatible types when assigning >> to type 'pgprot_t {aka struct }' from type 'int' vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^ cc1: some warnings being treated as errors -- drivers/video/fbdev/core/fbmem.c: In function 'fb_mmap': >> drivers/video/fbdev/core/fbmem.c:1414:23: error: implicit declaration of >> function 'pgprot_decrypted' [-Werror=implicit-function-declaration] vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^~~~ >> drivers/video/fbdev/core/fbmem.c:1414:21: error: incompatible types when >> assigning to type 'pgprot_t {aka struct }' from type 'int' vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^ drivers/video/fbdev/core/fbmem.c:1444:20: error: incompatible types when assigning to type 'pgprot_t {aka struct }' from type 'int' vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^ cc1: some warnings being treated as errors -- drivers/gpu/drm/udl/udl_fb.c: In function 'udl_fb_mmap': >> drivers/gpu/drm/udl/udl_fb.c:174:22: error: implicit declaration of function >> 'pgprot_decrypted' [-Werror=implicit-function-declaration] vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^~~~ >> drivers/gpu/drm/udl/udl_fb.c:174:20: error: incompatible types when >> assigning to type 'pgprot_t {aka struct }' from type 'int' vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); ^ cc1: some warnings being treated as errors vim +/pgprot_decrypted +932 drivers/gpu/drm/drm_gem.c 926 return -EINVAL; 927 928 vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; 929 vma->vm_ops = dev->driver->gem_vm_ops; 930 vma->vm_private_data = obj; 931 vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); > 932 vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); 933 934 /* Take a ref for this mapping of the object, so that the fault 935 * handler can dereference the mmap offset's pointer to the object. --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3
Hi Tom, [auto build test ERROR on linus/master] [also build test ERROR on v4.12-rc4 next-20170607] [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/Tom-Lendacky/x86-Secure-Memory-Encryption-AMD/20170608-104147 config: um-x86_64_defconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=um SUBARCH=x86_64 All errors (new ones prefixed by >>): In file included from arch/x86/include/asm/cacheflush.h:6:0, from include/linux/highmem.h:11, from net/core/sock.c:116: arch/x86/include/asm/special_insns.h: In function 'native_read_cr3_pa': >> arch/x86/include/asm/special_insns.h:239:30: error: 'PHYSICAL_PAGE_MASK' >> undeclared (first use in this function) return (native_read_cr3() & PHYSICAL_PAGE_MASK); ^~ arch/x86/include/asm/special_insns.h:239:30: note: each undeclared identifier is reported only once for each function it appears in arch/x86/include/asm/special_insns.h: In function 'read_cr3_pa': arch/x86/include/asm/special_insns.h:244:23: error: 'PHYSICAL_PAGE_MASK' undeclared (first use in this function) return (read_cr3() & PHYSICAL_PAGE_MASK); ^~ vim +/PHYSICAL_PAGE_MASK +239 arch/x86/include/asm/special_insns.h 233 } 234 235 #define nop() asm volatile ("nop") 236 237 static inline unsigned long native_read_cr3_pa(void) 238 { > 239 return (native_read_cr3() & PHYSICAL_PAGE_MASK); 240 } 241 242 static inline unsigned long read_cr3_pa(void) --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v6 25/34] swiotlb: Add warnings for use of bounce buffers with SME
Hi Tom, [auto build test ERROR on linus/master] [also build test ERROR on v4.12-rc4 next-20170607] [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/Tom-Lendacky/x86-Secure-Memory-Encryption-AMD/20170608-104147 config: sparc-defconfig (attached as .config) compiler: sparc-linux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc All errors (new ones prefixed by >>): In file included from include/linux/dma-mapping.h:13:0, from include/linux/skbuff.h:34, from include/linux/filter.h:12, from kernel//bpf/core.c:24: >> include/linux/mem_encrypt.h:16:29: fatal error: asm/mem_encrypt.h: No such >> file or directory #include ^ compilation terminated. vim +16 include/linux/mem_encrypt.h 2d7c2ec4 Tom Lendacky 2017-06-07 10 * published by the Free Software Foundation. 2d7c2ec4 Tom Lendacky 2017-06-07 11 */ 2d7c2ec4 Tom Lendacky 2017-06-07 12 2d7c2ec4 Tom Lendacky 2017-06-07 13 #ifndef __MEM_ENCRYPT_H__ 2d7c2ec4 Tom Lendacky 2017-06-07 14 #define __MEM_ENCRYPT_H__ 2d7c2ec4 Tom Lendacky 2017-06-07 15 2d7c2ec4 Tom Lendacky 2017-06-07 @16 #include 2d7c2ec4 Tom Lendacky 2017-06-07 17 2d7c2ec4 Tom Lendacky 2017-06-07 18 #endif/* __MEM_ENCRYPT_H__ */ :: The code at line 16 was first introduced by commit :: 2d7c2ec4c60e83432b27bfb32042706f404d4158 x86/mm: Add Secure Memory Encryption (SME) support :: TO: Tom Lendacky:: CC: 0day robot --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v6 19/34] x86/mm: Add support to access boot related data in the clear
Hi Tom, [auto build test ERROR on linus/master] [also build test ERROR on v4.12-rc4 next-20170607] [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/Tom-Lendacky/x86-Secure-Memory-Encryption-AMD/20170608-104147 config: i386-randconfig-x077-06040719 (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): In file included from arch/x86/include/asm/dma.h:12:0, from include/linux/bootmem.h:9, from arch/x86/mm/ioremap.c:9: >> arch/x86/include/asm/io.h:386:37: error: conflicting types for >> 'arch_memremap_can_ram_remap' #define arch_memremap_can_ram_remap arch_memremap_can_ram_remap ^ >> arch/x86/mm/ioremap.c:561:6: note: in expansion of macro >> 'arch_memremap_can_ram_remap' bool arch_memremap_can_ram_remap(resource_size_t phys_addr, unsigned long size, ^~~ arch/x86/include/asm/io.h:384:13: note: previous declaration of 'arch_memremap_can_ram_remap' was here extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, ^~~ -- In file included from arch/x86/include/asm/dma.h:12:0, from include/linux/bootmem.h:9, from arch/x86//mm/ioremap.c:9: >> arch/x86/include/asm/io.h:386:37: error: conflicting types for >> 'arch_memremap_can_ram_remap' #define arch_memremap_can_ram_remap arch_memremap_can_ram_remap ^ arch/x86//mm/ioremap.c:561:6: note: in expansion of macro 'arch_memremap_can_ram_remap' bool arch_memremap_can_ram_remap(resource_size_t phys_addr, unsigned long size, ^~~ arch/x86/include/asm/io.h:384:13: note: previous declaration of 'arch_memremap_can_ram_remap' was here extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, ^~~ vim +/arch_memremap_can_ram_remap +386 arch/x86/include/asm/io.h 380 extern void arch_io_free_memtype_wc(resource_size_t start, resource_size_t size); 381 #define arch_io_reserve_memtype_wc arch_io_reserve_memtype_wc 382 #endif 383 384 extern bool arch_memremap_can_ram_remap(resource_size_t offset, size_t size, 385 unsigned long flags); > 386 #define arch_memremap_can_ram_remap arch_memremap_can_ram_remap 387 388 #endif /* _ASM_X86_IO_H */ --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 3/3] x86/apic: Clean up the apic delivery mode macro definition
Hi, [auto build test ERROR on iommu/next] [also build test ERROR on v4.7-rc7 next-20160722] [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/Baoquan-He/Enable-legacy-irq-mode-before-jump-to-kexec-kdump-kernel/20160724-054857 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: i386-randconfig-i0-201630 (attached as .config) compiler: gcc-4.8 (Debian 4.8.4-1) 4.8.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): arch/x86/kvm/lapic.c: In function '__apic_accept_irq': >> arch/x86/kvm/lapic.c:963:7: error: 'APIC_DM_EXTINT' undeclared (first use in >> this function) case APIC_DM_EXTINT: ^ arch/x86/kvm/lapic.c:963:7: note: each undeclared identifier is reported only once for each function it appears in vim +/APIC_DM_EXTINT +963 arch/x86/kvm/lapic.c 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 957 smp_wmb(); 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 958 set_bit(KVM_APIC_SIPI, >pending_events); 3842d135f arch/x86/kvm/lapic.c Avi Kivity 2010-07-27 959 kvm_make_request(KVM_REQ_EVENT, vcpu); d76901750 arch/x86/kvm/lapic.c Marcelo Tosatti 2008-09-08 960 kvm_vcpu_kick(vcpu); 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 961 break; 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 962 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 @963 case APIC_DM_EXTINT: 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 964 /* 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 965 * Should only be called by kvm_apic_local_deliver() with LVT0, 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 966 * before NMI watchdog was enabled. Already handled by :: The code at line 963 was first introduced by commit :: 23930f9521c9c4d4aa96cdb9d1e1703f3782bb94 KVM: x86: Enable NMI Watchdog via in-kernel PIT source :: TO: Jan Kiszka:: CC: Avi Kivity --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH v2] kexec: add resriction on the kexec_load
Hi, [auto build test ERROR on stable/master] [also build test ERROR on v4.7-rc7] [cannot apply to next-20160721] [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/zhongjiang/kexec-add-resriction-on-the-kexec_load/20160722-143017 base: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git master config: i386-defconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings (new ones prefixed by >>): kernel/kexec_core.c: In function 'sanity_check_segment_list': >> kernel/kexec_core.c:222:3: error: 'total' undeclared (first use in this >> function) total += image->segment[i].memsz; ^ kernel/kexec_core.c:222:3: note: each undeclared identifier is reported only once for each function it appears in >> kernel/kexec_core.c:151:16: warning: unused variable 'total_segments' >> [-Wunused-variable] unsigned long total_segments = 0; ^~ vim +/total +222 kernel/kexec_core.c 145 gfp_t gfp_mask, 146 unsigned long dest); 147 148 int sanity_check_segment_list(struct kimage *image) 149 { 150 int result, i; > 151 unsigned long total_segments = 0; 152 unsigned long nr_segments = image->nr_segments; 153 154 /* 155 * Verify we have good destination addresses. The caller is 156 * responsible for making certain we don't attempt to load 157 * the new image into invalid or reserved areas of RAM. This 158 * just verifies it is an address we can use. 159 * 160 * Since the kernel does everything in page size chunks ensure 161 * the destination addresses are page aligned. Too many 162 * special cases crop of when we don't do this. The most 163 * insidious is getting overlapping destination addresses 164 * simply because addresses are changed to page size 165 * granularity. 166 */ 167 result = -EADDRNOTAVAIL; 168 for (i = 0; i < nr_segments; i++) { 169 unsigned long mstart, mend; 170 171 mstart = image->segment[i].mem; 172 mend = mstart + image->segment[i].memsz; 173 if ((mstart & ~PAGE_MASK) || (mend & ~PAGE_MASK)) 174 return result; 175 if (mend >= KEXEC_DESTINATION_MEMORY_LIMIT) 176 return result; 177 } 178 179 /* Verify our destination addresses do not overlap. 180 * If we alloed overlapping destination addresses 181 * through very weird things can happen with no 182 * easy explanation as one segment stops on another. 183 */ 184 result = -EINVAL; 185 for (i = 0; i < nr_segments; i++) { 186 unsigned long mstart, mend; 187 unsigned long j; 188 189 mstart = image->segment[i].mem; 190 mend = mstart + image->segment[i].memsz; 191 for (j = 0; j < i; j++) { 192 unsigned long pstart, pend; 193 194 pstart = image->segment[j].mem; 195 pend = pstart + image->segment[j].memsz; 196 /* Do the segments overlap ? */ 197 if ((mend > pstart) && (mstart < pend)) 198 return result; 199 } 200 } 201 202 /* Ensure our buffer sizes are strictly less than 203 * our memory sizes. This should always be the case, 204 * and it is easier to check up front than to be surprised 205 * later on. 206 */ 207 result = -EINVAL; 208 for (i = 0; i < nr_segments; i++) { 209 if (image->segment[i].bufsz > image->segment[i].memsz) 210 return result; 211 } 212 213 /* Verity all segment size donnot exceed the specified size. 214 * if segment size from user space is too large, a large 215 * amount of time will be wasted when allocating page. so, 216 * softlockup may be come up. 217 */ 218 for (i = 0; i < nr_segments; i++) { 219 if (image->segment[i].memsz > (totalram_pages / 2)) 220 return result; 221 > 222 total += image->segment[i].memsz; 223 } 224
Re: [PATCH 3/3] x86/apic: Clean up the apic delivery mode macro definition
Hi, [auto build test WARNING on iommu/next] [also build test WARNING on v4.7-rc7 next-20160722] [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/Baoquan-He/Enable-legacy-irq-mode-before-jump-to-kexec-kdump-kernel/20160724-054857 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) include/linux/compiler.h:232:8: sparse: attribute 'no_sanitize_address': unknown attribute arch/x86/kvm/lapic.c:186:15: sparse: incompatible types in comparison expression (different address spaces) arch/x86/kvm/lapic.c:963:14: sparse: undefined identifier 'APIC_DM_EXTINT' >> arch/x86/kvm/lapic.c:963:14: sparse: incompatible types for 'case' statement arch/x86/kvm/lapic.c:699:15: sparse: incompatible types in comparison expression (different address spaces) arch/x86/kvm/lapic.c:799:15: sparse: incompatible types in comparison expression (different address spaces) arch/x86/kvm/lapic.c:963:14: sparse: Expected constant expression in case statement arch/x86/kvm/lapic.c: In function '__apic_accept_irq': arch/x86/kvm/lapic.c:963:7: error: 'APIC_DM_EXTINT' undeclared (first use in this function) case APIC_DM_EXTINT: ^~ arch/x86/kvm/lapic.c:963:7: note: each undeclared identifier is reported only once for each function it appears in vim +/case +963 arch/x86/kvm/lapic.c c5ec15340 drivers/kvm/lapic.c He, Qing2007-09-03 947 vcpu->vcpu_id); c5ec15340 drivers/kvm/lapic.c He, Qing2007-09-03 948 } 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 949 break; 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 950 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 951 case APIC_DM_STARTUP: 1b10bf31a arch/x86/kvm/lapic.c Jan Kiszka 2008-09-30 952 apic_debug("SIPI to vcpu %d vector 0x%02x\n", c5ec15340 drivers/kvm/lapic.c He, Qing2007-09-03 953 vcpu->vcpu_id, vector); 6da7e3f64 arch/x86/kvm/lapic.c Gleb Natapov2009-03-05 954 result = 1; 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 955 apic->sipi_vector = vector; 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 956 /* make sure sipi_vector is visible for the receiver */ 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 957 smp_wmb(); 66450a21f arch/x86/kvm/lapic.c Jan Kiszka 2013-03-13 958 set_bit(KVM_APIC_SIPI, >pending_events); 3842d135f arch/x86/kvm/lapic.c Avi Kivity 2010-07-27 959 kvm_make_request(KVM_REQ_EVENT, vcpu); d76901750 arch/x86/kvm/lapic.c Marcelo Tosatti 2008-09-08 960 kvm_vcpu_kick(vcpu); 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 961 break; 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 962 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 @963 case APIC_DM_EXTINT: 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 964 /* 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 965 * Should only be called by kvm_apic_local_deliver() with LVT0, 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 966 * before NMI watchdog was enabled. Already handled by 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 967 * kvm_apic_accept_pic_intr(). 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 968 */ 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 969 break; 23930f952 arch/x86/kvm/lapic.c Jan Kiszka 2008-09-26 970 97222cc83 drivers/kvm/lapic.c Eddie Dong 2007-09-12 971 default: :: The code at line 963 was first introduced by commit :: 23930f9521c9c4d4aa96cdb9d1e1703f3782bb94 KVM: x86: Enable NMI Watchdog via in-kernel PIT source :: TO: Jan Kiszka:: CC: Avi Kivity --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [V6 PATCH 5/6] x86/nmi: Fix to save registers for crash dump on external NMI broadcast
Hi Hidehiro, [auto build test ERROR on v4.4-rc4] [also build test ERROR on next-20151209] [cannot apply to tip/x86/core] url: https://github.com/0day-ci/linux/commits/Hidehiro-Kawai/Fix-race-issues-among-panic-NMI-and-crash_kexec/20151210-095254 config: x86_64-randconfig-s4-12101030 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): arch/x86/built-in.o: In function `do_nmi': >> (.text+0x7339): undefined reference to `run_crash_ipi_callback' --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl
Hi Palmer, [auto build test WARNING on v4.3-rc7] [also WARNING on: next-20151103] url: https://github.com/0day-ci/linux/commits/Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 base: https://github.com/0day-ci/linux Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 config: alpha-defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=alpha All warnings (new ones prefixed by >>): >> ./usr/include/asm/setup.h:16: leaks CONFIG_ALPHA_LEGACY_START_ADDRESS to >> userspace where it is not valid --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 09/13] Move bp_type_idx to kernel/event/hw_breakpoint.c
Hi Palmer, [auto build test ERROR on v4.3-rc7] [also ERROR on: next-20151103] url: https://github.com/0day-ci/linux/commits/Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 base: https://github.com/0day-ci/linux Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 config: arm-socfpga_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=arm All errors (new ones prefixed by >>): arch/arm/kernel/ptrace.c: In function 'ptrace_get_hbp_resource_info': >> arch/arm/kernel/ptrace.c:440:33: error: 'TYPE_INST' undeclared (first use in >> this function) num_brps = hw_breakpoint_slots(TYPE_INST); ^ arch/arm/kernel/ptrace.c:440:33: note: each undeclared identifier is reported only once for each function it appears in >> arch/arm/kernel/ptrace.c:441:33: error: 'TYPE_DATA' undeclared (first use in >> this function) num_wrps = hw_breakpoint_slots(TYPE_DATA); ^ -- arch/arm/kernel/hw_breakpoint.c: In function 'hw_breakpoint_slots': >> arch/arm/kernel/hw_breakpoint.c:290:7: error: 'TYPE_INST' undeclared (first >> use in this function) case TYPE_INST: ^ arch/arm/kernel/hw_breakpoint.c:290:7: note: each undeclared identifier is reported only once for each function it appears in >> arch/arm/kernel/hw_breakpoint.c:292:7: error: 'TYPE_DATA' undeclared (first >> use in this function) case TYPE_DATA: ^ vim +/TYPE_INST +440 arch/arm/kernel/ptrace.c 864232fa Will Deacon 2010-09-03 434 864232fa Will Deacon 2010-09-03 435 static u32 ptrace_get_hbp_resource_info(void) 864232fa Will Deacon 2010-09-03 436 { 864232fa Will Deacon 2010-09-03 437u8 num_brps, num_wrps, debug_arch, wp_len; 864232fa Will Deacon 2010-09-03 438u32 reg = 0; 864232fa Will Deacon 2010-09-03 439 864232fa Will Deacon 2010-09-03 @440num_brps= hw_breakpoint_slots(TYPE_INST); 864232fa Will Deacon 2010-09-03 @441num_wrps= hw_breakpoint_slots(TYPE_DATA); 864232fa Will Deacon 2010-09-03 442debug_arch = arch_get_debug_arch(); 864232fa Will Deacon 2010-09-03 443wp_len = arch_get_max_wp_len(); 864232fa Will Deacon 2010-09-03 444 :: The code at line 440 was first introduced by commit :: 864232fa1a2f8dfe003438ef0851a56722740f3e ARM: 6357/1: hw-breakpoint: add new ptrace requests for hw-breakpoint interaction :: TO: Will Deacon:: CC: Russell King --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [PATCH 13/13] Re-enable and clean up "check_config()" in headers_check.pl
Hi Palmer, [auto build test WARNING on v4.3-rc7] [also WARNING on: next-20151103] url: https://github.com/0day-ci/linux/commits/Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 base: https://github.com/0day-ci/linux Palmer-Dabbelt/Remove-ifdef-CONFIG_64BIT-from-all-asm-generic-fcntl-h/20151104-035501 config: blackfin-TCM-BF537_defconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=blackfin All warnings (new ones prefixed by >>): >> ./usr/include/asm/fixed_code.h:14: leaks CONFIG_PHY_RAM_BASE_ADDRESS to >> userspace where it is not valid ./usr/include/asm/fixed_code.h:15: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:18: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:20: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:22: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:24: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:25: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:26: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:27: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:28: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:29: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:30: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:32: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:34: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid ./usr/include/asm/fixed_code.h:36: leaks CONFIG_PHY_RAM_BASE_ADDRESS to userspace where it is not valid --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [V4 PATCH 3/4] kexec: Fix race between panic() and crash_kexec() called directly
Hi Hidehiro, [auto build test results on v4.3-rc2 -- if it's inappropriate base, please ignore] config: x86_64-allnoconfig (attached as .config) reproduce: git checkout 0077681103150af584e5e592c0238fd010654c26 # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): kernel/panic.c: In function 'panic': >> kernel/panic.c:140:3: error: implicit declaration of function >> '__crash_kexec' [-Werror=implicit-function-declaration] __crash_kexec(NULL); ^ cc1: some warnings being treated as errors vim +/__crash_kexec +140 kernel/panic.c 134 * If we have crashed and we have a crash kernel loaded let it handle 135 * everything else. 136 * If we want to run this after calling panic_notifiers, pass 137 * the "crash_kexec_post_notifiers" option to the kernel. 138 */ 139 if (!crash_kexec_post_notifiers) > 140 __crash_kexec(NULL); 141 142 /* 143 * Note smp_send_stop is the usual smp shutdown function, which --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
Re: [V4 PATCH 3/4] kexec: Fix race between panic() and crash_kexec() called directly
Hi Hidehiro, [auto build test results on v4.3-rc2 -- if it's inappropriate base, please ignore] config: ia64-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 0077681103150af584e5e592c0238fd010654c26 # save the attached .config to linux build tree make.cross ARCH=ia64 All warnings (new ones prefixed by >>): In file included from arch/ia64/include/uapi/asm/intrinsics.h:21:0, from arch/ia64/include/asm/intrinsics.h:10, from arch/ia64/include/asm/bitops.h:18, from include/linux/bitops.h:36, from include/linux/kernel.h:10, from include/linux/list.h:8, from include/linux/preempt.h:10, from include/linux/spinlock.h:50, from include/linux/mmzone.h:7, from include/linux/gfp.h:5, from include/linux/mm.h:9, from kernel/kexec_core.c:12: kernel/kexec_core.c: In function 'crash_kexec': arch/ia64/include/uapi/asm/cmpxchg.h:56:2: warning: value computed is not used [-Wunused-value] ((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr ^ arch/ia64/include/asm/atomic.h:135:30: note: in expansion of macro 'xchg' #define atomic_xchg(v, new) (xchg(&((v)->counter), new)) ^ >> kernel/kexec_core.c:899:3: note: in expansion of macro 'atomic_xchg' atomic_xchg(_cpu, -1); ^ vim +/atomic_xchg +899 kernel/kexec_core.c 883 884 /* 885 * Only one CPU is allowed to execute the crash_kexec() code as with 886 * panic(). Otherwise parallel calls of panic() and crash_kexec() 887 * may stop each other. To exclude them, we use panic_cpu here too. 888 */ 889 this_cpu = raw_smp_processor_id(); 890 old_cpu = atomic_cmpxchg(_cpu, -1, this_cpu); 891 if (old_cpu == -1) { 892 /* This is the 1st CPU which comes here, so go ahead. */ 893 __crash_kexec(regs); 894 895 /* 896 * Reset panic_cpu to allow another panic()/crash_kexec() 897 * call. 898 */ > 899 atomic_xchg(_cpu, -1); 900 } 901 } 902 903 size_t crash_get_memory_size(void) 904 { 905 size_t size = 0; 906 907 mutex_lock(_mutex); --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: Binary data ___ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec