Possible bug in rtc_entropy.c
|
2019-03-10, 18:21
Post: #1
|
|||
|
|||
Possible bug in rtc_entropy.c
Hello,
I have been working with iPXE for a special project and ran into issues with Hyper-V Gen-1 VMs. I read through the forum and saw the history behind this and noted that the code to detect a broken RTC was added to mainline code some time ago. I instrumented the code and found that on newer versions of Hyper-V that test passes and the RTC code attempts to instantiate DRBG and fails when it calls get_noise. Tracing through I found that the process runs along fine until rtc_sample where it just freezes. Looking at the Assembly code in rtc_sample I noticed something odd. The current mainline code has two jz instructions that reference the label :1b, but that label does not exist in the code fragment. I'm bit sure why the assembler doesn't complain about it, but I suppose it leaves it for the linker to deal with and the linker ignores the issue because the code is embedded. In any event looking at the code I also noticed there are two identical labels :1 present. Overall it looks like some cutting and pasting may have resulted in assembly code that has flaws. I changed the second label to :2 leaving the first as :1 and then targeted the first jz at :1 an the second at :2 and the code started to function and the VMs could boot. Perhaps this could be reviewed and updated if my assumptions are correct ? |
|||
2019-03-11, 11:12
Post: #2
|
|||
|
|||
RE: Possible bug in rtc_entropy.c
I would recommend that you post this to the ipxe-devel mailing list for it to reach the right audience.
Use GitHub Discussions VRAM bin |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)