Re: [PATCH] aarch64: vdso: Wire up getrandom() vDSO implementation

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

 



On Tue, Aug 27, 2024 at 11:02 AM Jason A. Donenfeld <Jason@xxxxxxxxx> wrote:
>
> On Tue, Aug 27, 2024 at 10:46:21AM +0200, Christophe Leroy wrote:
> > > +/**
> > > + * __arch_chacha20_blocks_nostack - Generate ChaCha20 stream without using the stack.
> > > + * @dst_bytes:     Destination buffer to hold @nblocks * 64 bytes of output.
> > > + * @key:   32-byte input key.
> > > + * @counter:       8-byte counter, read on input and updated on return.
> > > + * @nblocks:       Number of blocks to generate.
> > > + *
> > > + * Generates a given positive number of blocks of ChaCha20 output with nonce=0, and does not write
> > > + * to any stack or memory outside of the parameters passed to it, in order to mitigate stack data
> > > + * leaking into forked child processes.
> > > + */
> > > +extern void __arch_chacha20_blocks_nostack(u8 *dst_bytes, const u32 *key, u32 *counter, size_t nblocks);
> >
> > For Jason: We all redefine this prototype, should we have it in a
> > central place, or do you expect some architecture to provide some static
> > inline for it ?
>
> Given the doc comment and such, that would be nice. But I didn't see a
> straight forward way of doing that when I tried before. If you want to
> try and send another fixup commit, that'd be welcomed.

I'll give it a shot.





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux