Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SI25b-0007Qm-Mz for mharc-grub-devel@gnu.org; Wed, 11 Apr 2012 14:16:19 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI25Y-0007QU-N0 for grub-devel@gnu.org; Wed, 11 Apr 2012 14:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SI25W-0003JO-Oi for grub-devel@gnu.org; Wed, 11 Apr 2012 14:16:16 -0400 Received: from che.mayfirst.org ([209.234.253.108]:54398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI25W-0003JH-L1 for grub-devel@gnu.org; Wed, 11 Apr 2012 14:16:14 -0400 Received: from pip.fifthhorseman.net (dsl254-070-154.nyc1.dsl.speakeasy.net [216.254.70.154]) by che.mayfirst.org (Postfix) with ESMTPSA id 262DDF975 for ; Wed, 11 Apr 2012 14:16:10 -0400 (EDT) Received: by pip.fifthhorseman.net (Postfix, from userid 1000) id 061D81187C; Wed, 11 Apr 2012 14:16:10 -0400 (EDT) From: Daniel Kahn Gillmor To: Grub 2 Development List Subject: Re: grub.pxe, ARP-after-boot, DMA, and trouble In-Reply-To: <87sjggw1ar.fsf@pip.fifthhorseman.net> References: <87sjggw1ar.fsf@pip.fifthhorseman.net> User-Agent: Notmuch/0.12 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Wed, 11 Apr 2012 14:16:04 -0400 Message-ID: <87ty0quobf.fsf@pip.fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 209.234.253.108 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2012 18:16:18 -0000 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain On Sat, 07 Apr 2012 01:36:44 -0400, Daniel Kahn Gillmor wrote: > In particular, i suspect that *after* the bootloader has turned over > control to the kernel (memtest in this case), the PXE-driven NIC is > continuing to DMA received packets into active RAM. phcoder sent me the patch below to address the PXE DMA issue. I tested it against the current bzr head. My testing grub.cfg is just: ---------------------- serial --speed=115200 terminal_input console serial terminal_output console serial linux16 (pxe)/memtest86+.bin console=ttyS0,115200n8 boot ---------------------- Using grub bzr head without this patch, i get these RAM "failures" on the net-booted ThinkCentre M70 within ~15 seconds on roughly every other boot (i haven't found the right packets to inject to force the DMA to happen consistently, alas). Using grub bzr head with the patch, i have been unable to reproduce a single RAM failures in more than 20 trials. I think this patch resolves the issue, and should go into the mainline. Thanks, phcoder! --dkg --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=pxe-dma-fix.patch Content-Transfer-Encoding: quoted-printable Content-Description: phcoder's fix =3D=3D=3D modified file 'grub-core/net/drivers/i386/pc/pxe.c' =2D-- grub-core/net/drivers/i386/pc/pxe.c 2012-02-08 18:26:01 +0000 +++ grub-core/net/drivers/i386/pc/pxe.c 2012-04-11 12:53:17 +0000 @@ -278,9 +278,14 @@ grub_pxe_close (const struct grub_net_card *dev __attribute__ ((unused))) { if (pxe_rm_entry) =2D grub_pxe_call (GRUB_PXENV_UNDI_CLOSE, =2D (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR, =2D pxe_rm_entry); + { + grub_pxe_call (GRUB_PXENV_UNDI_CLOSE, + (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR, + pxe_rm_entry); + grub_pxe_call (GRUB_PXENV_UNDI_SHUTDOWN, + (void *) GRUB_MEMORY_MACHINE_SCRATCH_ADDR, + pxe_rm_entry); + } } =20 static grub_err_t --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQJ8BAEBCgBmBQJPhcplXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwRUU1QkU5NzkyODJEODBCOUY3NTQwRjFD Q0QyRUQ5NEQyMTczOUU5AAoJEMzS7ZTSFznpZr4QAIi+w9zlDGVLHqifwKR1308/ oieq8CTextBUt8KjAiStLMlnKgbzRXVXyLzNXiWnn5e/8386e44Jg6gv9KqHBE7f vqwtwJ9C5OImMoVn2iusTEaU2OHjwfu3L1cseL6w3SuAl/0VMfCpVSdgDFzKesZ9 ynBHCx606csrygx0SadjmPvUoCZCv8DWy5P2+oi43W5QEaCxA+lM4TTLAnCTaArY 1h4YqM8oCUU9azjwJfZU3IRNRsiJQyJMM3ZoE1o5iK7fkh/h+VEk3FgYrrV04lKe QTmL66NsC9QDh6W3pRzpAJpmp6SUVsdJyM1tx7/LkW41G15xjyAOT7ldHls8RuTo yhw9k8592UX+e2bMJLzQyj4ErkJn/GgTB/SYnm2hxGZoZU98epec6+QXlE/XHqBy VUsVaoc289ijYEPuGf5L6Fyb0+BWRX1In7K4XzLq80WAH2Lj12FggwotPE5JZfAu 9dUvpsC04ep3Fh5aS1QgG3DmgpsjA40PWVZGDg0gCz/NmlkJLrj4xs64ONwSIsSV OQyt1u7pwCrrzLF9aIbpTNV5PXySKxDJAKcnTnp3oZ+8hC6UcJCEbLoZu741r3Li NadsFo3b7SUcB8aL5p0tiYnMKLgbbCrJGdKJCfpVzZpeJ3kNflCLDQcz5kFUvKy2 xHaUcJJpJhzQfSTKKBe/ =xM1U -----END PGP SIGNATURE----- --==-=-=--