Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1417621

Re: [PATCH 0/2] Proper ro_after_init implementation on s390

From Kees Cook <keescook@chromium.org>
Newsgroups linux.kernel
Subject Re: [PATCH 0/2] Proper ro_after_init implementation on s390
Date 2016-06-08 18:00 +0200
Message-ID <rHO3J-24Z-43@gated-at.bofh.it> (permalink)
References <rHnZw-2wN-21@gated-at.bofh.it> <rHrqp-4vk-3@gated-at.bofh.it> <rHtBT-61h-23@gated-at.bofh.it> <rHtLz-64y-3@gated-at.bofh.it> <rHExj-4nH-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jun 7, 2016 at 10:41 PM, Heiko Carstens
<heiko.carstens@de.ibm.com> wrote:
> On Tue, Jun 07, 2016 at 11:11:17AM -0700, Kees Cook wrote:
>> On Tue, Jun 7, 2016 at 11:07 AM, Heiko Carstens
>> <heiko.carstens@de.ibm.com> wrote:
>> > On Tue, Jun 07, 2016 at 08:49:14AM -0700, Kees Cook wrote:
>> >> > Heiko Carstens (2):
>> >> >   vmlinux.lds.h: allow arch specific handling of ro_after_init data section
>> >> >   s390/mm: add proper __ro_after_init support
>> >> >
>> >> >  arch/s390/include/asm/cache.h     |  3 ---
>> >> >  arch/s390/include/asm/sections.h  |  1 +
>> >> >  arch/s390/kernel/vmlinux.lds.S    | 12 +++++++++++-
>> >> >  arch/s390/mm/init.c               |  7 ++++---
>> >> >  arch/s390/mm/vmem.c               |  7 +++----
>> >> >  include/asm-generic/vmlinux.lds.h | 10 +++++++++-
>> >> >  6 files changed, 28 insertions(+), 12 deletions(-)
>> >>
>> >> Awesome! This looks great to me! Have you had a chance to look through
>> >> any of the arch/s390/ __init code for variables that should be marked
>> >> __ro_after_init?
>> >
>> > Not yet, and actually this I'm a bit reluctant to do that, since any wrong
>> > annotation will lead to kernel crashes sooner or later ;)
>> > However I'll look into this as well.
>>
>> Yup, though the good news is it's usually discovered very quickly. :)
>
> Eventually it might make sense to add something like
> DEBUG_SECTION_MISMATCH, which would only report on _write_ accesses from
> non-init sections.
>
> Not sure if this can be done easily and without the need of a new compiler
> feature. The new problem class I'm afraid of is more or less the same that
> we had when non-init code referenced (already freed) initdata objects.

Yeah. I'm hopeful we'll have a gcc plugin to help with this soon.

-Kees

-- 
Kees Cook
Chrome OS & Brillo Security

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Proper ro_after_init implementation on s390 Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-06-07 14:10 +0200
  Re: [PATCH 0/2] Proper ro_after_init implementation on s390 Kees Cook <keescook@chromium.org> - 2016-06-07 17:50 +0200
    Re: [PATCH 0/2] Proper ro_after_init implementation on s390 Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-06-07 20:10 +0200
      Re: [PATCH 0/2] Proper ro_after_init implementation on s390 Kees Cook <keescook@chromium.org> - 2016-06-07 20:20 +0200
        Re: [PATCH 0/2] Proper ro_after_init implementation on s390 Heiko Carstens <heiko.carstens@de.ibm.com> - 2016-06-08 07:50 +0200
          Re: [PATCH 0/2] Proper ro_after_init implementation on s390 Kees Cook <keescook@chromium.org> - 2016-06-08 18:00 +0200

csiph-web