grub-devel
[Top][All Lists]
Advanced

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

[RFC 2/2] net: workaround to bypass corruption of the efihttp function p


From: Ken Lin
Subject: [RFC 2/2] net: workaround to bypass corruption of the efihttp function pointer
Date: Fri, 20 Jan 2017 09:13:21 +0800

It's a workaround to bypass the corruption of the Request function pointer.
The function pointer crashes after the grub menu is shown. Here is the log:

net/drivers/efi/efihttp.c:175: b->create_event()
net/drivers/efi/efihttp.c:188: grub_efihttp:0x3edc4020,
grub_efihttp->request:0xafafafafafafafaf
net/drivers/efi/efihttp.c:191: Before grub_efihttp->request(),
url:http://192.168.111.1/boot/grub/x86_64-efi/part_gpt.mod
!!!! X64 Exception Type - 0D(#GP - General Protection)  CPU Apic ID - 00000000 
!!!!
RIP  - 000000003E74C59B, CS  - 0000000000000038, RFLAGS - 0000000000210202
ExceptionData - 0000000000000000
RAX  - 000000003BD24280, RCX - 000000003EDC4020, RDX - 000000003BC5B500
RBX  - 000000003BC5B600, RSP - 000000003FAFA6D0, RBP - 000000003BC5B4A0
RSI  - 000000003EDC4020, RDI - AFAFAFAFAFAFAFAF
R8   - 000000003BC5B340, R9  - 000000003BC5B1A0, R10 - 0000000000000013
R11  - 0000000000000058, R12 - 000000003E74C594, R13 - 000000003E754D13
R14  - 000000003BC5B460, R15 - 0000000000000000
DS   - 0000000000000030, ES  - 0000000000000030, FS  - 0000000000000030
GS   - 0000000000000030, SS  - 0000000000000030
CR0  - 0000000080000033, CR2 - 0000000000000000, CR3 - 000000003FA99000
CR4  - 0000000000000668, CR8 - 0000000000000000
DR0  - 0000000000000000, DR1 - 0000000000000000, DR2 - 0000000000000000
DR3  - 0000000000000000, DR6 - 00000000FFFF0FF0, DR7 - 0000000000000400
GDTR - 000000003FA87698 0000000000000047, LDTR - 0000000000000000
IDTR - 000000003F4FA018 0000000000000FFF,   TR - 0000000000000000
FXSAVE_STATE - 000000003FAFA330
!!!! Find PE image (No PDB)  (ImageBase=000000003E74C000, 
EntryPoint=000000003E74C400) !!!!

HTTP Boot can’t work without this workaround.
The root cause is unknown. It is much appreciated for any kind of suggestions
for debugging this.

Signed-off-by: Ken Lin <address@hidden>
Signed-off-by: Clay Chang <address@hidden>
Reviewed-by: Keng-Yu Lin <address@hidden>
---
 grub-core/net/net.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 90c5b48..e258109 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1661,6 +1661,9 @@ static void
 grub_net_poll_cards_idle_real (void)
 {
   struct grub_net_card *card;
+#ifdef GRUB_MACHINE_EFI
+  if (grub_efihttp) return;
+#endif
   FOR_NET_CARDS (card)
   {
     grub_uint64_t ctime = grub_get_time_ms ();
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]