lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 10 Dec 2019 02:46:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Sven Schnelle <svens@...ckframe.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Helge Deller <deller@....de>
Subject: arch/parisc/kernel/kexec_file.c:55:8: error: 'struct kimage' has no
 member named 'arch'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e42617b825f8073569da76dc4510bfa019b1c35a
commit: 1191cf4986b5e8008c615896e487dc35fe922acd parisc: add support for kexec_file_load() syscall
date:   3 months ago
config: parisc-randconfig-a001-20191209 (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 1191cf4986b5e8008c615896e487dc35fe922acd
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   In file included from arch/parisc/kernel/kexec_file.c:9:0:
   include/linux/kexec.h:33:2: error: #error KEXEC_SOURCE_MEMORY_LIMIT not defined
    #error KEXEC_SOURCE_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:37:2: error: #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
    #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:41:2: error: #error KEXEC_CONTROL_MEMORY_LIMIT not defined
    #error KEXEC_CONTROL_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:49:2: error: #error KEXEC_CONTROL_PAGE_SIZE not defined
    #error KEXEC_CONTROL_PAGE_SIZE not defined
     ^~~~~
   include/linux/kexec.h:53:2: error: #error KEXEC_ARCH not defined
    #error KEXEC_ARCH not defined
     ^~~~~
   arch/parisc/kernel/kexec_file.c: In function 'elf_load':
>> arch/parisc/kernel/kexec_file.c:55:8: error: 'struct kimage' has no member named 'arch'
      image->arch.initrd_start = kbuf.mem;
           ^~
   arch/parisc/kernel/kexec_file.c:56:8: error: 'struct kimage' has no member named 'arch'
      image->arch.initrd_end = kbuf.mem + initrd_len;
           ^~
   arch/parisc/kernel/kexec_file.c:72:8: error: 'struct kimage' has no member named 'arch'
      image->arch.cmdline = kbuf.mem;
           ^~
--
   In file included from kernel/kexec_core.c:14:0:
   include/linux/kexec.h:33:2: error: #error KEXEC_SOURCE_MEMORY_LIMIT not defined
    #error KEXEC_SOURCE_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:37:2: error: #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
    #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:41:2: error: #error KEXEC_CONTROL_MEMORY_LIMIT not defined
    #error KEXEC_CONTROL_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:49:2: error: #error KEXEC_CONTROL_PAGE_SIZE not defined
    #error KEXEC_CONTROL_PAGE_SIZE not defined
     ^~~~~
   include/linux/kexec.h:53:2: error: #error KEXEC_ARCH not defined
    #error KEXEC_ARCH not defined
     ^~~~~
   kernel/kexec_core.c: In function 'sanity_check_segment_list':
>> kernel/kexec_core.c:177:15: error: 'KEXEC_DESTINATION_MEMORY_LIMIT' undeclared (first use in this function); did you mean 'KEXEC_CRASH_CONTROL_MEMORY_LIMIT'?
      if (mend >= KEXEC_DESTINATION_MEMORY_LIMIT)
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                  KEXEC_CRASH_CONTROL_MEMORY_LIMIT
   kernel/kexec_core.c:177:15: note: each undeclared identifier is reported only once for each function it appears in
   kernel/kexec_core.c: In function 'kimage_alloc_normal_control_pages':
>> kernel/kexec_core.c:384:17: error: 'KEXEC_CONTROL_MEMORY_LIMIT' undeclared (first use in this function); did you mean 'KEXEC_CONTROL_MEMORY_GFP'?
      if ((epfn >= (KEXEC_CONTROL_MEMORY_LIMIT >> PAGE_SHIFT)) ||
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
                    KEXEC_CONTROL_MEMORY_GFP
   In file included from kernel/kexec_core.c:14:0:
   kernel/kexec_core.c: In function 'kimage_alloc_crash_control_pages':
>> include/linux/kexec.h:57:42: error: 'KEXEC_CONTROL_MEMORY_LIMIT' undeclared (first use in this function); did you mean 'KEXEC_CONTROL_MEMORY_GFP'?
    #define KEXEC_CRASH_CONTROL_MEMORY_LIMIT KEXEC_CONTROL_MEMORY_LIMIT
                                             ^
>> kernel/kexec_core.c:450:18: note: in expansion of macro 'KEXEC_CRASH_CONTROL_MEMORY_LIMIT'
      if (hole_end > KEXEC_CRASH_CONTROL_MEMORY_LIMIT)
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/kexec_core.c: In function 'kimage_alloc_page':
>> kernel/kexec_core.c:722:6: error: 'KEXEC_SOURCE_MEMORY_LIMIT' undeclared (first use in this function); did you mean 'KEXEC_CRASH_CONTROL_MEMORY_LIMIT'?
        (KEXEC_SOURCE_MEMORY_LIMIT >> PAGE_SHIFT)) {
         ^~~~~~~~~~~~~~~~~~~~~~~~~
         KEXEC_CRASH_CONTROL_MEMORY_LIMIT
   kernel/kexec_core.c: In function '__crash_kexec':
>> kernel/kexec_core.c:950:4: error: implicit declaration of function 'crash_setup_regs'; did you mean 'task_pt_regs'? [-Werror=implicit-function-declaration]
       crash_setup_regs(&fixed_regs, regs);
       ^~~~~~~~~~~~~~~~
       task_pt_regs
   cc1: some warnings being treated as errors
--
   In file included from kernel/kexec_file.c:16:0:
   include/linux/kexec.h:33:2: error: #error KEXEC_SOURCE_MEMORY_LIMIT not defined
    #error KEXEC_SOURCE_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:37:2: error: #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
    #error KEXEC_DESTINATION_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:41:2: error: #error KEXEC_CONTROL_MEMORY_LIMIT not defined
    #error KEXEC_CONTROL_MEMORY_LIMIT not defined
     ^~~~~
   include/linux/kexec.h:49:2: error: #error KEXEC_CONTROL_PAGE_SIZE not defined
    #error KEXEC_CONTROL_PAGE_SIZE not defined
     ^~~~~
   include/linux/kexec.h:53:2: error: #error KEXEC_ARCH not defined
    #error KEXEC_ARCH not defined
     ^~~~~
   In file included from arch/parisc/include/asm/page.h:181:0,
                    from include/linux/mm_types_task.h:16,
                    from include/linux/mm_types.h:5,
                    from include/linux/mmzone.h:21,
                    from include/linux/gfp.h:6,
                    from include/linux/mm.h:10,
                    from kernel/kexec_file.c:13:
   kernel/kexec_file.c: In function 'kimage_file_alloc_init':
>> kernel/kexec_file.c:295:19: error: 'KEXEC_CONTROL_PAGE_SIZE' undeclared (first use in this function); did you mean 'KEXEC_CONTROL_MEMORY_GFP'?
            get_order(KEXEC_CONTROL_PAGE_SIZE));
                      ^
   include/asm-generic/getorder.h:52:23: note: in definition of macro 'get_order'
     __builtin_constant_p(n) ? (    \
                          ^
   kernel/kexec_file.c:295:19: note: each undeclared identifier is reported only once for each function it appears in
            get_order(KEXEC_CONTROL_PAGE_SIZE));
                      ^
   include/asm-generic/getorder.h:52:23: note: in definition of macro 'get_order'
     __builtin_constant_p(n) ? (    \
                          ^
   kernel/kexec_file.c: In function 'crash_prepare_elf64_headers':
   kernel/kexec_file.c:1257:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      phdr->p_vaddr = (Elf64_Addr)_text;
                      ^
   kernel/kexec_file.c:1274:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      phdr->p_vaddr = (unsigned long long) __va(mstart);
                      ^

vim +55 arch/parisc/kernel/kexec_file.c

    15	
    16	static void *elf_load(struct kimage *image, char *kernel_buf,
    17				unsigned long kernel_len, char *initrd,
    18				unsigned long initrd_len, char *cmdline,
    19				unsigned long cmdline_len)
    20	{
    21		int ret, i;
    22		unsigned long kernel_load_addr;
    23		struct elfhdr ehdr;
    24		struct kexec_elf_info elf_info;
    25		struct kexec_buf kbuf = { .image = image, .buf_min = 0,
    26					  .buf_max = -1UL, };
    27	
    28		ret = kexec_build_elf_info(kernel_buf, kernel_len, &ehdr, &elf_info);
    29		if (ret)
    30			goto out;
    31	
    32		ret = kexec_elf_load(image, &ehdr, &elf_info, &kbuf, &kernel_load_addr);
    33		if (ret)
    34			goto out;
    35	
    36		image->start = __pa(elf_info.ehdr->e_entry);
    37	
    38		for (i = 0; i < image->nr_segments; i++)
    39			image->segment[i].mem = __pa(image->segment[i].mem);
    40	
    41		pr_debug("Loaded the kernel at 0x%lx, entry at 0x%lx\n",
    42			 kernel_load_addr, image->start);
    43	
    44		if (initrd != NULL) {
    45			kbuf.buffer = initrd;
    46			kbuf.bufsz = kbuf.memsz = initrd_len;
    47			kbuf.buf_align = PAGE_SIZE;
    48			kbuf.top_down = false;
    49			kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
    50			ret = kexec_add_buffer(&kbuf);
    51			if (ret)
    52				goto out;
    53	
    54			pr_debug("Loaded initrd at 0x%lx\n", kbuf.mem);
  > 55			image->arch.initrd_start = kbuf.mem;
    56			image->arch.initrd_end = kbuf.mem + initrd_len;
    57		}
    58	
    59		if (cmdline != NULL) {
    60			kbuf.buffer = cmdline;
    61			kbuf.bufsz = kbuf.memsz = ALIGN(cmdline_len, 8);
    62			kbuf.buf_align = PAGE_SIZE;
    63			kbuf.top_down = false;
    64			kbuf.buf_min = PAGE0->mem_free + PAGE_SIZE;
    65			kbuf.buf_max = kernel_load_addr;
    66			kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
    67			ret = kexec_add_buffer(&kbuf);
    68			if (ret)
    69				goto out;
    70	
    71			pr_debug("Loaded cmdline at 0x%lx\n", kbuf.mem);
    72			image->arch.cmdline = kbuf.mem;
    73		}
    74	out:
    75		return NULL;
    76	}
    77	

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ