From: kernel test robot <lkp@intel.com>
To: Rishabh Bhatnagar <rishabhb@codeaurora.org>,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, bjorn.andersson@linaro.org,
mathieu.poirier@linaro.org, tsoni@codeaurora.org,
psodagud@codeaurora.org, sidgup@codeaurora.org,
Rishabh Bhatnagar <rishabhb@codeaurora.org>
Subject: Re: [PATCH v5 2/3] remoteproc: Add inline coredump functionality
Date: Fri, 26 Jun 2020 02:33:39 +0800 [thread overview]
Message-ID: <202006260248.vvrkqWaj%lkp@intel.com> (raw)
In-Reply-To: <1592961854-634-3-git-send-email-rishabhb@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]
Hi Rishabh,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.8-rc2 next-20200625]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Rishabh-Bhatnagar/Extend-coredump-functionality/20200624-092759
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e857ce6eae7ca21b2055cca4885545e29228fe2
config: h8300-randconfig-m031-20200624 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/remoteproc/remoteproc_coredump.c:186 rproc_coredump_read() warn: unsigned 'copy_sz' is never less than zero.
vim +/copy_sz +186 drivers/remoteproc/remoteproc_coredump.c
171
172 static ssize_t rproc_coredump_read(char *buffer, loff_t offset, size_t count,
173 void *data, size_t header_sz)
174 {
175 size_t seg_data;
176 size_t copy_sz, bytes_left = count;
177 struct rproc_dump_segment *seg;
178 struct rproc_coredump_state *dump_state = data;
179 struct rproc *rproc = dump_state->rproc;
180 void *elfcore = dump_state->header;
181
182 /* Copy the vmalloc'ed header first. */
183 if (offset < header_sz) {
184 copy_sz = memory_read_from_buffer(buffer, count, &offset,
185 elfcore, header_sz);
> 186 if (copy_sz < 0)
187 return -EINVAL;
188
189 return copy_sz;
190 }
191
192 /*
193 * Find out the segment memory chunk to be copied based on offset.
194 * Keep copying data until count bytes are read.
195 */
196 while (bytes_left) {
197 seg = rproc_coredump_find_segment(offset - header_sz,
198 &rproc->dump_segments,
199 &seg_data);
200 /* EOF check */
201 if (!seg) {
202 dev_info(&rproc->dev, "Ramdump done, %lld bytes read",
203 offset);
204 break;
205 }
206
207 copy_sz = min_t(size_t, bytes_left, seg_data);
208
209 rproc_copy_segment(rproc, buffer, seg, seg->size - seg_data,
210 copy_sz);
211
212 offset += copy_sz;
213 buffer += copy_sz;
214 bytes_left -= copy_sz;
215 }
216
217 return count - bytes_left;
218 }
219
---
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: 29729 bytes --]
next prev parent reply other threads:[~2020-06-25 18:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 1:24 [PATCH v5 0/3] Extend coredump functionality Rishabh Bhatnagar
2020-06-24 1:24 ` [PATCH v5 1/3] remoteproc: Move coredump functionality to a new file Rishabh Bhatnagar
2020-06-24 1:24 ` [PATCH v5 2/3] remoteproc: Add inline coredump functionality Rishabh Bhatnagar
2020-06-24 6:26 ` kernel test robot
2020-06-24 10:26 ` kernel test robot
2020-06-25 18:33 ` kernel test robot [this message]
2020-06-24 1:24 ` [PATCH v5 3/3] remoteproc: Add coredump debugfs entry Rishabh Bhatnagar
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=202006260248.vvrkqWaj%lkp@intel.com \
--to=lkp@intel.com \
--cc=bjorn.andersson@linaro.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=psodagud@codeaurora.org \
--cc=rishabhb@codeaurora.org \
--cc=sidgup@codeaurora.org \
--cc=tsoni@codeaurora.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;
as well as URLs for NNTP newsgroup(s).