From 3422e04a2e31dba3e17af206f160d4fc409f4250 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Fri, 5 Mar 2021 10:03:27 -0600 Subject: kernel-5.11.3-50 * Fri Mar 05 2021 Justin M. Forbes [5.11.3-50] - PCI: Add MCFG quirks for Tegra194 host controllers (Vidya Sagar) - Revert "PCI: Add MCFG quirks for Tegra194 host controllers" (Peter Robinson) - forgot to push this one earlier (Justin M. Forbes) - Reference the patch as version.patchlevel to more easily see diffs between stable releases (Justin M. Forbes) Resolves: rhbz# Signed-off-by: Justin M. Forbes --- mod-sign.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'mod-sign.sh') diff --git a/mod-sign.sh b/mod-sign.sh index 5081e77dc..1afe136e2 100755 --- a/mod-sign.sh +++ b/mod-sign.sh @@ -11,22 +11,23 @@ MODSECKEY=$1 MODPUBKEY=$2 - moddir=$3 -modules=`find $moddir -name *.ko` +modules=$(find "$moddir" -type f -name '*.ko') -for mod in $modules -do - dir=`dirname $mod` - file=`basename $mod` +NPROC=$(nproc) +[ -z "$NPROC" ] && NPROC=1 - ./scripts/sign-file sha256 ${MODSECKEY} ${MODPUBKEY} ${dir}/${file} - rm -f ${dir}/${file}.{sig,dig} +# NB: this loop runs 2000+ iterations. Try to be fast. +echo "$modules" | xargs -r -n16 -P $NPROC sh -c " +for mod; do + ./scripts/sign-file sha256 $MODSECKEY $MODPUBKEY \$mod + rm -f \$mod.sig \$mod.dig done +" DUMMYARG0 # xargs appends ARG1 ARG2..., which go into $mod in for loop. -RANDOMMOD=$(find $moddir -type f -name '*.ko' | sort -R | head -n 1) -if [ "~Module signature appended~" != "$(tail -c 28 $RANDOMMOD)" ]; then +RANDOMMOD=$(echo "$modules" | sort -R | head -n 1) +if [ "~Module signature appended~" != "$(tail -c 28 "$RANDOMMOD")" ]; then echo "*****************************" echo "*** Modules are unsigned! ***" echo "*****************************" -- cgit