* [PATCH] x86, kaslr: use char array to gain sizeof sanity
@ 2013-11-12 16:56 Kees Cook
2013-11-12 17:01 ` [tip:x86/kaslr] x86, kaslr: Use " tip-bot for Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2013-11-12 16:56 UTC (permalink / raw)
To: H. Peter Anvin, Ingo Molnar
Cc: linux-kernel, Thomas Gleixner, x86, Mathias Krause
The build_str needs to be char [] not char * for the sizeof() to report
the string length.
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
arch/x86/boot/compressed/aslr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index 8746487fa916..9777ed15fbb9 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -13,7 +13,7 @@
#include <linux/version.h>
/* Simplified build-specific string for starting entropy. */
-static const char *build_str = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
+static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
#define I8254_PORT_CONTROL 0x43
--
1.7.9.5
--
Kees Cook
Chrome OS Security
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:x86/kaslr] x86, kaslr: Use char array to gain sizeof sanity
2013-11-12 16:56 [PATCH] x86, kaslr: use char array to gain sizeof sanity Kees Cook
@ 2013-11-12 17:01 ` tip-bot for Kees Cook
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Kees Cook @ 2013-11-12 17:01 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, keescook, minipli, tglx
Commit-ID: 327f7d72454aecdc7a4a1c847a291a3f224b730f
Gitweb: http://git.kernel.org/tip/327f7d72454aecdc7a4a1c847a291a3f224b730f
Author: Kees Cook <keescook@chromium.org>
AuthorDate: Tue, 12 Nov 2013 08:56:07 -0800
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Tue, 12 Nov 2013 08:58:35 -0800
x86, kaslr: Use char array to gain sizeof sanity
The build_str needs to be char [] not char * for the sizeof() to report
the string length.
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: http://lkml.kernel.org/r/20131112165607.GA5921@www.outflux.net
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/boot/compressed/aslr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index 38a07cc..84be175 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -13,7 +13,7 @@
#include <linux/version.h>
/* Simplified build-specific string for starting entropy. */
-static const char *build_str = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
+static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION;
#define I8254_PORT_CONTROL 0x43
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-12 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-12 16:56 [PATCH] x86, kaslr: use char array to gain sizeof sanity Kees Cook
2013-11-12 17:01 ` [tip:x86/kaslr] x86, kaslr: Use " tip-bot for Kees Cook
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®