From: Kees Cook <keescook@chromium.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Richard Weinberger <richard.weinberger@gmail.com>,
Richard Weinberger <richard@nod.at>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Prasad Sodagudi <psodagud@codeaurora.org>,
Sami Tolvanen <samitolvanen@google.com>,
Amit Daniel Kachhap <amit.kachhap@arm.com>,
"open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@vger.kernel.org>,
clang-built-linux@googlegroups.com,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH drivers/misc 0/4] lkdtm: Various clean ups
Date: Wed, 24 Jun 2020 23:06:18 -0700 [thread overview]
Message-ID: <202006242300.145D555@keescook> (raw)
In-Reply-To: <80f501f4-d4fb-1f22-5603-57b5490a695d@infradead.org>
On Wed, Jun 24, 2020 at 06:45:47PM -0700, Randy Dunlap wrote:
> Looks like lkdtm/bugs.c needs to get/use arch/x86/include/asm/processor.h
> but it actually uses arch/x86/um/asm/processor*.h, which does not have the
> needed structs etc.
Should I just test for !UML in bugs.c? (This is all for the
lkdtm_DOUBLE_FAULT() test.) I already do those kinds of checks for the
lkdtm_UNSET_SMEP() test. e.g.:
diff --git a/drivers/misc/lkdtm/bugs.c b/drivers/misc/lkdtm/bugs.c
index 736675f0a246..f3e7040a7739 100644
--- a/drivers/misc/lkdtm/bugs.c
+++ b/drivers/misc/lkdtm/bugs.c
@@ -13,7 +13,7 @@
#include <linux/uaccess.h>
#include <linux/slab.h>
-#ifdef CONFIG_X86_32
+#if IS_ENABLED(CONFIG_X86_32) && !IS_ENABLED(CONFIG_UML)
#include <asm/desc.h>
#endif
@@ -419,7 +419,7 @@ void lkdtm_UNSET_SMEP(void)
void lkdtm_DOUBLE_FAULT(void)
{
-#ifdef CONFIG_X86_32
+#if IS_ENABLED(CONFIG_X86_32) && !IS_ENABLED(CONFIG_UML)
/*
* Trigger #DF by setting the stack limit to zero. This clobbers
* a GDT TLS slot, which is okay because the current task will die
--
Kees Cook
next prev parent reply other threads:[~2020-06-25 6:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 20:03 [PATCH drivers/misc 0/4] lkdtm: Various clean ups Kees Cook
2020-05-29 20:03 ` [PATCH 1/4] lkdtm: Avoid more compiler optimizations for bad writes Kees Cook
2020-05-29 20:10 ` Nick Desaulniers
2020-05-29 20:03 ` [PATCH 2/4] lkdtm/heap: Avoid edge and middle of slabs Kees Cook
2020-05-29 20:03 ` [PATCH 3/4] selftests/lkdtm: Reset WARN_ONCE to avoid false negatives Kees Cook
2020-05-29 20:22 ` Shuah Khan
2020-05-29 20:03 ` [PATCH 4/4] lkdtm: Make arch-specific tests always available Kees Cook
2020-06-23 23:10 ` [PATCH drivers/misc 0/4] lkdtm: Various clean ups Kees Cook
2020-06-23 23:32 ` Randy Dunlap
2020-06-24 0:01 ` Kees Cook
2020-06-24 7:23 ` Richard Weinberger
2020-06-24 20:36 ` Kees Cook
2020-06-24 21:29 ` Randy Dunlap
2020-06-24 22:01 ` Richard Weinberger
2020-06-24 22:23 ` Randy Dunlap
2020-06-24 22:35 ` Randy Dunlap
2020-06-25 1:45 ` Randy Dunlap
2020-06-25 6:06 ` Kees Cook [this message]
2020-06-25 6:24 ` Richard Weinberger
2020-06-25 15:24 ` Randy Dunlap
2020-06-24 6:13 ` Greg Kroah-Hartman
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=202006242300.145D555@keescook \
--to=keescook@chromium.org \
--cc=amit.kachhap@arm.com \
--cc=clang-built-linux@googlegroups.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=psodagud@codeaurora.org \
--cc=rdunlap@infradead.org \
--cc=richard.weinberger@gmail.com \
--cc=richard@nod.at \
--cc=samitolvanen@google.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox