<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=6703&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Blacklisting unused driver modules]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=6703</link>
		<description><![CDATA[The most recent posts in Blacklisting unused driver modules.]]></description>
		<lastBuildDate>Wed, 03 Jul 2024 12:09:00 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50898#p50898</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>... apologize for the offtopic.</p></div></blockquote></div><p>Not needed, it <em>is</em> related.</p><div class="quotebox"><cite>aluma wrote:</cite><blockquote><div><p>... recompile the kernel ...</p></div></blockquote></div><p>I have <a href="https://dev1galaxy.org/viewtopic.php?pid=45076#p45076" rel="nofollow">thought</a> about it more than once and will probably end up doing it down the road.<br />But not before I really need to do it to keep my box working properly.<strong>*</strong></p><p>The main reason being that I have no plans to do any hardware upgrades in the foreseable future.<br />Save for maybe faster SAS HDDs along with a new SAS controller.<br />Or maybe replacing old monitors or needing a new PS with more than the stingy 540W this Sun Microsystems one puts out.</p><p>But that would be about it.</p><p>Thanks for your input.</p><p>Best,</p><p>A.</p><p><strong>*</strong> seeing how things are going these days, <em>before</em> may well arrive sooner than later.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 03 Jul 2024 12:09:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50898#p50898</guid>
		</item>
		<item>
			<title><![CDATA[Re: Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50897#p50897</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>GlennW wrote:</cite><blockquote><div><p>blacklist modules in /etc/modules.d/...</p></div></blockquote></div><p>Yes, so do I.<br />I have a number of blacklisted modules, among them the infamous <span class="bbc">mei</span> and <span class="bbc">mei_me</span> (a separate one for each just in case) with these stanzas ...<br /><span class="bbc">install mei /bin/false</span><br />and<br /><span class="bbc">install mei_me /bin/false</span> </p><p>... to prevent loading if another non-blacklisted module requests it.<br />ie: blacklists the module and any other that depends on it.</p><p>The result is this:</p><div class="codebox"><pre><code>~$ sudo dmesg | grep -i error
--- snip ---
[   24.221918] udevd[427]: Error running install command &#039;/bin/false&#039; for module mei: retcode 1
--- snip ---
~$</code></pre></div><p>I have also blacklisted <span class="bbc">appletalk</span>, <span class="bbc">ax25</span>, <span class="bbc">firewire_ohci</span>, <span class="bbc">gpio_ich</span>, <span class="bbc">i8042</span>, <span class="bbc">lpc_ich</span>, <span class="bbc">psmouse</span>, <span class="bbc">tpm</span>, <span class="bbc">watchdog</span> and <span class="bbc">intel-microcode</span>.</p><p>I&#039;ll have to look at your list in detail, thanks for the heads-up. </p><p>As usual, I&#039;ve wandered off track.<br />Back to the OP modules.</p><p>Seeing that blacklisting was not working I went looking for the reason while wondering if they were not baked into the kernel.<br />And then I found this tidbit:</p><div class="codebox"><pre><code>~$ cat /etc/modules-load.d/cups-filters.conf
# Parallel printer driver modules loading for cups
# LOAD_LP_MODULE was &#039;yes&#039; in /etc/default/cups
lp
ppdev
parport_pc
~$ </code></pre></div><p>I remmed all entries and rebooted and as a result, <span class="bbc">CUPS</span> would show the job as &quot;Processing page 1...&quot; and stay there, with the printer not printing anything, so I undid the editing in the <span class="bbc">cups-filters.conf</span>, issued a reprint of the same job and things were back to normal again.</p><p>My printer is local so no network printing here, at least for now.<br />But I&#039;ll have to poke around and try to find out which of the modules loaded can be eliminated, if any at all.</p><p>Will post back when I find out.</p><p>Thanks for your input.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Wed, 03 Jul 2024 11:45:27 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50897#p50897</guid>
		</item>
		<item>
			<title><![CDATA[Re: Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50892#p50892</link>
			<description><![CDATA[<p>I apologize for the offtopic.<br />All that remains is to take a radical step - recompile the kernel, leaving in it the code only for the necessary devices and services. <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Wed, 03 Jul 2024 02:19:34 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50892#p50892</guid>
		</item>
		<item>
			<title><![CDATA[Re: Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50890#p50890</link>
			<description><![CDATA[<p>save editing my last post, but with more to add...</p><p>Another way to blacklist unwanted kernel modules </p><p>This was done as a step towards hardening this system.</p><p>/etc/modules</p><div class="codebox"><pre class="vscroll"><code># /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with &quot;#&quot; are ignored.
# Parameters can be specified after the module name.
install dccp /bin/false #    DCCP — Datagram Congestion Control Protocol
install sctp /bin/false #    SCTP — Stream Control Transmission Protocol
install rds /bin/false #    RDS — Reliable Datagram Sockets
install tipc /bin/false #    TIPC — Transparent Inter-process Communication
install n-hdlc /bin/false #    HDLC — High-Level Data Link Control
install ax25 /bin/false #    AX25 — Amateur X.25
install netrom /bin/false #    NetRom
install x25 /bin/false #    X25
install rose /bin/false #    ROSE
install decnet /bin/false #    DECnet
install econet /bin/false #    Econet
install af_802154 /bin/false #    af_802154 — IEEE 802.15.4
install ipx /bin/false #    IPX — Internetwork Packet Exchange
install appletalk /bin/false #    AppleTalk
install psnap /bin/false #    PSNAP — Subnetwork Access Protocol
install p8023 /bin/false #    p8023 — Novell raw IEEE 802.3
install p8022 /bin/false #    p8022 — IEEE 802.2
install can /bin/false #    CAN — Controller Area Network
install atm /bin/false #    ATM
install cramfs /bin/false
install freevxfs /bin/false
install jffs2 /bin/false
install hfs /bin/false
install hfsplus /bin/false
install squashfs /bin/false
install udf /bin/false
install cifs /bin/false
install nfs /bin/false
install nfsv3 /bin/false
install nfsv4 /bin/false
install ksmbd /bin/false
install gfs2 /bin/false
install vivid /bin/false
install firewire-core /bin/false
install thunderbolt /bin/false</code></pre></div><p>I hope this helps you.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Tue, 02 Jul 2024 23:01:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50890#p50890</guid>
		</item>
		<item>
			<title><![CDATA[Re: Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50889#p50889</link>
			<description><![CDATA[<p>Hi, I blacklist modules in /etc/modules.d/...</p><p>like lp</p><p>/etc/modules.d/LP-blacklist</p><div class="codebox"><pre><code># The LP module is seup for network printers, so we block it by default.
blacklist lp</code></pre></div><p>you may also blacklist by adding it to your /etc/default/grub file line GRUB_CMDLINE_LINUX_DEFAULT= (and running &quot;update-grub&quot; before rebooting)</p><p>/etc/default/grub</p><div class="codebox"><pre><code># If you change this file, run &#039;update-grub&#039; afterwards to update
# /boot/grub/grub.cfg.
# GlennsPref 20230920 ipv6
# GlennsPref 20240209 hardening-tips

GRUB_DEFAULT=0
GRUB_TIMEOUT=4
GRUB_DISTRIBUTOR=`lsb_release -i -s`
GRUB_CMDLINE_LINUX_DEFAULT=&quot;console=tty12 vga=794 modeset.nouveau=0 nokmsboot ipv6.disable=1 security=none selinux=0 apparmor=0 amd_iommu=on usbcore.autosuspend=-1&quot;

# discover other os&#039;s
GRUB_DISABLE_OS_PROBER=false

GRUB_GFXMODE=1920x1080

GRUB_INIT_TUNE=&quot;400 440 1&quot;
# resume=uuid errors... noresume &quot;we don&#039;t susspend&quot;
GRUB_CMDLINE_LINUX=&quot;noresume idle=nomwait&quot;

GRUB_THEME=/usr/share/desktop-base/grub-themes/desktop-grub-theme/theme.txt</code></pre></div><p>I am not sure which is most efficient.</p>]]></description>
			<author><![CDATA[dummy@example.com (GlennW)]]></author>
			<pubDate>Tue, 02 Jul 2024 22:55:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50889#p50889</guid>
		</item>
		<item>
			<title><![CDATA[Blacklisting unused driver modules]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=50880#p50880</link>
			<description><![CDATA[<p>Hello:</p><p>My newly upgraded <span class="bbc">Daedalus</span> installation loads a couple of modules I don&#039;t need: </p><div class="codebox"><pre><code>~$ sudo dmesg
--- snip ---
[   26.714355] lp: driver loaded but no devices found
[   26.722412] ppdev: user-space parallel port driver
--- snip ---</code></pre></div><div class="codebox"><pre><code>~$ lsmod | grep &quot;lp\|parport\|pdev&quot;  
parport_pc             40960  0
ppdev                  24576  0
lp                     20480  0
parport                73728  3 parport_pc,lp,ppdev
--- snip ---</code></pre></div><p>My Samsung M2020W printer is USB and uses the <span class="bbc">usbcore</span> module:</p><div class="codebox"><pre><code>~$ sudo dmesg
--- snip ---
[   24.245461] usblp 6-5:1.0: usblp1: USB Bidirectional printer dev 4 if 0 alt 0 proto 2 vid 0x04E8 pid 0x3321
[   24.245834] usbcore: registered new interface driver usblp
~$
--- snip ---</code></pre></div><p>Although I do have an onboard serial 8250/16550 port in my box (which I use every so often), there is no on-board parallel port in the mb.<br />So it seems a good idea to avoid loading it at boot time.</p><p>It seems there are two posible ways to do this:<br />One would be the <span class="bbc">parport=0</span> kernel command line, which I expect nip the whole process <em>in-the-bud</em> or alternatively, blacklisting the module.</p><p>Am I correct in assuming that the kernel command line option is the most efficient way?</p><p>Thanks in advance.</p><p>Best,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Tue, 02 Jul 2024 12:35:47 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=50880#p50880</guid>
		</item>
	</channel>
</rss>
