2024-02-23 06:01:35

by Eric Biggers

[permalink] [raw]
Subject: Re: [PATCH 01/15] crypto: skcipher - Add tailsize attribute

On Thu, Feb 15, 2024 at 02:40:05PM +0800, Herbert Xu wrote:
> On Wed, Feb 14, 2024 at 03:44:13PM -0800, Eric Biggers wrote:
> >
> > > diff --git a/crypto/lskcipher.c b/crypto/lskcipher.c
> > > index 0b6dd8aa21f2..2a602911f4fc 100644
> > > --- a/crypto/lskcipher.c
> > > +++ b/crypto/lskcipher.c
> > > @@ -300,6 +300,7 @@ static void __maybe_unused crypto_lskcipher_show(
> > > seq_printf(m, "ivsize : %u\n", skcipher->co.ivsize);
> > > seq_printf(m, "chunksize : %u\n", skcipher->co.chunksize);
> > > seq_printf(m, "statesize : %u\n", skcipher->co.statesize);
> > > + seq_printf(m, "tailsize : %u\n", skcipher->co.tailsize);
> >
> > Do we really want to add new attributes like this to /proc/crypto?
> >
> > I worry about userspace starting to depend on these algorithm attributes in a
> > weird way.
> >
> > What is the use case for exposing them to userspace?
>
> Well this particular parameter is needed for user-space apps to know
> whether their next read will block or not.
>

Can you give a specific example of how this would be useful?

- Eric