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]
Date:   Mon, 7 Jun 2021 16:44:15 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     Takashi Iwai <tiwai@...e.de>, Kyle Meyer <kyle.meyer@....com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>, linux-acpi@...r.kernel.org
Subject: Re: [PATCH] acpi-cpufreq: Skip initialization if a cpufreq driver
 exists

On 07-06-21, 13:02, Rafael J. Wysocki wrote:
> On Mon, Jun 7, 2021 at 9:26 AM Viresh Kumar <viresh.kumar@...aro.org> wrote:
> > I am not sure how this is supposed to work. If we return 0 from
> > acpi_cpufreq_init(),
> > then the driver will never be used, since it's acpi_cpufreq_init()
> > will never get
> > called again later.
> 
> Unless the module is unloaded and loaded again, that is.

Right.

> > cpufreq drivers don't follow the generic device/driver model where a driver gets
> > probed again if a device appears and so this is broken.
> 
> It is broken anyway as per the changelog of this patch.
> 
> On systems with several hundred logical CPUs this really can be troublesome.

Hmm, I agree.

> > Please revert this patch.
> 
> Well, you can argue that the problem at hand is outside the kernel and
> so it's not a kernel's business to address it.

Exactly, what we did here is add a band-aid to make a userspace tool
happy, the kernel was doing the right thing earlier.

> After all, systemd-udevd could learn to avoid attempting to load the
> module again if it fails with -EEXIST,

That is one way, right.

> but I'm not sure how different
> that really would be from what this patch does, in practice.

The very first difference is we won't be adding an incorrect hack in
the kernel to solve this userspace problem. Else in order to make
acpi-cpufreq driver work, after a user unloads intel-pstate, user
would be required to unload the acpi-cpufreq and load it again, which
will surely look confusing to the user. Why unload to load it again ?

Leaving a module inserted in an unusable state is not the right
solution to fix a problem IMHO.

-- 
viresh

Powered by blists - more mailing lists