Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1453434
| From | Kees Cook <keescook@chromium.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section) |
| Date | 2016-08-01 22:00 +0200 |
| Message-ID | <s1rxv-2ia-23@gated-at.bofh.it> (permalink) |
| References | <rHxct-85W-11@gated-at.bofh.it> <rHxcu-85W-29@gated-at.bofh.it> <s1rxv-2ia-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Aug 1, 2016 at 5:37 AM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> Kees Cook <keescook@chromium.org> writes:
>
>> This adds a function that lives in the .rodata section. The section
>> flags are corrected using objcopy since there is no way with gcc to
>> declare section flags in an architecture-agnostic way.
>>
>> Signed-off-by: Kees Cook <keescook@chromium.org>
>> ---
>> drivers/misc/Makefile | 7 +++++++
>> drivers/misc/lkdtm.h | 6 ++++++
>> drivers/misc/lkdtm_core.c | 24 +++++++++++++++++-------
>> drivers/misc/lkdtm_rodata.c | 10 ++++++++++
>> 4 files changed, 40 insertions(+), 7 deletions(-)
>> create mode 100644 drivers/misc/lkdtm.h
>> create mode 100644 drivers/misc/lkdtm_rodata.c
>
> This is blowing up my linker :(
>
> scripts/link-vmlinux.sh: line 52: 36260 Segmentation fault (core dumped) ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${KBUILD_VMLINUX_INIT} --start-group ${KBUILD_VMLINUX_MAIN} --end-group ${1}
>
> Haven't had a chance to debug it further.
Argh. Do you want a quick fix for this now? I can add a PPC CONFIG
blacklist for the rodata check, maybe?
Also, what version of gcc? I'll see if I can reproduce this with a
cross compiler...
-Kees
--
Kees Cook
Chrome OS & Brillo Security
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section) Kees Cook <keescook@chromium.org> - 2016-08-01 22:00 +0200
Re: [kernel-hardening] Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section) Michael Ellerman <mpe@ellerman.id.au> - 2016-08-02 05:20 +0200
Re: [kernel-hardening] Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section) Kees Cook <keescook@chromium.org> - 2016-08-02 21:20 +0200
Re: [kernel-hardening] Re: Linker segfault on powerpc when CONFIG_LKDTM=y (was Re: [kernel-hardening] [PATCH 3/5] lkdtm: add function for testing .rodata section) Michael Ellerman <mpe@ellerman.id.au> - 2016-08-03 07:00 +0200
csiph-web