From: Patricia Alfonso <trishalfonso@google.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
anton.ivanov@cambridgegreys.com,
Andrey Ryabinin <aryabinin@virtuozzo.com>,
David Gow <davidgow@google.com>,
Brendan Higgins <brendanhiggins@google.com>,
linux-um@lists.infradead.org,
kasan-dev <kasan-dev@googlegroups.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH] UML: add support for KASAN under x86_64
Date: Thu, 13 Feb 2020 14:55:59 -0800 [thread overview]
Message-ID: <CAKFsvUKun6HOk_9ocZ81YebEp90jr3WsAah24HDQQQqY9eamjg@mail.gmail.com> (raw)
In-Reply-To: <CACT4Y+ZJeABriqRZkThVa-MNDBwe7cH=Hmq1vonNmyCTMZOu6w@mail.gmail.com>
On Wed, Feb 12, 2020 at 9:40 PM 'Dmitry Vyukov' via kasan-dev
<kasan-dev@googlegroups.com> wrote:
>
> On Wed, Feb 12, 2020 at 11:25 PM Patricia Alfonso
> <trishalfonso@google.com> wrote:
> > > On Wed, Feb 12, 2020 at 1:19 AM Patricia Alfonso
> > > <trishalfonso@google.com> wrote:
> > > >
> > > > On Thu, Jan 16, 2020 at 12:53 AM Dmitry Vyukov <dvyukov@google.com> wrote:
> > > > >
> > > > > > +void kasan_init(void)
> > > > > > +{
> > > > > > + kasan_map_memory((void *)KASAN_SHADOW_START, KASAN_SHADOW_SIZE);
> > > > > > +
> > > > > > + // unpoison the kernel text which is form uml_physmem -> uml_reserved
> > > > > > + kasan_unpoison_shadow((void *)uml_physmem, physmem_size);
> > > > > > +
> > > > > > + // unpoison the vmalloc region, which is start_vm -> end_vm
> > > > > > + kasan_unpoison_shadow((void *)start_vm, (end_vm - start_vm + 1));
> > > > > > +
> > > > > > + init_task.kasan_depth = 0;
> > > > > > + pr_info("KernelAddressSanitizer initialized\n");
> > > > > > +}
> > > > >
> > > > > Was this tested with stack instrumentation? Stack instrumentation
> > > > > changes what shadow is being read/written and when. We don't need to
> > > > > get it working right now, but if it does not work it would be nice to
> > > > > restrict the setting and leave some comment traces for future
> > > > > generations.
> > > > If you are referring to KASAN_STACK_ENABLE, I just tested it and it
> > > > seems to work fine.
> > >
> > >
> > > I mean stack instrumentation which is enabled with CONFIG_KASAN_STACK.
> >
> > I believe I was testing with CONFIG_KASAN_STACK set to 1 since that is
> > the default value when compiling with GCC.The syscall_stub_data error
> > disappears when the value of CONFIG_KASAN_STACK is 0, though.
>
>
> Then I would either disable it for now for UML, or try to unpoision
> stack or ignore accesses.
>
Okay, I'll probably disable it in UML for now.
--
Patricia Alfonso
next prev parent reply other threads:[~2020-02-13 22:56 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
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 [this message]
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=CAKFsvUKun6HOk_9ocZ81YebEp90jr3WsAah24HDQQQqY9eamjg@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=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).