revert "kallsyms: fix absolute addresses for kASLR"
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 10 Mar 2014 22:49:48 +0000 (15:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 Mar 2014 00:26:20 +0000 (17:26 -0700)
Revert the recently applied 0f55159d091c ("kallsyms: fix absolute
addresses for kASLR").  Kees said

: This got NAKed, please don't apply -- this patch works for x86 and
: ARM, but may cause problems for others:
:
: https://lkml.org/lkml/2014/2/24/718

It appears that Kees will be fixing all this up for 3.15.

Cc: Andy Honig <ahonig@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/kallsyms.c

index 276e84b..10085de 100644 (file)
@@ -330,7 +330,8 @@ static void write_src(void)
                                printf("\tPTR\t_text + %#llx\n",
                                        table[i].addr - _text);
                        else
-                               printf("\tPTR\t%#llx\n", table[i].addr);
+                               printf("\tPTR\t_text - %#llx\n",
+                                       _text - table[i].addr);
                } else {
                        printf("\tPTR\t%#llx\n", table[i].addr);
                }