Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp592926rwo; Fri, 21 Jul 2023 18:00:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGVCdcZiUmTQJNeZciI7jgp8aMiC2PYjAYAhZS/LaPUmwvCkOYgdTQq+QMLQy9RY1BMdoOU X-Received: by 2002:aa7:c6d1:0:b0:51e:f9f:460a with SMTP id b17-20020aa7c6d1000000b0051e0f9f460amr3276387eds.4.1689987655825; Fri, 21 Jul 2023 18:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689987655; cv=none; d=google.com; s=arc-20160816; b=d78ckDiO+pV61hTgZUYnVBfhvB42WCWrcDQwEzicR3NYUsAHDhQw0jUhG3INs3kuFO K9V7yE7LrWRjnQBjxnSRarNtXUpu5GXsLqGM7hHrlX4Iemtdw4KPmRPEba8qud9jla0C TZJSTt7QYts3rRZjUbrf4806cLQ+4Z6wDB+2J3ddo/YcXp7RV6yTh62KNHy1PNhdSpan 4sjWi6zxDka7LO8oxDNRFOg/ASp6lUeedJuX+imzCaEGjRezmqRlp1C4qnLTTQbd4ync wJmdDTIunYY49Pr/nkYoO9X18z9JieY9mQRoEur2sbLw86h2lx8EAhpnIZyhGtM9FjPu ZZuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-language :content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:to:dkim-signature; bh=K7v4oJ8bdkwFUPWX9U+8bpz7Y/cvFtbhuun3p54pee0=; fh=dzRchVJv+psxqlrnzgzyFWtQd+ow0S4iz03Dy7/NEqc=; b=T3mGqOi7YTp9DsxmjC54+Q2lP9w8AGR/3nm4mAMq75fRQWtF5Z1WvY9IYCGhtBkIxh L8aX182M6NzcMburbkyiwRFNqEDGQvq4xeqqA78xmwmZBdImLKGgE7tgeWjn1zQvkV3t apsfUAXzFDbsPSmFB27iwKV0Ebbj4VfxIL2qQ5QnfGszK8kR8JF3+PqW+4i4twMggavB 9YowosHfuRjWxti1s7RVXW5kW0fDCI7z/zecqzqcNN5ujv2Sy6mvEw0dvH+bKQ6JXbvO 14zHhj4TYWHvEH62JQivQnyFZyap6vecmabhOkYysJ8fxGEicf46s3niFif8yApUhRhA NEjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=qwKRhfgh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c24-20020aa7df18000000b0051dece5afcesi3006489edy.225.2023.07.21.18.00.30; Fri, 21 Jul 2023 18:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=qwKRhfgh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230106AbjGVAJR (ORCPT + 99 others); Fri, 21 Jul 2023 20:09:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229533AbjGVAJQ (ORCPT ); Fri, 21 Jul 2023 20:09:16 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AD0C30FF; Fri, 21 Jul 2023 17:09:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1689984553; x=1690589353; i=w_armin@gmx.de; bh=K7v4oJ8bdkwFUPWX9U+8bpz7Y/cvFtbhuun3p54pee0=; h=X-UI-Sender-Class:To:From:Subject:Date; b=qwKRhfghIa3keHMzx4uSFavLV4CO/ROdE/39zcMNui9uRJvQl5FnR+xG+bQ0ANHoxZjdo1d vpgX9ySRQ6X7Xj8OQlIEqD+xT/cOMbu5OvZu2tUIk+roni2wAVMM3jfc96zn42qvAEMRYkn+x pE6ubj5wG7ijk+L5D97T4I0WFKc0a64omALaFom58Hi4HpccwvVRpQvnv7VucTOtvfBGlRLYK pTya5W20i23696QtA2woG9xsc2YP3K11/+yKGEiCGJQ8tUaPMDLaALqHGTk13/sN7gVMzzhS3 fRi6qu4fHAXt0V7mHYNZRTglQXx49XkAY5swSojd+bE4AnWWJFrA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [141.30.226.129] ([141.30.226.129]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MSKuA-1qThDt1SbA-00Sdzc; Sat, 22 Jul 2023 02:09:13 +0200 To: "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" From: Armin Wolf Subject: WMI probe failure when reprobing Message-ID: <1252c8fb-8d5f-98ad-b24a-5fabec2e1c8b@gmx.de> Date: Sat, 22 Jul 2023 02:09:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Provags-ID: V03:K1:ieJ3CecbsjmP11vfKIEAPflCd7vibaLKj4sekxzv5yerJQjjw2l E80/JeqZPifOz4f5gvvepLlGpQMVXNAoD2TdhRXnh5cqmpw9cljCh9LmzSJ6JA+3n3tHdo4 Z1oBA/+bptEgHJCu+Z9bRKjKcvsqA82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rFfGBuNVAz 4W++SFgM4SXnSpk2gOIg726BE8M= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, i just noticed that under some circumstances, ACPI WMI devices might fail to reprobe when being manually unbound and later rebound. Example: 1. ACPI WMI device #1 binds and registers WMI device with GUID "05901221-D566-11D1-B2F0-00A0C9062910", resulting in the device being named "05901221-D566-11D1-B2F0-00A0C9062910". 2. ACPI WMI device #2 binds and registers WMI device with GUID "05901221-D566-11D1-B2F0-00A0C9062910", resulting in the device being named "05901221-D566-11D1-B2F0-00A0C9062910-1". 3. ACPI WMI device #1 is manually unbound and later rebound, now the WMI device with GUID "05901221-D566-11D1-B2F0-00A0C9062910" is being named "05901221-D566-11D1-B2F0-00A0C9062910-1" too, since device naming depends on the number of GUIDs currently known to the WMI subsystem. 4. A WMI device named "05901221-D566-11D1-B2F0-00A0C9062910-1" already exists, causing the registration of the new WMI device to fail. I thought about some possible ways to solve this naming issue: - symlinks to simulate old WMI devices names, new WMI device names similar to "wmiX" with X being a global unique id - no symlinks, new WMI device names similar to "wmiX" with X being a global unique id - use global id instead of GUID number The first approach has full sysfs backward compatibility but i do not know how to create symlinks inside the "devices" directory. The second approach is the easiest and cleanest one, but provides no sysfs backward compatibility. The last approach provides only limited sysfs backward compatibility and only for programs which can handle "-X" WMI device names. Currently, there is one single stable sysfs ABI entry concerning the WMI subsystem (for wmi-bmof), and two testing sysfs ABI entries (dell-wmi-privacy, sbl-fw-update). I do not know of any userspace programs relying on these ABIs, but i suspect there might be a couple of scripts which might be affected. Which approach should i take to solve this problem? Armin Wolf