Hi Xiaokai, I think I'll be able to review these today. Sorry for the delay.
Kent On Tue, Apr 9, 2013 at 8:22 PM, Wang, Xiaokai <[email protected]> wrote: > > Please review. > > Thanks > Xiaokai > > > -----Original Message----- > From: Wang, Xiaokai > Sent: Monday, March 25, 2013 4:58 PM > To: 'Kent Yoder' > Subject: RE: [TrouSerS-tech] patches about tpm_getpermanentflags and > tpm_nvdefine commands > > > 1) Initializing askOwnerPass to TURE. Done > 2) logically & UNIT32 with its flags. Done. Work well on x86 processor. > Having no power architecture processor,so,test is not be done on which. Sorry. > 3) Adding a condition to judge whether hPcrsRead object exist. > > Please review. Thanks again. > > Regards > Xiaokai > > -----Original Message----- > From: Kent Yoder [mailto:[email protected]] > Sent: Saturday, March 23, 2013 5:13 AM > To: Wang, Xiaokai > Subject: Re: [TrouSerS-tech] patches about tpm_getpermanentflags and > tpm_nvdefine commands > > Hi Xiaokai, > > On Mon, Mar 18, 2013 at 12:45 AM, Wang, Xiaokai <[email protected]> > wrote: >> Hi kent, >> >> The patches are ok? > > A couple things: > > 1) when run w/ no arguments, tpm_getpermaentflags segfaults. It looks like > initializing askOwnerPass to TRUE will fix this > 2) bitfields like tpm_perm_flags_t and tpm_stclear_flags_t do not work on the > power architecture. The fix is to logically & the UINT32 with its flags. > Please convert these. These flags are in tpm.h already in > trousers: > > #define TPM_PF_DISABLE ((UINT32)0x00000001) > #define TPM_PF_OWNERSHIP ((UINT32)0x00000002) > #define TPM_PF_DEACTIVATED ((UINT32)0x00000003) > ... and so on.. > > 3) I have a questino on tpm_nvdefine's changes. It looks like the new code > (after your patch) will overwrite the hPcrsRead/hPcrsWrite objects. For > instance if the user uses -f to pass in a list of pcr values, the hPcrsRead > object will get created in parseNVPermsFile(), then its object handle will be > overwritten by contextCreateObject() just before you test "if(w_loc_flag == > 1)". Try to restructure the code so that the localities can be set > regardless of how the pcr values are set )if at all). > > Thanks, > Kent > >> >> Thanks, >> Xiaokai >> >> -----Original Message----- >> From: Kent Yoder [mailto:[email protected]] >> Sent: Tuesday, March 05, 2013 4:04 AM >> To: Wang, Xiaokai >> Cc: Stefan Berger ([email protected]); >> [email protected] >> Subject: Re: patches about tpm_getpermanentflags and tpm_nvdefine >> commands >> >> Hi Xiaokai, >> >> On Mon, Mar 4, 2013 at 4:15 AM, Wang, Xiaokai <[email protected]> wrote: >>> Hi all, >>> >>> >>> >>> Attach files are the patches I made about tpm-tools. >> >> Thanks for the patches. It looks like they didn't get formatted correctly >> for git though. You can use git format-patch on your local repository to >> export patches. Please try this and resubmit. >> >>> I change the name tpm_getcap to tpm_getpermanentflags,so that don't >>> need any other arguments to display TPM_PERMANENTFLAGS. >>> >>> >>> >>> One probem is below: >>> >>> + if (genericOptHandler >>> >>> + (argc, argv, "o:", hOpts, >>> >>> + sizeof(hOpts) / sizeof(struct option), parse, >>> + help) != >>> 0) >>> >>> + goto out; >>> >>> >>> >>> "o:" cann't get rid of ":", otherwise the argument ownerpassword >>> value will be 0x0 and the cmd will implement abnormal. >>> >>> The reason I am not very clear,please help debug that. >> >> Please take a look at how tpm_nvdefine.c handles the owner password. >> The argument for ownerpass should be optional. >> >>> >>> >>> If the patches have no other problems I hope you can apply them. Thank you! >> >> Your patch to man/man8/tpm_nvdefine.8 made me realize that the .8 manpages >> with .pod extensions don't even need to be in git, since they're regenerated >> at build time. I've removed them entirely in the "1.3.9" branch in git. >> All you need to do is patch the .pod file here. >> >> Thanks, >> Kent >> >>> >>> >>> >>> >>> Regards >>> >>> Xiaokai >>> >>> ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ TrouSerS-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/trousers-tech
