lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 2 Aug 2022 22:07:42 +0200 From: Alexander Potapenko <glider@...gle.com> To: Marco Elver <elver@...gle.com> Cc: Alexander Viro <viro@...iv.linux.org.uk>, Alexei Starovoitov <ast@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, Andrey Konovalov <andreyknvl@...gle.com>, Andy Lutomirski <luto@...nel.org>, Arnd Bergmann <arnd@...db.de>, Borislav Petkov <bp@...en8.de>, Christoph Hellwig <hch@....de>, Christoph Lameter <cl@...ux.com>, David Rientjes <rientjes@...gle.com>, Dmitry Vyukov <dvyukov@...gle.com>, Eric Dumazet <edumazet@...gle.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Herbert Xu <herbert@...dor.apana.org.au>, Ilya Leoshkevich <iii@...ux.ibm.com>, Ingo Molnar <mingo@...hat.com>, Jens Axboe <axboe@...nel.dk>, Joonsoo Kim <iamjoonsoo.kim@....com>, Kees Cook <keescook@...omium.org>, Mark Rutland <mark.rutland@....com>, Matthew Wilcox <willy@...radead.org>, "Michael S. Tsirkin" <mst@...hat.com>, Pekka Enberg <penberg@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Petr Mladek <pmladek@...e.com>, Steven Rostedt <rostedt@...dmis.org>, Thomas Gleixner <tglx@...utronix.de>, Vasily Gorbik <gor@...ux.ibm.com>, Vegard Nossum <vegard.nossum@...cle.com>, Vlastimil Babka <vbabka@...e.cz>, kasan-dev <kasan-dev@...glegroups.com>, Linux Memory Management List <linux-mm@...ck.org>, Linux-Arch <linux-arch@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org> Subject: Re: [PATCH v4 17/45] init: kmsan: call KMSAN initialization routines On Tue, Jul 12, 2022 at 4:05 PM Marco Elver <elver@...gle.com> wrote: > > > +/** > > + * kmsan_task_exit() - Notify KMSAN that a task has exited. > > + * @task: task about to finish. > > + */ > > +void kmsan_task_exit(struct task_struct *task); > > Something went wrong with patch shuffling here I think, > kmsan_task_create + kmsan_task_exit decls are duplicated by this > patch. Right, I've messed it up. Will fix. > > + > > +struct page_pair { > > 'struct shadow_origin_pages' for a more descriptive name? How about "metadata_page_pair"? > > + * At the very end there may be leftover blocks in held_back[]. They are > > + * collected later by kmsan_memblock_discard(). > > + */ > > +bool kmsan_memblock_free_pages(struct page *page, unsigned int order) > > +{ > > + struct page *shadow, *origin; > > Can this just be 'struct page_pair'? Not sure this is worth it. We'll save one line by assigning this struct to held_back[order], but the call to kmsan_setup_meta() will become more verbose. (and passing a struct page_pair to kmsan_setup_meta() looks excessive). > > + struct page *origin, int order) > > +{ > > + int i; > > + > > + for (i = 0; i < (1 << order); i++) { > > Noticed this in many places, but we can just make these "for (int i =.." now. Fixed here and all over the runtime. > > @@ -1731,6 +1731,9 @@ void __init memblock_free_pages(struct page *page, unsigned long pfn, > > { > > if (early_page_uninitialised(pfn)) > > return; > > + if (!kmsan_memblock_free_pages(page, order)) > > + /* KMSAN will take care of these pages. */ > > + return; > > Add {} because the then-statement is not right below the if. Done. -- Alexander Potapenko Software Engineer Google Germany GmbH Erika-Mann-Straße, 33 80636 München Geschäftsführer: Paul Manicle, Liana Sebastian Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
Powered by blists - more mailing lists