Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315594
| From | Balbir Singh <bsingharora@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table |
| Date | 2016-01-23 14:30 +0100 |
| Message-ID | <qU6ql-3fe-7@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qTwmT-3nT-27@gated-at.bofh.it> <qTwPT-3OJ-5@gated-at.bofh.it> <qTFgt-1rB-5@gated-at.bofh.it> <qTR7Z-19M-11@gated-at.bofh.it> <qTRUm-1vG-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 22 Jan 2016 22:54:44 +0100 Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote: > > """ > kallsyms: add support for relative offsets in kallsyms address table > > 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. > > On 64-bit architectures, it cuts the size of the kallsyms address table in > half, since offsets between kernel symbols can typically be expressed in 32 > bits. This saves several hundreds of kilobytes of permanent .rodata on > average. In addition, the kallsyms address table is no longer subject to > dynamic relocation when CONFIG_RELOCATABLE is in effect, so the relocation > work done after decompression now doesn't have to do relocation updates for > all these values. This saves up to 24 bytes (i.e., the size of a ELF64 RELA > relocation table entry) per value, which easily adds up to a couple of > megabytes of uncompressed __init data on ppc64 or arm64. Even if these > relocation entries typically compress well, the combined size reduction of > 2.8 MB uncompressed for a ppc64_defconfig build (of which 2.4 MB is __init > data) results in a ~500 KB space saving in the compressed image. > > 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. snip I still don't get the 2GB limitaiton, because of the 32 bit address does it imply that modules load with -2GB to +2GB of the kernel base address of the kallsyms address table? Balbir Singh.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-21 11:50 +0100
Re: [PATCH v2] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-21 12:40 +0100
[PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-21 18:30 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Kees Cook <keescook@chromium.org> - 2016-01-22 00:00 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Andrew Morton <akpm@linux-foundation.org> - 2016-01-22 00:30 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-22 09:30 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Andrew Morton <akpm@linux-foundation.org> - 2016-01-22 22:10 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-22 23:00 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Balbir Singh <bsingharora@gmail.com> - 2016-01-23 14:30 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Michael Ellerman <mpe@ellerman.id.au> - 2016-01-22 04:50 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-01-22 07:50 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Andrew Morton <akpm@linux-foundation.org> - 2016-01-22 00:00 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Andrew Morton <akpm@linux-foundation.org> - 2016-01-23 00:40 +0100
Re: [PATCH v3] kallsyms: add support for relative offsets in kallsyms address table Andrew Morton <akpm@linux-foundation.org> - 2016-01-23 00:50 +0100
csiph-web