From: Andrew Morton <akpm@linux-foundation.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, x86@kernel.org,
keescook@chromium.org, mingo@kernel.org, hpa@zytor.com,
heiko.carstens@de.ibm.com, benh@kernel.crashing.org,
mpe@ellerman.id.au, mmarek@suse.cz, rusty@rustcorp.com.au,
arnd@arndb.de, linux-arch@vger.kernel.org
Subject: Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table
Date: Fri, 22 Jan 2016 15:34:28 -0800 [thread overview]
Message-ID: <20160122153428.8422f42877c7707dbcba0259@linux-foundation.org> (raw)
In-Reply-To: <1453396783-21591-1-git-send-email-ard.biesheuvel@linaro.org>
On Thu, 21 Jan 2016 18:19:43 +0100 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> Similar to how relative extables are implemented, it is possible to emit
> the kallsyms table in such a way that it contains offsets relative to some
> anchor point in the kernel image rather than absolute addresses. The benefit
> is that such table entries are no longer subject to dynamic relocation when
> the build time and runtime offsets of the kernel image are different. Also,
> on 64-bit architectures, it essentially cuts the size of the address table
> in half since offsets can typically be expressed in 32 bits.
>
> Since it is useful for some architectures (like x86) to retain the ability
> to emit absolute values as well, this patch adds support for both, by
> emitting absolute addresses as positive 32-bit values, and addresses
> relative to the lowest encountered relative symbol as negative values, which
> are subtracted from the runtime address of this base symbol to produce the
> actual address.
>
> Support for the above is enabled by default for all architectures except
> IA-64, whose symbols are too far apart to capture in this manner.
scripts/kallsyms.c: In function 'record_relative_base':
scripts/kallsyms.c:744: error: 'ULLONG_MAX' undeclared (first use in this function)
scripts/kallsyms.c:744: error: (Each undeclared identifier is reported only once
scripts/kallsyms.c:744: error: for each function it appears in.)
That's with (ancient) glibc-headers-2.5-3. It appears that limits.h's
ULLONG_MAX requires "#ifdef __USE_ISOC99". I'm not sure what's the
correct way of turning this on.
next prev parent reply other threads:[~2016-01-22 23:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 10:48 [PATCH v2] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel
2016-01-21 11:34 ` Ard Biesheuvel
2016-01-21 17:19 ` [PATCH v3] " Ard Biesheuvel
2016-01-21 22:50 ` Andrew Morton
2016-01-21 22:55 ` Kees Cook
2016-01-21 22:55 ` Kees Cook
2016-01-21 23:20 ` Andrew Morton
2016-01-22 8:20 ` Ard Biesheuvel
2016-01-22 21:07 ` Andrew Morton
2016-01-22 21:54 ` Ard Biesheuvel
2016-01-22 21:54 ` Ard Biesheuvel
2016-01-23 13:21 ` Balbir Singh
2016-01-22 3:44 ` Michael Ellerman
2016-01-22 6:44 ` Ard Biesheuvel
2016-01-22 23:34 ` Andrew Morton [this message]
2016-01-22 23:34 ` Andrew Morton
2016-01-22 23:43 ` Andrew Morton
2016-01-22 23:43 ` Andrew Morton
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=20160122153428.8422f42877c7707dbcba0259@linux-foundation.org \
--to=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=keescook@chromium.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--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).