mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/compressed: remove unnecessary check
@ 2015-02-20 17:55 Alexander Kuleshov
  2015-02-20 18:38 ` Kees Cook
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kuleshov @ 2015-02-20 17:55 UTC (permalink / raw)
  To: H. Peter Anvin, Thomas Gleixner, Ingo Molnar, Kees Cook
  Cc: linux-kernel, Alexander Kuleshov

region.start is entry->addr, but we already did check for case when
entry->addr + entry->size < minimum, so no need to check that
region.start is less than minimum.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
---
 arch/x86/boot/compressed/aslr.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index bb13763..13424a9 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -249,11 +249,7 @@ static void process_e820_entry(struct e820entry *entry,
 
 	region.start = entry->addr;
 	region.size = entry->size;
-
-	/* Potentially raise address to minimum location. */
-	if (region.start < minimum)
-		region.start = minimum;
-
+ 
 	/* Potentially raise address to meet alignment requirements. */
 	region.start = ALIGN(region.start, CONFIG_PHYSICAL_ALIGN);
 
-- 
2.3.0.80.g18d0fec


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-20 18:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-20 17:55 [PATCH] x86/compressed: remove unnecessary check Alexander Kuleshov
2015-02-20 18:38 ` Kees Cook
2015-02-20 18:47   ` Alexander Kuleshov

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®