From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Fioravante Subject: Re: [PATCH VTPM v8 0/8] Vtpm patch set Date: Thu, 10 Jan 2013 17:08:09 -0500 Message-ID: <50EF3BC9.3000606@jhuapl.edu> References: <1357227440-22175-1-git-send-email-matthew.fioravante@jhuapl.edu> <1357831800.9456.42.camel@zakaz.uk.xensource.com> <50EF3A1E.5090905@jhuapl.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2041642603740753941==" Return-path: In-Reply-To: <50EF3A1E.5090905@jhuapl.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, Ian Campbell List-Id: xen-devel@lists.xenproject.org This is a cryptographically signed message in MIME format. --===============2041642603740753941== Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms050502050208000900060601" This is a cryptographically signed message in MIME format. --------------ms050502050208000900060601 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 01/10/2013 05:01 PM, Matthew Fioravante wrote: > On 01/10/2013 10:30 AM, Ian Campbell wrote: >> On Thu, 2013-01-03 at 15:37 +0000, Matthew Fioravante wrote: >>> The following are the final set of patches for vtpm in xen. >>> They are derived from the previous v7 and Ian's xen >>> vtpm respository with the various minor bug fixes we >>> have discussed and fixed along the way. The bug fixes >>> are baked into their respective patches. >> Thanks. >> >> Unfortunately I'm afraid this fails to build for me when cmake is >> installed. I get: >> >> ld -nostdlib -L/local/scratch/ianc/devel/committer.git/stubdom/cross-r= oot-x86_64/x86_64-xen-elf/lib -m elf_x86_64 -T arch/x86/minios-x86_64.ld= s \ >> /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/m= ini-os.o \ >> -o /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtp= m/mini-os >> ld: warning: section `.bss' type changed to PROGBITS >> /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mi= ni-os.o: In function `mkdirs': >> tpm_emulator_extern.c:(.text+0xbd95): undefined reference to `__errno_= location' >> tpm_emulator_extern.c:(.text+0xbdad): undefined reference to `__errno_= location' >> /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mi= ni-os.o: In function `_tpm_extern_init': >> tpm_emulator_extern.c:(.text+0xbe7f): undefined reference to `open' >> tpm_emulator_extern.c:(.text+0xbe9b): undefined reference to `__errno_= location' >> /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mi= ni-os.o: In function `_tpm_write_to_storage': >> tpm_emulator_extern.c:(.text+0xc1e9): undefined reference to `open' >> /local/scratch/ianc/devel/committer.git/stubdom/mini-os-x86_64-vtpm/mi= ni-os.o: In function `_tpm_read_from_storage': >> tpm_emulator_extern.c:(.text+0xc27b): undefined reference to `open' >> tpm_emulator_extern.c:(.text+0xc2a2): undefined reference to `lseek' >> tpm_emulator_extern.c:(.text+0xc2ba): undefined reference to `lseek' >> make[2]: *** [/local/scratch/ianc/devel/committer.git/stubdom/mini-os-= x86_64-vtpm/mini-os] Error 1 >> make[2]: Leaving directory `/local/scratch/ianc/devel/committer.git/ex= tras/mini-os' > I'm going to claim user error on this one. > > In the stubdom/Makefile we define TPM_NO_EXTERN using cmake to build th= e > tpm emulator. In tpm_emulator-x86_64/tpm/tpm_emulator_extern.c all of > the functions defined there use open() and mkdir() etc.. However when > TPM_NO_EXTERN is defined this > file contains only a set of null initialized function pointers (which > vtpm assigns to its own functions). > > Using the standard make targets there should be no possible way to get > the tpm emulator to build without TPM_NO_EXTERN. When cmake is not > present make vtpm-stubdom will fail because vtpm-stubdom is not present= > in the TARGETS variable. I certainly was not able to reproduce it in > xen-unstable or in staging using a variety or permutations of make > targets and cmake present/not-present. > > Were you playing with building the tpm emulator manually? > > Anyway I'm confident that if you do a distclean and rebuild the error > should go away. Unless there is something broken about the clean target= s > leaving things around that should be deleted. > > Can you try one more time with cmake installed? There is however a bug if you try to do make cross-tpmemu with cmake not = installed. It creates tpm_emulator-$(ARCH) but doesn't run cmake,=20 screwing up the make rules that expect this directory to exist. I'm=20 creating a fix now to do a check and abort early. Still, this bug=20 doesn't cause the linker error you've given, it only causes tpm emulator = to fail to build. >> lseek and open are defined in extras/mini-os/lib/sys.c but: >> $ nm stubdom/mini-os-x86_64-vtpm/lib/sys.o | egrep T.\(open\|lseek\) >> 0000000000002456 T lseek64 >> 0000000000002a4e T open64 >> >> Perhaps some sort of -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE mismatc= h >> between the libc and the app libraries? >> >> Not sure about the __errno_location one other than: >> >> $ grep -B2 __errno_location stubdom/caml/main-caml.c >> /* Ugly binary compatibility with Linux */ >> FILE *_stderr asm("stderr"); >> int *__errno_location; >> >> Everything else seems to build ok. so without cmake installed it works= >> fine. >> >>> Matthew Fioravante (8): >>> add vtpm-stubdom code >>> add stubdom/vtpmmgr code >>> vtpm/vtpmmgr and required libs to stubdom/Makefile >>> Add vtpm documentation >>> README: Add cmake dependency >>> stubdom: Add autoconf >>> Add a top level configure script >>> Add conditional build of subsystems to configure.ac >> Ian. >> > --------------ms050502050208000900060601 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIDyjCC A8YwggMvoAMCAQICBD/xyf0wDQYJKoZIhvcNAQEFBQAwLzELMAkGA1UEBhMCVVMxDzANBgNV BAoTBkpIVUFQTDEPMA0GA1UECxMGQklTRENBMB4XDTEwMDYxMTE4MjIwNloXDTEzMDYxMTE4 NTIwNlowZjELMAkGA1UEBhMCVVMxDzANBgNVBAoTBkpIVUFQTDEPMA0GA1UECxMGUGVvcGxl MTUwFgYDVQQLEw9WUE5Hcm91cC1CSVNEQ0EwGwYDV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ATA3MC8xCzAJBgNVBAYTAlVTMQ8wDQYDVQQKEwZKSFVBUEwxDzANBgNVBAsTBkJJ U0RDQQIEP/HJ/TAJBgUrDgMCGgUAoIHLMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJ KoZIhvcNAQkFMQ8XDTEzMDExMDIyMDgwOVowIwYJKoZIhvcNAQkEMRYEFKjHPwD1XqKk5exb vNG+HOkdEuo7MGwGCSqGSIb3DQEJDzFfMF0wCwYJYIZIAWUDBAEqMAsGCWCGSAFlAwQBAjAK BggqhkiG9w0DBzAOBggqhkiG9w0DAgICAIAwDQYIKoZIhvcNAwICAUAwBwYFKw4DAgcwDQYI KoZIhvcNAwICASgwDQYJKoZIhvcNAQEBBQAEgYAimsb9Nc07OE+xptZ7KBdWZ3F0lGPejOWM XkIvbHDSgt2SRiJboa7lUhtji8PV985V4X0lIPEFvbktzr0ECAhia4ZZ7sy8Ph3j+K/7ctwv ssDCahp74CeWdEY32FNcZr/OzN49xslsjriz8CZyQAUPwi99Hfm3Nsuv/nj2opQWQQAAAAAA AA== --------------ms050502050208000900060601-- --===============2041642603740753941== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============2041642603740753941==--