grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH V3 3/3] verifiers: Add TPM documentation


From: Daniel Kiper
Subject: Re: [PATCH V3 3/3] verifiers: Add TPM documentation
Date: Mon, 14 Jan 2019 12:09:47 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Dec 17, 2018 at 03:47:20PM +0100, Daniel Kiper wrote:
> On Wed, Dec 12, 2018 at 09:57:48AM -0800, Matthew Garrett wrote:
> > On Wed, Dec 12, 2018 at 6:31 AM Daniel Kiper <address@hidden> wrote:
> > >
> > > On Mon, Dec 03, 2018 at 03:48:17PM +0100, Daniel Kiper wrote:
> > > > On Thu, Nov 29, 2018 at 11:28:10AM -0800, Matthew Garrett wrote:
> > > > > Describe the behaviour of grub when the TPM module is in use.
> > > > >
> > > > > Signed-off-by: Matthew Garrett <address@hidden>
> > > >
> > > > Reviewed-by: Daniel Kiper <address@hidden>
> > > >
> > > > If there are no objections I will apply the patch series in a week or 
> > > > so.
> > >
> > > Pushed. However, I have had to change "enable = efi;" to "enable = 
> > > x86_64_efi;"
> > > in grub-core/Makefile.core.def. Otherwise ARM EFI builds would be broken.
> > > I hope that this is not a problem for you.
> >
> > Hmm, this should have been architecture independent - what was the
> > failure? I can send a followup patch to fix that up.
>
> Please see below. As you can see all non x86_64 EFI builds fail. Failures 
> look the same.
>
> ******************************************************************************
>
> ./configure --target=aarch64-linux-gnu --with-platform=efi 
> --enable-grub-mkfont --prefix="`pwd`/grub-dist"
>
> [...]
>
> aarch64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W  
> -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=ARM64_EFI -nostdinc -isystem 
> /usr/lib/gcc-cross/aarch64-linux-gnu/6/include -I../include -I../include 
> -DGRUB_FILE=\"commands/efi/tpm.c\" -I. -I. -I.. -I.. -I../include 
> -I../include -I../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 
> -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment 
> -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal 
> -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit 
> -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces 
> -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type 
> -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs 
> -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
> -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings 
> -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls 
> -Wmissing-prototypes -Wmissing-declarations -Wcast-align  -Wextra 
> -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch 
> -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast 
> -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign 
> -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 
> -freg-struct-return -mgeneral-regs-only -fno-dwarf2-cfi-asm 
> -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-pie 
> -fno-stack-protector -Wtrampolines -Werror -mcmodel=large  -ffreestanding   
> -MT commands/efi/tpm_module-tpm.o -MD -MP -MF 
> commands/efi/.deps-core/tpm_module-tpm.Tpo -c -o 
> commands/efi/tpm_module-tpm.o `test -f 'commands/efi/tpm.c' || echo 
> './'`commands/efi/tpm.c
> In file included from commands/efi/tpm.c:23:0:
> commands/efi/tpm.c: In function ‘grub_tpm1_log_event’:
> commands/efi/tpm.c:248:52: error: passing argument 2 of 
> ‘tpm->log_extend_event’ makes integer from pointer without a cast 
> [-Werror=int-conversion]
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c:248:52: note: expected ‘grub_efi_physical_address_t {aka 
> long unsigned int}’ but argument is of type ‘unsigned char *’
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c: In function ‘grub_tpm2_log_event’:
> commands/efi/tpm.c:298:60: error: passing argument 3 of 
> ‘tpm->hash_log_extend_event’ from incompatible pointer type 
> [-Werror=incompatible-pointer-types]
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> commands/efi/tpm.c:298:60: note: expected ‘grub_efi_physical_address_t * {aka 
> long unsigned int *}’ but argument is of type  unsigned char *’
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> cc1: all warnings being treated as errors
>
> ******************************************************************************
>
> ./configure --target=arm-linux-gnueabihf --with-platform=efi 
> --enable-grub-mkfont --prefix="`pwd`/grub-dist"
>
> [...]
>
> arm-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W  
> -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=ARM_EFI -nostdinc -isystem 
> /usr/lib/gcc-cross/arm-linux-gnueabihf/6/include -I../include -I../include 
> -DGRUB_FILE=\"commands/efi/tpm.c\" -I. -I. -I.. -I.. -I../include 
> -I../include -I../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 
> -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment 
> -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal 
> -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit 
> -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces 
> -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type 
> -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs 
> -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
> -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings 
> -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls 
> -Wmissing-prototypes -Wmissing-declarations -Wcast-align  -Wextra 
> -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch 
> -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast 
> -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign 
> -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 
> -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm 
> -fno-asynchronous-unwind-tables -fno-unwind-tables -mthumb-interwork -Qn 
> -fno-PIE -fno-pie -fno-stack-protector -mno-unaligned-access -Wtrampolines 
> -Werror   -ffreestanding   -MT commands/efi/tpm_module-tpm.o -MD -MP -MF 
> commands/efi/.deps-core/tpm_module-tpm.Tpo -c -o 
> commands/efi/tpm_module-tpm.o `test -f 'commands/efi/tpm.c' || echo 
> './'`commands/efi/tpm.c
> In file included from commands/efi/tpm.c:23:0:
> commands/efi/tpm.c: In function ‘grub_tpm1_log_event’:
> commands/efi/tpm.c:248:52: error: passing argument 2 of 
> ‘tpm->log_extend_event’ makes integer from pointer without a cast 
> [-Werror=int-conversion]
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c:248:52: note: expected ‘grub_efi_physical_address_t {aka 
> long long unsigned int}’ but argument is of type ‘unsigned char *’
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c: In function ‘grub_tpm2_log_event’:
> commands/efi/tpm.c:298:60: error: passing argument 3 of 
> ‘tpm->hash_log_extend_event’ from incompatible pointer type 
> [-Werror=incompatible-pointer-types]
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> commands/efi/tpm.c:298:60: note: expected ‘grub_efi_physical_address_t * {aka 
> long long unsigned int *}’ but argument is of type ‘unsigned char *’
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> cc1: all warnings being treated as errors
>
> ******************************************************************************
>
> ./configure --target=i386 --with-platform=efi --enable-grub-mkfont 
> --prefix="`pwd`/grub-dist"
>
> [...]
>
> gcc -DHAVE_CONFIG_H -I. -I..  -Wall -W  -DGRUB_MACHINE_EFI=1 
> -DGRUB_MACHINE=I386_EFI -m32 -nostdinc -isystem 
> /usr/lib/gcc/x86_64-linux-gnu/6/include -I../include -I../include 
> -DGRUB_FILE=\"commands/efi/tpm.c\" -I. -I. -I.. -I.. -I../include 
> -I../include -I../grub-core/lib/libgcrypt-grub/src/    -D_FILE_OFFSET_BITS=64 
> -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment 
> -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal 
> -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit 
> -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces 
> -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type 
> -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs 
> -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label 
> -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings 
> -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls 
> -Wmissing-prototypes -Wmissing-declarations  -Wextra -Wattributes 
> -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch 
> -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast 
> -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign 
> -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 
> -march=i386 -m32 -falign-jumps=1 -falign-loops=1 -falign-functions=1 
> -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow 
> -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe 
> -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-pie 
> -fno-stack-protector -Wtrampolines -Werror   -ffreestanding   -MT 
> commands/efi/tpm_module-tpm.o -MD -MP -MF 
> commands/efi/.deps-core/tpm_module-tpm.Tpo -c -o 
> commands/efi/tpm_module-tpm.o `test -f 'commands/efi/tpm.c' || echo 
> './'`commands/efi/tpm.c
> In file included from commands/efi/tpm.c:23:0:
> commands/efi/tpm.c: In function ‘grub_tpm1_log_event’:
> commands/efi/tpm.c:248:52: error: passing argument 2 of 
> ‘tpm->log_extend_event’ makes integer from pointer without a cast 
> [-Werror=int-conversion]
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c:248:52: note: expected ‘grub_efi_physical_address_t {aka 
> long long unsigned int}’ but argument is of type ‘unsigned char *’
>    status = efi_call_7 (tpm->log_extend_event, tpm, buf, (grub_uint64_t) size,
>                                                     ^
> ../include/grub/efi/api.h:1698:55: note: in definition of macro ‘efi_call_7’
>  #define efi_call_7(func, a, b, c, d, e, f, g) func(a, b, c, d, e, f, g)
>                                                        ^
> commands/efi/tpm.c: In function ‘grub_tpm2_log_event’:
> commands/efi/tpm.c:298:60: error: passing argument 3 of 
> ‘tpm->hash_log_extend_event’ from incompatible pointer type 
> [-Werror=incompatible-pointer-types]
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> commands/efi/tpm.c:298:60: note: expected ‘grub_efi_physical_address_t * {aka 
> long long unsigned int *}’ but argument is of type ‘unsigned char *’
>    status = efi_call_5 (tpm->hash_log_extend_event, tpm, 0, buf,
>                                                             ^
> ../include/grub/efi/api.h:1696:52: note: in definition of macro ‘efi_call_5’
>  #define efi_call_5(func, a, b, c, d, e) func(a, b, c, d, e)
>                                                     ^
> cc1: all warnings being treated as errors
>
> ******************************************************************************

Ping?

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]