OSDN Git Service

staging: rtl8192u: ieee80211: Convert from ahash to shash
authorKees Cook <keescook@chromium.org>
Tue, 24 Jul 2018 16:49:32 +0000 (09:49 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jul 2018 08:05:24 +0000 (10:05 +0200)
commit2f675c91eeb7f59d649825f931184becdc94b905
treea1c85a7234de7b99068d59ed9bf616155c70d2e7
parentbd757b5d2e0b30939ba63b80af7355fe755fe2da
staging: rtl8192u: ieee80211: Convert from ahash to shash

This is an identical change to the wireless/lib80211 of the same name.
In preparing to remove all stack VLA usage from the kernel[1], this
removes the discouraged use of AHASH_REQUEST_ON_STACK in favor of
the smaller SHASH_DESC_ON_STACK by converting from ahash-wrapped-shash
to direct shash. By removing a layer of indirection this both improves
performance and reduces stack usage. The stack allocation will be made
a fixed size in a later patch to the crypto subsystem.

[1] https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qPXydAacU1RqZWA@mail.gmail.com

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c