Re: [Bug Report] Bug in "efi/libstub: Add get_event_log() support for CC platforms"

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

 



Hi Muhammad,

Thanks for the report.

On Thu, 7 Mar 2024 at 12:02, Muhammad Usama Anjum
<usama.anjum@xxxxxxxxxxxxx> wrote:
>
> Hi,
>
> The recent patch:
> 276805fb9c305: efi/libstub: Add get_event_log() support for CC platforms
> has introduced
> #define EFI_CC_EVENT_LOG_FORMAT_TCG_2   0x00000002
>
> But EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 has the same numerical value:
> #define EFI_TCG2_EVENT_LOG_FORMAT_TCG_2   0x2
>
> Thus there is dead code in efi_retrieve_tcg2_eventlog() i.e, multiple if
> conditions with (version == 2) I'm unable to decide on what is wrong and
> what is right here. Please have a look.
>

Why is this a problem? The compiler will recognize this and simplify
the conditional. The code as written is semantically correct, the fact
that the symbolic constants resolve to the same numerical value is
just an implementation detail.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux