Re: [PATCH V3 6/6] crypto/nx: Add P9 NX support for 842 compression engine
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-08-29 21:24:16
Also in:
linux-crypto
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2017-08-29 21:24:16
Also in:
linux-crypto
On Tue, 2017-08-29 at 09:58 -0400, Dan Streetman wrote:
quoted
+ + ret = -EINVAL; + if (coproc && coproc->vas.rxwin) { + wmem->txwin = nx842_alloc_txwin(coproc);this is wrong. the workmem is scratch memory that's valid only for the duration of a single operation. do you actually need a txwin per crypto transform? or do you need a txwin per coprocessor? or txwin per processor? either per-coproc or per-cpu should be created at driver init and held separately (globally) instead of a per-transform txwin. I really don't see why you would need a txwin per transform, because the coproc should not care how many different transforms there are.
We should only need a single window for the whole kernel really, plus one per user process who wants direct access but that's not relevant here. Cheers, Ben.