Files
android_kernel_xiaomi_sm8450/include/linux/random.h
Greg Kroah-Hartman e61ebc6383 ANDROID: change function signatures for some random functions.
In 5.10.119 the functions add_device_randomness() and get_random_bytes()
want from:
	void get_random_bytes(void *buf, int len);
		->
	void get_random_bytes(void *buf, size_t len);

	void add_device_randomness(const void *buf, unsigned int len);
		->
	void add_device_randomness(const void *buf, size_t len);

	int __must_check get_random_bytes_arch(void *buf, int len);
		->
	size_t __must_check get_random_bytes_arch(void *buf, size_t len);

As these functions are part of the GKI abi to be preserved, move them
back.  As these are just lengths of the buffer, all is fine with the
size, they should never overflow.

Bug: 161946584
Fixes: 07280d2c3f ("random: make more consistent use of integer types")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I5430259958b9a904e6e8b950e11526332c919c0c
2022-07-14 14:35:43 +02:00

4.4 KiB