Re: [PATCH 1/3] TPM: new stm i2c device driver

From: Rajiv Andrade
Date: Fri Oct 01 2010 - 11:26:04 EST


Hi Christophe,

The code must be applied and compiled against the security-next tree, that currently doesn't provide the locked ioctl anymore. Can you implement the locking inside tpm_st19_i2c_ioctl() and set it at the unlocked_ioctl field? Shouldn't be too hard, you can get tpm_write() as an example.

By the way, I may be missing something, but why the tpm command transmission (TPMIOC_TRANSMIT) should be handled through ioctl instead of a modified tpm_write() that can send the commands through i2c?

Thanks,
Rajiv

On 01/10/2010, at 11:27, Christophe Henri RICARD wrote:

> Hi James,
>
> Which kernel are you using ?
> I have made my testing with a 2.6.35.4 kernel.
> As far as I know kernel 2.6.36 will not provide any ioctl field any more.
> May be this is the reason ?
>
> Please let me know.
> Thanks
> Christophe
>
> -----Original Message-----
> From: James Morris [mailto:jmorris@xxxxxxxxx]
> Sent: Thursday, September 30, 2010 7:51 PM
> To: Rajiv Andrade
> Cc: linux-kernel@xxxxxxxxxxxxxxx; joe@xxxxxxxxxxx; Christophe Henri RICARD
> Subject: Re: [PATCH 1/3] TPM: new stm i2c device driver
>
> On Thu, 30 Sep 2010, Rajiv Andrade wrote:
>
>> From: Christophe Henri RICARD <christophe-h.ricard@xxxxxx>
>>
>> This driver uses the Linux I2C, TPM and generic gpio interfaces.
>>
>> Signed-off-by: Christophe Henri RICARD <christophe-h.ricard@xxxxxx>
>> Signed-off-by: Rajiv Andrade <srajiv@xxxxxxxxxxxxxxxxxx>
>
> This does not look to have been compile tested against my tree:
>
> CC [M] drivers/char/tpm/tpm_stm_st19_i2c.o
> drivers/char/tpm/tpm_stm_st19_i2c.c:574: error: unknown field ioctl specified in initializer
> drivers/char/tpm/tpm_stm_st19_i2c.c:574: warning: initialization from incompatible pointer type
> make[1]: *** [drivers/char/tpm/tpm_stm_st19_i2c.o] Error 1
>
> The locked ioctl was removed in commit
> b19dd42faf413b4705d4adb38521e82d73fa4249
>
>
>
> - James
> --
> James Morris
> <jmorris@xxxxxxxxx>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/