[<prev] [next>] [day] [month] [year] [list]
Message-Id: <201010292037.32588.knikanth@suse.de>
Date: Fri, 29 Oct 2010 20:37:32 +0530
From: Nikanth Karthikesan <knikanth@...e.de>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
x86@...nel.org
Subject: [PATCH] Modules: x86_64 - R_X86_64_PC32 gives signed 32 bit and needs overflow check.
R_X86_64_PC32 gives signed 32 bit and needs overflow check.
Signed-off-by: Nikanth Karthikesan <knikanth@...e.de>
---
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 8f29560..59b859a 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -168,11 +168,9 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
break;
case R_X86_64_PC32:
val -= (u64)loc;
- *(u32 *)loc = val;
-#if 0
+ *(s32 *)loc = val;
if ((s64)val != *(s32 *)loc)
goto overflow;
-#endif
break;
default:
printk(KERN_ERR "module %s: Unknown rela relocation: %llu\n",
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists