Usage of get_random_bytes() in i2c-cp2615

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

 



Normally, `cp2615_i2c_transfer.tag` is a random number that identifies
a given request-reply pair (the chip sends its response with the same
tag it got in the request). Currently, for the sake of ease, my driver
sends its requests with a fixed tag of 0xDD for all requests. This
defeats the purpose of the tag system. Should I use
`get_random_bytes()` instead? My concerns are that generating a random
value for each I2C transfer may lead to the entropy pool being used
up, especially since - if I understand correctly -
`get_random_bytes()` always generates 32 bit random words and discards
any extra bytes if `length%4 != 0`, and I only need 1 byte each time.



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux