Comment 5 for bug 1967130

Revision history for this message
Alexandre Ghiti (alexghiti) wrote :

I have a workaround for this:

    UBUNTU: SAUCE: riscv: Disable VMAP_STACK since it fails with efi

    When VMAP_STACK is enabled, kernel threads have their stacks in the vmalloc
    region.

    So when The kworker responsible for handling efi work queue (efi_call_rts) calls
    efi_virtmap_load and then switch_mm, if the stack of the worker is in a vmalloc
    area not yet synchronized with efi_mm (since RISC-V lazily populates vmalloc
    area), an attempt to access this stack will trigger a fault which can't be
    resolved since when trying to save the context, a new trap will be triggered and
    so on.

    So disable VMAP_STACK for now until we figure out the correct fix.

And I'm working on the proper fix which consists in synchronizing the efi page table with the page table of the calling thread before switching to efi mm.