From: Conor Dooley <conor@kernel.org>
To: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Ard Biesheuvel <ardb@kernel.org>,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
kasan-dev@googlegroups.com, linux-efi@vger.kernel.org
Subject: Re: [PATCH v2 1/6] riscv: Split early and final KASAN population functions
Date: Mon, 23 Jan 2023 22:15:43 +0000 [thread overview]
Message-ID: <Y88HD2ocLQilIuDr@spud> (raw)
In-Reply-To: <20230123100951.810807-2-alexghiti@rivosinc.com>
[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-01-23 22:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 10:09 [PATCH v2 0/6] RISC-V kasan rework Alexandre Ghiti
2023-01-23 10:09 ` [PATCH v2 1/6] riscv: Split early and final KASAN population functions Alexandre Ghiti
2023-01-23 22:15 ` Conor Dooley [this message]
2023-01-24 8:00 ` Alexandre Ghiti
2023-01-23 10:09 ` [PATCH v2 2/6] riscv: Rework kasan " Alexandre Ghiti
2023-01-23 10:09 ` [PATCH v2 3/6] riscv: Move DTB_EARLY_BASE_VA to the kernel address space Alexandre Ghiti
2023-01-23 10:09 ` [PATCH v2 4/6] riscv: Fix EFI stub usage of KASAN instrumented strcmp function Alexandre Ghiti
2023-01-23 10:19 ` Ard Biesheuvel
2023-01-23 10:09 ` [PATCH v2 5/6] riscv: Fix ptdump when KASAN is enabled Alexandre Ghiti
2023-01-23 10:09 ` [PATCH v2 6/6] riscv: Unconditionnally select KASAN_VMALLOC if KASAN Alexandre Ghiti
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=Y88HD2ocLQilIuDr@spud \
--to=conor@kernel.org \
--cc=alexghiti@rivosinc.com \
--cc=andreyknvl@gmail.com \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
/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