Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2478329pxb; Mon, 18 Jan 2021 20:34:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3DSmRrrRCO64pSjvmA9C4ZxQEy9/2p/p8JpTwxDHU3gareUyX1ddnlL3u3VJOBJL08ZGF X-Received: by 2002:a17:906:4bc1:: with SMTP id x1mr1770538ejv.509.1611030886841; Mon, 18 Jan 2021 20:34:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611030886; cv=none; d=google.com; s=arc-20160816; b=dV4HVtHjfU2KurWlGdWHe3VcLbuB0YYuHZK/HoRGomexoksEhzHwOMPxdKPow+AoIK 3lHOpo2MgWRblqFqR4l04v5+q65isqHeVsOCimRfrqt0NQgc+deW1nV4Jq48ZS5ZSzqL i72hCqLvjwhmM4tT+1oTjME06OUsjUU8v2sGKVTqsNEa6SH228ZW5fRbh9h9TqE2UUOi PqNC/qMKPFQ8B7IWYyDtOFtJctRqemoKhEjpP75oC+A+TLDC4or58op78E9W+rdfq7W6 Y2f6yOsmgOqn/+QE/Vdh/5vnSlJ8coU863XkvF9XnWflb/lMI3T2sB/2x8CqKSECRpKP X1jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=6mRQZmz0qJCRPm/rrB2vCwY8p7DQa9FSZobWEdZt2AA=; b=mmTOMJ/VBu8kL1PYvTYF5HqsrsWMcbzN8KuXkZptSivPDA1VDvCMKJ9qL1FMpNXNPK +/gNeV9cjxgYehKrcndghn9ARUGAw6n2B76x1c374fcVu88UUsGWT+OZ5tF/hBMsdVag XEAsjvEUU46tkbqNNw0tM/x1NJiAt5CwKqIhA44Tr+B0oQiTHcUC/35A6P6YP5hpOuDw VSlIB5aoGf6q/eDoRUw/ti4vrzz2/qXK7cS4eMqXdccXmEnDHTxa3kTJzTMniVa7xxlH dOrwYvn2ItTi9N5HtaFMQmucuPkHxs3IzrYblPP7ykkmQIKC5G7byqhl5R8jSeWtMkxg INqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si8604547edp.96.2021.01.18.20.34.24; Mon, 18 Jan 2021 20:34:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405029AbhAROuG (ORCPT + 99 others); Mon, 18 Jan 2021 09:50:06 -0500 Received: from mga11.intel.com ([192.55.52.93]:17924 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404931AbhAROtu (ORCPT ); Mon, 18 Jan 2021 09:49:50 -0500 IronPort-SDR: yjHuIjZYexVBLrdRaDEbxUJBTqnYI9f91FI5XEJegu1QHggbG+Xm7/WduZ1gUZ0BjSYsogCyDq 8aH/6wtnB8AA== X-IronPort-AV: E=McAfee;i="6000,8403,9867"; a="175308915" X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="175308915" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 06:47:55 -0800 IronPort-SDR: N/OSbmJvnlaGgpYrSXnAv/OjRKOfNSJM5Gc3BHlsoFqmvDKrF8LzD08qoJhOibcT+CIs8kkOK2 CYq5Albn+NeQ== X-IronPort-AV: E=Sophos;i="5.79,356,1602572400"; d="scan'208";a="406240133" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2021 06:47:52 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l1Vpt-002FaL-U8; Mon, 18 Jan 2021 16:48:53 +0200 Date: Mon, 18 Jan 2021 16:48:53 +0200 From: Andy Shevchenko To: Greg Kroah-Hartman Cc: Mika Westerberg , "Rafael J. Wysocki" , Kai-Heng Feng , lennart@poettering.net, ACPI Devel Maling List , LKML Subject: Re: Multiple MODALIAS= in uevent file confuses userspace Message-ID: <20210118144853.GP4077@smile.fi.intel.com> References: <20210118141238.GQ968855@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 18, 2021 at 03:26:28PM +0100, Greg Kroah-Hartman wrote: > On Mon, Jan 18, 2021 at 04:12:38PM +0200, Mika Westerberg wrote: > > On Mon, Jan 18, 2021 at 02:50:33PM +0100, Rafael J. Wysocki wrote: > > > On Mon, Jan 18, 2021 at 8:27 AM Kai-Heng Feng > > > wrote: > > > > On Sat, Jan 9, 2021 at 12:25 AM Kai-Heng Feng > > > > wrote: > > > > > > > > > > Commit 8765c5ba19490 ("ACPI / scan: Rework modalias creation when > > > > > "compatible" is present") creates two modaliases for certain ACPI > > > > > devices. However userspace (systemd-udevd in this case) assumes uevent > > > > > file doesn't have duplicated keys, so two "MODALIAS=" breaks the > > > > > assumption. > > > > > > > > > > Based on the assumption, systemd-udevd internally uses hashmap to > > > > > store each line of uevent file, so the second modalias always replaces > > > > > the first modalias. > > > > > > > > > > My attempt [1] is to add a new key, "MODALIAS1" for the second > > > > > modalias. This brings up the question of whether each key in uevent > > > > > file is unique. If it's no unique, this may break may userspace. > > > > > > > > Does anyone know if there's any user of the second modalias? > > > > If there's no user of the second one, can we change it to OF_MODALIAS > > > > or COMPAT_MODALIAS? > > > > The only users I'm aware are udev and the busybox equivalent (udev, > > mdev) but I'm not sure if they use the second second modalias at all so > > OF_MODALIAS for the DT compatible string sounds like a good way to solve > > this. > > As udev seems to "break" with this (which is where we got the original > report from), I don't think you need to worry about that user :) > Does anyone use mdev anymore, and in any ACPI-supported systems? Yes, regularly. -- With Best Regards, Andy Shevchenko