Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp730099pxm; Fri, 25 Feb 2022 18:33:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwTQjhiXaKBXGh+bNfJsVDNOk9tbZ1m3oCA2ufwroB7l2fdERz73Zg3voVu77aVjKgI2xRz X-Received: by 2002:a65:52cc:0:b0:374:3ee6:c632 with SMTP id z12-20020a6552cc000000b003743ee6c632mr8452311pgp.91.1645842790736; Fri, 25 Feb 2022 18:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645842790; cv=none; d=google.com; s=arc-20160816; b=rcLfgF/lruMu/svR9yuGuRPJg1S8R+EVYgJK6/DCLwrFqI2IXa2+iNoeVs31tzfPpA WBYHMtzERsX1GaxRM3fc8dSsw4Nql0c5XRgVua8Tr0+4K9cR4wQ5WGMdS5CxUagmrkMH vQPe6eUCDBu4uose5MM9vlthfjawpqn9bPAbOSgoZyqfOsxAY9w1tGVJNZo19Yz2guxA RmNngPOSOZIDhw2M6kCwrKjnJVUubQKBrUnH40BCvEb/6eUFJkXIwEbHqn1X0gj+1EaY pdOxSv7ctiGodR/oby3L2fyEvOJzWjOC1QEh3DZqtiGeDl9AjJ+utMYw+D7GCUjqkUmN GMog== 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=JTYLcwUbreSo2d+DQqXz8u/h/iA9YEA+75XmkkTkj68=; b=XuPmUVcHwLBMOlzxCXHX0RJhck+k2mK+prvZ1Z19TIG+NmvgFhuhievkkr6PPQE5rW A2AlECBJDRPnLNZ6O75ELjamrig2NvgSbBChzq9cvnwjNPexoKCfenkVy5oLcuci7Swh aHRx+5wdxVOzVu6er5aBca7YBQUJUZrvYUPr1RDO0+BuKEy7mOdGZz1FCMU6zhe2a9JD 7dzSztCt8/dOSmjb7/Ck0UsH+HesAnoy5AxQvLiPUGX0Z9nuDQqKJ4D2K2BTe6RYtCjd ARRIUtr+F9uYNRv13saBfQFCoZs1mBBHtLTjf6XZMB6g6mV4yoWDXag/xpd6R9CwRpFC 6xow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=T72zAitS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l136-20020a633e8e000000b003745324eef2si3533648pga.533.2022.02.25.18.33.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:33:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=T72zAitS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 50427F68E7; Fri, 25 Feb 2022 17:59:38 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236662AbiBYVGG (ORCPT + 99 others); Fri, 25 Feb 2022 16:06:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbiBYVGF (ORCPT ); Fri, 25 Feb 2022 16:06:05 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8275A18F22D; Fri, 25 Feb 2022 13:05:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8E629CE27E9; Fri, 25 Feb 2022 21:05:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18C8FC340E7; Fri, 25 Feb 2022 21:05:17 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="T72zAitS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1645823116; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JTYLcwUbreSo2d+DQqXz8u/h/iA9YEA+75XmkkTkj68=; b=T72zAitSXL2dBjYh8loaFFPEbxx65VgYYgcG/gTiVj8HTJ3iELrBYR3EjoB3aaOySWQiWP HavtRjTD0jP3FGuANO8eXwxQ9O5bkAxrsLluPhV4ShprQrAmvc4rb39QazbohqV3iAbbo4 z69rUB41iyQvgjhezrgAU1YxCvjwTQA= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id c415d855 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 25 Feb 2022 21:05:16 +0000 (UTC) Date: Fri, 25 Feb 2022 22:03:01 +0100 From: "Jason A. Donenfeld" To: Alexander Graf Cc: Ard Biesheuvel , ACPI Devel Maling List , Linux Kernel Mailing List , Len Brown , "Rafael J. Wysocki" , Greg KH , "Woodhouse, David" Subject: Re: [PATCH] ACPI: bus: Match first 9 bytes of device IDs Message-ID: References: <20220225155552.30636-1-graf@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Alex, On Fri, Feb 25, 2022 at 08:06:39PM +0100, Alexander Graf wrote: > On 25.02.22 19:39, Jason A. Donenfeld wrote: > > Okay, the final piece, userspace: > > > > /sys/bus/acpi/devices/QEMUVGID:00/modalias gives: > > acpi:QEMUVGID:VM_GEN_COUNTER: > > > > modinfo -F alias vmgenid.ko gives: > > acpi*:VM_GEN_COUNTER:* > > > > udev src uses fnmatch. > > > > Bash confirms a match: > > > > $ [[ "acpi:QEMUVGID:VM_GEN_COUNTER:" == acpi*:VM_GEN_COUNTER:* ]] && > > echo matches > > matches > > > > So I think with ACPI_ID_LEN --> 16 we are good to go. > > > Is the size increase (mostly rodata I suppose? Anywhere else?) measurable? On my test kernel, the size of vmlinux increases from 26918200 bytes to 26918200 bytes. Wait, did I do that test right? I'll try again. Yep, 26918200 -> 26918200, so it doesn't grow at all. I believe the reason is mostly because of: #define ACPI_ID_LEN 16 struct acpi_device_id { __u8 id[ACPI_ID_LEN]; kernel_ulong_t driver_data; __u32 cls; __u32 cls_msk; }; Because of the padding, 9->16 doesn't actually change the way this structure is allocated. Then, additional uses of ACPI_ID_LEN throughout the tree are rather sparse or enclosed within other structures or similar things. In other words, code size seems like very much a non-issue. Also, it's not as though MIPS has ACPI. We're talking about x86, Itanium, and (sometimes, I guess) arm64. Regards, Jason