linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patricia Alfonso <trishalfonso@google.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: richard@nod.at, jdike@addtoit.com,
	Brendan Higgins <brendanhiggins@google.com>,
	linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com,
	linux-um@lists.infradead.org, David Gow <davidgow@google.com>,
	aryabinin@virtuozzo.com, Dmitry Vyukov <dvyukov@google.com>,
	anton.ivanov@cambridgegreys.com
Subject: Re: [RFC PATCH] UML: add support for KASAN under x86_64
Date: Thu, 6 Feb 2020 10:21:59 -0800	[thread overview]
Message-ID: <CAKFsvUJu7NZpM0ER45zhSzte3ovkAvXBKx3Tppxci7O=0TwJMg@mail.gmail.com> (raw)
In-Reply-To: <b55720804de8e56febf48c7c3c11b578d06a8c9f.camel@sipsolutions.net>

On Thu, Jan 16, 2020 at 12:03 AM Johannes Berg
<johannes@sipsolutions.net> wrote:
>
> On Thu, 2020-01-16 at 08:57 +0100, Johannes Berg wrote:
> >
> > And if I remember from looking at KASAN, some of the constructors there
> > depended on initializing after the KASAN data structures were set up (or
> > at least allocated)? It may be that you solved that by allocating the
> > shadow so very early though.
>
> Actually, no ... it's still after main(), and the constructors run
> before.
>
> So I _think_ with the CONFIG_CONSTRUCTORS revert, this will no longer
> work (but happy to be proven wrong!), if so then I guess we do have to
> find a way to initialize the KASAN things from another (somehow
> earlier?) constructor ...
>
> Or find a way to fix CONFIG_CONSTRUCTORS and not revert, but I looked at
> it quite a bit and didn't.
>
> johannes


I've looked at this quite extensively over the past week or so. I was
able to initialize KASAN as one of the first things that gets executed
in main(), but constructors are, in fact, needed before main(). I
think it might be best to reintroduce constructors in a limited way to
allow KASAN to work in UML. I have done as much testing as I can on my
machine and this limited version seems to work, except when
STATIC_LINK is set. I will send some patches of what I have done so
far and we can talk more about it there. I would like to add your
name, Johannes, as a co-developed-by on that patch. If there is a
better way to give you credit for this, please let me know.


-- 
Patricia Alfonso

  parent reply	other threads:[~2020-02-06 18:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-15 18:28 [RFC PATCH] UML: add support for KASAN under x86_64 Patricia Alfonso
2020-01-15 18:48 ` Johannes Berg
2020-01-15 22:56   ` Patricia Alfonso
2020-01-16  7:57     ` Johannes Berg
2020-01-16  8:03       ` Johannes Berg
2020-01-16  9:18         ` Dmitry Vyukov
2020-01-16  9:20           ` Johannes Berg
2020-01-16  9:23             ` Dmitry Vyukov
2020-01-17  9:59               ` Dmitry Vyukov
2020-01-17 10:03                 ` Dmitry Vyukov
2020-01-17 10:05                   ` Dmitry Vyukov
2020-02-06 18:33                     ` Patricia Alfonso
2020-02-06 18:21         ` Patricia Alfonso [this message]
2020-02-06 19:14           ` Johannes Berg
2020-01-16  8:24     ` Dmitry Vyukov
2020-01-16  8:44 ` Dmitry Vyukov
2020-02-11 23:48   ` Patricia Alfonso
2020-02-12  6:23     ` Dmitry Vyukov
2020-01-16  8:50 ` Dmitry Vyukov
2020-01-16  8:52 ` Dmitry Vyukov
2020-02-12  0:19   ` Patricia Alfonso
2020-02-12  6:24     ` Dmitry Vyukov
2020-02-12 22:25       ` Patricia Alfonso
2020-02-13  5:39         ` Dmitry Vyukov
2020-02-13 22:55           ` Patricia Alfonso
2020-01-16  9:09 ` Dmitry Vyukov

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='CAKFsvUJu7NZpM0ER45zhSzte3ovkAvXBKx3Tppxci7O=0TwJMg@mail.gmail.com' \
    --to=trishalfonso@google.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=brendanhiggins@google.com \
    --cc=davidgow@google.com \
    --cc=dvyukov@google.com \
    --cc=jdike@addtoit.com \
    --cc=johannes@sipsolutions.net \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /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).