All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Ryabinin <ryabinin.a.a@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org,
	kasan-dev <kasan-dev@googlegroups.com>,
	Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH] kasan: account for new sections when instrumenting globals
Date: Thu, 23 Jun 2016 16:06:13 +0300	[thread overview]
Message-ID: <CAPAsAGxkbvBVei=Kz4hyKij44GEh12kL9bUn28FomtfnA-xUAQ@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+Zd25zQFXWL7tGFxt_-s-kM99K7SCgwyFxZuh2HPiW7Cw@mail.gmail.com>

2016-06-23 15:40 GMT+03:00 Dmitry Vyukov <dvyukov@google.com>:
> On Thu, Jun 23, 2016 at 1:50 PM, Andrey Ryabinin <ryabinin.a.a@gmail.com> wrote:
>> 2016-06-23 14:49 GMT+03:00 Andrey Ryabinin <ryabinin.a.a@gmail.com>:
>>
>>> Frankly, I don't understand why .text.[exit,startup] sections has any relation
>>> to the bug you described, but maybe I just don't now linker
>>
>> ... scripting well enough to understand what's going on here.
>
>
> I noticed that these 3 new sections are what's different between
> kernel that works and kernel that does not work. So I decided to
> account all of them
> Checked now, it works only with .dtors.
> Is it preferable to add only .dtors or all sections?

No. Merging text.startup/text.exit into INIT_TEXT/EXIT_TEXT makes sense anyway.
This will save us some memory. Also we can add .fini_array into
DISCARD section, because we don't need destructors.

As for .dtors, at first I'd like to understand where it comes from.
AFAIU it shouldn't exist at all.
Recent gcc should generate .fini_array instead of .dtors -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
So something is wrong here. Can you share your kernel .config, kernel version?
And you use gcc-6.1.0, right?

  reply	other threads:[~2016-06-23 13:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-22 17:07 [PATCH] kasan: account for new sections when instrumenting globals Dmitry Vyukov
2016-06-23 11:49 ` Andrey Ryabinin
2016-06-23 11:50   ` Andrey Ryabinin
2016-06-23 12:40     ` Dmitry Vyukov
2016-06-23 13:06       ` Andrey Ryabinin [this message]
2016-06-23 13:19         ` Dmitry Vyukov
2016-06-23 13:21           ` Dmitry Vyukov
2016-06-23 14:00             ` Andrey Ryabinin
2016-06-23 14:38               ` Dmitry Vyukov
2016-06-23 14:58                 ` Andrey Ryabinin

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='CAPAsAGxkbvBVei=Kz4hyKij44GEh12kL9bUn28FomtfnA-xUAQ@mail.gmail.com' \
    --to=ryabinin.a.a@gmail.com \
    --cc=arnd@arndb.de \
    --cc=dvyukov@google.com \
    --cc=glider@google.com \
    --cc=hpa@zytor.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.