All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: x86@kernel.org, kasan-dev@googlegroups.com
Cc: Kees Cook <keescook@chromium.org>, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/2] Allow use of lib/string in early boot
Date: Sat,  5 Sep 2020 18:23:21 -0400	[thread overview]
Message-ID: <20200905222323.1408968-1-nivedita@alum.mit.edu> (raw)

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


             reply	other threads:[~2020-09-05 22:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05 22:23 Arvind Sankar [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200905222323.1408968-1-nivedita@alum.mit.edu \
    --to=nivedita@alum.mit.edu \
    --cc=kasan-dev@googlegroups.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.