RE: [PATCH V6 0/2] Add efi page fault handler to recover from page
From: Prakhya, Sai Praneeth
Date: Wed Sep 12 2018 - 13:32:59 EST
> > This issue was reported by Al Stone when he saw that reboot via EFI
> > hangs the machine. Upon debugging, I found that it's
> > efi_reset_system() that's touching memory regions which it shouldn't.
> > To reproduce the same behavior, I have hacked OVMF and made
> > efi_reset_system() buggy. Along with efi_reset_system(), I have also
> > modified get_next_high_mono_count() and set_virtual_address_map().
> > They illegally access both boot time and other efi regions.
> > Testing the patch set:
> > ----------------------
> > 1. Download buggy firmware from here .
> > 2. Run a qemu instance with this buggy BIOS and boot mainline kernel.
> > Add reboot=efi to the kernel command line arguments and after the
> > kernel is up and running, type "reboot". The kernel should hang while
> > 3. With the same setup, boot kernel after applying patches and the
> > reboot should work fine. Also please notice warning/error messages
> > printed by kernel.
> Did you test these patches with other buggy runtime services?
Yes, I did. I have modified efi runtime service GetNextHighMonotonicCount
and made it buggy, when invoked from FWTS test suites the efi page fault
handler works as expected (i.e. freezing efi_rts_wq and disabling efi runtime