summaryrefslogtreecommitdiffstats
path: root/mod-extra-blacklist.sh
diff options
context:
space:
mode:
authorJustin M. Forbes <jforbes@fedoraproject.org>2021-03-17 12:38:46 -0500
committerJustin M. Forbes <jforbes@fedoraproject.org>2021-03-17 12:38:46 -0500
commit2d7cbaa6f9fa69d3f60984b67c2d03e57e6d9759 (patch)
treea1d03aed06bd868aef5d39f73d2bd5b64941612a /mod-extra-blacklist.sh
parent8cb9b8957f6c41855069d943280362fbf45cdbf1 (diff)
downloadkernel-2d7cbaa6f9fa69d3f60984b67c2d03e57e6d9759.tar.gz
kernel-2d7cbaa6f9fa69d3f60984b67c2d03e57e6d9759.tar.xz
kernel-2d7cbaa6f9fa69d3f60984b67c2d03e57e6d9759.zip
kernel-5.11.7-9
* Wed Mar 17 2021 Justin M. Forbes <jforbes@fedoraproject.org> [5.11.7-9] - Disable weak-modules again rhbz 1828455 (Justin M. Forbes) - More config updates for gcc-plugin turn off (Justin M. Forbes) - fedora: the PCH_CAN driver is x86-32 only (Peter Robinson) - common: disable legacy CAN device support (Peter Robinson) - common: Enable Microchip MCP251x/MCP251xFD CAN controllers (Peter Robinson) - common: Bosch MCAN support for Intel Elkhart Lake (Peter Robinson) - common: enable CAN_PEAK_PCIEFD PCI-E driver (Peter Robinson) - common: disable CAN_PEAK_PCIEC PCAN-ExpressCard (Peter Robinson) - common: enable common CAN layer 2 protocols (Peter Robinson) - ark: disable CAN_LEDS option (Peter Robinson) Resolves: rhbz# Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
Diffstat (limited to 'mod-extra-blacklist.sh')
-rwxr-xr-xmod-extra-blacklist.sh56
1 files changed, 0 insertions, 56 deletions
diff --git a/mod-extra-blacklist.sh b/mod-extra-blacklist.sh
deleted file mode 100755
index c4c4f8f6d..000000000
--- a/mod-extra-blacklist.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-buildroot="$1"
-kernel_base="$2"
-
-blacklist()
-{
- cat > "$buildroot/etc/modprobe.d/$1-blacklist.conf" <<-__EOF__
- # This kernel module can be automatically loaded by non-root users. To
- # enhance system security, the module is blacklisted by default to ensure
- # system administrators make the module available for use as needed.
- # See https://access.redhat.com/articles/3760101 for more details.
- #
- # Remove the blacklist by adding a comment # at the start of the line.
- blacklist $1
-__EOF__
-}
-
-check_blacklist()
-{
- if modinfo "$1" | grep -q '^alias:\s\+net-'; then
- mod="${1##*/}"
- mod="${mod%.ko*}"
- echo "$mod has an alias that allows auto-loading. Blacklisting."
- blacklist "$mod"
- fi
-}
-
-foreachp()
-{
- P=$(nproc)
- bgcount=0
- while read mod; do
- $1 "$mod" &
-
- bgcount=$((bgcount + 1))
- if [ $bgcount -eq $P ]; then
- wait -n
- bgcount=$((bgcount - 1))
- fi
- done
-
- wait
-}
-
-[ -d "$buildroot/etc/modprobe.d/" ] || mkdir -p "$buildroot/etc/modprobe.d/"
-find "$buildroot/$kernel_base/extra" -name "*.ko*" | \
- foreachp check_blacklist
-
-# Many BIOS-es export a PNP-id which causes the floppy driver to autoload
-# even though most modern systems don't have a 3.5" floppy driver anymore
-# this replaces the old die_floppy_die.patch which removed the PNP-id from
-# the module
-if [ -f $buildroot/$kernel_base/extra/drivers/block/floppy.ko* ]; then
- blacklist "floppy"
-fi