On 01/09/2017 05:17 PM, Jarkko Sakkinen wrote:
> On Wed, Jan 04, 2017 at 02:22:45PM -0500, Stefan Berger wrote:
>>     James Bottomley <[email protected]> wrote on 01/04/2017 02:05:35 
>> PM:
>>
>>     > From: James Bottomley <[email protected]>
>>     > To: Stefan Berger/Watson/IBM@IBMUS
>>     > Cc: Jarkko Sakkinen <[email protected]>, tpmdd-
>>     > [email protected], Jason Gunthorpe
>>     <[email protected]>
>>     > Date: 01/04/2017 02:05 PM
>>     > Subject: Re: [tpmdd-devel] [PATCH RFC 2/4] tpm: validate TPM 2.0
>>     commands
>>     >
>>     > On Wed, 2017-01-04 at 13:59 -0500, Stefan Berger wrote:
>>     > > [   67.699811] WARNING: CPU: 12 PID: 870 at mm/page_alloc.c:3511
>>     >
>>     > What's the code context around this line in your source?  Or what
>>     > kernel version?  If it's this
>>     >
>>     >    if (order >= MAX_ORDER) {
>>     >       WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
>>     >       return NULL;
>>     >    }
>>     >
>>
>>     I am running Jarkko's tree, the tabrm branch. 4.9.0-rc5 I think. I have
>>     exactly what you are showing above.
>>     > Then I think you may have returned bogus data to TPM_PT_TOTAL_COMMANDS;
>>     > perhaps print nr_commands.
>>
>>     Ha, what is likely the cause here is that the test suite, which 
>> implements
>>     only a few commands to respond to the kernel with from the vtpm proxy
>>     side, isn't feeding good data to the driver and the nr_commands ends up
>>     being 0... or actually bogus data / not initialized. I guess the function
>>     should check for valid input.
> So, what kind of validation do you suggest? Checking it whether it is
> zero?

Out of bounds. > 0x200, < 0x01

     Stefan


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
tpmdd-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

Reply via email to