From: kernel test robot <lkp@intel.com>
To: "Łukasz Stelmach" <l.stelmach@samsung.com>,
"Russell King" <linux@armlinux.org.uk>,
"Masahiro Yamada" <masahiroy@kernel.org>,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Enrico Weigelt" <info@metux.net>,
"Kees Cook" <keescook@chromium.org>,
"Ingo Molnar" <mingo@kernel.org>,
"Ben Dooks" <ben-linux@fluff.org>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 4/4] arm: kexec_file: load zImage or uImage, initrd and dtb
Date: Thu, 1 Oct 2020 18:09:15 +0800 [thread overview]
Message-ID: <202010011859.bXKkBh70-lkp@intel.com> (raw)
In-Reply-To: <20200930183413.17023-5-l.stelmach@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 5999 bytes --]
Hi "Łukasz,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20200930]
[cannot apply to arm/for-next v5.9-rc7 v5.9-rc6 v5.9-rc5 v5.9-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/ukasz-Stelmach/kexec_file_load-for-arm/20201001-024045
base: de69ee6df1cfbf3c67787d8504fd21b59da39572
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/9a7741b76697140672aba84338463032c1fc9fb8
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ukasz-Stelmach/kexec_file_load-for-arm/20201001-024045
git checkout 9a7741b76697140672aba84338463032c1fc9fb8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/arm/kernel/kexec_zimage.c: In function 'zimage_load':
>> arch/arm/kernel/kexec_zimage.c:89:28: warning: variable 'h' set but not used [-Wunused-but-set-variable]
89 | struct arm_zimage_header *h;
| ^
vim +/h +89 arch/arm/kernel/kexec_zimage.c
83
84 static void *zimage_load(struct kimage *image,
85 char *zimage, unsigned long zimage_len,
86 char *initrd, unsigned long initrd_len,
87 char *cmdline, unsigned long cmdline_len)
88 {
> 89 struct arm_zimage_header *h;
90 struct kexec_buf kbuf;
91 struct kexec_segment *zimage_segment;
92 const struct arm_zimage_tag *tag;
93 int ret = -EINVAL;
94
95 unsigned long zimage_mem = 0x20000; /* malloc 64kB + stack 4 kB + some bss */
96 unsigned long kernel_len = zimage_len * 5; /* 5:1 compression */
97 unsigned long kernel_offset = memblock_start_of_DRAM();
98 unsigned long zimage_offset = kernel_offset +
99 ALIGN(kernel_len, PAGE_SIZE);
100 unsigned long initrd_offset = zimage_offset +
101 ALIGN(zimage_len + zimage_mem, PAGE_SIZE);
102
103 if (image->type == KEXEC_TYPE_CRASH) {
104 kernel_offset += crashk_res.start;
105 zimage_offset += crashk_res.start;
106 initrd_offset += crashk_res.start;
107 }
108 debug_offsets();
109
110 h = (struct arm_zimage_header *)zimage;
111
112 tag = find_extension_tag(zimage, zimage_len, ZIMAGE_TAG_KRNL_SIZE);
113 if (tag) {
114 uint32_t *p = (void *)zimage +
115 le32_to_cpu(tag->u.krnl_size.size_ptr);
116 uint32_t edata_size = le32_to_cpu(get_unaligned(p));
117 uint32_t bss_size = le32_to_cpu(tag->u.krnl_size.bss_size);
118 uint32_t text_offset = le32_to_cpu(tag->u.krnl_size.text_offset);
119
120 kernel_offset += ALIGN(text_offset, PAGE_SIZE);
121 kernel_len = edata_size + bss_size;
122
123 pr_debug("Decompressed kernel sizes:\n");
124 pr_debug(" text+data 0x%08lx bss 0x%08lx total 0x%08lx\n",
125 (unsigned long)edata_size,
126 (unsigned long)bss_size,
127 (unsigned long)kernel_len);
128
129 zimage_offset = kernel_offset + ALIGN(edata_size, PAGE_SIZE);
130 initrd_offset = zimage_offset +
131 max(ALIGN(zimage_len + 0x20000, PAGE_SIZE),
132 ALIGN((unsigned long)bss_size, PAGE_SIZE));
133 debug_offsets();
134 }
135
136 tag = find_extension_tag(zimage, zimage_len,
137 ZIMAGE_TAG_ZIMAGE_MEM);
138 if (tag) {
139 uint32_t zimage_mem = le32_to_cpu(tag->u.zimage_mem);
140
141 pr_debug("Decompressor requires %d bytes of memory\n", zimage_mem);
142
143 initrd_offset = max(ALIGN(zimage_offset + zimage_len + zimage_mem, PAGE_SIZE),
144 ALIGN(kernel_offset + kernel_len, PAGE_SIZE));
145 debug_offsets();
146 }
147
148 /*
149 * zImage MUST be loaded into the first 128 MiB of physical
150 * memory for proper memory detection. Should the uncompressed
151 * kernel be larger than 128 MiB, zImage relocation becomes
152 * unavoidable and it is best to rely on the relocation code.
153 */
154 if (((zimage_offset - kernel_offset) + PAGE_SIZE + 0x8000) >= SZ_128M) {
155 pr_debug("The kernel is too big (%ld MiB) to avoid "
156 "zImage relocation. Loading zimage at 0x%08lx\n",
157 ((zimage_offset - kernel_offset) >> 20),
158 kernel_offset);
159 zimage_offset = kernel_offset;
160 }
161
162 kbuf.image = image;
163 kbuf.top_down = false;
164
165 kbuf.buf_min = zimage_offset;
166 kbuf.buf_max = ULONG_MAX;
167 kbuf.buffer = zimage;
168 kbuf.bufsz = zimage_len;
169 kbuf.buf_align = PAGE_SIZE;
170
171 kbuf.mem = KEXEC_BUF_MEM_UNKNOWN;
172 kbuf.memsz = zimage_len;
173
174 ret = kexec_add_buffer(&kbuf);
175 if (ret)
176 return ERR_PTR(ret);
177
178 pr_debug("Loaded zImage at 0x%lx bufsz=0x%lx memsz=0x%lx\n",
179 kbuf.mem, kbuf.bufsz, kbuf.memsz);
180
181 initrd_offset += kbuf.mem - zimage_offset;
182 debug_offsets();
183
184 zimage_segment = &image->segment[image->nr_segments - 1];
185 image->start = zimage_segment->mem;
186
187 ret = load_other_segments(image,
188 zimage_segment->mem, zimage_segment->memsz,
189 initrd, initrd_len, initrd_offset,
190 cmdline);
191 return ERR_PTR(ret);
192 }
193
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 76676 bytes --]
prev parent reply other threads:[~2020-10-01 10:10 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200601142806eucas1p2680c5625411e7a695d8469760a926520@eucas1p2.samsung.com>
2020-06-01 14:27 ` [PATCH 0/5] kexec_file_load() for arm Łukasz Stelmach
[not found] ` <CGME20200601142810eucas1p1767585cf172d26aedb551d7453aa7402@eucas1p1.samsung.com>
2020-06-01 14:27 ` [PATCH 1/5] arm: decompressor: set malloc pool size for the decompressor Łukasz Stelmach
2020-06-01 14:46 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601145652eucas1p11dcea1cea21824d0a6bfe6ab38c1cab7@eucas1p1.samsung.com>
2020-06-01 14:56 ` Lukasz Stelmach
2020-06-01 15:10 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601165420eucas1p273e0cdb143312b9a621e2444c5daae9b@eucas1p2.samsung.com>
2020-06-01 16:54 ` Lukasz Stelmach
[not found] ` <CGME20200601142810eucas1p23056f7997a880ff7d676c64703f87115@eucas1p2.samsung.com>
2020-06-01 14:27 ` [PATCH 2/5] arm: add image header definitions Łukasz Stelmach
[not found] ` <CGME20200601142810eucas1p1c42ff7c9b417f04bc506261726f08b4f@eucas1p1.samsung.com>
2020-06-01 14:27 ` [PATCH 3/5] arm: decompressor: define a new zImage tag Łukasz Stelmach
2020-06-01 14:55 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601162002eucas1p28eb08a42de6f313458e9391bd5976e90@eucas1p2.samsung.com>
2020-06-01 16:19 ` Lukasz Stelmach
2020-06-01 18:25 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601202757eucas1p11d380be9e0b2fe912a358d21e2d8dc2a@eucas1p1.samsung.com>
2020-06-01 20:27 ` Lukasz Stelmach
2020-06-01 20:41 ` Russell King - ARM Linux admin
[not found] ` <CGME20200602161720eucas1p257e9e892ed4679ed1d168db34d089a82@eucas1p2.samsung.com>
2020-06-02 16:17 ` Lukasz Stelmach
[not found] ` <CGME20200601142811eucas1p260e5a434ea7743eecdb37c4d975c5f05@eucas1p2.samsung.com>
2020-06-01 14:27 ` [PATCH 4/5] arm: Add kexec_image_info Łukasz Stelmach
2020-06-01 14:56 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601163034eucas1p1f9c726b605c18bf3944254cd83dd67b3@eucas1p1.samsung.com>
2020-06-01 16:30 ` Lukasz Stelmach
[not found] ` <CGME20200601142811eucas1p1604c8e6ca06c09f1ec821ea5e1918c53@eucas1p1.samsung.com>
2020-06-01 14:27 ` [PATCH 5/5] arm: kexec_file: load zImage or uImage, initrd and dtb Łukasz Stelmach
2020-06-01 15:07 ` Russell King - ARM Linux admin
2020-06-01 15:14 ` Russell King - ARM Linux admin
[not found] ` <CGME20200601164700eucas1p2e30af458bae7e820ca55f7936ac3579a@eucas1p2.samsung.com>
2020-06-01 16:46 ` Lukasz Stelmach
[not found] ` <CGME20200601184829eucas1p1b06bfc130083f6248d624febed1de9fc@eucas1p1.samsung.com>
2020-06-01 18:48 ` Lukasz Stelmach
[not found] ` <CGME20200602161737eucas1p241dd0e0a9b5eea7c5d5774c46b3c570b@eucas1p2.samsung.com>
2020-06-02 16:17 ` [PATCH v2 0/5] kexec_file_load() for arm Łukasz Stelmach
[not found] ` <CGME20200602161737eucas1p2c83700f7c17296c4367ee3fda1c6e783@eucas1p2.samsung.com>
2020-06-02 16:17 ` [PATCH v2 1/5] arm: decompressor: set malloc pool size for the decompressor Łukasz Stelmach
[not found] ` <CGME20200602161738eucas1p27dfbe386bd76555598d5574faf4fdad3@eucas1p2.samsung.com>
2020-06-02 16:17 ` [PATCH v2 2/5] arm: add image header definitions Łukasz Stelmach
[not found] ` <CGME20200602161738eucas1p2151f88b526bb009c27820a4f290a961e@eucas1p2.samsung.com>
2020-06-02 16:17 ` [PATCH v2 3/5] arm: decompressor: define a new zImage tag Łukasz Stelmach
[not found] ` <CGME20200602161738eucas1p2ccfaa7610dc6f76e209ba96d6278259e@eucas1p2.samsung.com>
2020-06-02 16:17 ` [PATCH v2 4/5] arm: Add kexec_image_info Łukasz Stelmach
[not found] ` <CGME20200602161739eucas1p16a56ff590bf44e747d5ad6e178d57067@eucas1p1.samsung.com>
2020-06-02 16:17 ` [PATCH v2 5/5] arm: kexec_file: load zImage or uImage, initrd and dtb Łukasz Stelmach
2020-06-11 10:37 ` [PATCH 0/5] kexec_file_load() for arm Dave Young
[not found] ` <CGME20200930183921eucas1p11a56f805421a614be67f869f5ed18b9b@eucas1p1.samsung.com>
2020-09-30 18:34 ` [PATCH v3 0/4] " Łukasz Stelmach
[not found] ` <CGME20200930183923eucas1p2241d3e1b8d4d05a2228448ff8fc4bb74@eucas1p2.samsung.com>
2020-09-30 18:34 ` [PATCH v3 1/4] arm: add image header definitions Łukasz Stelmach
[not found] ` <CGME20200930183924eucas1p2869520cc28e705073cb08c37c1e2fc6d@eucas1p2.samsung.com>
2020-09-30 18:34 ` [PATCH v3 2/4] arm: decompressor: define a new zImage tag Łukasz Stelmach
[not found] ` <CGME20200930183924eucas1p1eba72052e1723ce75e00cbadbe03b6fa@eucas1p1.samsung.com>
2020-09-30 18:34 ` [PATCH v3 3/4] arm: Add kexec_image_info Łukasz Stelmach
[not found] ` <CGME20200930183924eucas1p281730f3d651fc2c78d6a95e47a2c5220@eucas1p2.samsung.com>
2020-09-30 18:34 ` [PATCH v3 4/4] arm: kexec_file: load zImage or uImage, initrd and dtb Łukasz Stelmach
2020-10-01 10:09 ` kernel test robot [this message]
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=202010011859.bXKkBh70-lkp@intel.com \
--to=lkp@intel.com \
--cc=ben-linux@fluff.org \
--cc=info@metux.net \
--cc=kbuild-all@lists.01.org \
--cc=keescook@chromium.org \
--cc=l.stelmach@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=masahiroy@kernel.org \
--cc=mingo@kernel.org \
--cc=ndesaulniers@google.com \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).