Re: [PATCH mmc-utils] use proper type for RPMB blocks_cnt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 10, 2018 at 01:19:08PM +0100, Simon Horman wrote:
> On Fri, Nov 30, 2018 at 01:54:47PM +0100, Wolfram Sang wrote:
> > The JEDEC standard is confusing. The number of max blocks for reading
> > RPMB is determined by CMD23 which can hold an unsigned int and not only
> > u16. It is true that the current maximum is 64K of blocks, yet this may
> > be extended in the future. Let's not apply a limit here which should be
> > checked by the card.
> > 
> > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> 
> I am a little confused. What is the width of an unsigned int?
> If 4 bytes, would using uint32_t make this clearer?

Nope, because in struct mmc_ioc_cmd (used for the ioctl), the 'blocks'
variable which this value ultimately ends up in, is also unsigned int.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux