[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y88HD2ocLQilIuDr@spud>
Date: Mon, 23 Jan 2023 22:15:43 +0000
From: Conor Dooley <conor@...nel.org>
To: Alexandre Ghiti <alexghiti@...osinc.com>
Cc: Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Ard Biesheuvel <ardb@...nel.org>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
kasan-dev@...glegroups.com, linux-efi@...r.kernel.org
Subject: Re: [PATCH v2 1/6] riscv: Split early and final KASAN population
functions
Hey Alex,
FYI this patch has a couple places with spaces used rather than tabs for
indent.
> static void __init kasan_populate_p4d(pgd_t *pgd,
> - unsigned long vaddr, unsigned long end,
> - bool early)
> + unsigned long vaddr, unsigned long end)
> {
> phys_addr_t phys_addr;
> p4d_t *p4dp, *base_p4d;
> unsigned long next;
>
> - if (early) {
> - /*
> - * We can't use pgd_page_vaddr here as it would return a linear
> - * mapping address but it is not mapped yet, but when populating
> - * early_pg_dir, we need the physical address and when populating
> - * swapper_pg_dir, we need the kernel virtual address so use
> - * pt_ops facility.
> - */
> - base_p4d = pt_ops.get_p4d_virt(pfn_to_phys(_pgd_pfn(*pgd)));
> - } else {
> - base_p4d = (p4d_t *)pgd_page_vaddr(*pgd);
> - if (base_p4d == lm_alias(kasan_early_shadow_p4d)) {
> - base_p4d = memblock_alloc(PTRS_PER_PUD * sizeof(p4d_t), PAGE_SIZE);
> - memcpy(base_p4d, (void *)kasan_early_shadow_p4d,
> - sizeof(p4d_t) * PTRS_PER_P4D);
> - }
> - }
> + base_p4d = (p4d_t *)pgd_page_vaddr(*pgd);
> + if (base_p4d == lm_alias(kasan_early_shadow_p4d)) {
> + base_p4d = memblock_alloc(PTRS_PER_PUD * sizeof(p4d_t), PAGE_SIZE);
> + memcpy(base_p4d, (void *)kasan_early_shadow_p4d,
> + sizeof(p4d_t) * PTRS_PER_P4D);
> + }
^^ here.
Thanks,
Conor.
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists