[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20141125092408.GA6390@secunet.com>
Date: Tue, 25 Nov 2014 10:24:08 +0100
From: Steffen Klassert <steffen.klassert@...unet.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: Stephan Mueller <smueller@...onox.de>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: crypto: user - crypto_alg_match removal
On Tue, Nov 25, 2014 at 05:06:01PM +0800, Herbert Xu wrote:
> On Tue, Nov 25, 2014 at 09:42:25AM +0100, Steffen Klassert wrote:
> >
> > Well, I think there is a small but important difference. If a user
> > requests a driver name that would match an algorithm name (i.e. cbc(aes)
> > instead of cbc(aes-asm)) crypto_alg_lookup() returns the algorithm with
> > the highest priority instead of telling that we don't have a driver with
> > the name cbc(aes).
>
> Does this matter though? The current user interface is only used to
> query specific driver names which should never be equal to an
> algorithm name. So doing so already invokes undefined behaviour.
>
Using an algorithm name as a driver name is a misconfiguration.
We currently, catch these kind of misconfigurations beacuse
we match only driver names with crypto_alg_match().
crypto_alg_lookup() would return the algorithm with the highest
priority in this case and this would indeed lead to undefined
behaviour.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists