lkml.org 
[lkml]   [2021]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:x86/cpu 2/3] arch/x86/kernel/alternative.c:96:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds.
Yet another useless report!

On Tue, Mar 16, 2021 at 07:50:10AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/cpu
> head: 301cddc21a157a3072d789a3097857202e550a24
> commit: a89dfde3dc3c2dbf56910af75e2d8b11ec5308f6 [2/3] x86: Remove dynamic NOP selection
> compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
>
> cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

What's cppcheck?

That?

Description-en: tool for static C/C++ code analysis (CLI)
Cppcheck is a command-line tool that tries to detect bugs that your


> >> arch/x86/kernel/alternative.c:96:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds. [pointerOutOfBounds]
> x86nops + 1 + 2 + 3 + 4,
> ^
> arch/x86/kernel/alternative.c:97:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+15' is out of bounds. [pointerOutOfBounds]
> x86nops + 1 + 2 + 3 + 4 + 5,
> ^
> arch/x86/kernel/alternative.c:98:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+21' is out of bounds. [pointerOutOfBounds]
> x86nops + 1 + 2 + 3 + 4 + 5 + 6,
> ^
> arch/x86/kernel/alternative.c:99:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+28' is out of bounds. [pointerOutOfBounds]
> x86nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
> ^
> >> arch/x86/kernel/ftrace.c:304:7: warning: union member 'ftrace_op_code_union::code' is never used. [unusedStructMember]
> char code[OP_REF_SIZE];
> ^

How do you trigger this?

/me ignores it until there's some info on how those things can be
reproduced.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2021-03-16 09:29    [W:0.052 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site