|
From: Wang, S. <sha...@in...> - 2009-01-04 05:25:52
|
I think that should be your txt public config space is reserved by kernel. see variable iomem_resource. I haven't tried it on the kernel but on xen unstable. I think there must be somewhere to reserve it, perhaps e820 parsing in the kernel since the range is reserved in e820 table. Can you try to remove the range out of iomem_resource? Shane Jonathan M. McCune wrote: > Hi Shane, > > Thanks, that fixed the build process. I still get the following > errors, though I haven't made an effort to track them down yet. > > # insmod txt-test.ko > insmod: error inserting 'txt-test.ko': -1 Device or resource busy > > # dmesg | tail > [ 160.097624] txt_test: module license 'BSD' taints kernel. > [ 160.099563] ERROR: TXT public config space is already reserved > > Thanks, > -Jon > > > Wang, Shane wrote: >> I guess this is because of some chaos of linux kernel build >> environment in the header files. >> >> Please try the patch attached and build again. >> >> Shane >> >> Jonathan M. McCune wrote: >> >>> Hello list, >>> >>> I grabbed the latest tboot from mercurial: >>> >>> hg clone http://www.bughost.org/repos.hg/tboot.hg >>> >>> I edited tboot.hg/txt-test/Makefile to set these directories (and >>> uncommented the MOD_TARGET line): >>> >>> LINUX_BASE_DIR = /usr/src/linux >>> LINUX_BUILD_DIR = /usr/src/linux >>> LINUX_SRC_DIR = /usr/src/linux >>> >>> Make then fails as follows: >>> >>> # make >>> gcc -Wall -Werror -Wstrict-prototypes -fno-strict-aliasing -O2 >>> -std=gnu99 -Wno-array-bounds -m32 -march=i686 -c txt-stat.c -o >>> txt-stat.o gcc -Wall -Werror -Wstrict-prototypes >>> -fno-strict-aliasing -O2 -std=gnu99 -Wno-array-bounds -m32 >>> -march=i686 txt-stat.o -o txt-stat gcc -Wall -Werror >>> -Wstrict-prototypes -fno-strict-aliasing -O2 -std=gnu99 >>> -Wno-array-bounds -m32 -march=i686 -c acminfo.c -o acminfo.o gcc >>> -Wall -Werror -Wstrict-prototypes -fno-strict-aliasing -O2 >>> -std=gnu99 -Wno-array-bounds -m32 -march=i686 acminfo.o -o >>> acminfo make -C /usr/src/linux M=/root/tboot.hg/txt-test modules >>> make[1]: Entering directory `/usr/src/linux-source-2.6.27' CC [M] >>> /root/tboot.hg/txt-test/txt-test.o >>> In file included from include/linux/kernel.h:12, >>> from include/linux/delay.h:10, >>> from /root/tboot.hg/txt-test/txt-test.c:39: >>> include/linux/stddef.h:16: error: expected identifier before >>> numeric constant In file included from include/linux/kernel.h:13, >>> from include/linux/delay.h:10, >>> from /root/tboot.hg/txt-test/txt-test.c:39: >>> include/linux/types.h:33: error: two or more data types in >>> declaration specifiers include/linux/types.h:33: warning: useless >>> type name in empty declaration In file included from >>> /root/tboot.hg/txt-test/txt-test.c:49: >>> /root/tboot.hg/txt-test/../include/config.h:69:1: warning: >>> "__packed" redefined In file included from >>> include/linux/compiler-gcc4.h:6, from >>> include/linux/compiler.h:40, from >>> include/linux/linkage.h:4, from >>> include/linux/kernel.h:11, from >>> include/linux/delay.h:10, from >>> /root/tboot.hg/txt-test/txt-test.c:39: >>> include/linux/compiler-gcc.h:43:1: warning: this is the location of >>> the previous definition make[2]: *** >>> [/root/tboot.hg/txt-test/txt-test.o] Error 1 >>> make[1]: *** [_module_/root/tboot.hg/txt-test] Error 2 >>> make[1]: Leaving directory `/usr/src/linux-source-2.6.27' >>> make: *** [txt-test.ko] Error 2 >>> >>> >>> >>> >>> # gcc -v >>> Using built-in specs. >>> Target: i486-linux-gnu >>> Configured with: ../src/configure -v --with-pkgversion='Ubuntu >>> 4.3.2-1ubuntu11' >>> --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs >>> --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr >>> --enable-shared --with-system-zlib --libexecdir=/usr/lib >>> --without-included-gettext --enable-threads=posix --enable-nls >>> --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 >>> --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc >>> --enable-mpfr --enable-targets=all --enable-checking=release >>> --build=i486-linux-gnu --host=i486-linux-gnu >>> --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 >>> (Ubuntu 4.3.2-1ubuntu11) >>> >>> # hg tip >>> changeset: 111:e009b057d5b0 >>> tag: tip >>> user: Joseph Cihula <jos...@in...> >>> date: Fri Jan 02 22:04:28 2009 -0800 >>> summary: Fixed bug with command line handling in S3; added >>> rollback attack protections to S3 >>> >>> I'm using a custom-compiled 2.6.27 from Ubuntu 8.10, but I have not >>> done any tboot-specific patches. The system boots just fine with >>> tboot in the grub menu: >>> >>> title TBOOT + Ubuntu 8.10, kernel 2.6.27.2jm1 >>> uuid a8d5e68a-d490-4035-9877-0a0d25ea047f >>> kernel /boot/tboot.gz >>> module /boot/vmlinuz-2.6.27.2jm1 >>> root=UUID=a8d5e68a-d490-4035-9877-0a0d25ea047f ro crashker >>> nel=384M-2G:64M@16M,2G-:128M@16M >>> module /boot/initrd.img-2.6.27.2jm1 >>> module /boot/GM45_PM45_SINIT_19.BIN >>> boot >>> >>> But this is a Lenovo T400 laptop with no serial port and I can't >>> tell if tboot does anything or not. >>> >>> Thanks for any help you can provide, >>> -Jon >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> _______________________________________________ >>> tboot-devel mailing list >>> tbo...@li... >>> https://lists.sourceforge.net/lists/listinfo/tboot-devel |