]> git.baikalelectronics.ru Git - kernel.git/commit
x86: mark kprobe templates as character arrays, not single characters
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jul 2017 18:34:47 +0000 (11:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 Jul 2017 18:34:47 +0000 (11:34 -0700)
commitc0d33dcc02d077dc9d0a1f8d6f9fd9a3c8bc8759
treea51908ed455f210d1752a732c3af95c936bb6f63
parent999fbee8407d2c4c13e3da286c49050cf2c5401b
x86: mark kprobe templates as character arrays, not single characters

They really are, and the "take the address of a single character" makes
the string fortification code unhappy (it believes that you can now only
acccess one byte, rather than a byte range, and then raises errors for
the memory copies going on in there).

We could now remove a few 'addressof' operators (since arrays naturally
degrade to pointers), but this is the minimal patch that just changes
the C prototypes of those template arrays (the templates themselves are
defined in inline asm).

Reported-by: kernel test robot <xiaolong.ye@intel.com>
Acked-and-tested-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/kprobes.h