lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241127182656.5834616b@gandalf.local.home>
Date: Wed, 27 Nov 2024 18:26:56 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: David Hunter <david.hunter.linux@...il.com>
Cc: javier.carrasco.cruz@...il.com, linux-kbuild@...r.kernel.org,
 linux-kernel@...r.kernel.org, masahiroy@...nel.org, shuah@...nel.org
Subject: Re: [PATCH v3 0/7] streamline_config.pl: fix: process configs set
 to "y"

On Wed, 27 Nov 2024 18:05:47 -0500
David Hunter <david.hunter.linux@...il.com> wrote:

> From: David.hunter.linux@...il.com
> 
> I think that there are 2 distinct reasons that a module should not be
> turned off when using the 'localmodconfig' command. 
> 
> 1) the module is used directly
> 2) the module is needed for another module that has been included in the
> kernel with a "y". 
> 
> I think we both agree on the first reason, but we may be having a
> disagreement/miscommunication for reason 2. 

Note, Linus uses make localmodconfig a lot. He didn't always, because he
complained that it would keep too many options enabled. I don't want to
suddenly have Linus's make localmodconfig blow up the options again. I can
see him complaining about it. Believe me, you don't want Linus to notice
this patch for the wrong reasons.

This is why I'm very concerned about things like BCACHEFS being enabled
after localmodconfig when there's obviously no reason for it. Even if it
enables CLOSURES. BCACHEFS is an filesystem that I don't use. It should not
be enabled on my machines.

> 
> > For example:
> >
> >  BCACHEFS_FS n -> m
> >
> > Why is that needed?  
> 
> With regards to your question, I see that 'CLOSURES' is set to 'y' in
> your original .config file. 'BCACHEFS_FS' selects 'CLOSURES'. I suspect
> that if 'BCACHEFS_FS' is set to 'n', then your config would have no way
> of keeping 'CLOSURES' as 'y'.

Which is OK for this example.

> 
> I understand that the following patch is not suitable for upstream;
> however, the following patch might help you to understand a little bit
> more about each config options like 'BCACHEFS_FS'. 
> 
> https://lore.kernel.org/all/20241014141345.5680-5-david.hunter.linux@gmail.com/

Note, I'll try to remember to look at this after the Thanksgiving break.

> 
> If you put in
> 
> dprintvar("BCACHEFS_FS);
> 
> you would be able to see what selects 'BCACHEFS_FS' and what is selected
> by 'BCACHEFS_FS'. I suspect that if you were to use it for each of the
> config options that you have questions about, you would likely see that
> each config option set to "m" has a "y" option that it selects. The
> question then would be is the "y" option actually required for your
> particular machine.   

I would argue that if a 'y' depends on a 'm' then it's not needed unless
that 'y' is a dependency for other 'm's that are needed. We should look
into seeing if that's the case.

> 
> This brings us to the root cause of the issue that we are having: there
> is no way to know if a config option set to 'y' is actually required. If
> there was a way to tell if 'CLOSURES' is needed, we can easily determine
> whether BCACHEFS_FS is actually necessary. 

I would say that CLOSURES is considered needed if a 'm' that is needed
depends on it. Otherwise, I would say no.

> 
> Without knowing whether the 'y' options are needed, we then have to make
> a determination whether it is better to have the (potentially necessary)
> 'y' options with the extra (not directly used) 'm' options or to drop
> those 'y' options along with those 'm' options. 
> 
> My argument is that the 'y' options are important, even if we cannot
> determine whether they are used or not. The problem I had that made me
> aware of the issues with localmodconfig was that my new computer would
> consistently do an emergency shutdown whenever I would try to compile the
> kernel. I eventually realized that the fan was not being recognized, so
> my workaround was to put the BIOS in control of the fan (instead of the
> kernel). 
> 
> It was not until I realized that I had a few hardware devices that were
> not being recognized that I was able to pinpoint the root cause of the
> problem. For clarity, some of my hardware devices that were nonfunctional
> were USBs, the microphone, Bluetooth (and as mentioned earlier, the fan). 

Can you show the dependency change for those devices. Knowing what exactly
was disabled and knowing what was needed would be useful. That way we can
fix the actual problem without using a big hammer approach of just keeping
any module enabled that enables a 'y'.

> 
> I am curious to know if there are any hardware devices that are not
> recognized on your computer after you use localmodconfig. One way to
> check is to use use 'ls' on the psuedofilesystem or to use any of the
> commands (like lspci) that recognize hardware.
> 
> I do not know whether any of your hardware requires the 'CLOSURES'
> config, but because someone's hardware MAY need it, my reasoning is that
> streamline_config.pl should include 'BCACHEFS_FS' if it is the only thing
> that selects another config opiton set to 'y'. 

BACHEFS is a new file system. If there's a dependency in my config that
requires it, that's a bug in the config.

> 
> On my computer, when all of these configs set to 'm' are added (because
> of reason 2), all of my hardware works (including the Bluetooth,
> microphone, and USBs. 
> 
> If, on the other hand, you still feel like it would be better to not
> include these particular config options, I would ask that you allow a
> command line option like '-s' or '--safe' that users could use to make
> the config file with the added modules. 

Let's first find out what the problem is. Remember, this is code that Linus
uses for his builds. Rule #1 I was told when I first became a kernel
developer was, "Whatever you do. Don't break Linus's workstation!"

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ