lkml.org 
[lkml]   [2018]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 12/16] x86/microcode/AMD: Fix container size's type
Hi Borislav,

I love your patch! Perhaps something to improve:

[auto build test WARNING on tip/x86/core]
[also build test WARNING on v4.20-rc1 next-20181109]
[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/Borislav-Petkov/x86-microcode-AMD-Improve-container-verification/20181109-065233

smatch warnings:
arch/x86/kernel/cpu/microcode/amd.c:368 scan_containers() warn: always true condition '(size >= 0) => (0-u32max >= 0)'
arch/x86/kernel/cpu/microcode/amd.c:368 scan_containers() warn: always true condition '(size >= 0) => (0-u32max >= 0)'

vim +368 arch/x86/kernel/cpu/microcode/amd.c

361
362 /*
363 * Scan the ucode blob for the proper container as we can have multiple
364 * containers glued together.
365 */
366 static void scan_containers(u8 *ucode, size_t size, struct cont_desc *desc)
367 {
> 368 while (size >= 0) {
369 size_t s = parse_container(ucode, size, desc);
370 if (!s)
371 return;
372
373 /* catch wraparound */
374 if (size >= s) {
375 ucode += s;
376 size -= s;
377 } else
378 return;
379 }
380 }
381

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

\
 
 \ /
  Last update: 2018-11-10 22:00    [W:0.136 / U:8.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site