From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: philmd@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Fri, 20 Sep 2019 07:59:13 -0700 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 644D9C057F31 for ; Fri, 20 Sep 2019 14:59:13 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id n3so2411349wrt.9 for ; Fri, 20 Sep 2019 07:59:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zasUv9YaVO3nafCPM4xub2dzlVpKq5lnYL0mhZi86t8=; b=bqx3i+k0pu8nKIaIHz4q7f+zRIiHnb0HIXKqMZG7DVSpc6DGGLrb6qESKeFgH4Yjsu HPmAWPxaX9QY7w1fJAgHJ9pYZyvu7fPCLF9sdBHjNXggE7mA23kHDQMzwnJIFH9M5acC 1lc5hV+x7NioV0Bxr55C9mAhR4YlzP3t/nbNm+uESYwxErjaBRuaJ9ubcMeyOdgb+954 Surj/3NPurnosDL1qDXCtpjD9YceWzaxslXON1Fjq54liRjZ928+iJD4wtLP2AgY8PKn 5vg3HaoZb8S5KV1nDITARtg5WwnF2f7O7fHHEm23xg/RDD/Jsh+uEruu2l55RLurbWpt pOig== X-Gm-Message-State: APjAAAUArZAdIPh3tK5V9JyiGN8lpp6PH5n9Q3FA1P3zA8DDZWJhk/z7 Su8n6mVydEITlcckKpaWzXcQsY+tHPyeec8XK4q8bMeHg27fMhtuOSXia7UFtNg8ClfzaQM8XkH Mfxl0PkbI3rxl9Q== X-Received: by 2002:a1c:20c8:: with SMTP id g191mr767845wmg.36.1568991551829; Fri, 20 Sep 2019 07:59:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/Bqmhy1CeYDDkMCkOTz3tvsSEar2Ob/De0a4EzavwyCebBRJGWKrtz+T0d3FQ6nHYzutYHg== X-Received: by 2002:a1c:20c8:: with SMTP id g191mr767836wmg.36.1568991551679; Fri, 20 Sep 2019 07:59:11 -0700 (PDT) Received: from [192.168.1.40] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id z3sm1622756wmi.30.2019.09.20.07.59.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Sep 2019 07:59:11 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 23/35] OvmfPkg/VirtioNetDxe: fix SignalEvent() call To: devel@edk2.groups.io, lersek@redhat.com Cc: Ard Biesheuvel , Jordan Justen References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-24-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <7175e96b-046a-51b7-e8eb-44c4518aaf54@redhat.com> Date: Fri, 20 Sep 2019 16:59:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190917194935.24322-24-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/17/19 9:49 PM, Laszlo Ersek wrote: > The SignalEvent() boot service takes an EFI_EVENT, not an (EFI_EVENT*). > Fix the call in the notification function of > "EFI_SIMPLE_NETWORK_PROTOCOL.WaitForPacket". > > This is an actual bug. The reason it's never been triggered is likely that > the "SNP.WaitForPacket" event is rarely waited for by applications -- edk2 > itself has zero instances of that, for example. > > Cc: Ard Biesheuvel > Cc: Jordan Justen > Signed-off-by: Laszlo Ersek > --- > > Notes: > build-tested only > > OvmfPkg/VirtioNetDxe/Events.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c > index 620910774bc5..83e96e5e5d91 100644 > --- a/OvmfPkg/VirtioNetDxe/Events.c > +++ b/OvmfPkg/VirtioNetDxe/Events.c > @@ -58,7 +58,7 @@ VirtioNetIsPacketAvailable ( > MemoryFence (); > > if (Dev->RxLastUsed != RxCurUsed) { > - gBS->SignalEvent (&Dev->Snp.WaitForPacket); > + gBS->SignalEvent (Dev->Snp.WaitForPacket); > } > } > > Reviewed-by: Philippe Mathieu-Daude