All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ardb@kernel.org>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Will Deacon <will@kernel.org>,  Marc Zyngier <maz@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	 Ryan Roberts <ryan.roberts@arm.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	 Kees Cook <keescook@chromium.org>
Subject: Re: [PATCH v8 00/43] arm64: Add support for LPA2 and WXN at stage 1
Date: Fri, 16 Feb 2024 19:23:18 +0100	[thread overview]
Message-ID: <CAMj1kXEupLLE+xZaGygAJ0pOG8dm9Ov_7efWfK4af5JPgfZZfg@mail.gmail.com> (raw)
In-Reply-To: <170810439864.589251.1526990737780573683.b4-ty@arm.com>

On Fri, 16 Feb 2024 at 18:35, Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> On Wed, 14 Feb 2024 13:28:46 +0100, Ard Biesheuvel wrote:
> > This v8 covers the remaining changes that implement support for LPA2 and
> > WXN at stage 1, now that some of the prerequisites are in place.
> >
> > v4: https://lore.kernel.org/r/20230912141549.278777-63-ardb@google.com/
> > v5: https://lore.kernel.org/r/20231124101840.944737-41-ardb@google.com/
> > v6: https://lore.kernel.org/r/20231129111555.3594833-43-ardb@google.com/
> > v7: https://lore.kernel.org/r/20240123145258.1462979-52-ardb%2Bgit%40google.com/
> >
> > [...]
>
> I queued this series via the arm64 tree (for-next/stage1-lpa2). I tried
> a couple of releases ago but for some reason my tests started failing at
> it was very close to the merging window, so dropped. This time around,
> if anything goes wrong, we have a bit of time to fix (it might as well
> have been my test scripts and nothing to do with these patches).
>
> The last patch introducing WXN has ABI implications but it's default
> off. I think we should keep the patch as certain markets will likely
> turn it on.
>
> Surprisingly, there are no conflicts with Ryan's contpte series AFAICT
> (I did a merge locally).
>

No *lexical* conflicts, right? :-)

I built for-next/core with 16k pages/52-bits, and ended up with the
splat below. Unfortunately, it is intermittent, and I haven't been
able to reproduce it, so I have no idea whether it is my code, Ryan's
code or an inadvertent interaction between the two. (Or perhaps some
other code in the tree)

I did build with WXN enabled in this case, but it seems unlikely that
that plays a role here.






[    0.392768] Unable to handle kernel write to read-only memory at
virtual address ffffe6d037873360
[    0.393314] Mem abort info:
[    0.393480]   ESR = 0x000000009600004f
[    0.393702]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.394089]   SET = 0, FnV = 0
[    0.394272]   EA = 0, S1PTW = 0
[    0.394458]   FSC = 0x0f: level 3 permission fault
[    0.394741] Data abort info:
[    0.394915]   ISV = 0, ISS = 0x0000004f, ISS2 = 0x00000000
[    0.395239]   CM = 0, WnR = 1, TnD = 0, TagAccess = 0
[    0.395602]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[    0.396152] swapper pgtable: 16k pages, 47-bit VAs, pgdp=00000000c8870000
[    0.396844] [ffffe6d037873360] pgd=0000000000000000,
p4d=0000000000000000, pud=10000000c9034003, pmd=10000000c903c003,
pte=00600000c8870783
[    0.398172] Internal error: Oops: 000000009600004f [#1] PREEMPT SMP
[    0.398833] Modules linked in:
[    0.399147] CPU: 3 PID: 1 Comm: systemd Not tainted 6.8.0-rc3+ #28
[    0.399774] Hardware name: QEMU KVM Virtual Machine, BIOS unknown 2/2/2022
[    0.400464] pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[    0.401176] pc : __pmd_alloc+0x164/0x1f4
[    0.401579] lr : __pmd_alloc+0xac/0x1f4
[    0.402117] sp : ffffc0008007b960
[    0.402672] x29: ffffc0008007b960 x28: ffffe6cfe1844000 x27: 0000000000002cc2
[    0.403833] x26: 0000000002000000 x25: ffffe6d037873360 x24: ffffe6cfe17f8000
[    0.404990] x23: ffff8ebf40fd4000 x22: ffffe6d037b83c80 x21: ffffe6d037b83c80
[    0.406177] x20: ffffe6d037873360 x19: ffffe6d037b83d1c x18: 000000000000cda8
[    0.407381] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[    0.408455] x14: 0000000000001b00 x13: dead000000000122 x12: 0000000000000000
[    0.409179] x11: 0000000000000015 x10: 1000000000000003 x9 : 1000000000000003
[    0.409939] x8 : 1000000100fd4003 x7 : 0000000000000000 x6 : ffffc0008007ba50
[    0.410670] x5 : ffff8ebf7f9bb9e0 x4 : ffff8ebf7f9bb9c0 x3 : 0000000000000901
[    0.411394] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffffe6d037b83d1c
[    0.412204] Call trace:
[    0.412426]  __pmd_alloc+0x164/0x1f4
[    0.412736]  vmap_pages_pud_range+0x160/0x244
[    0.413122]  __vmap_pages_range_noflush+0xb0/0x218
[    0.413531]  __vmalloc_area_node+0x4b8/0x5c0
[    0.413897]  __vmalloc_node_range+0x124/0x218
[    0.414276]  module_alloc+0x118/0x170
[    0.414589]  load_module+0xd5c/0x133c
[    0.414898]  __arm64_sys_finit_module+0x21c/0x2c0
[    0.415292]  invoke_syscall+0x48/0xd8
[    0.415623]  do_el0_svc+0x7c/0xa8
[    0.415937]  el0_svc+0x34/0x78
[    0.416210]  el0t_64_sync_handler+0x84/0xfc
[    0.416589]  el0t_64_sync+0x190/0x194
[    0.416910] Code: 9278a508 aa090108 f9000fa8 f9400fa8 (f9000288)
[    0.417432] ---[ end trace 0000000000000000 ]---
[    0.417861] note: systemd[1] exited with preempt_count 1
[    0.418237] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x0000000b
[    0.418765] SMP: stopping secondary CPUs
[    0.419061] Kernel Offset: 0x26cfb5c90000 from 0xffffc00080000000
[    0.419517] PHYS_OFFSET: 0xfff07141c0000000
[    0.419820] CPU features: 0x0,00000000,a0044d4a,33ce7727
[    0.420214] Memory Limit: none
[    0.420439] ---[ end Kernel panic - not syncing: Attempted to kill
init! exitcode=0x0000000b ]---

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-02-16 18:23 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 12:28 [PATCH v8 00/43] arm64: Add support for LPA2 and WXN at stage 1 Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 01/43] arm64: kernel: Manage absolute relocations in code built under pi/ Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 02/43] arm64: kernel: Don't rely on objcopy to make code under pi/ __init Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 03/43] arm64: head: move relocation handling to C code Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 04/43] arm64: idreg-override: Move to early mini C runtime Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 05/43] arm64: kernel: Remove early fdt remap code Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 06/43] arm64: head: Clear BSS and the kernel page tables in one go Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 07/43] arm64: Move feature overrides into the BSS section Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 08/43] arm64: head: Run feature override detection before mapping the kernel Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 09/43] arm64: head: move dynamic shadow call stack patching into early C runtime Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 10/43] arm64: cpufeature: Add helper to test for CPU feature overrides Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 11/43] arm64: kaslr: Use feature override instead of parsing the cmdline again Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 12/43] arm64: idreg-override: Create a pseudo feature for rodata=off Ard Biesheuvel
2024-02-14 12:28 ` [PATCH v8 13/43] arm64: Add helpers to probe local CPU for PAC and BTI support Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 14/43] arm64: head: allocate more pages for the kernel mapping Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 15/43] arm64: head: move memstart_offset_seed handling to C code Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 16/43] arm64: mm: Make kaslr_requires_kpti() a static inline Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 17/43] arm64: mmu: Make __cpu_replace_ttbr1() out of line Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 18/43] arm64: head: Move early kernel mapping routines into C code Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 19/43] arm64: mm: Use 48-bit virtual addressing for the permanent ID map Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 20/43] arm64: pgtable: Decouple PGDIR size macros from PGD/PUD/PMD levels Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 21/43] arm64: kernel: Create initial ID map from C code Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 22/43] arm64: mm: avoid fixmap for early swapper_pg_dir updates Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 23/43] arm64: mm: omit redundant remap of kernel image Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 24/43] arm64: Revert "mm: provide idmap pointer to cpu_replace_ttbr1()" Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 25/43] arm64: mm: Handle LVA support as a CPU feature Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 26/43] arm64: mm: Add feature override support for LVA Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 27/43] arm64: Avoid #define'ing PTE_MAYBE_NG to 0x0 for asm use Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 28/43] arm64: Add ESR decoding for exceptions involving translation level -1 Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 29/43] arm64: mm: Wire up TCR.DS bit to PTE shareability fields Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 30/43] arm64: mm: Add LPA2 support to phys<->pte conversion routines Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 31/43] arm64: mm: Add definitions to support 5 levels of paging Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 32/43] arm64: mm: add LPA2 and 5 level paging support to G-to-nG conversion Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 33/43] arm64: Enable LPA2 at boot if supported by the system Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 34/43] arm64: mm: Add 5 level paging support to fixmap and swapper handling Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 35/43] arm64: kasan: Reduce minimum shadow alignment and enable 5 level paging Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 36/43] arm64: mm: Add support for folding PUDs at runtime Ard Biesheuvel
2024-02-29 14:17   ` Ryan Roberts
2024-02-29 23:01     ` Nathan Chancellor
2024-03-01  8:54       ` Ryan Roberts
2024-03-01  9:10         ` Ard Biesheuvel
2024-03-01  9:37           ` Ard Biesheuvel
2024-03-01  9:47             ` Ryan Roberts
2024-03-01 10:22               ` Ryan Roberts
2024-02-14 12:29 ` [PATCH v8 37/43] arm64: ptdump: Disregard unaddressable VA space Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 38/43] arm64: ptdump: Deal with translation levels folded at runtime Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 39/43] arm64: kvm: avoid CONFIG_PGTABLE_LEVELS for runtime levels Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 40/43] arm64: Enable 52-bit virtual addressing for 4k and 16k granule configs Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 41/43] arm64: defconfig: Enable LPA2 support Ard Biesheuvel
2024-02-14 12:29 ` [PATCH v8 42/43] mm: add arch hook to validate mmap() prot flags Ard Biesheuvel
2024-03-12 19:53   ` Catalin Marinas
2024-03-12 23:23     ` Ard Biesheuvel
2024-03-13 10:47       ` Catalin Marinas
2024-03-13 11:45         ` Ard Biesheuvel
2024-03-13 15:31           ` Catalin Marinas
2024-02-14 12:29 ` [PATCH v8 43/43] arm64: mm: add support for WXN memory translation attribute Ard Biesheuvel
2024-02-16 17:35 ` [PATCH v8 00/43] arm64: Add support for LPA2 and WXN at stage 1 Catalin Marinas
2024-02-16 18:23   ` Ard Biesheuvel [this message]
2024-02-16 22:34     ` Ard Biesheuvel

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=CAMj1kXEupLLE+xZaGygAJ0pOG8dm9Ov_7efWfK4af5JPgfZZfg@mail.gmail.com \
    --to=ardb@kernel.org \
    --cc=anshuman.khandual@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=keescook@chromium.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.