forked from rpms/kernel
d0cec25c97
* Tue Sep 12 2023 Scott Weaver <scweaver@redhat.com> [5.14.0-365.el9] - redhat/self-test: Remove rpmlint test (Prarit Bhargava) - redhat: shellcheck script fixes (Prarit Bhargava) - redhat/self-test: Clean up tests that do not work in CS9/RHEL9 (Prarit Bhargava) - redhat/self-test/data: Rework data (Prarit Bhargava) - redhat/kernel.spec.template: update compression variables to support zstd (Brian Masney) [RHEL-2376] - kernel.spec.template: Add global compression variables (Brian Masney) [RHEL-2376] - platform/x86/intel/tpmi: Add debugfs interface (David Arcari) [2177011] - platform/x86/intel/tpmi: Read feature control status (David Arcari) [2177011] - redhat/configs: enable CONFIG_INTEL_TPMI (David Arcari) [2177011] - platform/x86/intel/tpmi: Prevent overflow for cap_offset (David Arcari) [2177011] - platform/x86/intel: tpmi: Remove hardcoded unit and offset (David Arcari) [2177011] - platform/x86/intel: tpmi: Revise the comment of intel_vsec_add_aux (David Arcari) [2177011] - platform/x86/intel: tpmi: Fix double free in tpmi_create_device() (David Arcari) [2177011] - platform/x86/intel/tpmi: Fix double free reported by Smatch (David Arcari) [2177011] - platform/x86/intel/tpmi: ADD tpmi external interface for tpmi feature drivers (David Arcari) [2177011] - platform/x86/intel/tpmi: Process CPU package mapping (David Arcari) [2177011] - platform/x86/intel: Intel TPMI enumeration driver (David Arcari) [2177011] Resolves: rhbz#2177011, RHEL-2376 Signed-off-by: Scott Weaver <scweaver@redhat.com>
38 lines
1.1 KiB
Bash
Executable File
38 lines
1.1 KiB
Bash
Executable File
#! /bin/bash
|
|
|
|
# The modules_sign target checks for corresponding .o files for every .ko that
|
|
# is signed. This doesn't work for package builds which re-use the same build
|
|
# directory for every variant, and the .config may change between variants.
|
|
# So instead of using this script to just sign lib/modules/$KernelVer/extra,
|
|
# sign all .ko in the buildroot.
|
|
|
|
# This essentially duplicates the 'modules_sign' Kbuild target and runs the
|
|
# same commands for those modules.
|
|
|
|
MODSECKEY=$1
|
|
MODPUBKEY=$2
|
|
moddir=$3
|
|
|
|
modules=$(find "$moddir" -type f -name '*.ko')
|
|
|
|
NPROC=$(nproc)
|
|
[ -z "$NPROC" ] && NPROC=1
|
|
|
|
# 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=$(echo "$modules" | sort -R | head -n 1)
|
|
if [ "~Module signature appended~" != "$(tail -c 28 "$RANDOMMOD")" ]; then
|
|
echo "*****************************"
|
|
echo "*** Modules are unsigned! ***"
|
|
echo "*****************************"
|
|
exit 1
|
|
fi
|
|
|
|
exit 0
|