public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully
@ 2018-03-23 21:57 Laszlo Ersek
  2018-03-24  3:52 ` Ard Biesheuvel
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2018-03-23 21:57 UTC (permalink / raw)
  To: edk2-devel-01; +Cc: Ard Biesheuvel, Rocky, Ruiyu Ni

According to the UEFI spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() is supposed
to catch an invalid BltOperation, and report it with
EFI_INVALID_PARAMETER.

Remove the assertion from QemuVideoGraphicsOutputBlt() that prevents this
from working in NOOPT and DEBUG builds.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Rocky <xingrong.ni@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Reported-by: Rocky <xingrong.ni@intel.com>
Analyzed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=897
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---

Notes:
    Repo:   https://github.com/lersek/edk2.git
    Branch: qemuvideo_invalid_bltop

 OvmfPkg/QemuVideoDxe/Gop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
index b479d24a8763..d51efc2a83d5 100644
--- a/OvmfPkg/QemuVideoDxe/Gop.c
+++ b/OvmfPkg/QemuVideoDxe/Gop.c
@@ -366,7 +366,7 @@ Returns:
 
   default:
     Status = EFI_INVALID_PARAMETER;
-    ASSERT (FALSE);
+    break;
   }
 
   gBS->RestoreTPL (OriginalTPL);
-- 
2.14.1.3.gb7cf6e02401b



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully
  2018-03-23 21:57 [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully Laszlo Ersek
@ 2018-03-24  3:52 ` Ard Biesheuvel
  2018-03-26  1:26   ` Ni, Ruiyu
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2018-03-24  3:52 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: edk2-devel-01, Rocky, Ruiyu Ni

On 23 March 2018 at 21:57, Laszlo Ersek <lersek@redhat.com> wrote:
> According to the UEFI spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() is supposed
> to catch an invalid BltOperation, and report it with
> EFI_INVALID_PARAMETER.
>
> Remove the assertion from QemuVideoGraphicsOutputBlt() that prevents this
> from working in NOOPT and DEBUG builds.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Rocky <xingrong.ni@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Reported-by: Rocky <xingrong.ni@intel.com>
> Analyzed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=897
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>
> Notes:
>     Repo:   https://github.com/lersek/edk2.git
>     Branch: qemuvideo_invalid_bltop
>
>  OvmfPkg/QemuVideoDxe/Gop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
> index b479d24a8763..d51efc2a83d5 100644
> --- a/OvmfPkg/QemuVideoDxe/Gop.c
> +++ b/OvmfPkg/QemuVideoDxe/Gop.c
> @@ -366,7 +366,7 @@ Returns:
>
>    default:
>      Status = EFI_INVALID_PARAMETER;
> -    ASSERT (FALSE);
> +    break;
>    }
>
>    gBS->RestoreTPL (OriginalTPL);
> --
> 2.14.1.3.gb7cf6e02401b
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully
  2018-03-24  3:52 ` Ard Biesheuvel
@ 2018-03-26  1:26   ` Ni, Ruiyu
  2018-03-26 15:02     ` Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Ni, Ruiyu @ 2018-03-26  1:26 UTC (permalink / raw)
  To: Ard Biesheuvel, Laszlo Ersek; +Cc: edk2-devel-01, Rocky

On 3/24/2018 11:52 AM, Ard Biesheuvel wrote:
> On 23 March 2018 at 21:57, Laszlo Ersek <lersek@redhat.com> wrote:
>> According to the UEFI spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() is supposed
>> to catch an invalid BltOperation, and report it with
>> EFI_INVALID_PARAMETER.
>>
>> Remove the assertion from QemuVideoGraphicsOutputBlt() that prevents this
>> from working in NOOPT and DEBUG builds.
>>
>> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> Cc: Rocky <xingrong.ni@intel.com>
>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>> Reported-by: Rocky <xingrong.ni@intel.com>
>> Analyzed-by: Ruiyu Ni <ruiyu.ni@intel.com>
>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=897
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> 
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> 
>> ---
>>
>> Notes:
>>      Repo:   https://github.com/lersek/edk2.git
>>      Branch: qemuvideo_invalid_bltop
>>
>>   OvmfPkg/QemuVideoDxe/Gop.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
>> index b479d24a8763..d51efc2a83d5 100644
>> --- a/OvmfPkg/QemuVideoDxe/Gop.c
>> +++ b/OvmfPkg/QemuVideoDxe/Gop.c
>> @@ -366,7 +366,7 @@ Returns:
>>
>>     default:
>>       Status = EFI_INVALID_PARAMETER;
>> -    ASSERT (FALSE);
>> +    break;
>>     }
>>
>>     gBS->RestoreTPL (OriginalTPL);
>> --
>> 2.14.1.3.gb7cf6e02401b
>>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully
  2018-03-26  1:26   ` Ni, Ruiyu
@ 2018-03-26 15:02     ` Laszlo Ersek
  0 siblings, 0 replies; 4+ messages in thread
From: Laszlo Ersek @ 2018-03-26 15:02 UTC (permalink / raw)
  To: Ni, Ruiyu, Ard Biesheuvel; +Cc: edk2-devel-01, Rocky

On 03/26/18 03:26, Ni, Ruiyu wrote:
> On 3/24/2018 11:52 AM, Ard Biesheuvel wrote:
>> On 23 March 2018 at 21:57, Laszlo Ersek <lersek@redhat.com> wrote:
>>> According to the UEFI spec, EFI_GRAPHICS_OUTPUT_PROTOCOL.Blt() is
>>> supposed
>>> to catch an invalid BltOperation, and report it with
>>> EFI_INVALID_PARAMETER.
>>>
>>> Remove the assertion from QemuVideoGraphicsOutputBlt() that prevents
>>> this
>>> from working in NOOPT and DEBUG builds.
>>>
>>> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>> Cc: Rocky <xingrong.ni@intel.com>
>>> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>>> Reported-by: Rocky <xingrong.ni@intel.com>
>>> Analyzed-by: Ruiyu Ni <ruiyu.ni@intel.com>
>>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=897
>>> Contributed-under: TianoCore Contribution Agreement 1.1
>>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>>
>> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>>
>>> ---
>>>
>>> Notes:
>>>      Repo:   https://github.com/lersek/edk2.git
>>>      Branch: qemuvideo_invalid_bltop
>>>
>>>   OvmfPkg/QemuVideoDxe/Gop.c | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c
>>> index b479d24a8763..d51efc2a83d5 100644
>>> --- a/OvmfPkg/QemuVideoDxe/Gop.c
>>> +++ b/OvmfPkg/QemuVideoDxe/Gop.c
>>> @@ -366,7 +366,7 @@ Returns:
>>>
>>>     default:
>>>       Status = EFI_INVALID_PARAMETER;
>>> -    ASSERT (FALSE);
>>> +    break;
>>>     }
>>>
>>>     gBS->RestoreTPL (OriginalTPL);
>>> -- 
>>> 2.14.1.3.gb7cf6e02401b
>>>
> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
> 

Thank you both, commit e1fb441624cd.

Laszlo


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-26 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-23 21:57 [PATCH] OvmfPkg/QemuVideoDxe: handle invalid BltOperation gracefully Laszlo Ersek
2018-03-24  3:52 ` Ard Biesheuvel
2018-03-26  1:26   ` Ni, Ruiyu
2018-03-26 15:02     ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox