powerpc/prom_init: don't use string functions from lib/
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 26 Apr 2019 16:23:28 +0000 (16:23 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 2 May 2019 15:20:25 +0000 (01:20 +1000)
commit450e7dd4001f22f796e22422dd1d2cbd5bda21fc
tree9e5344b15ad98198ebe39326ef7f0faf46cfa187
parentcbe46bd4f5104552b612505b73d366f66efc2341
powerpc/prom_init: don't use string functions from lib/

When KASAN is active, the string functions in lib/ are doing the
KASAN checks. This is too early for prom_init.

This patch implements dedicated string functions for prom_init,
which will be compiled in with KASAN disabled.

Size of prom_init before the patch:
   text    data     bss     dec     hex filename
  12060     488    6960   19508    4c34 arch/powerpc/kernel/prom_init.o

Size of prom_init after the patch:
   text    data     bss     dec     hex filename
  12460     488    6960   19908    4dc4 arch/powerpc/kernel/prom_init.o

This increases the size of prom_init a bit, but as prom_init is
in __init section, it is freed after boot anyway.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom_init.c
arch/powerpc/kernel/prom_init_check.sh