linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Allow use of lib/string in early boot
@ 2020-09-05 22:23 Arvind Sankar
  2020-09-05 22:23 ` [RFC PATCH 1/2] lib/string: Disable instrumentation Arvind Sankar
  2020-09-05 22:23 ` [RFC PATCH 2/2] x86/cmdline: Use strscpy to initialize boot_command_line Arvind Sankar
  0 siblings, 2 replies; 9+ messages in thread
From: Arvind Sankar @ 2020-09-05 22:23 UTC (permalink / raw)
  To: x86, kasan-dev; +Cc: Kees Cook, linux-kernel

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-09  5:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 22:23 [RFC PATCH 0/2] Allow use of lib/string in early boot Arvind Sankar
2020-09-05 22:23 ` [RFC PATCH 1/2] lib/string: Disable instrumentation Arvind Sankar
2020-09-08  9:39   ` Marco Elver
2020-09-08 17:21     ` Kees Cook
2020-09-08 18:40       ` Arvind Sankar
2020-09-09  5:20         ` Dmitry Vyukov
2020-09-05 22:23 ` [RFC PATCH 2/2] x86/cmdline: Use strscpy to initialize boot_command_line Arvind Sankar
2020-09-05 22:59   ` Randy Dunlap
2020-09-05 23:16     ` Arvind Sankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).