public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Coiby Xu <coxu@redhat.com>, kexec@lists.infradead.org
Cc: oe-kbuild-all@lists.linux.dev,
	"Ondrej Kozina" <okozina@redhat.com>,
	"Milan Broz" <gmazyland@gmail.com>,
	"Thomas Staudt" <tstaudt@de.ibm.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Kairui Song" <ryncsn@gmail.com>,
	"Jan Pazdziora" <jpazdziora@redhat.com>,
	"Pingfan Liu" <kernelfans@gmail.com>,
	"Baoquan He" <bhe@redhat.com>, "Dave Young" <dyoung@redhat.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	"Dave Hansen" <dave.hansen@intel.com>,
	"Vitaly Kuznetsov" <vkuznets@redhat.com>,
	"Greg KH" <greg@kroah.com>, "Vivek Goyal" <vgoyal@redhat.com>,
	"Eric Biederman" <ebiederm@xmission.com>,
	"Kees Cook" <kees@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	"(open list:KERNEL HARDENING (not covered by other
	areas):Keyword:b__counted_byb)" <linux-hardening@vger.kernel.org>
Subject: Re: [PATCH v6 3/7] crash_dump: store dm crypt keys in kdump reserved memory
Date: Tue, 29 Oct 2024 22:41:50 +0800	[thread overview]
Message-ID: <202410292237.HA9vMqbC-lkp@intel.com> (raw)
In-Reply-To: <20241029055223.210039-4-coxu@redhat.com>

Hi Coiby,

kernel test robot noticed the following build errors:

[auto build test ERROR on e42b1a9a2557aa94fee47f078633677198386a52]

url:    https://github.com/intel-lab-lkp/linux/commits/Coiby-Xu/kexec_file-allow-to-place-kexec_buf-randomly/20241029-135449
base:   e42b1a9a2557aa94fee47f078633677198386a52
patch link:    https://lore.kernel.org/r/20241029055223.210039-4-coxu%40redhat.com
patch subject: [PATCH v6 3/7] crash_dump: store dm crypt keys in kdump reserved memory
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20241029/202410292237.HA9vMqbC-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241029/202410292237.HA9vMqbC-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410292237.HA9vMqbC-lkp@intel.com/

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

   kernel/crash_dump_dm_crypt.c: In function 'crash_load_dm_crypt_keys':
>> kernel/crash_dump_dm_crypt.c:221:16: error: variable 'kbuf' has initializer but incomplete type
     221 |         struct kexec_buf kbuf = {
         |                ^~~~~~~~~
>> kernel/crash_dump_dm_crypt.c:222:18: error: 'struct kexec_buf' has no member named 'image'
     222 |                 .image = image,
         |                  ^~~~~
>> kernel/crash_dump_dm_crypt.c:222:26: warning: excess elements in struct initializer
     222 |                 .image = image,
         |                          ^~~~~
   kernel/crash_dump_dm_crypt.c:222:26: note: (near initialization for 'kbuf')
>> kernel/crash_dump_dm_crypt.c:223:18: error: 'struct kexec_buf' has no member named 'buf_min'
     223 |                 .buf_min = 0,
         |                  ^~~~~~~
   kernel/crash_dump_dm_crypt.c:223:28: warning: excess elements in struct initializer
     223 |                 .buf_min = 0,
         |                            ^
   kernel/crash_dump_dm_crypt.c:223:28: note: (near initialization for 'kbuf')
>> kernel/crash_dump_dm_crypt.c:224:18: error: 'struct kexec_buf' has no member named 'buf_max'
     224 |                 .buf_max = ULONG_MAX,
         |                  ^~~~~~~
   In file included from include/linux/limits.h:7,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/loongarch/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/rcupdate.h:27,
                    from include/linux/rbtree.h:24,
                    from include/linux/key.h:15,
                    from kernel/crash_dump_dm_crypt.c:2:
>> include/vdso/limits.h:13:25: warning: excess elements in struct initializer
      13 | #define ULONG_MAX       (~0UL)
         |                         ^
   kernel/crash_dump_dm_crypt.c:224:28: note: in expansion of macro 'ULONG_MAX'
     224 |                 .buf_max = ULONG_MAX,
         |                            ^~~~~~~~~
   include/vdso/limits.h:13:25: note: (near initialization for 'kbuf')
      13 | #define ULONG_MAX       (~0UL)
         |                         ^
   kernel/crash_dump_dm_crypt.c:224:28: note: in expansion of macro 'ULONG_MAX'
     224 |                 .buf_max = ULONG_MAX,
         |                            ^~~~~~~~~
>> kernel/crash_dump_dm_crypt.c:225:18: error: 'struct kexec_buf' has no member named 'top_down'
     225 |                 .top_down = false,
         |                  ^~~~~~~~
   kernel/crash_dump_dm_crypt.c:225:29: warning: excess elements in struct initializer
     225 |                 .top_down = false,
         |                             ^~~~~
   kernel/crash_dump_dm_crypt.c:225:29: note: (near initialization for 'kbuf')
>> kernel/crash_dump_dm_crypt.c:226:18: error: 'struct kexec_buf' has no member named 'random'
     226 |                 .random = true,
         |                  ^~~~~~
   kernel/crash_dump_dm_crypt.c:226:27: warning: excess elements in struct initializer
     226 |                 .random = true,
         |                           ^~~~
   kernel/crash_dump_dm_crypt.c:226:27: note: (near initialization for 'kbuf')
>> kernel/crash_dump_dm_crypt.c:221:26: error: storage size of 'kbuf' isn't known
     221 |         struct kexec_buf kbuf = {
         |                          ^~~~
>> kernel/crash_dump_dm_crypt.c:246:20: error: 'KEXEC_BUF_MEM_UNKNOWN' undeclared (first use in this function)
     246 |         kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
         |                    ^~~~~~~~~~~~~~~~~~~~~
   kernel/crash_dump_dm_crypt.c:246:20: note: each undeclared identifier is reported only once for each function it appears in
>> kernel/crash_dump_dm_crypt.c:247:13: error: implicit declaration of function 'kexec_add_buffer' [-Wimplicit-function-declaration]
     247 |         r = kexec_add_buffer(&kbuf);
         |             ^~~~~~~~~~~~~~~~
>> kernel/crash_dump_dm_crypt.c:221:26: warning: unused variable 'kbuf' [-Wunused-variable]
     221 |         struct kexec_buf kbuf = {
         |                          ^~~~


vim +/kbuf +221 kernel/crash_dump_dm_crypt.c

   218	
   219	int crash_load_dm_crypt_keys(struct kimage *image)
   220	{
 > 221		struct kexec_buf kbuf = {
 > 222			.image = image,
 > 223			.buf_min = 0,
 > 224			.buf_max = ULONG_MAX,
 > 225			.top_down = false,
 > 226			.random = true,
   227		};
   228		int r;
   229	
   230	
   231		if (key_count <= 0) {
   232			kexec_dprintk("No dm-crypt keys\n");
   233			return -EINVAL;
   234		}
   235	
   236		image->dm_crypt_keys_addr = 0;
   237		r = build_keys_header();
   238		if (r)
   239			return r;
   240	
   241		kbuf.buffer = keys_header;
   242		kbuf.bufsz = get_keys_header_size(key_count);
   243	
   244		kbuf.memsz = kbuf.bufsz;
   245		kbuf.buf_align = ELF_CORE_HEADER_ALIGN;
 > 246		kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
 > 247		r = kexec_add_buffer(&kbuf);
   248		if (r) {
   249			kvfree((void *)kbuf.buffer);
   250			return r;
   251		}
   252		image->dm_crypt_keys_addr = kbuf.mem;
   253		image->dm_crypt_keys_sz = kbuf.bufsz;
   254		kexec_dprintk(
   255			"Loaded dm crypt keys to kexec_buffer bufsz=0x%lx memsz=0x%lx\n",
   256			kbuf.bufsz, kbuf.bufsz);
   257	
   258		return r;
   259	}
   260	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2024-10-29 14:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  5:52 [PATCH v6 0/7] Support kdump with LUKS encryption by reusing LUKS volume keys Coiby Xu
2024-10-29  5:52 ` [PATCH v6 1/7] kexec_file: allow to place kexec_buf randomly Coiby Xu
2024-11-29  1:38   ` Baoquan He
2024-12-02 10:04     ` Coiby Xu
2024-10-29  5:52 ` [PATCH v6 2/7] crash_dump: make dm crypt keys persist for the kdump kernel Coiby Xu
2024-10-29  5:52 ` [PATCH v6 3/7] crash_dump: store dm crypt keys in kdump reserved memory Coiby Xu
2024-10-29 14:41   ` kernel test robot [this message]
2024-11-01  7:16     ` Coiby Xu
2024-12-11 12:58   ` Baoquan He
2024-12-23  1:05     ` Coiby Xu
2024-10-29  5:52 ` [PATCH v6 4/7] crash_dump: reuse saved dm crypt keys for CPU/memory hot-plugging Coiby Xu
2024-12-11 13:08   ` Baoquan He
2024-12-23  0:41     ` Coiby Xu
2024-10-29  5:52 ` [PATCH v6 5/7] crash_dump: retrieve dm crypt keys in kdump kernel Coiby Xu
2024-10-29  5:52 ` [PATCH v6 6/7] x86/crash: pass dm crypt keys to " Coiby Xu
2024-12-11 12:55   ` Baoquan He
2024-12-23  1:16     ` Coiby Xu
2024-12-26  3:48       ` Baoquan He
2025-01-03  2:24         ` Coiby Xu
2024-10-29  5:52 ` [PATCH v6 7/7] x86/crash: make the page that stores the dm crypt keys inaccessible Coiby Xu
2024-11-04  6:17 ` [PATCH v6 0/7] Support kdump with LUKS encryption by reusing LUKS volume keys Baoquan He
2024-12-03 17:53 ` David Woodhouse
2024-12-11  1:33   ` Baoquan He
2024-12-14  2:24 ` Baoquan He
2024-12-23  1:19   ` Coiby Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202410292237.HA9vMqbC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=berrange@redhat.com \
    --cc=bhe@redhat.com \
    --cc=coxu@redhat.com \
    --cc=dave.hansen@intel.com \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=gmazyland@gmail.com \
    --cc=greg@kroah.com \
    --cc=gustavoars@kernel.org \
    --cc=jpazdziora@redhat.com \
    --cc=kees@kernel.org \
    --cc=kernelfans@gmail.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=okozina@redhat.com \
    --cc=ryncsn@gmail.com \
    --cc=tstaudt@de.ibm.com \
    --cc=vgoyal@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox