Re: [kvm-unit-tests PATCH v6 00/32] EFI and ACPI support for arm64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 10, 2023 at 01:32:59AM -0700, Nadav Amit wrote:
> 
> > On May 30, 2023, at 9:08 AM, Nikos Nikoleris <nikos.nikoleris@xxxxxxx> wrote:
> > 
> > Hello,
> > 
> > This series adds initial support for building arm64 tests as EFI
> > apps and running them under QEMU. Much like x86_64, we import external
> > dependencies from gnu-efi and adapt them to work with types and other
> > assumptions from kvm-unit-tests. In addition, this series adds support
> > for enumerating parts of the system using ACPI.
> 
> Just an issue I encountered, which I am not sure is arm64 specific:
> 
> All the printf’s in efi_main() are before current_thread_info() is
> initialized (or even memset’d to zero, as done in setup_efi).
> 
> But printf() calls puts() which checks if mmu_enabled(). And
> mmu_enabled() uses is_user() and current_thread_info()->cpu, both
> of which read uninitialized data from current_thread_info().
> 
> IOW: Any printf in efi_main() can cause a crash.
>

Nice catch, Nadav. Nikos, shouldn't we drop the memset() in setup_efi and
put a zero_range call, similar to the one in arm/cstart64.S which zero's
the thread-info area, in arm/efi/crt0-efi-aarch64.S?

Thanks,
drew



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux