On Thu, Oct 13, 2022 at 01:40:40PM +0200, Rolf Eike Beer wrote:
> Am Donnerstag, 13. Oktober 2022, 12:16:35 CEST schrieb Florian Westphal:
> > Rolf Eike Beer wrote:
> > > Florian, can you comment and maybe fix it?
> >
> > Can't comment, do not remember -- this was 5 years ago.
> >
> > > Or you w
On Tue, Oct 11, 2022 at 01:18:40AM +, Elliott, Robert (Servers) wrote:
>
> > diff --git a/crypto/testmgr.c b/crypto/testmgr.c
> ...
> > @@ -944,7 +944,7 @@ static void generate_random_bytes(u8 *buf, size_t count)
> > default:
> > /* Fully random bytes */
> > for (i
With no callers left of prandom_u32() and prandom_bytes(), as well as
get_random_int(), remove these deprecated wrappers, in favor of
get_random_u32() and get_random_bytes().
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Kees Cook
Reviewed-by: Yury Norov
Signed-off-by: Jason A. Donenfeld
Kroah-Hartman
Reviewed-by: Kees Cook
Reviewed-by: Yury Norov
Reviewed-by: Christophe Leroy # powerpc
Signed-off-by: Jason A. Donenfeld
---
arch/powerpc/crypto/crc-vpmsum_test.c | 2 +-
block/blk-crypto-fallback.c | 2 +-
crypto/async_tx/raid6test.c | 2
thunderbolt
Acked-by: Darrick J. Wong # for xfs
Signed-off-by: Jason A. Donenfeld
---
Documentation/networking/filter.rst| 2 +-
arch/parisc/kernel/process.c | 2 +-
arch/parisc/kernel/sys_parisc.c| 4 ++--
arch/s390/mm/mmap.c
in a non-32-bit context.
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Kees Cook
Reviewed-by: Yury Norov
Signed-off-by: Jason A. Donenfeld
---
arch/s390/kernel/process.c | 2 +-
drivers/mtd/nand/raw/nandsim.c | 2 +-
lib/test_vmalloc.c | 2 +-
net/rds/bind.c | 2
lt.
@plus_one@
expression literal_mask.LITERAL;
position literal_mask.p;
identifier add_one.RESULT;
identifier FUNC;
@@
- (FUNC()@p & (LITERAL))
+ (RESULT() & LITERAL)
Reviewed-by: Greg Kroah-Hartman
Reviewed-by: Kees Cook
Reviewed-by: Yury Norov
Acked-b
: Greg Kroah-Hartman
Reviewed-by: Kees Cook
Reviewed-by: Yury Norov
Reviewed-by: Jan Kara # for ext2, ext4, and sbitmap
Signed-off-by: Jason A. Donenfeld
---
fs/ext2/ialloc.c | 3 +--
fs/ext4/ialloc.c | 5 ++---
lib/sbitmap.c | 2 +-
lib/test_vmalloc.c | 17 -
4
by: Jan Kara # for ext4 and sbitmap
Reviewed-by: Christoph Böhmwalder # for drbd
Acked-by: Ulf Hansson # for mmc
Acked-by: Darrick J. Wong # for xfs
Signed-off-by: Jason A. Donenfeld
---
arch/arm/kernel/process.c | 2 +-
arch/arm64/kernel/process.c
s.org
Cc: loonga...@lists.linux.dev
Cc: net...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: x...@kernel.org
Jason A. Donenfeld (7):
treewide: use prandom_u32_max() when possible, part 1
treewide: use prandom_u32_max() when possible, part 2
treewide: use get_random_{u8,u16}() when possible
On Sat, Oct 08, 2022 at 08:41:14PM -0700, Kees Cook wrote:
> On Fri, Oct 07, 2022 at 11:53:52PM -0600, Jason A. Donenfeld wrote:
> > This is a five part treewide cleanup of random integer handling. The
> > rules for random integers are:
>
> Reviewing the delta between of my
On Sat, Oct 08, 2022 at 09:53:33PM +, David Laight wrote:
> From: Jason A. Donenfeld
> > Sent: 07 October 2022 18:56
> ...
> > > Given these kinds of less mechanical changes, it may make sense to split
> > > these from the "trivial" conversions in a tre
On Sat, Oct 8, 2022 at 4:37 PM Jason A. Donenfeld wrote:
>
> On Sat, Oct 08, 2022 at 10:18:45PM +, David Laight wrote:
> > From: Jason A. Donenfeld
> > > Sent: 07 October 2022 19:01
> > >
> > > The prandom_u32() function has been a deprecated inline wr
On Sat, Oct 08, 2022 at 10:18:45PM +, David Laight wrote:
> From: Jason A. Donenfeld
> > Sent: 07 October 2022 19:01
> >
> > The prandom_u32() function has been a deprecated inline wrapper around
> > get_random_u32() for several releases now, and compiles down
On Sat, Oct 08, 2022 at 10:08:03PM +, David Laight wrote:
> From: Jason A. Donenfeld
> > Sent: 07 October 2022 19:01
> >
> > Rather than incurring a division or requesting too many random bytes for
> > the given range, use the prandom_u32_max() function, which
Reviewed-by: Christophe Leroy # powerpc
Signed-off-by: Jason A. Donenfeld
---
arch/powerpc/crypto/crc-vpmsum_test.c | 2 +-
block/blk-crypto-fallback.c | 2 +-
crypto/async_tx/raid6test.c | 2 +-
drivers/dma/dmatest.c | 2
With no callers left of prandom_u32() and prandom_bytes(), as well as
get_random_int(), remove these deprecated wrappers, in favor of
get_random_u32() and get_random_bytes().
Reviewed-by: Kees Cook
Signed-off-by: Jason A. Donenfeld
---
drivers/char/random.c | 11 +--
include/linux
-by: Jason A. Donenfeld
---
Documentation/networking/filter.rst| 2 +-
arch/parisc/kernel/process.c | 2 +-
arch/parisc/kernel/sys_parisc.c| 4 ++--
arch/s390/mm/mmap.c| 2 +-
arch/x86/kernel/cpu/amd.c
in a non-32-bit context.
Reviewed-by: Kees Cook
Signed-off-by: Jason A. Donenfeld
---
arch/s390/kernel/process.c | 2 +-
lib/test_vmalloc.c | 2 +-
net/ipv4/ip_output.c| 2 +-
net/netfilter/nf_nat_core.c | 4 ++--
net/rds/bind.c | 2 +-
net/sched/sch_sfb.c
print("Skipping large mask of %s" % (literal))
cocci.include_match(False)
// Replace the literal mask with the calculated result.
@plus_one@
expression literal_mask.LITERAL;
position literal_mask.p;
identifier add_one.RESULT;
identifier FUNC;
@@
- (FUNC()@p & (LITERAL))
+
+ return E;
}
@drop_var@
type T;
identifier VAR;
@@
{
- T VAR;
... when != VAR
}
Reviewed-by: Kees Cook
Reviewed-by: KP Singh
Reviewed-by: Jan Kara # for ext4 and sbitmap
Reviewed-by: Christoph Böhmwalder # for drbd
Acked-by: Ulf Hansson # for mmc
Acked-by: Dar
: Kees Cook
Reviewed-by: Jan Kara # for ext2, ext4, and sbitmap
Signed-off-by: Jason A. Donenfeld
---
fs/ext2/ialloc.c | 3 +--
fs/ext4/ialloc.c | 5 ++---
lib/sbitmap.c | 2 +-
lib/test_vmalloc.c | 17 -
4 files changed, 8 insertions(+), 19 deletions(-)
diff --git a
a...@lists.linux.dev
Cc: net...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: x...@kernel.org
Jason A. Donenfeld (7):
treewide: use prandom_u32_max() when possible, part 1
treewide: use prandom_u32_max() when possible, part 2
treewide: use get_random_{u8,u16}() when possible, part 1
On Fri, Oct 07, 2022 at 03:47:44PM -0700, Kees Cook wrote:
> > diff --git a/lib/test_vmalloc.c b/lib/test_vmalloc.c
> > index 4f2f2d1bac56..56ffaa8dd3f6 100644
> > --- a/lib/test_vmalloc.c
> > +++ b/lib/test_vmalloc.c
> > @@ -151,9 +151,7 @@ static int random_size_alloc_test(void)
> > int i;
>
On Fri, Oct 07, 2022 at 03:47:44PM -0700, Kees Cook wrote:
> On Fri, Oct 07, 2022 at 12:01:03PM -0600, Jason A. Donenfeld wrote:
> > Rather than incurring a division or requesting too many random bytes for
> > the given range, use the prandom_u32_max() function, which only takes
On Fri, Oct 07, 2022 at 10:34:47PM +0200, Rolf Eike Beer wrote:
> > diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c
> > index 7c37e09c92da..18c4f0e3e906 100644
> > --- a/arch/parisc/kernel/process.c
> > +++ b/arch/parisc/kernel/process.c
> > @@ -288,7 +288,7 @@ __get_wchan(
On Fri, Oct 07, 2022 at 02:17:22PM -0700, Darrick J. Wong wrote:
> On Fri, Oct 07, 2022 at 12:01:03PM -0600, Jason A. Donenfeld wrote:
> > Rather than incurring a division or requesting too many random bytes for
> > the given range, use the prandom_u32_max() function, which onl
around get_random_u32().
Reviewed-by: Kees Cook
Acked-by: Toke Høiland-Jørgensen # for sch_cake
Acked-by: Chuck Lever # for nfsd
Reviewed-by: Jan Kara # for ext4
Acked-by: Mika Westerberg # for thunderbolt
Signed-off-by: Jason A. Donenfeld
---
Documentation/networking/filter.rst| 2
Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value,
simply use the get_random_{u8,u16}() functions, which are faster than
wasting the additional bytes from a 32-bit value.
Reviewed-by: Kees Cook
Acked-by: Toke Høiland-Jørgensen # for sch_cake
Signed-off-by: Jason A
With no callers left of prandom_u32() and prandom_bytes(), as well as
get_random_int(), remove these deprecated wrappers, in favor of
get_random_u32() and get_random_bytes().
Reviewed-by: Kees Cook
Signed-off-by: Jason A. Donenfeld
---
drivers/char/random.c | 11 +--
include/linux
Signed-off-by: Jason A. Donenfeld
---
arch/powerpc/crypto/crc-vpmsum_test.c | 2 +-
block/blk-crypto-fallback.c | 2 +-
crypto/async_tx/raid6test.c | 2 +-
drivers/dma/dmatest.c | 2 +-
drivers/mtd/nand/raw/nandsim.c | 2
Reviewed-by: Jan Kara # for ext2, ext4, and sbitmap
Signed-off-by: Jason A. Donenfeld
---
arch/arm64/kernel/process.c | 2 +-
arch/loongarch/kernel/process.c | 2 +-
arch/loongarch/kernel/vdso.c | 2 +-
arch/mips/kernel/process.c | 2 +-
arch/mips/kernel
-by: Kees Cook
Reviewed-by: KP Singh
Reviewed-by: Jan Kara # for ext4 and sbitmap
Acked-by: Ulf Hansson # for mmc
Signed-off-by: Jason A. Donenfeld
---
arch/arm/kernel/process.c | 2 +-
arch/s390/kernel/vdso.c | 2 +-
arch/um/kernel/process.c
xppc-...@lists.ozlabs.org
Cc: loonga...@lists.linux.dev
Cc: net...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: x...@kernel.org
Jason A. Donenfeld (6):
treewide: use prandom_u32_max() when possible, mechanically
treewide: use prandom_u32_max() when possible
treewide: use get_random_
On Fri, Oct 07, 2022 at 10:12:42AM -0700, Kees Cook wrote:
> On Fri, Oct 07, 2022 at 08:07:58AM -0600, Jason A. Donenfeld wrote:
> > On Fri, Oct 07, 2022 at 04:57:24AM +, Christophe Leroy wrote:
> > >
> > >
> > > Le 07/10/2022 à 01:36, Jason A. Do
On Fri, Oct 07, 2022 at 04:57:24AM +, Christophe Leroy wrote:
>
>
> Le 07/10/2022 à 01:36, Jason A. Donenfeld a écrit :
> > On 10/6/22, Christophe Leroy wrote:
> >>
> >>
> >> Le 06/10/2022 à 19:31, Christophe Leroy a écrit :
> >>>
&
On 10/6/22, Bagas Sanjaya wrote:
> On 10/6/22 23:53, Jason A. Donenfeld wrote:
>> The prandom_bytes() function has been a deprecated inline wrapper around
>> get_random_bytes() for several releases now, and compiles down to the
>> exact same code. Replace the deprecated wrapp
On 10/6/22, Christophe Leroy wrote:
>
>
> Le 06/10/2022 à 19:31, Christophe Leroy a écrit :
>>
>>
>> Le 06/10/2022 à 19:24, Jason A. Donenfeld a écrit :
>>> Hi Christophe,
>>>
>>> On Thu, Oct 6, 2022 at 11:21 AM Christophe Leroy
>>>
Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value,
simply use the get_random_{u8,u16}() functions, which are faster than
wasting the additional bytes from a 32-bit value.
Reviewed-by: Kees Cook
Acked-by: Toke Høiland-Jørgensen # for sch_cake
Signed-off-by: Jason A
Hi Christophe,
On Thu, Oct 6, 2022 at 11:21 AM Christophe Leroy
wrote:
> Le 06/10/2022 à 18:53, Jason A. Donenfeld a écrit :
> > The prandom_u32() function has been a deprecated inline wrapper around
> > get_random_u32() for several releases now, and compiles down to the
>
The prandom_bytes() function has been a deprecated inline wrapper around
get_random_bytes() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function.
Reviewed-by: Kees Cook
Signed-off-by: Jason A. Donenfeld
With no callers left of prandom_u32() and prandom_bytes(), as well as
get_random_int(), remove these deprecated wrappers, in favor of
get_random_u32() and get_random_bytes().
Reviewed-by: Kees Cook
Signed-off-by: Jason A. Donenfeld
---
drivers/char/random.c | 11 +--
include/linux
around get_random_u32().
Reviewed-by: Kees Cook
Acked-by: Toke Høiland-Jørgensen # for sch_cake
Acked-by: Chuck Lever # for nfsd
Reviewed-by: Jan Kara # for ext4
Signed-off-by: Jason A. Donenfeld
---
Documentation/networking/filter.rst| 2 +-
arch/arm64/kernel/process.c
Reviewed-by: Jan Kara # for ext2, ext4, and sbitmap
Signed-off-by: Jason A. Donenfeld
---
arch/arm/kernel/process.c | 2 +-
arch/loongarch/kernel/vdso.c | 2 +-
arch/mips/kernel/vdso.c | 2 +-
arch/parisc/kernel/vdso.c
nel.org
Cc: linux-r...@vger.kernel.org
Cc: linux-s...@vger.kernel.org
Cc: linux-um@lists.infradead.org
Cc: linux-...@vger.kernel.org
Cc: linux-wirel...@vger.kernel.org
Cc: linuxppc-...@lists.ozlabs.org
Cc: loonga...@lists.linux.dev
Cc: net...@vger.kernel.org
Cc: sparcli...@vger.kernel.org
Cc: x..
On Sun, Apr 24, 2022 at 12:33:44AM +0100, Maciej W. Rozycki wrote:
> unconditionally. I think this discovery asks for code optimisation, which
> I'll try to cook up sometime.
At some point too, by the way, we might also consider putting that into
a .c file rather than a static inline in the .h,
s.infradead.org
Cc: x...@kernel.org
Cc: linux-xte...@linux-xtensa.org
Cc: openr...@lists.librecores.org
Cc: linux-i...@vger.kernel.org
Cc: linux-s...@vger.kernel.org
Cc: linux-par...@vger.kernel.org
Cc: linuxppc-...@lists.ozlabs.org
Jason A. Donenfeld (17):
ia64: define get_cycles macro for arch-ove
Hi Sandy,
On Sat, Apr 23, 2022 at 10:24:07AM +0800, Sandy Harris wrote:
> On Sat, Apr 23, 2022 at 6:37 AM Jason A. Donenfeld wrote:
> >
> > All platforms are now guaranteed to provide some value for
> > random_get_entropy(). In case some bug leads to this not being so, w
Hi Maciej,
On Thu, Apr 21, 2022 at 9:25 PM Maciej W. Rozycki wrote:
>
> On Tue, 19 Apr 2022, Jason A. Donenfeld wrote:
>
> > For situations in which we don't have a c0 counter register available,
> > we've been falling back to reading the c0 "random" regi
Hi Borislav,
On Tue, Apr 19, 2022 at 8:59 PM Borislav Petkov wrote:
>
> On Tue, Apr 19, 2022 at 08:38:41PM +0200, Jason A. Donenfeld wrote:
> > I think I prefer doing (a), and leaving (b) for another time when you
> > or another x86 maintainer can do so. But I'll do which
Hi Borislav,
On Tue, Apr 19, 2022 at 8:16 PM Borislav Petkov wrote:
> > +static inline unsigned long random_get_entropy(void)
> > +{
> > +#ifndef CONFIG_X86_TSC
> > + if (!boot_cpu_has(X86_FEATURE_TSC))
>
> cpu_feature_enabled() pls.
This function began as a carbon copy of get_cycles(), whic
Hi Johannes,
On Tue, Apr 19, 2022 at 01:33:21PM +0200, Johannes Berg wrote:
> On Tue, 2022-04-19 at 13:16 +0200, Jason A. Donenfeld wrote:
> > In the event that random_get_entropy() can't access a cycle counter or
> > similar, falling back to returning 0 is really no
time. And more importantly, it lets us do the
same sponge-like construction everywhere.
Cc: Theodore Ts'o
Signed-off-by: Jason A. Donenfeld
---
drivers/char/random.c | 89 ++-
1 file changed, 29 insertions(+), 60 deletions(-)
diff --git a/dri
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Max Filippov
Signed-off-by: Jason A. Donenfeld
---
arch/xtensa/include/asm/timex.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/includ
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: David S. Miller
Signed-off-by: Jason A. Donenfeld
---
arch/sparc/include/asm/timex_32.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sparc/include
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Signed-off-by: Jason A. Donenfeld
---
arch/um/include/asm/timex.h | 9 ++---
1 file changed, 2 insertions(+), 7 del
486 with
no RDTSC, so we only need the fallback code for that case.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: x...@kernel.org
Signed-off-by: Jason A. Donenfeld
---
arch/x86/include/asm/timex.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/include/asm/timex.h b/arc
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Dinh Nguyen
Signed-
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Russell King
Signed-
viously were falling back to 0 for ancient CPUs that Linux does
not support anyway; remove that dead path entirely.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Thomas Bogendoerfer
Cc: Maciej W. Rozycki
Signed-off-by: Jason A. Donenfeld
---
ThomasB - I dropped your Ack from v4, because this is p
elt
Signed-off-by: Jason A. Donenfeld
---
arch/riscv/include/asm/timex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 507cae273bc6..d6a7428f6248 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/ri
Signed-off-by: Jason A. Donenfeld
---
arch/m68k/include/asm/timex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
index 6a21d9358280..f4a7a340f4ca 100644
--- a/arch/m68k/include/asm/timex.h
+++ b/arch/m68k/incl
turning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Theodore Ts'o
Signed-off-by: Jason A. Donenfeld
---
include/linux/timex.h | 8
kernel/time/timekeeping.c | 10 ++
2 files changed, 18 insertions(+)
diff --git a/include/linux/timex.h b/include/linux/t
c: H. Peter Anvin
Cc: Chris Zankel
Cc: Max Filippov
Cc: Stephen Boyd
Cc: Dinh Nguyen
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-m...@lists.linux-m68k.org
Cc: linux-m...@vger.kernel.org
Cc: linux-ri...@lists.infradead.org
Cc: sparcli...@vger.kernel.org
Cc: linux-um@lists.infradead.org
C
Hi Maciej,
On Sat, Apr 16, 2022 at 03:44:53PM +0100, Maciej W. Rozycki wrote:
> > Okay, I can give this a shot, but this certainly isn't my forté. It
> > may ultimately wind up being simpler for you to just send some code of
> > what you envision for this, but if I understand your idea correctly,
Hi Maciej,
On Fri, Apr 15, 2022 at 2:26 PM Maciej W. Rozycki wrote:
> return (random_get_entropy_fallback() << 14) | ((1<<14) -
> read_c0_random());
>
> of course, as bit 13 is still one of the active ones in the R3k CP0 Random
> register.
Ah, thanks, will do that.
> There are two variant
Hi Russell,
On Thu, Apr 14, 2022 at 12:12 PM Russell King (Oracle)
wrote:
> I'm surprised this didn't trigger checkpatch to warn. From
> coding-style:
>
> 6.1) Function prototypes
> Do not use the ``extern`` keyword with function declarations as this makes
> lines longer and isn't strictly necess
Hi Maciej,
On Thu, Apr 14, 2022 at 02:16:18AM +0100, Maciej W. Rozycki wrote:
> Yes, for the relevant CPUs the range is 63-8 << 8 for R3k machines and
> 47-0 (the lower bound can be higher if wired entries are used, which I
> think we occasionally do) for R4k machines with a buggy CP0 counter.
Hi Rob,
On Wed, Apr 13, 2022 at 4:40 PM Rob Herring wrote:
> Moving this check to get_cycles() implementation would eliminate the
> RiscV implementation of random_get_entropy() if you follow my other
> suggestion.
Not an option. random_get_entropy() != get_cycles(). Sometimes these
are different
Hi Rob,
On Wed, Apr 13, 2022 at 4:32 PM Rob Herring wrote:
> 'does not have a usable get_cycles(), ...' as clearly some arches have
> get_cycles() and yet still need a fallback.
>
> Why not handle the 'if get_cycles() returns 0 do the fallback' within
> a weak random_get_entropy() function? Then
Hi Maciej,
On Wed, Apr 13, 2022 at 2:46 PM Maciej W. Rozycki wrote:
>
> On Wed, 13 Apr 2022, Thomas Bogendoerfer wrote:
>
> > > diff --git a/arch/mips/include/asm/timex.h b/arch/mips/include/asm/timex.h
> > > index b05bb70a2e46..abc60a6395e3 100644
> > > --- a/arch/mips/include/asm/timex.h
> > >
time. And more importantly, it lets us do the
same sponge-like construction everywhere.
Cc: Theodore Ts'o
Signed-off-by: Jason A. Donenfeld
---
drivers/char/random.c | 87 ++-
1 file changed, 28 insertions(+), 59 deletions(-)
diff --git a/dri
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Max Filippov
Signed-off-by: Jason A. Donenfeld
---
arch/xtensa/include/asm/timex.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/includ
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: David S. Miller
Signed-off-by: Jason A. Donenfeld
---
arch/sparc/include/asm/timex_32.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sparc/include
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Signed-off-by: Jason A. Donenfeld
---
arch/um/include/asm/timex.h | 9 ++---
1 file changed, 2 insertions(+), 7 del
486 with
no RDTSC, so we only need the fallback code for that case.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: x...@kernel.org
Signed-off-by: Jason A. Donenfeld
---
arch/x86/include/asm/tsc.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/include/asm/tsc.h b/arch/x8
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Dinh Nguyen
Signed-
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Russell King
Signed-
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Thomas Bogendoerfer
Signed-
elt
Signed-off-by: Jason A. Donenfeld
---
arch/riscv/include/asm/timex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 507cae273bc6..d6a7428f6248 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/ri
Signed-off-by: Jason A. Donenfeld
---
arch/m68k/include/asm/timex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
index 6a21d9358280..f4a7a340f4ca 100644
--- a/arch/m68k/include/asm/timex.h
+++ b/arch/m68k/incl
turning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Theodore Ts'o
Signed-off-by: Jason A. Donenfeld
---
include/linux/timex.h | 8
kernel/time/timekeeping.c | 10 ++
2 files changed, 18 insertions(+)
diff --git a/include/linux/timex.h b/include/linux/t
ists.linux-m68k.org
Cc: linux-m...@vger.kernel.org
Cc: linux-ri...@lists.infradead.org
Cc: sparcli...@vger.kernel.org
Cc: linux-um@lists.infradead.org
Cc: x...@kernel.org
Cc: linux-xte...@linux-xtensa.org
Jason A. Donenfeld (11):
timekeeping: add raw clock fallback for random_get_entropy(
Hi Thomas,
On Tue, Apr 12, 2022 at 10:57 PM Thomas Gleixner wrote:
>
> On Tue, Apr 12 2022 at 19:27, Jason A. Donenfeld wrote:
> > +/**
> > + * random_get_entropy_fallback - Returns the raw clock source value,
> > + * used by random.c for platforms with no
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Max Filippov
Signed-off-by: Jason A. Donenfeld
---
arch/xtensa/include/asm/timex.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/includ
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: David S. Miller
Signed-off-by: Jason A. Donenfeld
---
arch/sparc/include/asm/timex_32.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sparc/include
r architectures, which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Signed-off-by: Jason A. Donenfeld
---
arch/um/include/asm/timex.h | 9 ++---
1 file changed, 2 insertions(+), 7 del
486 with
no RDTSC, so we only need the fallback code for that case.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: x...@kernel.org
Signed-off-by: Jason A. Donenfeld
---
arch/x86/include/asm/tsc.h | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/x86/include/asm/tsc.h b/arch/x8
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Dinh Nguyen
Signed-
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Russell King
Signed-
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Thomas Bogendoerfer
Signed-
elt
Signed-off-by: Jason A. Donenfeld
---
arch/riscv/include/asm/timex.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/timex.h b/arch/riscv/include/asm/timex.h
index 507cae273bc6..d6a7428f6248 100644
--- a/arch/riscv/include/asm/timex.h
+++ b/arch/ri
ffies eventually. It's not as though
random_get_entropy_fallback() is super high precision or guaranteed to
be entropic, but basically anything that's not zero all the time is
better than returning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Geert Uytterhoeven
Signed-
turning zero all the time.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Theodore Ts'o
Signed-off-by: Jason A. Donenfeld
---
include/linux/timex.h | 8
kernel/time/timekeeping.c | 10 ++
2 files changed, 18 insertions(+)
diff --git a/include/linux/timex.h b/include/linux/t
Cc: Dinh Nguyen
Cc: linux-arm-ker...@lists.infradead.org
Cc: linux-m...@lists.linux-m68k.org
Cc: linux-m...@vger.kernel.org
Cc: linux-ri...@lists.infradead.org
Cc: sparcli...@vger.kernel.org
Cc: linux-um@lists.infradead.org
Cc: x...@kernel.org
Cc: linux-xte...@linux-xtensa.org
Jason A. Done
Hi Thomas,
On Mon, Apr 11, 2022 at 10:18 AM Thomas Gleixner wrote:
> > diff --git a/arch/m68k/include/asm/timex.h b/arch/m68k/include/asm/timex.h
> > index 6a21d9358280..5351b10e1b18 100644
> > --- a/arch/m68k/include/asm/timex.h
> > +++ b/arch/m68k/include/asm/timex.h
> > @@ -35,7 +35,7 @@ stati
Hi Eric,
On 4/11/22, Eric Biggers wrote:
> On Fri, Apr 08, 2022 at 08:21:35PM +0200, Jason A. Donenfeld wrote:
>> By my first guess, we have ktime_get_boottime_ns(), jiffies, and
>> sched_clock(). It seems like sched_clock() has already done a lot of
>> work in being alway
which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Max Filippov
Signed-off-by: Jason A. Donenfeld
---
arch/xtensa/include/asm/timex.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/xtensa/include/asm/timex.
which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: David S. Miller
Signed-off-by: Jason A. Donenfeld
---
arch/sparc/include/asm/timex_32.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/sparc/include/asm/timex_32.
which means we can get rid of the empty stub
function here.
Cc: Thomas Gleixner
Cc: Arnd Bergmann
Cc: Richard Weinberger
Cc: Anton Ivanov
Cc: Johannes Berg
Signed-off-by: Jason A. Donenfeld
---
arch/um/include/asm/timex.h | 9 ++---
1 file changed, 2 insertions(+), 7 deletions(-)
diff
1 - 100 of 123 matches
Mail list logo