Re: [2/4] crypto: af_alg - Allow arbitrarily long algorithm names" email-alg_bind.txt

From: Herbert Xu
Date: Mon Nov 27 2017 - 00:54:32 EST


On Wed, Nov 08, 2017 at 05:51:36PM +0100, Lukasz Odzioba wrote:
> Hi,
> I found this patch by accident and it got my attention.
> I think we can't make this name arbitrarily long because bind syscall checks addrlen before feeding protocol with it.
> Current limit on my machine is 128 bytes and I can't even reach alg_bind() function if I specify more than that.
> We may want to revert that.

Thanks for noticing this. It's obviously still limited by the
underlying system call interface.

However, this isn't actually a problem because the crypto API
is currently limited to 128 bytes. If and ever we need to inrease
that again then it would become a problem. The solution would
probably be to switch to a different interface for specifying
such long names.

Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt