From: Kees Cook <keescook@chromium.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"x86@kernel.org" <x86@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>, "H. Peter Anvin" <hpa@zytor.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Michal Marek <mmarek@suse.cz>,
Rusty Russell <rusty@rustcorp.com.au>,
Arnd Bergmann <arnd@arndb.de>,
linux-arch <linux-arch@vger.kernel.org>,
Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v4 0/3] kallsyms base relative series
Date: Mon, 25 Jan 2016 10:53:34 -0800 [thread overview]
Message-ID: <CAGXu5jK9vSafsp8KdArPqT748WwcSnhDO0vYcuhCu+NHeSiFfg@mail.gmail.com> (raw)
In-Reply-To: <1453731572-18448-1-git-send-email-ard.biesheuvel@linaro.org>
On Mon, Jan 25, 2016 at 6:19 AM, Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
> This v4 of my kallsyms base relative implementation is now a 3 piece series,
> since it caused some problems due to the way absolute symbols are handled
> by the absolute per cpu code. As it turns out, that code was probably wrong
> in the sense that it caused non-relocated symbol addresses to be emitted
> for values that are in fact relative to the address of the kernel text.
>
> Patch #1 fixes the scripts/kallsyms invocation to only pass the x86_64
> specific --absolute-percpu option if CONFIG_SMP is also set.
>
> Patch #2 reworks the absolute percpu code to only emit those percpu symbols
> as absolute, and not symbols that have been classified as 'A' (absolute) by
> the linker, since that does not mean quite the same thing.
>
> Patch #3 is the original kallsyms base relative patch, with some
> modifications:
> - folded the s/ULLONG_MAX/-1ULL? change made by Andrew
> - ensured that the kallsyms_relative_base value itself is relocated as
> required.
> - dropped all of the acks and other tags, as they have become outdated with
> the recent changes to this patch.
>
> Ard Biesheuvel (3):
> x86: kallsyms: disable absolute percpu symbols on !SMP
> kallsyms: don't overload absolute symbol type for percpu symbols
> kallsyms: add support for relative offsets in kallsyms address table
Still works for me!
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
-Kees
>
> init/Kconfig | 16 +++
> kernel/kallsyms.c | 38 ++++++--
> scripts/kallsyms.c | 102 +++++++++++++++++---
> scripts/link-vmlinux.sh | 6 +-
> scripts/namespace.pl | 2 +
> 5 files changed, 142 insertions(+), 22 deletions(-)
>
> --
> 2.5.0
>
--
Kees Cook
Chrome OS & Brillo Security
next prev parent reply other threads:[~2016-01-25 18:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 14:19 [PATCH v4 0/3] kallsyms base relative series Ard Biesheuvel
2016-01-25 14:19 ` [PATCH v4 1/3] x86: kallsyms: disable absolute percpu symbols on !SMP Ard Biesheuvel
2016-01-25 14:19 ` [PATCH v4 2/3] kallsyms: don't overload absolute symbol type for percpu symbols Ard Biesheuvel
2016-01-25 14:19 ` [PATCH v4 3/3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel
2016-01-25 14:19 ` Ard Biesheuvel
2016-01-25 17:44 ` [PATCH v4 0/3] kallsyms base relative series Guenter Roeck
2016-01-25 18:53 ` Kees Cook [this message]
2016-01-25 18:53 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGXu5jK9vSafsp8KdArPqT748WwcSnhDO0vYcuhCu+NHeSiFfg@mail.gmail.com \
--to=keescook@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@kernel.org \
--cc=mmarek@suse.cz \
--cc=mpe@ellerman.id.au \
--cc=rusty@rustcorp.com.au \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).