Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2479080pxb; Mon, 18 Jan 2021 20:36:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyBM7R7wm3kk36kJxaIYTYTHMYZqLxkikNAkybOzneJAAXijQKExekWopfOLYfIcDr7KPJM X-Received: by 2002:a05:6402:388:: with SMTP id o8mr1888060edv.359.1611030993220; Mon, 18 Jan 2021 20:36:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611030993; cv=none; d=google.com; s=arc-20160816; b=kt+ZfGegnIhN8LwHY1cbQUPSWjWc6TbIURILJL1vA5mBSj3tic5WxirUJJDAWunwC9 wvkzmRENpi7d5GLfY5JiHXmCbeZUK4RdRr9wnH4TnY9AWTMO24OmRHESiWgVxeRQUiig k0SMeq73U57OjlzIw97725qr1Ak5q7TTofSRzy2kWiChs4fxVf1/eOpno5N1hWi8r2nd U7iKfitPoab24+T/9UFAWIZXxk7twq6DYYC0q6wsTTBKsnrCY2bUSdMM02XPE7d98XyX TrQtAyPrfngkFN0ECDpKKyg24GkqwNHIJDTlBKRzMIt0dzgQiTSN03YddW3gpWb5s3zv I3JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mSeANgkAplz/QWYQyDpzS6mOMOgD4PbM2Zbxp3O7jHc=; b=NEX23s6upcx/r8sEGDvena7RO19rZL+Jq1D4tyNrolpFvkhL/C1Rg8YurIlFwQWURH 2SntgCy3J4QFKqENqNJ2VIOjc64FVtB4CREgK4LG4WcFUVWTwKqtAdavydFtJmFwT7L5 qASD71Ge+ok+aQEJjUCyIIsRdQWXxSqasBE0b7lihKvY4ZeJjt3mAgcv0tr98AFzUonS 8XxF1767wCaag+8xZAjpmXPq4nK47kexDulwRMTkWtpaA+qSUWvki+ZjgZ8Jiip6u5nd lrLkHZghUbEZP4enlYcyyCjKqQiGwbah757+NoqWFJnT4cY7sUUEWnUTWAcJDvOkeQHk v21w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LzyfKaPV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si8635830edm.386.2021.01.18.20.36.10; Mon, 18 Jan 2021 20:36:33 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LzyfKaPV; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2393109AbhARO72 (ORCPT + 99 others); Mon, 18 Jan 2021 09:59:28 -0500 Received: from mail.kernel.org ([198.145.29.99]:51404 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393088AbhARO7C (ORCPT ); Mon, 18 Jan 2021 09:59:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BCFAF22C7E; Mon, 18 Jan 2021 14:58:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610981901; bh=nh5KakTK6nTSgE6PtzTNzNznKC5ibgWCISjQhk0kTsA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LzyfKaPVnpa7W9U9p8yK5Gg7abCBOku3OUsP8ZijR04c9zrMXFLkPHFqZLGxHWP5E X+ZFlhny43fdMOkjqHkDBRQR9i9OpakW9pPLEZNJidMO+OB46d6WJvYhCYJqkxQti4 cZlQfHEKanVkrtkO2zRv66ft+IeLGDQxMXwT/U7k= Date: Mon, 18 Jan 2021 15:58:18 +0100 From: Greg Kroah-Hartman To: Andy Shevchenko 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: References: <20210118141238.GQ968855@lahna.fi.intel.com> <20210118144853.GP4077@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210118144853.GP4077@smile.fi.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 18, 2021 at 04:48:53PM +0200, Andy Shevchenko wrote: > 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. Ok, and how badly does it break when MODALIAS is multiple lines like this? Or can it handle it? thanks, greg k-h