Re: UEFI Secure boot using qemu-kvm

From: James Bottomley
Date: Wed Jun 27 2012 - 15:53:27 EST


On Wed, 2012-06-27 at 20:38 +0100, Matthew Garrett wrote:
> On Wed, Jun 27, 2012 at 08:35:04PM +0100, James Bottomley wrote:
>
> > I've tried to build pesign, but I have huge problems with the make
> > process; how did you build it?
>
> I checked it out and ran make. What problems ar eyou seeing?


jejb@dabdike> make
make -C include TOPDIR=/home/jejb/git/pesign
SRCDIR=/home/jejb/git/pesign/include/ ARCH=x86_64
make[1]: Entering directory `/home/jejb/git/pesign/include'
make -C libdpe TOPDIR=/home/jejb/git/pesign
SRCDIR=/home/jejb/git/pesign/libdpe/ ARCH=x86_64
make[2]: Entering directory `/home/jejb/git/pesign/include/libdpe'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/jejb/git/pesign/include/libdpe'
make[1]: Leaving directory `/home/jejb/git/pesign/include'
make -C libdpe TOPDIR=/home/jejb/git/pesign
SRCDIR=/home/jejb/git/pesign/libdpe/ ARCH=x86_64
make[1]: Entering directory `/home/jejb/git/pesign/libdpe'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jejb/git/pesign/libdpe'
make -C src TOPDIR=/home/jejb/git/pesign
SRCDIR=/home/jejb/git/pesign/src/ ARCH=x86_64
make[1]: Entering directory `/home/jejb/git/pesign/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/jejb/git/pesign/src'
make -C util TOPDIR=/home/jejb/git/pesign
SRCDIR=/home/jejb/git/pesign/util/ ARCH=x86_64
make[1]: Entering directory `/home/jejb/git/pesign/util'
/usr/bin/gcc -I/home/jejb/git/pesign/include -g -O0 -fpic -Wall
-fshort-wchar -fno-strict-aliasing -fno-merge-constants --std=gnu99
-D_GNU_SOURCE -DEFI_FUNCTION_WRAPPER -mno-red-zone -I/usr/include/efi/
-I/usr/include/efi/x86_64/ -I/usr/include/efi/protocol -fpic
-fshort-wchar -fno-reorder-functions -fno-strict-aliasing
-fno-merge-constants -mno-red-zone -Wimplicit-function-declaration
-DCONFIG_x86_64 -D__UEFI__ -c setupsb.c -o setupsb.o
In file included from /usr/include/efi/efi.h:35:0,
from setupsb.c:2:
/usr/include/efi/x86_64/efibind.h:88:1: error: unknown type name
âuint64_tâ
/usr/include/efi/x86_64/efibind.h:89:1: error: unknown type name
âint64_tâ
/usr/include/efi/x86_64/efibind.h:92:5: error: unknown type name
âuint32_tâ
/usr/include/efi/x86_64/efibind.h:93:5: error: unknown type name
âint32_tâ
/usr/include/efi/x86_64/efibind.h:96:1: error: unknown type name
âuint16_tâ
/usr/include/efi/x86_64/efibind.h:97:1: error: unknown type name
âint16_tâ
/usr/include/efi/x86_64/efibind.h:98:1: error: unknown type name
âuint8_tâ
/usr/include/efi/x86_64/efibind.h:99:1: error: unknown type name
âint8_tâ
/usr/include/efi/x86_64/efibind.h:106:1: error: unknown type name
âint64_tâ
/usr/include/efi/x86_64/efibind.h:107:1: error: unknown type name
âuint64_tâ
setupsb.c: In function âdumphexâ:
setupsb.c:30:3: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:33:4: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:37:3: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âdumphex_strâ:
setupsb.c:46:3: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:49:4: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:53:3: warning: passing argument 1 of âPrintâ from incompatible
pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âget_argsâ:
setupsb.c:62:27: error: âEFI_BOOT_SERVICESâ has no member named
âOpenProtocolâ
setupsb.c:66:5: error: âEFI_OPEN_PROTOCOL_GET_PROTOCOLâ undeclared
(first use in this function)
setupsb.c:66:5: note: each undeclared identifier is reported only once
for each function it appears in
setupsb.c:73:22: error: âEFI_BOOT_SERVICESâ has no member named
âCloseProtocolâ
setupsb.c: In function âpk_is_populatedâ:
setupsb.c:86:3: warning: passing argument 1 of âLibGetVariableAndSizeâ
from incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:511:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âkek_is_populatedâ:
setupsb.c:100:3: warning: passing argument 1 of âLibGetVariableAndSizeâ
from incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:511:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âdb_is_populatedâ:
setupsb.c:114:3: warning: passing argument 1 of âLibGetVariableAndSizeâ
from incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:511:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âmake_variableâ:
setupsb.c:143:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:153:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âusageâ:
setupsb.c:172:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:176:8: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:177:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:178:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:179:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:180:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:181:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:182:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: In function âhas_forceâ:
setupsb.c:190:3: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c: At top level:
setupsb.c:215:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:215:2: warning: (near initialization for âhashes[0].nameâ)
[enabled by default]
setupsb.c:216:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:216:2: warning: (near initialization for âhashes[1].nameâ)
[enabled by default]
setupsb.c:217:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:217:2: warning: (near initialization for âhashes[2].nameâ)
[enabled by default]
setupsb.c:218:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:218:2: warning: (near initialization for âhashes[3].nameâ)
[enabled by default]
setupsb.c: In function âget_hashâ:
setupsb.c:235:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:238:3: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:241:6: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:242:5: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:256:5: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:257:5: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:265:5: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:266:5: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:277:6: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:279:6: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:290:2: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âget_fileâ:
setupsb.c:297:2: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âset_pkâ:
setupsb.c:312:4: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:319:3: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:320:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âset_db_helperâ:
setupsb.c:364:4: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âset_dbâ:
setupsb.c:394:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âset_dbxâ:
setupsb.c:402:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âset_kekâ:
setupsb.c:410:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âappend_dbâ:
setupsb.c:419:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âappend_dbxâ:
setupsb.c:427:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âappend_kekâ:
setupsb.c:435:5: warning: passing argument 6 of âset_db_helperâ from
incompatible pointer type [enabled by default]
setupsb.c:350:1: note: expected âCHAR16 *â but argument is of type
âshort unsigned int *â
setupsb.c: In function âappend_pkâ:
setupsb.c:441:2: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:442:2: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âclear_dbâ:
setupsb.c:466:4: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:467:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: In function âclear_kekâ:
setupsb.c:499:4: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:500:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c: At top level:
setupsb.c:517:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:517:2: warning: (near initialization for âactions[0].nameâ)
[enabled by default]
setupsb.c:517:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:517:2: warning: (near initialization for âactions[0].dbâ)
[enabled by default]
setupsb.c:518:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:518:2: warning: (near initialization for âactions[1].nameâ)
[enabled by default]
setupsb.c:518:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:518:2: warning: (near initialization for âactions[1].dbâ)
[enabled by default]
setupsb.c:519:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:519:2: warning: (near initialization for âactions[2].nameâ)
[enabled by default]
setupsb.c:519:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:519:2: warning: (near initialization for âactions[2].dbâ)
[enabled by default]
setupsb.c:520:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:520:2: warning: (near initialization for âactions[3].nameâ)
[enabled by default]
setupsb.c:520:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:520:2: warning: (near initialization for âactions[3].dbâ)
[enabled by default]
setupsb.c:521:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:521:2: warning: (near initialization for âactions[4].nameâ)
[enabled by default]
setupsb.c:521:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:521:2: warning: (near initialization for âactions[4].dbâ)
[enabled by default]
setupsb.c:522:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:522:2: warning: (near initialization for âactions[5].nameâ)
[enabled by default]
setupsb.c:522:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:522:2: warning: (near initialization for âactions[5].dbâ)
[enabled by default]
setupsb.c:523:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:523:2: warning: (near initialization for âactions[6].nameâ)
[enabled by default]
setupsb.c:523:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:523:2: warning: (near initialization for âactions[6].dbâ)
[enabled by default]
setupsb.c:524:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:524:2: warning: (near initialization for âactions[7].nameâ)
[enabled by default]
setupsb.c:524:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:524:2: warning: (near initialization for âactions[7].dbâ)
[enabled by default]
setupsb.c:525:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:525:2: warning: (near initialization for âactions[8].nameâ)
[enabled by default]
setupsb.c:525:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:525:2: warning: (near initialization for âactions[8].dbâ)
[enabled by default]
setupsb.c:526:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:526:2: warning: (near initialization for âactions[9].nameâ)
[enabled by default]
setupsb.c:526:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:526:2: warning: (near initialization for âactions[9].dbâ)
[enabled by default]
setupsb.c:527:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:527:2: warning: (near initialization for âactions[10].nameâ)
[enabled by default]
setupsb.c:527:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:527:2: warning: (near initialization for âactions[10].dbâ)
[enabled by default]
setupsb.c:528:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:528:2: warning: (near initialization for âactions[11].nameâ)
[enabled by default]
setupsb.c:528:2: warning: initialization from incompatible pointer type
[enabled by default]
setupsb.c:528:2: warning: (near initialization for âactions[11].dbâ)
[enabled by default]
setupsb.c: In function âefi_mainâ:
setupsb.c:545:3: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:550:3: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:553:3: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:557:3: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:558:5: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:559:5: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:560:5: warning: passing argument 2 of âStrCmpâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:200:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
setupsb.c:569:2: warning: overflow in implicit constant conversion
[-Woverflow]
setupsb.c:583:3: warning: passing argument 1 of âPrintâ from
incompatible pointer type [enabled by default]
/usr/include/efi/efilib.h:388:1: note: expected âCHAR16 *â but argument
is of type âshort unsigned int *â
make[1]: *** [setupsb.o] Error 1
make[1]: Leaving directory `/home/jejb/git/pesign/util'
make: *** [util] Error 2

James


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/