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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240806020747.365042-1-luke@ljones.dev>
Date: Tue,  6 Aug 2024 14:07:41 +1200
From: "Luke D. Jones" <luke@...nes.dev>
To: platform-driver-x86@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
	ilpo.jarvinen@...ux.intel.com,
	hdegoede@...hat.com,
	corentin.chary@...il.com,
	"Luke D. Jones" <luke@...nes.dev>
Subject: [PATCH v2 0/6] platform/x86: introduce asus-armoury

This is the first major patch I've ever done with the intention of
introducing a new module, so it's highly likely I've made some mistakes
or misunderstood something.

TL;DR:
1. introduce new module to contain bios attributes, using fw_attributes_class
2. deprecate all possible attributes from asus-wmi that were added ad-hoc
3. remove those in the next LTS cycle

The idea for this originates from a conversation with Mario Limonciello
https://lore.kernel.org/platform-driver-x86/371d4109-a3bb-4c3b-802f-4ec27a945c99@amd.com/

It is without a doubt much cleaner to use, easier to discover, and the
API is well defined as opposed to the random clutter of attributes I had
been placing in the platform sysfs.

The name `asus-armoury` was settled on after some debate with users of the module.
This name is derived from the ASUS application named "Armoury Crate" as this is what
many users look for in searches and articles when crossing over to Linux from Windows.
The alternative was `asus-fw-settings`, which may still be up if there is any opposition
to the new name.

I am unsure of how best to handle the deprecation of attributes.

There's also some attributes that are obviously boolean but are using 0/1.
I'm unsure if I should change that.

And would it be best to move the asus stuff to a subdir now? Akin to the
Dell platform stuff.

The two new files were formatted with clangd with line length 96

I get this with checkpatch:
```
ERROR: Macros with multiple statements should be enclosed in a do - while loop
#934: FILE: drivers/platform/x86/asus-armoury.h:116:
+#define ATTR_GROUP_ENUM_INT_RO(_attrname, _fsname, _wmi, _possible, _dispname) \
+	__ATTR_CURRENT_INT_RO(_attrname, _wmi);                                \
+	__ATTR_GROUP_ENUM(_attrname, _fsname, _possible, _dispname)
```
I'm unsure what to do - adding the do/while breaks things.

All guidance deeply appreciated to get this over the line.

Regards,
Luke

Changelog:
- v1
  - Initial submission
- v2
  - Too many changes to list
  - History: https://lore.kernel.org/platform-driver-x86/20240716051612.64842-1-luke@ljones.dev/

Luke D. Jones (6):
  platform/x86: asus-wmi: Add quirk for ROG Ally X
  platform/x86: asus-armoury: move existing tunings to asus-armoury
    module
  platform/x86: asus-armoury: add dgpu tgp control
  platform/x86: asus-armoury: add apu-mem control support
  platform/x86: asus-armoury: add core count control
  asus-wmi: deprecate bios features

 .../ABI/testing/sysfs-platform-asus-wmi       |   17 +
 drivers/platform/x86/Kconfig                  |   22 +
 drivers/platform/x86/Makefile                 |    1 +
 drivers/platform/x86/asus-armoury.c           | 1047 +++++++++++++++++
 drivers/platform/x86/asus-armoury.h           |  241 ++++
 drivers/platform/x86/asus-wmi.c               |  187 ++-
 include/linux/platform_data/x86/asus-wmi.h    |   19 +
 7 files changed, 1506 insertions(+), 28 deletions(-)
 create mode 100644 drivers/platform/x86/asus-armoury.c
 create mode 100644 drivers/platform/x86/asus-armoury.h

-- 
2.45.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ