From: Kees Cook <keescook@chromium.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Joe Perches <joe@perches.com>,
Fengguang Wu <fengguang.wu@intel.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-am33-list@redhat.com, linux-kernel@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: [PATCH 1/3] lkdtm: Include WARN format string
Date: Tue, 7 Nov 2017 16:27:47 -0800 [thread overview]
Message-ID: <1510100869-73751-2-git-send-email-keescook@chromium.org> (raw)
In-Reply-To: <1510100869-73751-1-git-send-email-keescook@chromium.org>
In order to test the ordering of WARN format strings, actually include one
in LKDTM.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/misc/lkdtm_bugs.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/lkdtm_bugs.c b/drivers/misc/lkdtm_bugs.c
index 9e0b4f959987..8523f7dbac99 100644
--- a/drivers/misc/lkdtm_bugs.c
+++ b/drivers/misc/lkdtm_bugs.c
@@ -62,9 +62,11 @@ void lkdtm_BUG(void)
BUG();
}
+static int warn_counter;
+
void lkdtm_WARNING(void)
{
- WARN_ON(1);
+ WARN(1, "Warning message trigger count: %d\n", warn_counter++);
}
void lkdtm_EXCEPTION(void)
--
2.7.4
next prev parent reply other threads:[~2017-11-08 0:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 0:27 [PATCH 0/3] bug: Fix "cut here" location for __WARN_TAINT Kees Cook
2017-11-08 0:27 ` Kees Cook [this message]
2017-11-08 0:27 ` [PATCH 1/3] lkdtm: Include WARN format string Kees Cook
2017-11-08 0:27 ` [PATCH 2/3] bug: Define the "cut here" string in a single place Kees Cook
2017-11-08 0:27 ` Kees Cook
2017-11-08 0:27 ` [PATCH 3/3] bug: Fix "cut here" location for __WARN_TAINT architectures Kees Cook
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=1510100869-73751-2-git-send-email-keescook@chromium.org \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=fengguang.wu@intel.com \
--cc=joe@perches.com \
--cc=jpoimboe@redhat.com \
--cc=linux-am33-list@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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 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).