|
Lee Duncan |
aba9fc |
From: Richard Henderson <richard.henderson@linaro.org>
|
|
Lee Duncan |
aba9fc |
Date: Fri, 10 Jan 2020 14:54:18 +0000
|
|
Lee Duncan |
aba9fc |
Subject: linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check
|
|
Lee Duncan |
aba9fc |
Git-commit: 904caa6413c87aacbf7d0682da617c39ca18cf1a
|
|
Lee Duncan |
aba9fc |
Patch-mainline: v5.6-rc1
|
|
Lee Duncan |
aba9fc |
References: git-fixes
|
|
Lee Duncan |
aba9fc |
|
|
Lee Duncan |
aba9fc |
We must not use the pointer output without validating the
|
|
Lee Duncan |
aba9fc |
success of the random read.
|
|
Lee Duncan |
aba9fc |
|
|
Lee Duncan |
aba9fc |
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
|
|
Lee Duncan |
aba9fc |
Signed-off-by: Richard Henderson <rth@twiddle.net>
|
|
Lee Duncan |
aba9fc |
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Lee Duncan |
aba9fc |
Link: https://lore.kernel.org/r/20200110145422.49141-7-broonie@kernel.org
|
|
Lee Duncan |
aba9fc |
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
|
|
Lee Duncan |
aba9fc |
Acked-by: Lee Duncan <lduncan@suse.com>
|
|
Lee Duncan |
aba9fc |
---
|
|
Lee Duncan |
aba9fc |
include/linux/random.h | 8 ++++----
|
|
Lee Duncan |
aba9fc |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
Lee Duncan |
aba9fc |
|
|
Lee Duncan |
aba9fc |
diff --git a/include/linux/random.h b/include/linux/random.h
|
|
Lee Duncan |
aba9fc |
index ea0e2f5f1ec5..d319f9a1e429 100644
|
|
Lee Duncan |
aba9fc |
--- a/include/linux/random.h
|
|
Lee Duncan |
aba9fc |
+++ b/include/linux/random.h
|
|
Lee Duncan |
aba9fc |
@@ -167,19 +167,19 @@ static inline void prandom_seed_state(struct rnd_state *state, u64 seed)
|
|
Lee Duncan |
aba9fc |
#ifdef CONFIG_ARCH_RANDOM
|
|
Lee Duncan |
aba9fc |
# include <asm/archrandom.h>
|
|
Lee Duncan |
aba9fc |
#else
|
|
Lee Duncan |
aba9fc |
-static inline bool arch_get_random_long(unsigned long *v)
|
|
Lee Duncan |
aba9fc |
+static inline bool __must_check arch_get_random_long(unsigned long *v)
|
|
Lee Duncan |
aba9fc |
{
|
|
Lee Duncan |
aba9fc |
return false;
|
|
Lee Duncan |
aba9fc |
}
|
|
Lee Duncan |
aba9fc |
-static inline bool arch_get_random_int(unsigned int *v)
|
|
Lee Duncan |
aba9fc |
+static inline bool __must_check arch_get_random_int(unsigned int *v)
|
|
Lee Duncan |
aba9fc |
{
|
|
Lee Duncan |
aba9fc |
return false;
|
|
Lee Duncan |
aba9fc |
}
|
|
Lee Duncan |
aba9fc |
-static inline bool arch_get_random_seed_long(unsigned long *v)
|
|
Lee Duncan |
aba9fc |
+static inline bool __must_check arch_get_random_seed_long(unsigned long *v)
|
|
Lee Duncan |
aba9fc |
{
|
|
Lee Duncan |
aba9fc |
return false;
|
|
Lee Duncan |
aba9fc |
}
|
|
Lee Duncan |
aba9fc |
-static inline bool arch_get_random_seed_int(unsigned int *v)
|
|
Lee Duncan |
aba9fc |
+static inline bool __must_check arch_get_random_seed_int(unsigned int *v)
|
|
Lee Duncan |
aba9fc |
{
|
|
Lee Duncan |
aba9fc |
return false;
|
|
Lee Duncan |
aba9fc |
}
|
|
Lee Duncan |
aba9fc |
|