# git rev-parse -q --verify 16287397ec5c08aa58db6acf7dbc55470d78087d^{commit} 16287397ec5c08aa58db6acf7dbc55470d78087d already have revision, skipping fetch # git checkout -q -f -B kisskb 16287397ec5c08aa58db6acf7dbc55470d78087d # git clean -qxdf # < git log -1 # commit 16287397ec5c08aa58db6acf7dbc55470d78087d # Author: Ondrej Mosnacek # Date: Tue May 3 13:50:10 2022 +0200 # # crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ # # The commit referenced in the Fixes tag removed the 'break' from the else # branch in qcom_rng_read(), causing an infinite loop whenever 'max' is # not a multiple of WORD_SZ. This can be reproduced e.g. by running: # # kcapi-rng -b 67 >/dev/null # # There are many ways to fix this without adding back the 'break', but # they all seem more awkward than simply adding it back, so do just that. # # Tested on a machine with Qualcomm Amberwing processor. # # Fixes: a680b1832ced ("crypto: qcom-rng - ensure buffer for generate is completely filled") # Cc: stable@vger.kernel.org # Signed-off-by: Ondrej Mosnacek # Reviewed-by: Brian Masney # Signed-off-by: Herbert Xu # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux-ld --version # < git log --format=%s --max-count=1 16287397ec5c08aa58db6acf7dbc55470d78087d # < make -s -j 32 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- allnoconfig # < make -s -j 32 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- help # make -s -j 32 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- olddefconfig # make -s -j 32 ARCH=x86_64 O=/kisskb/build/crypto_x86_64-allnoconfig_x86_64-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/x86_64-linux/bin/x86_64-linux- Completed OK # rm -rf /kisskb/build/crypto_x86_64-allnoconfig_x86_64-gcc11 # Build took: 0:00:40.256345