projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cabd1d
)
ARM: 7540/1: kexec: Check segment memory addresses
author
Matthew Leach
<
[email protected]
>
Fri, 21 Sep 2012 17:56:11 +0000
(18:56 +0100)
committer
Russell King
<
[email protected]
>
Wed, 26 Sep 2012 21:58:39 +0000
(22:58 +0100)
Ensure that the memory regions that are set within the segments
correspond to physical contiguous memory regions.
Reviewed-by: Simon Horman <
[email protected]
>
Reviewed-by: Will Deacon <
[email protected]
>
Signed-off-by: Matthew Leach <
[email protected]
>
Signed-off-by: Will Deacon <
[email protected]
>
Signed-off-by: Russell King <
[email protected]
>
arch/arm/kernel/machine_kexec.c
patch
|
blob
|
history
diff --git
a/arch/arm/kernel/machine_kexec.c
b/arch/arm/kernel/machine_kexec.c
index dee34efca748c5e24172d564c1b415a1e96d336b..e29c3337ca8142aeb6f4bb755e3947d6aecd4fbe 100644
(file)
--- a/
arch/arm/kernel/machine_kexec.c
+++ b/
arch/arm/kernel/machine_kexec.c
@@
-8,6
+8,7
@@
#include <linux/reboot.h>
#include <linux/io.h>
#include <linux/irq.h>
+#include <linux/memblock.h>
#include <asm/pgtable.h>
#include <linux/of_fdt.h>
#include <asm/pgalloc.h>
@@
-44,6
+45,11
@@
int machine_kexec_prepare(struct kimage *image)
for (i = 0; i < image->nr_segments; i++) {
current_segment = &image->segment[i];
+ err = memblock_is_region_memory(current_segment->mem,
+ current_segment->memsz);
+ if (err)
+ return - EINVAL;
+
err = get_user(header, (__be32*)current_segment->buf);
if (err)
return err;