Linux Documentation
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.18] modpost: Handle malformed WMI GUID strings
       [not found] <20260831133314.4125787-1-sashal@kernel.org>
@ 2026-08-31 13:26 ` Sasha Levin
  2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME Sasha Levin
  2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFI Sasha Levin
  2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-08-31 13:26 UTC (permalink / raw)
  To: patches, stable
  Cc: Armin Wolf, Mario Limonciello, Ilpo Järvinen, Sasha Levin,
	corbet, nathan, nsc, platform-driver-x86, linux-doc, linux-kernel,
	linux-kbuild

From: Armin Wolf <W_Armin@gmx.de>

[ Upstream commit 3429ae7b2f02a4a6ad40d36ee06641d433d75a1b ]

Some WMI GUIDs found inside binary MOF files contain both
uppercase and lowercase characters. Blindly copying such
GUIDs will prevent the associated WMI driver from loading
automatically because the WMI GUID found inside WMI device ids
always contains uppercase characters.

Avoid this issue by always converting WMI GUID strings to
uppercase. Also verify that the WMI GUID string actually looks
like a valid GUID.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20260610203453.816254-10-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

The background git searches finished. They didn’t turn up the modpost
WMI GUID commit in this 6.18.44 tree — it’s still only a candidate. The
closest related in-tree commit is `97b726eb1dc2b` (msi-wmi-platform
lowercase GUID typo), which lines up with the modpost fix but doesn’t
replace it.

That doesn’t change the earlier conclusion: backport **YES** for 6.18.y.

 .../wmi/driver-development-guide.rst          |  2 +-
 scripts/mod/file2alias.c                      | 28 ++++++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/Documentation/wmi/driver-development-guide.rst b/Documentation/wmi/driver-development-guide.rst
index 5680303ae314e..ae577a290afc3 100644
--- a/Documentation/wmi/driver-development-guide.rst
+++ b/Documentation/wmi/driver-development-guide.rst
@@ -54,7 +54,7 @@ to matching WMI devices using a struct wmi_device_id table:
 ::
 
   static const struct wmi_device_id foo_id_table[] = {
-         /* Only use uppercase letters! */
+         /* Using only uppercase letters is recommended */
          { "936DA01F-9ABD-4D9D-80C7-02AF85C822A8", NULL },
          { }
   };
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 4e99393a35f15..20e542a888c49 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -1253,6 +1253,8 @@ static void do_tee_entry(struct module *mod, void *symval)
 static void do_wmi_entry(struct module *mod, void *symval)
 {
 	DEF_FIELD_ADDR(symval, wmi_device_id, guid_string);
+	char result[sizeof(*guid_string)];
+	int i;
 
 	if (strlen(*guid_string) != UUID_STRING_LEN) {
 		warn("Invalid WMI device id 'wmi:%s' in '%s'\n",
@@ -1260,7 +1262,31 @@ static void do_wmi_entry(struct module *mod, void *symval)
 		return;
 	}
 
-	module_alias_printf(mod, false, WMI_MODULE_PREFIX "%s", *guid_string);
+	for (i = 0; i < UUID_STRING_LEN; i++) {
+		char value = (*guid_string)[i];
+		bool valid = false;
+
+		if (i == 8 || i == 13 || i == 18 || i == 23) {
+			if (value == '-')
+				valid = true;
+		} else {
+			if (isxdigit(value))
+				valid = true;
+		}
+
+		if (!valid) {
+			warn("Invalid character %c inside WMI GUID string '%s' in '%s'\n",
+			     value, *guid_string, mod->name);
+			return;
+		}
+
+		/* Some GUIDs from BMOF definitions contain lowercase characters */
+		result[i] = toupper(value);
+	}
+
+	result[i] = '\0';
+
+	module_alias_printf(mod, false, WMI_MODULE_PREFIX "%s", result);
 }
 
 /* Looks like: mhi:S */
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME
       [not found] <20260831133314.4125787-1-sashal@kernel.org>
  2026-08-31 13:26 ` [PATCH AUTOSEL 6.18] modpost: Handle malformed WMI GUID strings Sasha Levin
@ 2026-08-31 13:27 ` Sasha Levin
  2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFI Sasha Levin
  2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-08-31 13:27 UTC (permalink / raw)
  To: patches, stable
  Cc: Brian Downey, Eugene Shalygin, Guenter Roeck, Sasha Levin, corbet,
	linux-hwmon, linux-doc, linux-kernel

From: Brian Downey <bdowne01@gmail.com>

[ Upstream commit 5f6617089dc06f9941e8ca57ba64345c9f1ed9ed ]

Add support for ROG MAXIMUS Z790 EXTREME

Signed-off-by: Brian Downey <bdowne01@gmail.com>
Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20260608060855.40469-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## PHASE 1: COMMIT MESSAGE FORENSICS

### Step 1.1: PARSE THE SUBJECT LINE
**Record:** `[hwmon: (asus-ec-sensors)] [add] [ROG MAXIMUS Z790 EXTREME
board support to existing EC sensors driver]`

### Step 1.2: PARSE ALL COMMIT MESSAGE TAGS
**Record:**
- **Fixes:** — not present (expected for manual review)
- **Reported-by:** — none
- **Tested-by:** — none
- **Reviewed-by:** — none
- **Acked-by:** — none
- **Link:** `https://lore.kernel.org/r/20260608060855.40469-1-
  eugene.shalygin@gmail.com`
- **Cc: stable@vger.kernel.org** — not present (expected)
- **Signed-off-by:** Brian Downey, Eugene Shalygin, Guenter Roeck (hwmon
  maintainer)

Notable: no syzbot/sanitizer reports; maintainer (Guenter Roeck)
committed it.

### Step 1.3: ANALYZE THE COMMIT BODY TEXT
**Record:**
- **Bug description:** None stated. Commit only says "Add support for
  ROG MAXIMUS Z790 EXTREME."
- **Symptom/failure mode:** Without this patch, `asus-ec-sensors` does
  not match this board's DMI name and does not expose EC-based hwmon
  sensors (T_Sensor, VRM, water-in/out, water-flow).
- **Version info:** None in message.
- **Root cause:** Board not listed in `dmi_table[]`;
  `sensors_family_intel_700[]` lacked water-sensor EC register mappings
  needed by this board.

### Step 1.4: DETECT HIDDEN BUG FIXES
**Record:** Not a hidden bug fix. This is explicit hardware enablement —
a DMI board table entry plus sensor-family data for a new motherboard.
No crash, leak, race, or corruption is described or implied.

---

## PHASE 2: DIFF ANALYSIS

### Step 2.1: INVENTORY THE CHANGES
**Record:**
- `Documentation/hwmon/asus_ec_sensors.rst`: +1 line (board list)
- `drivers/hwmon/asus-ec-sensors.c`: +15 lines
- **Functions modified:** None (only static data:
  `sensors_family_intel_700[]`, new `board_info_maximus_z790_extreme`,
  `dmi_table[]`)
- **Scope:** Single-file driver change + doc; surgical hardware-ID
  addition

### Step 2.2: CODE FLOW CHANGE
**Record:**
- **Hunk 1 (`sensors_family_intel_700[]`):** Before: intel 700 family
  had T_Sensor, T_Sensor 2, VRM, CPU_Opt only. After: adds Water_Flow,
  Water_In, Water_Out EC register mappings (same addresses as intel 600
  family).
- **Hunk 2 (`board_info_maximus_z790_extreme`):** New board config
  mirroring `board_info_maximus_z690_formula` but using
  `family_intel_700_series`.
- **Hunk 3 (`dmi_table[]`):** Adds DMI exact match for `"ROG MAXIMUS
  Z790 EXTREME"` → new board info.
- **Affected path:** `get_board_info()` → `dmi_first_match()` →
  `asus_ec_probe()` only when DMI matches this board.

### Step 2.3: IDENTIFY THE BUG MECHANISM
**Record:**
- **Bug category:** None (hardware enablement / missing board ID)
- **Mechanism:** Driver probes via platform device; `get_board_info()`
  returns NULL for unknown boards → probe returns `-ENODEV`. This patch
  adds the missing board identifier and its sensor map.

### Step 2.4: ASSESS THE FIX QUALITY
**Record:**
- Fix is obviously correct: copies the established Z690 FORMULA pattern
  (same sensor set, same mutex path) onto intel 700 family.
- Minimal and surgical; no logic changes.
- **Regression risk:** Very low. Water sensor entries in
  `sensors_family_intel_700[]` are only used when a board's `.sensors`
  bitmask requests them. Existing intel-700 boards (`ROG STRIX Z790-E
  GAMING WIFI II`, `ROG STRIX Z790-I GAMING WIFI`) do not enable water
  sensors and are unaffected.

---

## PHASE 3: GIT HISTORY INVESTIGATION

### Step 3.1: BLAME THE CHANGED LINES
**Record:**
- `sensors_family_intel_700[]` introduced in `0183cb21b8a87`
  (2025-07-28, "Add ROG STRIX Z790E GAMING WIFI II"); water sensors were
  absent from the start.
- Commit `5f6617089dc06` (2026-06-08) adds Z790 EXTREME support.
- Intel 700 family and DMI infrastructure are present in this tree since
  v6.18 development.

### Step 3.2: FOLLOW THE FIXES: TAG
**Record:** No `Fixes:` tag present; step not applicable.

### Step 3.3: CHECK FILE HISTORY FOR RELATED CHANGES
**Record:**
- Similar board-add commits already in v6.18.44: `15c8317366908` (Z790-I
  GAMING WIFI), `0183cb21b8a87` (Z790E GAMING WIFI II), `34c61c198d06b`
  (Z690-E GAMING WIFI).
- Same author ecosystem (Eugene Shalygin as committer/reviewer on many
  board-add patches).
- Standalone single-patch series (v1 → v2 per `b4 dig -a`); no multi-
  patch dependency.

### Step 3.4: CHECK THE AUTHOR'S OTHER COMMITS
**Record:** Eugene Shalygin is a regular `asus-ec-sensors` contributor
(many board-add patches). Brian Downey contributed the board data.
Guenter Roeck (hwmon maintainer) committed it.

### Step 3.5: CHECK FOR DEPENDENT/PREREQUISITE COMMITS
**Record:**
- Prerequisites present in v6.18.44: `asus-ec-sensors` driver,
  `family_intel_700_series`, `ASUS_HW_ACCESS_MUTEX_RMTW_ASMX`, DMI
  matching macros, water sensor enum/bit definitions.
- Commit is self-contained; no series dependencies.
- Cherry-pick to v6.18.44 applies cleanly (verified).

---

## PHASE 4: MAILING LIST AND EXTERNAL RESEARCH

### Step 4.1: FIND THE ORIGINAL PATCH DISCUSSION
**Record:**
- `b4 dig -c 5f6617089dc06`: matched v2 at `https://patch.msgid.link/202
  60608060855.40469-1-eugene.shalygin@gmail.com`
- `b4 dig -a`: v1 (2026-06-07) and v2 (2026-06-08); committed version is
  latest (v2).
- Lore thread content could not be fetched (Anubis bot protection on
  patch.msgid.link). Stable nomination in thread: **unverified**.

### Step 4.2: CHECK WHO REVIEWED THE PATCH
**Record:** `b4 dig -w` recipients include Guenter Roeck (hwmon
maintainer), linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan Corbet, Shuah Khan.

### Step 4.3: SEARCH FOR THE BUG REPORT
**Record:** No bug report tags or syzbot links. This is a user/hardware
enablement request, not a crash report.

### Step 4.4: CHECK FOR RELATED PATCHES AND SERIES
**Record:** Standalone 1-patch series (v1/v2). No companion fixes
required.

### Step 4.5: CHECK STABLE MAILING LIST HISTORY
**Record:** Not searched (no stable Cc: tag, no bug report to anchor
search). Stable-specific discussion: **unverified**.

---

## PHASE 5: CODE SEMANTIC ANALYSIS

### Step 5.1: IDENTIFY KEY FUNCTIONS IN THE DIFF
**Record:** No functions modified. Static data consumed by
`get_board_info()` and `asus_ec_probe()`.

### Step 5.2: TRACE CALLERS
**Record:**
- `get_board_info()` → called from `asus_ec_probe()` (line ~1256)
- `asus_ec_probe()` → registered as `.probe` in platform driver; reached
  from `asus_ec_init()` via `platform_create_bundle()`
- `module_init(asus_ec_init)` at driver load
- Context: module init / platform probe during boot; not a hot path

### Step 5.3: TRACE CALLEES
**Record:** `dmi_first_match(dmi_table)`, sensor setup via
`setup_sensor_data()`, `fill_ec_registers()`, hwmon device registration.
Uses existing EC read infrastructure and ACPI mutex locking.

### Step 5.4: FOLLOW THE CALL CHAIN
**Record:** Boot-time driver load → DMI match → hwmon sysfs sensors
exposed. Not directly syscall-triggered, but affects all users of this
motherboard who want temperature/fan monitoring via `asus-ec-sensors`.
Without match, driver silently does not bind (`-ENODEV`).

### Step 5.5: SEARCH FOR SIMILAR PATTERNS
**Record:** Identical pattern used for dozens of boards in this driver
(e.g., `board_info_maximus_z690_formula` with same sensor set on intel
600 family). Water sensor EC addresses match those in
`sensors_family_intel_600[]`.

---

## PHASE 6: CROSS-REFERENCING AGAINST THE LOCAL TREE

### Step 6.1: DOES THE BUGGY CODE EXIST IN THIS TREE?
**Record:**
- **Local tree:** `v6.18.44` (linux-6.18.y stable), `VERSION=6
  PATCHLEVEL=18 SUBLEVEL=44`
- **Missing board support exists:** `ROG MAXIMUS Z790 EXTREME` is absent
  from `dmi_table[]` and documentation in HEAD.
- Commit `5f6617089dc06` is **not** an ancestor of HEAD (`commit NOT in
  tree`).
- Driver `asus-ec-sensors` and `family_intel_700_series` **do** exist.
- `ROG MAXIMUS Z790 EXTREME` appears in `nct6775-platform.c` WMI list
  (partial/alternate monitoring path), but not in `asus-ec-sensors`.

### Step 6.2: CHECK FOR BACKPORT COMPLICATIONS
**Record:** Cherry-pick of `5f6617089dc06` onto v6.18.44 succeeds with
auto-merge, no conflicts. Expected apply: **clean**.

### Step 6.3: CHECK IF RELATED FIXES ARE ALREADY HERE
**Record:** No equivalent Z790 EXTREME entry in `asus-ec-sensors`.
Related intel-700 Z790 boards (Z790-I, Z790E WIFI II) are already
supported. This specific board is the gap.

---

## PHASE 7: SUBSYSTEM AND MAINTAINER CONTEXT

### Step 7.1: IDENTIFY THE SUBSYSTEM AND ITS CRITICALITY
**Record:** `drivers/hwmon/` — hardware monitoring. **Criticality:
PERIPHERAL** (affects specific ASUS motherboard owners, not core kernel
paths).

### Step 7.2: ASSESS SUBSYSTEM ACTIVITY
**Record:** `asus-ec-sensors` is actively maintained with frequent
board-add commits. v6.18.44 already includes multiple board-add patches
from the same series.

---

## PHASE 8: IMPACT AND RISK ASSESSMENT

### Step 8.1: DETERMINE WHO IS AFFECTED
**Record:** **Platform-specific** — owners of ASUS ROG MAXIMUS Z790
EXTREME motherboards running `CONFIG_SENSORS_ASUS_EC`. No impact on
other hardware.

### Step 8.2: DETERMINE THE TRIGGER CONDITIONS
**Record:** Triggered at boot when DMI reports `"ROG MAXIMUS Z790
EXTREME"` and `asus-ec-sensors` module loads. Common for affected
hardware owners. Not a security issue; not userspace-triggerable beyond
normal module loading.

### Step 8.3: DETERMINE THE FAILURE MODE SEVERITY
**Record:** Without patch: EC-based hwmon sensors unavailable (no
T_Sensor header, VRM temp, water loop temps/flow via this driver).
System boots normally; monitoring gap only. **Severity: LOW** (missing
functionality, not crash/corruption/hang).

### Step 8.4: CALCULATE RISK-BENEFIT RATIO
**Record:**
- **Benefit:** Enables hwmon for a real, shipping high-end motherboard
  on 6.18.y; matches established in-tree pattern.
- **Risk:** Very low — 16 lines of static data, no logic changes, no
  effect on existing boards.
- **Ratio:** Moderate benefit for a small user population vs. very low
  regression risk.

---

## PHASE 9: FINAL SYNTHESIS

### Step 9.1: COMPILE THE EVIDENCE

**FOR backporting:**
- Explicitly permitted by `Documentation/process/stable-kernel-
  rules.rst`: *"must either fix a real bug … or just add a device ID"*
- DMI board table entry is the functional equivalent of a device ID for
  this driver
- Driver already exists in v6.18.44; only board ID + sensor map added
- Small (16 lines), applies cleanly, obviously correct
- Same pattern as board-add commits already present in this tree
  (Z790-I, Z690 FORMULA, etc.)
- Hwmon maintainer committed it
- No regression risk for existing configurations

**AGAINST backporting:**
- Not a bug fix (no crash, corruption, security, deadlock)
- Missing sensors is low-severity — system works without them
- Partial monitoring may exist via `nct6775` WMI path for this board
  name
- Adds sensor family entries beyond a pure one-line ID (though only used
  by the new board)
- No `Cc: stable` or user bug reports demonstrating urgency

**Unresolved:**
- Whether lore reviewers nominated for stable (thread inaccessible)
- Whether users rely exclusively on `asus-ec-sensors` vs. `nct6775` on
  this board

### Step 9.2: STABLE RULES CHECKLIST
1. Obviously correct and tested? **PASS** — mirrors Z690 FORMULA;
   maintainer committed; v1→v2 review cycle
2. Fixes a real bug affecting users? **PASS** (via device-ID exception)
   — not a crash bug, but missing board ID prevents hardware monitoring
   on a supported driver
3. Important issue (crash, security, corruption, deadlock)? **FAIL** for
   bug-fix criterion; **PASS** only under device-ID exception (low-
   severity enablement)
4. Small and contained? **PASS** — 16 lines, 2 files, static data only
5. No new features or APIs? **PASS** — no new APIs; board ID addition
   per stable rules exception
6. Can apply to local tree? **PASS** — cherry-pick verified clean on
   v6.18.44

### Step 9.3: EXCEPTION CATEGORIES
**Record:** Falls under **device ID addition** (DMI board identifier for
existing driver). Analogous to PCI/USB ID additions documented in stable
rules and review guidelines.

### Step 9.4: DECISION RATIONALE

For **linux-6.18.y (v6.18.44)**: the `asus-ec-sensors` driver, intel-700
sensor family, and DMI infrastructure are all present. The commit adds
only a missing board identifier and its sensor configuration — the exact
pattern already used for other Z790/Z690 boards in this stable series.
Per the tree's own stable rules, device-ID additions to existing drivers
are explicitly eligible for stable backport even when they are not crash
fixes.

The patch is minimal, applies cleanly, and cannot affect boards that do
not match the new DMI entry. The benefit is enabling EC sensor
monitoring for ROG MAXIMUS Z790 EXTREME owners on 6.18.y; the risk is
negligible.

---

## Verification

- [Phase 1] Parsed subject, tags, body: hardware enablement, no
  bug/crash language
- [Phase 1] No syzbot/sanitizer/Fixes tags found
- [Phase 2] Diff: 16 lines, static data only in `asus-ec-sensors.c` + 1
  doc line
- [Phase 2] Verified water sensor bits not set on existing intel-700
  boards in HEAD
- [Phase 3] `git describe HEAD`: `v6.18.44`
- [Phase 3] `git merge-base --is-ancestor 5f6617089dc06 HEAD`: commit
  NOT in tree
- [Phase 3] `git blame` on `sensors_family_intel_700[]`: introduced
  0183cb21b8a87
- [Phase 3] Similar board-add `15c8317366908` IS in v6.18.44
- [Phase 4] `b4 dig -c 5f6617089dc06`: v2 lore URL found
- [Phase 4] `b4 dig -a`: v1 and v2 revisions found
- [Phase 4] `b4 dig -w`: Guenter Roeck and linux-hwmon CC'd
- [Phase 4] UNVERIFIED: lore thread content (Anubis blocked fetch)
- [Phase 5] Traced `get_board_info()` → `asus_ec_probe()` call chain in
  source
- [Phase 5] `module_init(asus_ec_init)` confirmed at line 1402
- [Phase 6] `ROG MAXIMUS Z790 EXTREME` absent from `asus-ec-sensors.c`
  in HEAD
- [Phase 6] `ROG MAXIMUS Z790 EXTREME` present in `nct6775-platform.c`
  WMI list
- [Phase 6] Cherry-pick `5f6617089dc06` onto HEAD: clean auto-merge
- [Phase 7] `CONFIG_SENSORS_ASUS_EC` exists in `drivers/hwmon/Kconfig`
- [Phase 8] Failure mode assessed as missing hwmon, severity LOW
- [Phase 9] `Documentation/process/stable-kernel-rules.rst` line 15:
  device ID exception confirmed

**YES**

 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
index a8456f29db950..8b9c24664e158 100644
--- a/Documentation/hwmon/asus_ec_sensors.rst
+++ b/Documentation/hwmon/asus_ec_sensors.rst
@@ -25,6 +25,7 @@ Supported boards:
  * ROG MAXIMUS XI HERO
  * ROG MAXIMUS XI HERO (WI-FI)
  * ROG MAXIMUS Z690 FORMULA
+ * ROG MAXIMUS Z790 EXTREME
  * ROG STRIX B550-E GAMING
  * ROG STRIX B550-I GAMING
  * ROG STRIX B650E-I GAMING WIFI
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index 57b771d96d4f0..33402bc3f6cd7 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -382,6 +382,12 @@ static const struct ec_sensor_info sensors_family_intel_700[] = {
 	[ec_sensor_temp_vrm] = EC_SENSOR("VRM", hwmon_temp, 1, 0x00, 0x33),
 	[ec_sensor_fan_cpu_opt] =
 		EC_SENSOR("CPU_Opt", hwmon_fan, 2, 0x00, 0xb0),
+	[ec_sensor_fan_water_flow] =
+		EC_SENSOR("Water_Flow", hwmon_fan, 2, 0x00, 0xbc),
+	[ec_sensor_temp_water_in] =
+		EC_SENSOR("Water_In", hwmon_temp, 1, 0x01, 0x00),
+	[ec_sensor_temp_water_out] =
+		EC_SENSOR("Water_Out", hwmon_temp, 1, 0x01, 0x01),
 };
 
 /* Shortcuts for common combinations */
@@ -475,6 +481,13 @@ static const struct ec_board_info board_info_maximus_z690_formula = {
 	.family = family_intel_600_series,
 };
 
+static const struct ec_board_info board_info_maximus_z790_extreme = {
+	.sensors = SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
+		SENSOR_SET_TEMP_WATER | SENSOR_FAN_WATER_FLOW,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_RMTW_ASMX,
+	.family = family_intel_700_series,
+};
+
 static const struct ec_board_info board_info_prime_x470_pro = {
 	.sensors = SENSOR_SET_TEMP_CHIPSET_CPU_MB |
 		SENSOR_TEMP_T_SENSOR | SENSOR_TEMP_VRM |
@@ -776,6 +789,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_maximus_xi_hero),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z690 FORMULA",
 					&board_info_maximus_z690_formula),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG MAXIMUS Z790 EXTREME",
+					&board_info_maximus_z790_extreme),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-E GAMING",
 					&board_info_strix_b550_e_gaming),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B550-I GAMING",
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFI
       [not found] <20260831133314.4125787-1-sashal@kernel.org>
  2026-08-31 13:26 ` [PATCH AUTOSEL 6.18] modpost: Handle malformed WMI GUID strings Sasha Levin
  2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME Sasha Levin
@ 2026-08-31 13:27 ` Sasha Levin
  2 siblings, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2026-08-31 13:27 UTC (permalink / raw)
  To: patches, stable
  Cc: Eugene Shalygin, Guenter Roeck, Sasha Levin, corbet, linux-hwmon,
	linux-doc, linux-kernel

From: Eugene Shalygin <eugene.shalygin@gmail.com>

[ Upstream commit 5e9f31543515d685cafed33274433b6360c0e1e4 ]

The board has a similar sensor configuration to the
ROG STRIX B850-I GAMING WIFI, but includes an additional
T-Sensor header. The patch was provided via GitHub [1].

[1] https://github.com/zeule/asus-ec-sensors/pull/105

Signed-off-by: Eugene Shalygin <eugene.shalygin@gmail.com>
Link: https://lore.kernel.org/r/20260607123626.100630-1-eugene.shalygin@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Phase 1: Commit Message Forensics

### Step 1.1: Parse the Subject Line
**Record:** `[hwmon: (asus-ec-sensors)] [add] [ROG STRIX B850-E GAMING
WIFI board support]`

### Step 1.2: Parse All Commit Message Tags
**Record:**
- **Fixes:** — not present (expected for manual review)
- **Reported-by:** — not present
- **Tested-by:** — not present
- **Reviewed-by:** — not present
- **Acked-by:** — not present
- **Link:** `https://lore.kernel.org/r/20260607123626.100630-1-
  eugene.shalygin@gmail.com`
- **Cc: stable@vger.kernel.org:** — not present (expected)
- **Signed-off-by:** Eugene Shalygin `<eugene.shalygin@gmail.com>`
  (author)
- **Signed-off-by:** Guenter Roeck `<linux@roeck-us.net>` (hwmon
  maintainer)
- **Notable:** GitHub reference `[1] https://github.com/zeule/asus-ec-
  sensors/pull/105` in body; no syzbot/fuzzer tags

### Step 1.3: Analyze Commit Body
**Record:**
- **Bug description:** Not a crash/corruption fix. Adds DMI board
  identification and sensor configuration for the ASUS ROG STRIX B850-E
  GAMING WIFI motherboard.
- **Symptom without patch:** `asus-ec-sensors` does not bind on this
  board; no EC-based temperature/fan hwmon sensors are exposed.
- **Root cause:** Board is absent from the driver's `dmi_table[]` and
  has no `ec_board_info` entry.
- **Configuration detail:** Similar to B850-I, but adds
  `SENSOR_TEMP_T_SENSOR` (T-Sensor header) and uses
  `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0` instead of the ACPI
  global lock used by B850-I.
- **Version info:** None in commit message.

### Step 1.4: Detect Hidden Bug Fixes
**Record:** Not a hidden bug fix. This is explicit hardware enablement —
a DMI board-table addition analogous to adding a PCI/USB device ID. No
error-path, locking, refcount, or memory-safety changes.

---

## Phase 2: Diff Analysis

### Step 2.1: Inventory the Changes
**Record:**
- `Documentation/hwmon/asus_ec_sensors.rst`: +1 line (board list)
- `drivers/hwmon/asus-ec-sensors.c`: +10 lines (struct + DMI entry)
- **Total:** ~11 lines added, 0 removed
- **Functions modified:** None; only static data
  (`board_info_strix_b850_e_gaming_wifi`, `dmi_table[]`)
- **Scope:** Single-subsystem, single-driver, surgical data-table
  addition

### Step 2.2: Code Flow Change
**Record:**
- **Hunk 1 (docs):** Adds board name to supported-boards list.
- **Hunk 2 (board_info):** Before → no config for B850-E. After → new
  `ec_board_info` with CPU/CPU package/MB/VRM temps, T-Sensor, CPU_OPT
  fan, SB PCI0 SIO1 mutex, `family_amd_800_series`.
- **Hunk 3 (dmi_table):** Before → DMI match fails for `"ROG STRIX
  B850-E GAMING WIFI"`, `get_board_info()` returns NULL,
  `asus_ec_probe()` returns `-ENODEV`. After → board matches and probe
  proceeds with correct sensor/mutex config.
- **Path affected:** Driver probe on matching DMI hardware only.

### Step 2.3: Bug Mechanism
**Record:**
- **Category:** Hardware enablement / board ID addition (DMI quirk
  equivalent)
- **Mechanism:** Missing DMI entry prevents driver binding; not a
  runtime crash bug. Wrong mutex/sensor map (if guessed from B850-I)
  could cause incorrect EC access — the patch supplies board-owner-
  validated configuration.

### Step 2.4: Fix Quality Assessment
**Record:**
- **Quality:** High. Follows the exact pattern of
  `board_info_strix_b850_i_gaming_wifi` (commit `25b2c02e5b1f8`) and
  other ATX boards using `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0`
  (e.g. `board_info_strix_x670e_e_gaming_wifi`).
- **Regression risk:** Very low — only adds a new DMI match; existing
  boards unaffected.
- **Red flags:** None.

---

## Phase 3: Git History Investigation

### Step 3.1: Blame Changed Lines
**Record:** Commit not yet in this tree. Sister board B850-I was added
by `25b2c02e5b1f8` (2025-07-28, merged via `989253cc46ff3` hwmon-
for-v6.18-rc1). `family_amd_800_series` introduced in `2c8ac03aad7a8`
(ROG STRIX X870E-E GAMING WIFI). All prerequisite infrastructure
predates 6.18.44.

### Step 3.2: Follow Fixes: Tag
**Record:** N/A — no `Fixes:` tag.

### Step 3.3: File History for Related Changes
**Record:** Recent `asus-ec-sensors.c` changes on `stable/linux-6.18.y`
after v6.18.0 are bug fixes only (`ENOMEM` handling, EC read intervals,
bank looping, T_Sensor fix for PRIME X670E-PRO WIFI). No new board
additions were backported post-v6.18.0. B850-I and other boards arrived
via the v6.18-rc1 merge. This commit would be the first post-release
board addition for this driver in 6.18.y, but that is precedent context,
not a disqualifier.

### Step 3.4: Author's Other Commits
**Record:** Eugene Shalygin is an active `asus-ec-sensors` contributor
(e.g. B850-I co-author, multiple board/fix commits). Guenter Roeck is
the hwmon maintainer and committed the patch.

### Step 3.5: Dependent/Prerequisite Commits
**Record:** No series dependency. Requires only existing infrastructure
in this tree:
- `asus-ec-sensors` driver ✓
- `family_amd_800_series` ✓
- `SENSOR_TEMP_T_SENSOR`, `SENSOR_FAN_CPU_OPT` ✓
- `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0` ✓
- B850-I support (`25b2c02e5b1f8`) ✓
Standalone backport.

---

## Phase 4: Mailing List and External Research

### Step 4.1: Original Patch Discussion
**Record:** Lore URL blocked by Anubis bot protection (could not read
thread). GitHub PR #105 (merged 2026-04-18, author `leimh`) confirms
hardware-owner testing; board config includes T-Sensor header and
dedicated hardware mutex. Label `mainlined` added. `b4 dig` without
commit hash failed; `b4 dig -c 25b2c02e5b1f8` worked for the related
B850-I patch only.

### Step 4.2: Reviewers
**Record:** Guenter Roeck (maintainer) Signed-off-by on commit. GitHub
review by `zeule` (asus-ec-sensors maintainer) before merge.

### Step 4.3: Bug Report
**Record:** No formal bug report. Hardware validation via GitHub PR #105
from a B850-E owner. Symptom: missing sensor support, not a kernel oops.

### Step 4.4: Related Patches/Series
**Record:** Standalone 1/1 patch. Related: B850-I addition
(`25b2c02e5b1f8`) already in tree; B850-E extends the same product line
with different sensor/mutex layout.

### Step 4.5: Stable Mailing List History
**Record:** Not searched (lore access blocked). No stable nomination
found in available sources.

---

## Phase 5: Code Semantic Analysis

### Step 5.1: Key Functions
**Record:** No functions modified. Data consumed by `get_board_info()` →
`asus_ec_probe()`.

### Step 5.2: Callers
**Record:** `get_board_info()` called from `asus_ec_probe()` (line
1256). `asus_ec_probe()` is the platform driver probe callback — runs at
boot/module load on ASUS boards with `CONFIG_SENSORS_ASUS_EC=y/m`.

### Step 5.3: Callees
**Record:** `dmi_first_match(dmi_table)` performs string match against
DMI board name; returns `ec_board_info` pointer used for sensor bitmask,
mutex path, and family selection.

### Step 5.4: Call Chain / Reachability
**Record:** Boot-time platform driver probe → DMI match → hwmon device
registration. Reachable on every boot for B850-E owners with the driver
enabled. Not a syscall-triggered path; not unprivileged-user
triggerable.

### Step 5.5: Similar Patterns
**Record:** Identical pattern to B850-I (`25b2c02e5b1f8`), X670E-E,
X870-I, and dozens of other `DMI_EXACT_MATCH_ASUS_BOARD_NAME` entries in
the same file (44 total matches).

---

## Phase 6: Cross-Referencing Against Local Tree

### Step 6.1: Does Buggy/Missing Code Exist?
**Record:** Local tree is **linux-6.18.y at v6.18.44** (`git describe
HEAD` → `v6.18.44`). `B850-E` is **not** present; `B850-I` **is**
present. Without this patch, B850-E users get `-ENODEV` from
`asus_ec_probe()`. All patch dependencies exist.

### Step 6.2: Backport Complications
**Record:** Expected **clean apply**. Insertion anchors verified in
current tree:
- After `board_info_strix_b650e_i_gaming` (lines 575–580)
- Before `board_info_strix_b850_i_gaming_wifi` (lines 582–587)
- DMI table between B650E-I and B850-I entries (lines 775–778)
- Docs between B650E-I and B850-I (lines 30–31)

### Step 6.3: Related Fixes Already Present?
**Record:** No B850-E entry or equivalent fix present. B850-I support
already in tree as the closest reference implementation.

---

## Phase 7: Subsystem and Maintainer Context

### Step 7.1: Subsystem Criticality
**Record:** `drivers/hwmon/` — **PERIPHERAL** (board-specific sensor
driver). Affects only users of `CONFIG_SENSORS_ASUS_EC` on this specific
motherboard.

### Step 7.2: Subsystem Activity
**Record:** Actively maintained; 4 bug-fix backports to this driver
since v6.18.0, plus many board additions in the v6.18-rc1 merge.

---

## Phase 8: Impact and Risk Assessment

### Step 8.1: Who Is Affected
**Record:** **Driver-specific / platform-specific** — owners of ROG
STRIX B850-E GAMING WIFI running `CONFIG_SENSORS_ASUS_EC`.

### Step 8.2: Trigger Conditions
**Record:** Every boot with matching DMI and driver enabled. Common for
target hardware. Not security-relevant; not userspace-triggerable.

### Step 8.3: Failure Mode Severity
**Record:** Without patch: no hwmon sensors (temperature/fan monitoring
unavailable via this driver); probe returns `-ENODEV`. **Severity: LOW**
— functional gap, not crash/corruption/deadlock. Fan control may fall
back to BIOS/EC defaults.

### Step 8.4: Risk-Benefit Ratio
**Record:**
- **Benefit:** Enables correct thermal/fan monitoring on a current AM5
  board for stable-kernel users; validated by hardware owner.
- **Risk:** Very low (~11 lines, data-only, no logic changes).
- **Ratio:** Favorable. Matches the stable-tree exception for
  device/board ID additions explicitly allowed in
  `Documentation/process/stable-kernel-rules.rst`.

---

## Phase 9: Final Synthesis

### Step 9.1: Evidence Summary

**FOR backport:**
- Explicitly allowed by stable rules: "just add a device ID" (`stable-
  kernel-rules.rst` line 15)
- DMI board entry is the hwmon equivalent of a device ID/quirk
- Tiny, surgical, obviously correct
- All prerequisites present in 6.18.44 (driver, `family_amd_800_series`,
  B850-I precedent, mutex path, sensor flags)
- Hardware-validated via GitHub PR #105
- Maintainer (Guenter Roeck) signed off
- Sister board B850-I already supported in this tree

**AGAINST backport:**
- Does not fix a crash, security issue, or data corruption
- No post-v6.18.0 board-addition backports for this driver (only bug
  fixes) — conservative precedent
- Affects a narrow hardware population

**Unresolved:**
- Full lore review thread inaccessible (Anubis block)
- Exact mainline commit SHA not in local tree (not needed for
  applicability assessment)

### Step 9.2: Stable Rules Checklist
1. Obviously correct and tested? **PASS** — pattern proven by sibling
   boards; GitHub PR from hardware owner; maintainer SOB.
2. Fixes a real bug affecting users? **PASS (exception)** — not a
   runtime bug, but stable rules explicitly allow device/board ID
   additions for hardware enablement.
3. Important issue? **PASS (exception)** — hardware quirk/ID category;
   enables monitoring on real production hardware.
4. Small and contained? **PASS** — ~11 lines, 2 files, data only.
5. No new features/APIs? **PASS** — no new APIs; board table entry only.
6. Can apply to local tree? **PASS** — prerequisites present; clean
   insertion points verified.

### Step 9.3: Exception Category
**Record:** Device/board ID addition to an existing driver (DMI quirk
equivalent). Driver `asus-ec-sensors` and `family_amd_800_series`
already exist; only the board entry is new.

### Step 9.4: Decision Rationale

For **linux-6.18.y (v6.18.44)**, this commit should be backported. It is
a minimal DMI board-table addition to an existing, already-shipped
driver — the same category explicitly permitted by stable-kernel rules
alongside PCI/USB ID additions. The B850-E is not covered by the
existing B850-I entry (different mutex path and additional T-Sensor).
Without it, owners of this board on 6.18.y get no `asus-ec-sensors`
support despite the driver and AMD 800-series infrastructure already
being present. Risk is negligible.

---

## Verification

- [Phase 1] Parsed subject, tags, body; no Fixes:/syzbot tags; Link to
  lore present
- [Phase 1] GitHub PR #105 fetched: merged, hardware-owner tested,
  T-Sensor + mutex noted
- [Phase 2] Diff inventory: 2 files, ~11 lines, static data only
- [Phase 2] Read `asus_ec_probe()` lines 1256–1258: `-ENODEV` when
  `get_board_info()` returns NULL
- [Phase 3] `git describe HEAD` → `v6.18.44`; `make kernelversion` →
  `6.18.44`
- [Phase 3] `git log --grep="B850-E"` → no commit in tree; B850-I at
  `25b2c02e5b1f8` confirmed in tree
- [Phase 3] `git blame` lines 582–587 → B850-I added by `25b2c02e5b1f8`
- [Phase 3] `git log v6.18.44 --not v6.18 -- drivers/hwmon/asus-ec-
  sensors.c` → 4 bug-fix backports only, no board additions
- [Phase 4] Lore fetch blocked by Anubis; GitHub PR #105 verified
  instead
- [Phase 4] `b4 dig -c 25b2c02e5b1f8` → B850-I lore URL (related patch
  only)
- [Phase 5] `get_board_info()` at line 1233; `asus_ec_probe()` at line
  1241; DMI table at line 728
- [Phase 5] `family_amd_800_series` case at line 1279 confirmed
- [Phase 6] `grep B850-E` in tree → not found; `grep B850-I` → present
- [Phase 6] Insertion anchor lines 575–587, 775–778, docs 30–31 verified
  by reading files
- [Phase 6] `ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0` used by
  existing boards (e.g. X670E-E line 625)
- [Phase 7] `CONFIG_SENSORS_ASUS_EC` in `drivers/hwmon/Kconfig` line
  2704; built via `drivers/hwmon/Makefile`
- [Phase 8] `Documentation/process/stable-kernel-rules.rst` line 15: "or
  just add a device ID"
- [Phase 8] Failure without patch: `-ENODEV`, no sensors — severity LOW,
  not crash
- UNVERIFIED: Full lore.kernel.org review thread (blocked)
- UNVERIFIED: Exact mainline commit SHA (not in local tree; irrelevant
  to 6.18.y applicability)

**YES**The analysis is complete for **linux-6.18.y (v6.18.44)**.

**Commit:** `hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFI`
**What it does:** Adds a DMI board entry and sensor config (~11 lines)
so the existing `asus-ec-sensors` driver works on the ROG STRIX B850-E
(CPU/MB/VRM temps, T-Sensor, CPU_OPT fan). Sister board B850-I is
already supported in this tree; B850-E is not.

**Verdict: YES** — This is a small board-ID addition to an existing
driver, explicitly allowed under stable rules (“just add a device ID”).
All prerequisites (`family_amd_800_series`, mutex paths, sensor flags)
are present in 6.18.44. Risk is very low; benefit is real hardware
enablement validated via GitHub PR #105.

 Documentation/hwmon/asus_ec_sensors.rst |  1 +
 drivers/hwmon/asus-ec-sensors.c         | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/hwmon/asus_ec_sensors.rst b/Documentation/hwmon/asus_ec_sensors.rst
index a5a58c00c3223..a8456f29db950 100644
--- a/Documentation/hwmon/asus_ec_sensors.rst
+++ b/Documentation/hwmon/asus_ec_sensors.rst
@@ -28,6 +28,7 @@ Supported boards:
  * ROG STRIX B550-E GAMING
  * ROG STRIX B550-I GAMING
  * ROG STRIX B650E-I GAMING WIFI
+ * ROG STRIX B850-E GAMING WIFI
  * ROG STRIX B850-I GAMING WIFI
  * ROG STRIX X570-E GAMING
  * ROG STRIX X570-E GAMING WIFI II
diff --git a/drivers/hwmon/asus-ec-sensors.c b/drivers/hwmon/asus-ec-sensors.c
index 13fd212ad4040..57b771d96d4f0 100644
--- a/drivers/hwmon/asus-ec-sensors.c
+++ b/drivers/hwmon/asus-ec-sensors.c
@@ -579,6 +579,14 @@ static const struct ec_board_info board_info_strix_b650e_i_gaming = {
 	.family = family_amd_600_series,
 };
 
+static const struct ec_board_info board_info_strix_b850_e_gaming_wifi = {
+	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
+		SENSOR_TEMP_MB | SENSOR_TEMP_VRM |
+		SENSOR_TEMP_T_SENSOR | SENSOR_FAN_CPU_OPT,
+	.mutex_path = ASUS_HW_ACCESS_MUTEX_SB_PCI0_SBRG_SIO1_MUT0,
+	.family = family_amd_800_series,
+};
+
 static const struct ec_board_info board_info_strix_b850_i_gaming_wifi = {
 	.sensors = SENSOR_TEMP_CPU | SENSOR_TEMP_CPU_PACKAGE |
 		SENSOR_TEMP_MB | SENSOR_TEMP_VRM,
@@ -774,6 +782,8 @@ static const struct dmi_system_id dmi_table[] = {
 					&board_info_strix_b550_i_gaming),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B650E-I GAMING WIFI",
 					&board_info_strix_b650e_i_gaming),
+	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B850-E GAMING WIFI",
+					&board_info_strix_b850_e_gaming_wifi),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX B850-I GAMING WIFI",
 					&board_info_strix_b850_i_gaming_wifi),
 	DMI_EXACT_MATCH_ASUS_BOARD_NAME("ROG STRIX X570-E GAMING",
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-31 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260831133314.4125787-1-sashal@kernel.org>
2026-08-31 13:26 ` [PATCH AUTOSEL 6.18] modpost: Handle malformed WMI GUID strings Sasha Levin
2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG MAXIMUS Z790 EXTREME Sasha Levin
2026-08-31 13:27 ` [PATCH AUTOSEL 6.18] hwmon: (asus-ec-sensors) add ROG STRIX B850-E GAMING WIFI Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox