Source: efibootguard
Version: 0.16-2
Severity: wishlist
Tags: ftbfs
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear maintainers,

The gnu-efi source package was updated from 3.0.15-1 to 3.0.18-1 on 25 Mar 2024. Based on Debian buildd gnu-efi 3.0.18-1, the build log for efibootguard on loong64 is the only and latest. Based on gnu-efi 3.0.15-1, efibootguard built on other architectures were built 69 days ago. Please see the built status (on 02 Apr 2024) from https://buildd.debian.org/status/package.php?p=efibootguard&suite=sid.

Compiling the efibootguard package failed for loong64 in the Debian Package Auto-Building environment, the error is as follows,
```
kernel-stub/initrd.c: In function ‘initrd_load_file’:
kernel-stub/initrd.c:83:31: error: passing argument 2 of ‘CopyMem’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
   83 |         CopyMem(buffer, loader->addr, loader->size);
      |                         ~~~~~~^~~~~~
In file included from kernel-stub/initrd.c:16:
......
```
The full log can be found at https://buildd.debian.org/status/logs.php?pkg=efibootguard&ver=0.16-2&arch=loong64.

After analysis, I found the second parameter of the CopyMem interface provided by the /usr/include/efi/efilib.h file is not "const" type. The /usr/include/efi/efilib.h header file is provided by the gnu-efi package. The second parameter of the CopyMem interface in version 3.0.15 is "IN CONST VOID *Src", but the second parameter of the CopyMem interface in version 3.0.18 is "IN VOID *Src". For example,
```
VOID EFIAPI
CopyMem (
    IN VOID     *Dest,
    IN VOID     *Src,
    IN UINTN    len
    );
```
It is recommended to modify the parameter passing specification for calling the CopyMem interface in the efibootguard source code.
Maintainers are requested to pay attention to the above phenomena.
Your opinions are welcome.

Thanks,
Dandan Zhang

Reply via email to