app-emulation/xen-4.3.2-r5 was built with the following: USE="efi -custom-cflags -debug -flask -xsm" ABI_X86="64" CFLAGS="" app-crypt/sbsigntool-0.6-r1 was built with the following: USE="" ABI_X86="64" sbsign crashes when trying to sign a xen microkernel EFI image: developer ~ # sbsign --key sign.key --cert sign.crt --output xen-4.3.2.signed.efi xen-4.3.2.efi warning: gap in section table: (null) : 0xffff80d87811f811 - 0xffff80d87811f811, .reloc : 0x001b69a0 - 0x001b7820, gaps in the section table may result in different checksums warning: data remaining[1800224 vs 2031123]: gaps between PE/COFF sections? warning: gap in section table: (null) : 0xffff80d8780fefa0 - 0xffff80d8780fefa0, .reloc : 0x001b69a0 - 0x001b7820, gaps in the section table may result in different checksums warning: data remaining[1800224 vs 2031128]: gaps between PE/COFF sections? sbsign: malloc.c:2369: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 *(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long) old_end & pagemask) == 0)' failed. Aborted
Please test again with version 0.8. commit 34c7074999fe3d58a6b992c49d864ab0dbd8ed93 Author: Matthias Maier <tamiko@gentoo.org> Date: Mon Aug 22 23:27:53 2016 -0500 app-crypt/sbsigntool: version bump to 0.8 Package-Manager: portage-2.2.28
Apologies for really late reply. Using sbsigntool-0.8 with xen-4.4.7 I can confirm that everything works properly and I'm able to successfully sign an EFI image of XEN. Regards, Garry