Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1642202
| From | Dmitry Vyukov <dvyukov@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption |
| Date | 2017-05-16 06:50 +0200 |
| Message-ID | <tHCAN-SX-1@gated-at.bofh.it> (permalink) |
| References | <tHzjz-7hu-7@gated-at.bofh.it> <tHCr8-PQ-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 15, 2017 at 9:34 PM, Dmitry Vyukov <dvyukov@google.com> wrote: > On Mon, May 15, 2017 at 6:16 PM, <js1304@gmail.com> wrote: >> From: Joonsoo Kim <iamjoonsoo.kim@lge.com> >> >> Hello, all. >> >> This is an attempt to recude memory consumption of KASAN. Please see >> following description to get the more information. >> >> 1. What is per-page shadow memory > > Hi Joonsoo, > > First I need to say that this is great work. I wanted KASAN to consume > 1/8-th of _kernel_ memory rather than total physical memory for a long > time. > > However, this implementation does not work inline instrumentation. And > the inline instrumentation is the main mode for KASAN. Outline > instrumentation is merely a rudiment to support gcc 4.9, and it needs > to be removed as soon as we stop caring about gcc 4.9 (do we at all? > is it the current compiler in any distro? Ubuntu 12 has 4.8, Ubuntu 14 > already has 5.4. And if you build gcc yourself or get a fresher > compiler from somewhere else, you hopefully get something better than > 4.9). > > Here is an example boot+scp log with inline instrumentation: > https://gist.githubusercontent.com/dvyukov/dfdc8b6972ddd260b201a85d5d5cdb5d/raw/2a032cd5be371c7ad6cad8f14c0a0610e6fa772e/gistfile1.txt > > Joonsoo, can you think of a way to take advantages of your approach, > but make it work with inline instrumentation? > > Will it work if we map a single zero page for whole shadow initially, > and then lazily map real shadow pages only for kernel memory, and then > remap it again to zero pages when the whole KASAN_SHADOW_SCALE_SHIFT > range of pages becomes unused (similarly to what you do in > kasan_unmap_shadow())? Just in case, I've uploaded a squashed version of this to codereview site, if somebody will find it useful: https://codereview.appspot.com/325780043 (side-by-side diffs is what you want)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 09/11] x86/kasan: support on-demand shadow mapping js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 11/11] mm/kasan: change the order of shadow memory check js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 10/11] mm/kasan: support dynamic shadow memory free js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 05/11] mm/kasan: introduce per-page shadow memory infrastructure js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 08/11] mm/kasan: support on-demand shadow allocation/mapping js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 02/11] mm/kasan: don't fetch the next shadow value speculartively js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH v1 07/11] x86/kasan: use per-page shadow memory js1304@gmail.com - 2017-05-16 03:20 +0200
[PATCH(RE-RESEND) v1 01/11] mm/kasan: rename _is_zero to _is_nonzero Joonsoo Kim <js1304@gmail.com> - 2017-05-16 03:30 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 06:40 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 06:50 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-16 08:30 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-16 22:50 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-17 09:30 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-17 09:30 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-24 09:00 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-24 09:50 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-24 19:30 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-19 04:00 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-22 08:10 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-24 08:10 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Dmitry Vyukov <dvyukov@google.com> - 2017-05-24 18:40 +0200
Re: [PATCH v1 00/11] mm/kasan: support per-page shadow memory to reduce memory consumption Joonsoo Kim <js1304@gmail.com> - 2017-05-24 08:20 +0200
csiph-web