[PATCH v8 00/43] arm64: Add support for LPA2 and WXN at stage 1

Ard Biesheuvel ardb at kernel.org
Fri Feb 16 10:23:18 PST 2024


On Fri, 16 Feb 2024 at 18:35, Catalin Marinas <catalin.marinas at 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 ]---



More information about the linux-arm-kernel mailing list