Skip to contentSkip to conversation

15136: regressions - FAIL

xen-unstable test In review xen.org 4 participants 17 messages Jan 19, 2013 – Jan 24, 2013

lore
Share & tools
lore

xen.org

author Tested-by Phil Evans Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Ian Campbell Acked-by Keir Fraser Acked-by Stefano Stabellini
#0 lore raw

flight 15136 xen-unstable real [real]
http://www.chiark.greenend.org.uk/~xensrcts/logs/15136/

Regressions :-(

Tests which did not succeed and are blocking,
including tests which could not be run:

 build-i386                    4 xen-build                 fail REGR. vs. 15130
 build-i386-oldkern            4 xen-build                 fail REGR. vs. 15130

Regressions which are regarded as allowable (not blocking):

 test-amd64-amd64-xl-sedf-pin  5 xen-boot                     fail   like 15130
 test-amd64-amd64-xl-sedf      5 xen-boot                     fail   like 15130

Tests which did not succeed, but are not blocking:
test-amd64-amd64-xl-pcipt-intel 9 guest-start fail never pass
test-amd64-i386-rhel6hvm-amd 1 xen-build-check(1) blocked n/a

 test-amd64-i386-qemuu-rhel6hvm-amd  1 xen-build-check(1)           blocked n/a
 test-amd64-i386-qemut-rhel6hvm-amd  1 xen-build-check(1)           blocked n/a
 test-amd64-i386-xend-winxpsp3  1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-xl-win-vcpus1  1 xen-build-check(1)           blocked  n/a
 test-amd64-amd64-xl-qemut-win7-amd64 13 guest-stop             fail never pass
 test-amd64-amd64-xl-qemuu-winxpsp3 13 guest-stop               fail never pass
 test-amd64-i386-win           1 xen-build-check(1)           blocked  n/a
 test-amd64-amd64-win         16 leak-check/check             fail   never pass
 test-amd64-amd64-xl-win7-amd64 13 guest-stop                   fail never pass
 test-amd64-i386-xl-credit2    1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-qemut-win-vcpus1  1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-xl            1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-xl-multivcpu  1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-pv            1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-xl-qemut-win7-amd64  1 xen-build-check(1)          blocked n/a
 test-amd64-i386-xl-win7-amd64  1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-qemuu-rhel6hvm-intel  1 xen-build-check(1)         blocked n/a
 test-amd64-i386-qemut-rhel6hvm-intel  1 xen-build-check(1)         blocked n/a
 test-amd64-i386-rhel6hvm-intel  1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-win-vcpus1    1 xen-build-check(1)           blocked  n/a
 test-amd64-i386-pair          1 xen-build-check(1)           blocked  n/a
 test-amd64-amd64-xl-winxpsp3 13 guest-stop                   fail   never pass
 test-amd64-i386-xl-qemut-winxpsp3-vcpus1  1 xen-build-check(1)     blocked n/a
 test-amd64-i386-xl-winxpsp3-vcpus1  1 xen-build-check(1)           blocked n/a
 test-amd64-i386-xl-qemut-win-vcpus1  1 xen-build-check(1)          blocked n/a
 test-amd64-i386-xend-qemut-winxpsp3  1 xen-build-check(1)          blocked n/a

test-amd64-amd64-xl-qemut-winxpsp3 13 guest-stop fail never pass
test-amd64-i386-qemut-win 1 xen-build-check(1) blocked n/a
test-amd64-amd64-xl-win 13 guest-stop fail never pass
test-amd64-amd64-xl-qemuu-win7-amd64 13 guest-stop fail never pass
test-amd64-amd64-qemut-win 16 leak-check/check fail never pass
test-amd64-amd64-xl-qemut-win 13 guest-stop fail never pass

version targeted for testing:
xen f07742a1a3c6
baseline version:
xen 025f202f3022

------------------------------------------------------------
People who touched revisions under test:
Boris Ostrovsky <[email protected]> Ian Campbell <[email protected]>
Ian Jackson <[email protected]>
Jan Beulich <[email protected]>
Keir Fraser <[email protected]>
Matthew Fioravante <[email protected]> Paolo Bonzini <[email protected]>
Phil Evans <[email protected]>
Stefano Stabellini <[email protected]> Tim Deegan <[email protected]>
------------------------------------------------------------

jobs:

 build-amd64                                                  pass    
 build-i386                                                   fail    
 build-amd64-oldkern                                          pass    
 build-i386-oldkern                                           fail    
 build-amd64-pvops                                            pass    
 build-i386-pvops                                             pass    
 test-amd64-amd64-xl                                          pass    
 test-amd64-i386-xl                                           blocked 
 test-amd64-i386-rhel6hvm-amd                                 blocked 
 test-amd64-i386-qemut-rhel6hvm-amd                           blocked 
 test-amd64-i386-qemuu-rhel6hvm-amd                           blocked 
 test-amd64-amd64-xl-qemut-win7-amd64                         fail    
 test-amd64-i386-xl-qemut-win7-amd64                          blocked 
 test-amd64-amd64-xl-qemuu-win7-amd64                         fail    
 test-amd64-amd64-xl-win7-amd64                               fail    
 test-amd64-i386-xl-win7-amd64                                blocked 
 test-amd64-i386-xl-credit2                                   blocked 
 test-amd64-amd64-xl-pcipt-intel                              fail    
 test-amd64-i386-rhel6hvm-intel                               blocked 
 test-amd64-i386-qemut-rhel6hvm-intel                         blocked 
 test-amd64-i386-qemuu-rhel6hvm-intel                         blocked 
 test-amd64-i386-xl-multivcpu                                 blocked 
 test-amd64-amd64-pair                                        pass    
 test-amd64-i386-pair                                         blocked 
 test-amd64-amd64-xl-sedf-pin                                 fail    
 test-amd64-amd64-pv                                          pass    
 test-amd64-i386-pv                                           blocked 
 test-amd64-amd64-xl-sedf                                     fail    
 test-amd64-i386-win-vcpus1                                   blocked 
 test-amd64-i386-qemut-win-vcpus1                             blocked 
 test-amd64-i386-xl-qemut-win-vcpus1                          blocked 
 test-amd64-i386-xl-win-vcpus1                                blocked 
 test-amd64-i386-xl-qemut-winxpsp3-vcpus1                     blocked 
 test-amd64-i386-xl-winxpsp3-vcpus1                           blocked 
 test-amd64-amd64-win                                         fail    
 test-amd64-i386-win                                          blocked 
 test-amd64-amd64-qemut-win                                   fail    
 test-amd64-i386-qemut-win                                    blocked 
 test-amd64-amd64-xl-qemut-win                                fail    
 test-amd64-amd64-xl-win                                      fail    
 test-amd64-i386-xend-qemut-winxpsp3                          blocked 
 test-amd64-amd64-xl-qemut-winxpsp3                           fail    
 test-amd64-amd64-xl-qemuu-winxpsp3                           fail    
 test-amd64-i386-xend-winxpsp3                                blocked 
 test-amd64-amd64-xl-winxpsp3                                 fail    

------------------------------------------------------------
sg-report-flight on woking.cam.xci-test.com
logs: /home/xc_osstest/logs
images: /home/xc_osstest/images

Logs, config files, etc. are available at
http://www.chiark.greenend.org.uk/~xensrcts/logs

Test harness code can be found at
http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary

Not pushing.

------------------------------------------------------------

changeset:   26429:f07742a1a3c6
tag:         tip
user:        Ian Campbell <[email protected]>
date:        Fri Jan 18 14:14:31 2013 +0000

stubdom: rerun autogen.sh

I forgot to do this while checking in 26424:e1d7053e4d45. Refresh now so as to not cause confusing looking changes next time it is run.

changeset:   26428:9e8c39bdc1fe
user:        Tim Deegan <[email protected]>
date:        Fri Jan 18 12:31:57 2013 +0100

x86/hvm: fix RTC setting.

When the guest writes one field of the RTC time, we must bring all the other fields up to date for the current second before calculating the new RTC time.

changeset:   26427:8f6dd5dc5d6c
user:        Boris Ostrovsky <[email protected]>
date:        Fri Jan 18 12:20:58 2013 +0100

x86/AMD: Enable WC+ memory type on family 10 processors

In some cases BIOS may not enable WC+ memory type on family 10 processors, instead converting what would be WC+ memory to CD type. On guests using nested pages this could result in performance degradation. This patch enables WC+.

changeset:   26426:eb8e9a23925d
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:48 2013 +0000

Add conditional build of subsystems to configure.ac

The toplevel Makefile still works without running configure and will default build everything

changeset:   26425:76dce3b9468e
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:48 2013 +0000

Add a top level configure script

changeset:   26424:e1d7053e4d45
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:47 2013 +0000

stubdom: Add autoconf

Stub domains now use autoconf to build.
This configure script can enable or disable specific domains and also specify custom download locations for stubdom library packages. See ./configure --help for details.

C and Caml are disabled by default. vtpm-stubdom is conditional on the presense of cmake.

Rename vtpmmgrdom to vtpmmgr-stubdom

Also update .*ignore

changeset:   26423:712419ef207b
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:46 2013 +0000

README: Add cmake dependency

cmake is an optional dependency for vtpm.

changeset:   26422:18326c674f9b
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:45 2013 +0000

Add vtpm documentation

See the files included in this patch for details

changeset:   26421:21b5491281c4
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:44 2013 +0000

vtpm/vtpmmgr and required libs to stubdom/Makefile

Add 3 new libraries to stubdom:
libgmp
polarssl
Berlios TPM Emulator 0.7.4

Add makefile structure for vtpm and vtpmmgrdom. Both vtpm domains are optional builds as vtpm depends on cmake. To build either of them, you must do so explicitly. make vtpm-stubdom vtpmmgrdom

Finally, also update .*ignore

[ijc, folded in fix from Matthew to workaround cmake 2.8.2 build failure]
changeset:   26420:600a6694754a
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:43 2013 +0000

add stubdom/vtpmmgr code

Add the code base for vtpmmgrdom. Makefile changes next patch.

changeset:   26419:06b884fed150
user:        Matthew Fioravante <[email protected]>
date:        Fri Jan 18 10:55:42 2013 +0000

add vtpm-stubdom code

Add the code base for vtpm-stubdom to the stubdom heirarchy. Makefile changes in later patch.

changeset:   26418:3b59a6c3e9b0
user:        Paolo Bonzini <[email protected]>
date:        Fri Jan 18 11:35:11 2013 +0100

x86: find a better location for the real-mode trampoline

On some machines, the location at 0x40e does not point to the beginning of the EBDA. Rather, it points to the beginning of the BIOS-reserved area of the EBDA, while the option ROMs place their data below that segment.

For this reason, 0x413 is actually a better source than 0x40e to get the location of the real-mode trampoline. Xen was already using it as a second source, and this patch keeps that working. However, just in case, let's also fetch the information from the multiboot structure, where the boot loader should have placed it. This way we don't necessarily trust one of the BIOS or the multiboot loader more than the other.

Retain the previous code, thus using the multiboot value only if it's sane but lower than the BDA computed one. Also use the full 32-bit mem_lower value and prefer MBI_MEMLIMITS over open coding it (requiring a slight adjustment to multiboot.h to make its constants actually usable in assembly code, which previously they were only meant to be).

changeset:   26417:025f202f3022
user:        Ian Campbell <[email protected]>
date:        Thu Jan 17 16:48:25 2013 +0000

xen: arm: fix assert in select_user_reg

The condition was inverted.

========================================
commit 2a1354d655d816feaad7dbdb8364f40a208439c1

Author: Ian Jackson <[email protected]>
Date:   Thu Jan 17 15:52:16 2013 +0000

e1000: fix compile warning introduced by security fix, and debugging

e33f918c19e393900b95a2bb6b10668dfe96a8f2, the fix for XSA-41, and its cherry picks in 4.2 and 4.1 introduced this compiler warning:
hw/e1000.c:641: warning: 'return' with a value, in function returning void

In upstream qemu (where this change came from), e1000_receive returns a value used by queueing machinery to decide whether to try resubmitting the packet later. Returning "size" means that the packet has been dealt with and should not be retried.

In this old branch (aka qemu-xen-traditional), this machinery is absent and e1000_receive returns void. Fix the return statement.

Also add a debugging statement along the lines of the others in this function.

#1 lore raw
Quoted 4 lines · xen.org

Tests which did not succeed and are blocking,
including tests which could not be run:

 build-i386                    4 xen-build                 fail REGR. vs. 15130
 build-i386-oldkern            4 xen-build                 fail REGR. vs. 15130 

Looks like vtpm_storage.c doesn't compile for 32-bit:
vtpm_storage.c: In function 'vtpm_storage_load_header':
vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' make[2]: *** [vtpm_storage.o] Error 1

Ian.

#2 lore raw
Quoted 11 lines · Ian Campbell
Quoted 4 lines · xen.org

Tests which did not succeed and are blocking,
including tests which could not be run:

 build-i386                    4 xen-build                 fail REGR. vs. 15130
 build-i386-oldkern            4 xen-build                 fail REGR. vs. 15130 

Looks like vtpm_storage.c doesn't compile for 32-bit:
vtpm_storage.c: In function 'vtpm_storage_load_header':
vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' make[2]: *** [vtpm_storage.o] Error 1

stubdom/vtpmmgr/vtpm_storage.c +1 -1
index abb0dba..de21b4a 100644
@@ -655,7 +655,7 @@ TPM_RESULT vtpm_storage_load_header(void)
 
    /* Validate the length of the output buffer */
    if(datalen < AES_KEY_SIZE + sizeof(UINT32)) {
-      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too small! expected (%ld)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
+      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too small! expected (%zu)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
       status = TPM_IOERROR;
       goto abort_egress;
    }

But also:

ld -nostdlib -L/local/scratch/ianc/devel/xen-unstable.git/stubdom/cross-root-i686/i686-xen-elf/lib  -m elf_i386 \
	-T arch/x86/minios-x86_32.lds /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os.o  \
	-o /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os

ld: warning: section .bss' type changed to PROGBITS /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os.o: In function aes_crypt_ecb':
/local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:659: undefined reference to padlock_supports' /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:661: undefined reference to padlock_xcryptecb' /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os.o: In function `aes_crypt_cbc':
/local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:771: undefined reference to padlock_supports' /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:773: undefined reference to padlock_xcryptcbc' make[1]: *** [/local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os] Error 1 make[1]: Leaving directory `/local/scratch/ianc/devel/xen-unstable.git/extras/mini-os'
make: *** [vtpmmgr-stubdom] Error 2

#3 lore raw

PATCH 1/1 vtpmmgr: fix build on 32-bit

Correct format string, fixing:
vtpm_storage.c: In function 'vtpm_storage_load_header': vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int' make[2]: *** [vtpm_storage.o] Error 1

Add padlock.o to PSSL_OBJS, fixing:
/local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os.o: In function aes_crypt_ecb': /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:659: undefined reference to padlock_supports' /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:661: undefined reference to padlock_xcryptecb' /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os.o: In function aes_crypt_cbc': /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:771: undefined reference to padlock_supports' /local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-x86_32/library/aes.c:773: undefined reference to padlock_xcryptcbc'
make[1]: ***
[/local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-vtpmmgr/mini-os]
Error 1

Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/vtpmmgr/Makefile       |    2 +-
 stubdom/vtpmmgr/vtpm_storage.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
stubdom/vtpmmgr/Makefile +1 -1
index 88c83c3..e41c261 100644
@@ -12,7 +12,7 @@
 XEN_ROOT=../..
 
 PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o
 
 TARGET=vtpmmgr.a
 OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o log.o
stubdom/vtpmmgr/vtpm_storage.c +1 -1
index abb0dba..de21b4a 100644
@@ -655,7 +655,7 @@ TPM_RESULT vtpm_storage_load_header(void)
 
    /* Validate the length of the output buffer */
    if(datalen < AES_KEY_SIZE + sizeof(UINT32)) {
-      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too small! expected (%ld)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
+      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too small! expected (%zu)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
       status = TPM_IOERROR;
       goto abort_egress;
    }
Signature · 1 line
1.7.2.5
#4 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 8 lines · Ian Campbell
stubdom/vtpmmgr/Makefile +0 -1
@@ -12,7 +12,7 @@
 XEN_ROOT=../..
 
 PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o

timing.o entropy_poll.o
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o

This was a quick fix to get the build fixed (and a test pass) sooner rather than later.

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Ian.

#5 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 7 lines · Ian Campbell, le Mon 21 Jan 2013 13:22:09 +0000, a écrit :
Quoted 4 lines

-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Indeed, it should have the same effect, if it contains these .o files.

Samuel

#6 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 10 lines · Samuel Thibault
Quoted 7 lines · Ian Campbell, le Mon 21 Jan 2013 13:22:09 +0000, a écrit :
Quoted 4 lines

-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Indeed, it should have the same effect, if it contains these .o files.

It looks to contain a superset, but the following incrmental patch Works For Me

Ian.

8<-----------------

From 7034f9965104fca7212ecc9bf89f3b3517b7bbfe Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/Makefile         |    2 +-
 stubdom/vtpmmgr/Makefile |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
stubdom/Makefile +1 -1
index 64ee6e2..65d02bb 100644
@@ -432,7 +432,7 @@ vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm
 
 .PHONY: vtpmmgr-stubdom
 vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"
 
 .PHONY: pv-grub
 pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
stubdom/vtpmmgr/Makefile +1 -4
index e41c261..af13b39 100644
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o
-
 TARGET=vtpmmgr.a
 OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o log.o
 
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label
 
 build: $(TARGET)
 $(TARGET): $(OBJS)
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
 
 clean:
 	rm -f $(TARGET) $(OBJS)
Signature · 9 lines
1.7.2.5




_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#7 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 20 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 8:43 AM
To: Samuel Thibault
Cc: [email protected]; Ian Jackson; Keir (Xen.org); Fioravante, Matthew E.
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 10 lines · Samuel Thibault
Quoted 8 lines · Ian Campbell, le Mon 21 Jan 2013 13:22:09 +0000, a écrit :
Quoted 5 lines

-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o

(quoted diff) +2 -0
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o
+havege.o

timing.o entropy_poll.o padlock.o

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Quoted 3 lines
Quoted 1 line

Indeed, it should have the same effect, if it contains these .o files.

It looks to contain a superset, but the following incrmental patch Works For Me

The idea was to keep vtpm and vtpmmgr as small as possible. Only the components of polarssl that are required are linked in. Polarssl is designed so that you can mix and match the specific crypto pieces by choosing specific .o files. Some parts of polarssl like networking may even require lwip or other depencies which vtpm does not use. Vtpmmgr actually uses its own rsa code (tpm_rsa.c) which is based on polarssl's rsa because the polarssl implementation is missing a feature.

Not only is that somewhat important from an efficiency standpoint but also from a security standpoint. Security folks like smaller code bases that they can reason about.

Quoted 34 lines

Ian.

8<-----------------

From 7034f9965104fca7212ecc9bf89f3b3517b7bbfe Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/Makefile         |    2 +-
 stubdom/vtpmmgr/Makefile |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
stubdom/Makefile index 64ee6e2..65d02bb renamed from stubdom/Makefile +0 -0

100644

stubdom/Makefile +0 -0
@@ -432,7 +432,7 @@ vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm

vtpm

.PHONY: vtpmmgr-stubdom
vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr

stubdom/Makefile +0 -1
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"

stubdom/Makefile +1 -0
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"
Quoted 4 lines

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"

This should work fine if you want to do it that way.

Quoted 30 lines

.PHONY: pv-grub
pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub diff --git
a/stubdom/vtpmmgr/Makefile b/stubdom/vtpmmgr/Makefile index e41c261..af13b39 100644

stubdom/vtpmmgr/Makefile +0 -2
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o

timing.o entropy_poll.o padlock.o
-
TARGET=vtpmmgr.a
OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o
log.o

stubdom/vtpmmgr/Makefile +0 -0
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-

unused-label

build: $(TARGET)
$(TARGET): $(OBJS)

stubdom/vtpmmgr/Makefile +1 -2
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
 
 clean:
 	rm -f $(TARGET) $(OBJS)
--
Quoted 3 lines

1.7.2.5

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 21 lines · Matthew E.
Quoted 21 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 8:43 AM
To: Samuel Thibault
Cc: [email protected]; Ian Jackson; Keir (Xen.org); Fioravante, Matthew E.
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 11 lines · Samuel Thibault
Quoted 8 lines · Ian Campbell, le Mon 21 Jan 2013 13:22:09 +0000, a écrit :
Quoted 5 lines

-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o

(quoted diff) +2 -0
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o
+havege.o

timing.o entropy_poll.o padlock.o

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Indeed, it should have the same effect, if it contains these .o files.

Quoted 7 lines
Quoted 1 line

It looks to contain a superset, but the following incrmental patch Works For Me

The idea was to keep vtpm and vtpmmgr as small as possible. Only the components of polarssl that are required are linked in. Polarssl is designed so that you can mix and match the specific crypto pieces by choosing specific .o files. Some parts of polarssl like networking may even require lwip or other depencies which vtpm does not use.

Because you are linking the .a file the linker should only pull in the bits you actually use, and by extension only pull in their dependencies.

Ian.

Quoted 74 lines

Vtpmmgr actually uses its own rsa code (tpm_rsa.c) which is based on
polarssl's rsa because the polarssl implementation is missing a feature.

Not only is that somewhat important from an efficiency standpoint but also from a security standpoint. Security folks like smaller code bases that they can reason about.

Quoted 34 lines

Ian.

8<-----------------

From 7034f9965104fca7212ecc9bf89f3b3517b7bbfe Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/Makefile         |    2 +-
 stubdom/vtpmmgr/Makefile |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
stubdom/Makefile index 64ee6e2..65d02bb renamed from stubdom/Makefile +0 -0

100644

stubdom/Makefile +0 -0
@@ -432,7 +432,7 @@ vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm

vtpm

.PHONY: vtpmmgr-stubdom
vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr

stubdom/Makefile +0 -1
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"

stubdom/Makefile +1 -0
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"
Quoted 4 lines

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"

This should work fine if you want to do it that way.

Quoted 27 lines

.PHONY: pv-grub
pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub diff --git
a/stubdom/vtpmmgr/Makefile b/stubdom/vtpmmgr/Makefile index e41c261..af13b39 100644

stubdom/vtpmmgr/Makefile +0 -2
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o

timing.o entropy_poll.o padlock.o
-
TARGET=vtpmmgr.a
OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o
log.o

stubdom/vtpmmgr/Makefile +0 -0
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-

unused-label

build: $(TARGET)
$(TARGET): $(OBJS)

stubdom/vtpmmgr/Makefile +1 -1
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
Quoted 7 lines
Quoted 6 lines

clean:
rm -f $(TARGET) $(OBJS)
--
1.7.2.5

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#9 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 35 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 9:52 AM
To: Fioravante, Matthew E.
Cc: Samuel Thibault; [email protected]; Ian Jackson; Keir (Xen.org)
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 6 lines · Matthew E.
Quoted 6 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 8:43 AM
To: Samuel Thibault
Cc: [email protected]; Ian Jackson; Keir (Xen.org); Fioravante,

Matthew E.

Quoted 18 lines
Quoted 17 lines

Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 11 lines · Samuel Thibault
Quoted 8 lines · Ian Campbell, le Mon 21 Jan 2013 13:22:09 +0000, a écrit :
Quoted 5 lines

-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o

(quoted diff) +2 -0
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o
+havege.o

timing.o entropy_poll.o padlock.o

But I wonder why we aren't using stubdom/polarssl-$(XEN_TARGET_ARCH)/library/libpolarssl.a here?

Indeed, it should have the same effect, if it contains these .o files.

It looks to contain a superset, but the following incrmental patch Works For Me

Quoted 8 lines
Quoted 5 lines

The idea was to keep vtpm and vtpmmgr as small as possible. Only the components of polarssl that are required are linked in. Polarssl is designed so that you can mix and match the specific crypto pieces by choosing specific .o files. Some parts of polarssl like networking may even require lwip or other depencies which vtpm does not use.

Because you are linking the .a file the linker should only pull in the bits you actually use, and by extension only pull in their dependencies.

In that case if the output binaries are the same we can change it to link to the entire library if that is what's preferred.

Quoted 87 lines

Ian.

Quoted 83 lines

Vtpmmgr actually uses its own rsa code (tpm_rsa.c) which is based on
polarssl's rsa because the polarssl implementation is missing a feature.

Not only is that somewhat important from an efficiency standpoint but also from a security standpoint. Security folks like smaller code bases that they can reason about.

Quoted 36 lines

Ian.

8<-----------------

From 7034f9965104fca7212ecc9bf89f3b3517b7bbfe Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/Makefile         |    2 +-
 stubdom/vtpmmgr/Makefile |    5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)
stubdom/Makefile index renamed from stubdom/Makefile +0 -0

64ee6e2..65d02bb
100644

stubdom/Makefile +0 -0
@@ -432,7 +432,7 @@ vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm

vtpm

.PHONY: vtpmmgr-stubdom
vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr

stubdom/Makefile +0 -1
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"

stubdom/Makefile +1 -0
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"
Quoted 4 lines

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"

This should work fine if you want to do it that way.

Quoted 33 lines

.PHONY: pv-grub
pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub diff --git
a/stubdom/vtpmmgr/Makefile b/stubdom/vtpmmgr/Makefile index e41c261..af13b39 100644

stubdom/vtpmmgr/Makefile +0 -2
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o

havege.o timing.o entropy_poll.o padlock.o
-
TARGET=vtpmmgr.a
OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o
tpm.o log.o

stubdom/vtpmmgr/Makefile +0 -0
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-

unused-label

build: $(TARGET)
$(TARGET): $(OBJS)

stubdom/vtpmmgr/Makefile +1 -2
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
 
 clean:
 	rm -f $(TARGET) $(OBJS)
--

1.7.2.5

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#10 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 11 lines · Matthew E.
Quoted 8 lines
Quoted 5 lines

The idea was to keep vtpm and vtpmmgr as small as possible. Only the components of polarssl that are required are linked in. Polarssl is designed so that you can mix and match the specific crypto pieces by choosing specific .o files. Some parts of polarssl like networking may even require lwip or other depencies which vtpm does not use.

Because you are linking the .a file the linker should only pull in the bits you actually use, and by extension only pull in their dependencies.

In that case if the output binaries are the same we can change it to link to the entire library if that is what's preferred.

The sizes are identical, I didn't check the actual contents.

I'm a bit more concerned about the first patch ("vtpmmgr: fix build on 32-bit") right at the moment since the build failure is blocking the automated test. If you are ok with please could you ack.

Ian.

#11 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

In reply to Ian Campbell

Acked by: Matthew Fioravante <[email protected]>

Quoted 72 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 8:20 AM
To: [email protected]
Cc: Samuel Thibault; [email protected]; [email protected]; Ian Campbell; Fioravante, Matthew E.
Subject: [PATCH] vtpmmgr: fix build on 32-bit

Correct format string, fixing:
vtpm_storage.c: In function 'vtpm_storage_load_header':
vtpm_storage.c:658: error: format '%ld' expects type 'long int', but argument 5 has type 'unsigned int'
vtpm_storage.c:658: error: format '%ld' expects type 'long int', but
argument 5 has type 'unsigned int' make[2]: *** [vtpm_storage.o] Error 1

Add padlock.o to PSSL_OBJS, fixing:

	/local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32-

vtpmmgr/mini-os.o: In function aes_crypt_ecb': /local/scratch/ianc/devel/xen- unstable.git/stubdom/polarssl-x86_32/library/aes.c:659: undefined reference to padlock_supports'
/local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-
x86_32/library/aes.c:661: undefined reference to padlock_xcryptecb' /local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32- vtpmmgr/mini-os.o: In function aes_crypt_cbc': /local/scratch/ianc/devel/xen- unstable.git/stubdom/polarssl-x86_32/library/aes.c:771: undefined reference to `padlock_supports'
/local/scratch/ianc/devel/xen-unstable.git/stubdom/polarssl-
x86_32/library/aes.c:773: undefined reference to `padlock_xcryptcbc' make[1]: *** [/local/scratch/ianc/devel/xen-unstable.git/stubdom/mini-os-x86_32- vtpmmgr/mini-os]
Error 1

Cc "Fioravante, Matthew E." <[email protected]>
---
 stubdom/vtpmmgr/Makefile       |    2 +-
 stubdom/vtpmmgr/vtpm_storage.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
stubdom/vtpmmgr/Makefile index renamed from stubdom/vtpmmgr/Makefile +0 -0

88c83c3..e41c261 100644

stubdom/vtpmmgr/Makefile +0 -1
@@ -12,7 +12,7 @@
 XEN_ROOT=../..
 
 PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o

timing.o entropy_poll.o

stubdom/vtpmmgr/Makefile +2 -0
+PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o
+timing.o entropy_poll.o padlock.o
 
 TARGET=vtpmmgr.a
 OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o

log.o diff --git a/stubdom/vtpmmgr/vtpm_storage.c b/stubdom/vtpmmgr/vtpm_storage.c index abb0dba..de21b4a 100644

stubdom/vtpmmgr/vtpm_storage.c +2 -2
@@ -655,7 +655,7 @@ TPM_RESULT vtpm_storage_load_header(void)
 
    /* Validate the length of the output buffer */
    if(datalen < AES_KEY_SIZE + sizeof(UINT32)) {
-      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too small!
 expected (%ld)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
+      vtpmlogerror(VTPM_LOG_VTPM, "Unbound AES key size (%d) was too
+ small! expected (%zu)\n", datalen, AES_KEY_SIZE + sizeof(UINT32));
       status = TPM_IOERROR;
       goto abort_egress;
    }
--

1.7.2.5

Applied
#12 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 1 line · Matthew E.

Acked by: Matthew Fioravante <[email protected]>

Thanks, applied.

I noticed that I had to add padlock.o to stubdom/vtpm/Makefile too. I just went ahead and did that.

Ian.

#13 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 9 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 11:16 AM
To: Fioravante, Matthew E.
Cc: [email protected]; Samuel Thibault; Ian Jackson; Keir (Xen.org)
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 7 lines
Quoted 1 line · Matthew E.

Acked by: Matthew Fioravante <[email protected]>

Thanks, applied.

I noticed that I had to add padlock.o to stubdom/vtpm/Makefile too. I just went ahead and did that.

Hmm, I thought that was included. Its something that only works in via cpus so its easy to miss. Anyway if you just switch to -lpolarssl then that problem should fix itself also.

Quoted 2 lines

Ian.

#14 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 11 lines · Matthew E.
Quoted 11 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 11:16 AM
To: Fioravante, Matthew E.
Cc: [email protected]; Samuel Thibault; Ian Jackson; Keir (Xen.org)
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 1 line · Matthew E.

Acked by: Matthew Fioravante <[email protected]>

Quoted 7 lines
Quoted 4 lines

Thanks, applied.

I noticed that I had to add padlock.o to stubdom/vtpm/Makefile too. I just went ahead and did that.

Hmm, I thought that was included. Its something that only works in via cpus so its easy to miss. Anyway if you just switch to -lpolarssl then that problem should fix itself also.

I've already pushed the padlock.o fix but here is the updated "use -lpolarssl" patch.

8<----------------------------------------

Quoted 1 line

From f8650d829965e16612a2570990190ded991294f3 Mon Sep 17 00:00:00 2001

From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpm/vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>

--
v2: Do vtpm as well as vtpmmgr.

---
 stubdom/Makefile         |    4 ++--
 stubdom/vtpm/Makefile    |    5 +----
 stubdom/vtpmmgr/Makefile |    5 +----
 3 files changed, 4 insertions(+), 10 deletions(-)
stubdom/Makefile +2 -2
index 64ee6e2..970f227 100644
@@ -428,11 +428,11 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c
 
 .PHONY: vtpm-stubdom
 vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" APP_LDLIBS="-ltpm -ltpm_crypto -lgmp"
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" APP_LDLIBS="-ltpm -ltpm_crypto -lgmp -lpolarssl"
 
 .PHONY: vtpmmgr-stubdom
 vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"
 
 .PHONY: pv-grub
 pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
stubdom/vtpm/Makefile +1 -4
index 30f7a1a..37051c1 100644
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o sha4.o padlock.o
-
 TARGET=vtpm.a
 OBJS=vtpm.o vtpm_cmd.o vtpmblk.o vtpm_pcrs.o
 
@@ -24,7 +21,7 @@ CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)/crypto
 CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)
 
 $(TARGET): $(OBJS)
-	ar -cr $@ $(OBJS) $(TPMEMU_OBJS) $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -cr $@ $(OBJS)
 
 $(OBJS): vtpm_manager.h
 
stubdom/vtpmmgr/Makefile +1 -4
index e41c261..af13b39 100644
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o entropy_poll.o padlock.o
-
 TARGET=vtpmmgr.a
 OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o log.o
 
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label
 
 build: $(TARGET)
 $(TARGET): $(OBJS)
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
 
 clean:
 	rm -f $(TARGET) $(OBJS)
Signature · 1 line
1.7.2.5
#15 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 24 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 11:27 AM
To: Fioravante, Matthew E.
Cc: Samuel Thibault; Keir (Xen.org); Ian Jackson; [email protected]
Subject: Re: [Xen-devel] [PATCH] vtpmmgr: fix build on 32-bit

Quoted 14 lines · Matthew E.
Quoted 14 lines

-----Original Message-----
From: Ian Campbell [mailto:[email protected]]
Sent: Monday, January 21, 2013 11:16 AM
To: Fioravante, Matthew E.
Cc: [email protected]; Samuel Thibault; Ian Jackson; Keir (Xen.org)
Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 1 line · Matthew E.

Acked by: Matthew Fioravante <[email protected]>

Thanks, applied.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

I noticed that I had to add padlock.o to stubdom/vtpm/Makefile too. I just went ahead and did that.

Hmm, I thought that was included. Its something that only works in via cpus so its easy to miss. Anyway if you just switch to -lpolarssl then that problem should fix itself also.

I've already pushed the padlock.o fix but here is the updated "use -lpolarssl" patch.

Looks good. If it compiles for you then:
Acked by: Matthew Fioravante <[email protected]>

Quoted 77 lines

8<----------------------------------------

From f8650d829965e16612a2570990190ded991294f3 Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpm/vtpmmgr: Use libpolarssl.a instead of hardcoding own list of .o files

Cc Samuel Thibault <[email protected]>
Cc "Fioravante, Matthew E." <[email protected]>

--
v2: Do vtpm as well as vtpmmgr.

---
 stubdom/Makefile         |    4 ++--
 stubdom/vtpm/Makefile    |    5 +----
 stubdom/vtpmmgr/Makefile |    5 +----
 3 files changed, 4 insertions(+), 10 deletions(-)
stubdom/Makefile index 64ee6e2..970f227 renamed from stubdom/Makefile +0 -0

100644

stubdom/Makefile +0 -0
@@ -428,11 +428,11 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-

$(XEN_TARGET_ARCH) libxc c

.PHONY: vtpm-stubdom
vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm

stubdom/Makefile +0 -1
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" APP_LDLIBS="- ltpm -ltpm_crypto -lgmp"

stubdom/Makefile +1 -0
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" APP_LDLIBS="- ltpm -ltpm_crypto -lgmp -lpolarssl"

.PHONY: vtpmmgr-stubdom
vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr

stubdom/Makefile +0 -1
-	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"

stubdom/Makefile +1 -0
+	DEF_CPPFLAGS="$(TARGET_CPPFLAGS)"

DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" $(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"

.PHONY: pv-grub
pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub diff --git
a/stubdom/vtpm/Makefile b/stubdom/vtpm/Makefile index 30f7a1a..37051c1 100644

stubdom/vtpm/Makefile +0 -3
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o sha4.o padlock.o
-
 TARGET=vtpm.a
 OBJS=vtpm.o vtpm_cmd.o vtpmblk.o vtpm_pcrs.o
 
@@ -24,7 +21,7 @@ CPPFLAGS+=-I../tpm_emulator-

$(XEN_TARGET_ARCH)/crypto
CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)

$(TARGET): $(OBJS)

stubdom/vtpm/Makefile +0 -1
-	ar -cr $@ $(OBJS) $(TPMEMU_OBJS) $(foreach

obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))

stubdom/vtpm/Makefile CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)/crypto · line 24

Quoted 1 line
stubdom/vtpm/Makefile +1 -0
+	ar -cr $@ $(OBJS)

Good catch on the TPMEMU_OBJS, that was a holdover from when the tpm emulator was linked in the same way. I must have overlooked it.

Quoted 33 lines

$(OBJS): vtpm_manager.h

stubdom/vtpmmgr/Makefile index renamed from stubdom/vtpmmgr/Makefile +0 -0

e41c261..af13b39 100644

stubdom/vtpmmgr/Makefile +0 -2
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o

timing.o entropy_poll.o padlock.o
-
TARGET=vtpmmgr.a
OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o
log.o

stubdom/vtpmmgr/Makefile +0 -0
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-

unused-label

build: $(TARGET)
$(TARGET): $(OBJS)

stubdom/vtpmmgr/Makefile +1 -2
-	ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+	ar -rcs $@ $^
 
 clean:
 	rm -f $(TARGET) $(OBJS)
--

1.7.2.5

Applied
#16 lore raw

Re: [PATCH] vtpmmgr: fix build on 32-bit

Quoted 4 lines · Matthew E.
Quoted 2 lines

I've already pushed the padlock.o fix but here is the updated "use -lpolarssl" patch.

Looks good. If it compiles for you then:
Acked by: Matthew Fioravante <[email protected]>

Applied, thanks.