Re: [PATCH v2 0/2] LoongArch: Implement getrandom() in vDSO

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

 



On Thu, Aug 15, 2024 at 10:22:31PM +0800, Xi Ruoyao wrote:
> > so I'll be able to take a look at this for real starting the 26th, as
> > right now I'm just on my cellphone using lore+mutt.
> > 
> > One thing I wanted to ask, though, is - doesn't LoongArch have 32 8-byte
> > registers? Shouldn't that be enough to implement ChaCha without spilling
> > and without using LSX?
> 
> I'll work on it but I need to ask a question (it may be stupid because I
> know a little about security) before starting to code:
> 
> Is "stack-less" meaning simply "don't spill any sensitive data onto the
> stack," or more strictly "stack shouldn't be used at all"?
> 
> For example, is it OK to save all the callee-saved registers in the
> function prologue onto the stack, and restore them in the epilogue?

Just means don't spill sensitive info, which means the key, the output,
the entire ChaCha state, and all intermediate states. But saving
callee-saved registers in the prologue like usual is fine.

Jason




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux