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: <CAJZ5v0haWTB92-r2UHmpc8JXh69uOHaS4qZUG3MyhqFLw1kOTw@mail.gmail.com>
Date: Fri, 23 May 2025 20:02:48 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Janne Grunau <j@...nau.net>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Armin Wolf <W_Armin@....de>, lenb@...nel.org, 
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH 1/2] ACPI: platform_profile: Add support for non-ACPI platforms

On Fri, May 23, 2025 at 6:29 PM Janne Grunau <j@...nau.net> wrote:
>
> On Fri, May 23, 2025 at 04:39:59PM +0200, Rafael J. Wysocki wrote:
> > On Thu, May 22, 2025 at 6:34 AM Armin Wolf <W_Armin@....de> wrote:
> > >
> > > Am 21.05.25 um 22:17 schrieb Rafael J. Wysocki:
> > >
> > > > On Sun, May 18, 2025 at 8:51 PM Armin Wolf <W_Armin@....de> wrote:
> > > >> Currently the platform profile subsystem assumes that all supported
> > > >> (i.e. ACPI-capable) platforms always run with ACPI being enabled.
> > > >> However some ARM64 notebooks do not support ACPI and are instead
> > > >> using devicetree for booting.
> > > >>
> > > >> Do not register the legacy sysfs interface on such devices as it
> > > >> depends on the acpi_kobj (/sys/firmware/acpi/) being present. Users
> > > >> are encouraged to use the new platform-profile class interface
> > > >> instead.
> > > > So how does it work in this case?
> > > >
> > > The platform profile subsystem also exposes a more modern class-based sysfs interface,
> > > see Documentation/ABI/testing/sysfs-class-platform-profile for details.
> > >
> > > This interface does not depend on /sys/firmware/acpi being present, so userspace
> > > programs can still control the platform profiles using the class-based interface.
> > >
> > > This will become very important once we have platform profile drivers not depending on
> > > some sort of ACPI interface. I suspect that sooner or later some drivers for the embedded
> > > controllers on ARM64 notebooks (devicetree!) will register with the platform profile subsystem.
> > >
> > > Apart from that this allows input drivers using platform_profile_cycle() to work on non-ACPI
> > > platforms (like ARm64 devices using devicetree).
> >
> > This driver though is located in drivers/acpi/ and depends on
> > CONFIG_ACPI.  Moreover, the platform profile provider drivers need to
> > select ACPI_PLATFORM_PROFILE so it gets built.  This means that there
> > are no non-ACPI platform profile providers currently in the tree.
> >
> > While the observation that the code in the driver, other than the
> > legacy sysfs interface, doesn't really depend on ACPI is valid, if you
> > want it to be used on systems without ACPI, it needs to be properly
> > converted to a generic driver.
> >
> > For now, it is better to simply make it fail to initialize without
> > ACPI, so I'm going to apply this patch:
> >
> > https://patchwork.kernel.org/project/linux-acpi/patch/20250522141410.31315-1-alexghiti@rivosinc.com/
>
> That unfortunately does not help with the hid-lenovo regression. Commit
> 84c9d2a968c8 ("HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn
> keys") added a platform_profile_cycle() call and thus a dependency on
> platform_profile.

And so on ACPI because platform_profile depends on it.

> hid-lenovo is used for USB and Bluetooth devices and
> not just for Lenovo laptop/tablet specific devices.
> Above patch just avoids the warning splat but still prevents loading
> hid-lenovo when ACPI is enabled in the kernel (like Distro kernels) on
> a non-ACPI system. This breaks devices like "Lenovo ThinkPad Compact
> Keyboard with TrackPoint" on such systems.
>
> I will send a patch to remove platform_profile_cycle() call as short
> term regression fix and tell the original author to to resubmit once the
> platform_profile dependency on non-ACPI systems is worked out.

Sure, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ