[RFC PATCH 0/2] Allow use of lib/string in early boot

From: Arvind Sankar
Date: Sat Sep 05 2020 - 18:23:32 EST


The string functions can currently not be used safely in early boot
code, at least on x86, as some of that code will be executing out of
the identity mapping rather than kernel virtual address space.
Instrumentation options that insert accesses to any global data will
cause a crash.

I'm proposing to disable instrumentation for lib/string.c to allow the
string functions to be usable, and the second patch is an example use
case.

However, I'm not very familiar with the actual uses of that
instrumentation and don't know whether disabling it all for lib/string
would be a terrible idea, hence the RFC.

Thanks.

Arvind Sankar (2):
lib/string: Disable instrumentation
x86/cmdline: Use strscpy to initialize boot_command_line

arch/x86/kernel/head64.c | 2 +-
arch/x86/kernel/head_32.S | 11 +++++------
lib/Makefile | 11 +++++++----
3 files changed, 13 insertions(+), 11 deletions(-)

--
2.26.2