[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170509230639.GA132135@beast>
Date: Tue, 9 May 2017 16:06:39 -0700
From: Kees Cook <keescook@...omium.org>
To: linux-kernel@...r.kernel.org
Cc: Eric Biederman <ebiederm@...ssion.com>, kexec@...ts.infradead.org,
Daniel Micay <danielmicay@...il.com>
Subject: [PATCH] kexec_file: Adjust type of kexec_purgatory
Defining kexec_purgatory as a zero-length char array upsets compile
time size checking. Since this is entirely runtime sized, switch
this to void *. This silences the warning generated by the future
CONFIG_FORTIFY_SOURCE, which did not like the memcmp() of a "0 byte"
array.
Cc: Daniel Micay <danielmicay@...il.com>
Signed-off-by: Kees Cook <keescook@...omium.org>
---
kernel/kexec_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kexec_file.c b/kernel/kexec_file.c
index b118735fea9d..bc86f85f1329 100644
--- a/kernel/kexec_file.c
+++ b/kernel/kexec_file.c
@@ -30,7 +30,7 @@
* Declare these symbols weak so that if architecture provides a purgatory,
* these will be overridden.
*/
-char __weak kexec_purgatory[0];
+void * __weak kexec_purgatory;
size_t __weak kexec_purgatory_size = 0;
static int kexec_calculate_store_digests(struct kimage *image);
--
2.7.4
--
Kees Cook
Pixel Security
Powered by blists - more mailing lists