Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9384538rwp; Thu, 20 Jul 2023 04:17:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlGM9dDONDzCfAtlebv78Xr3mt75ooRa3xtHJhftabuDqQPk36Y3m1ahYGuDaMJngwTuyXnV X-Received: by 2002:a17:906:d7:b0:994:47a5:a377 with SMTP id 23-20020a17090600d700b0099447a5a377mr5421729eji.24.1689851852435; Thu, 20 Jul 2023 04:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689851852; cv=none; d=google.com; s=arc-20160816; b=hTJj5fvQ3IsdGHh8hsk8Qt5ow/1dfgUtkHQVQU/Wrg1Kli6PpiP8UBz4P0GA/eoqmn 5xsz//+bs9biiYcFXzE159iGevojkgxSlHqts7kH3aZpUAcr2V1qBWHQmkJEeZLuyrSX z8J7GEb7E+MR0xo1tCSlzxpph887ypgNicr9OkpLMxV9qjvh4YpoHHSvNAoQ87Rg9KG8 l1YA/jK/V7ul05cQcrY9waAfNmxLfB6UMUvu/OV+DqmLgLBrof82QFcUUgvTfnajqwnx yXXPEvZ1qPlfzTZZMCvr9ISMxHcm7Zi+8qvh77EnGjW9gfQ0W/Vvc1391wHdbccIDwqW 4Qug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=Y2JtQMmANk8Ycv1ygWijsVhzopEKF97I4GcrRrQYLhY=; fh=vug2zQoNlU40N3EuTBan5uRckbXw+ovr92G4tx8AH/I=; b=Dg93m5heNNGLGZCgiBaq68Ka2e7xRKOaUyWC7hc9A42JZ/vO4mUenT5AIBXvVwCxed 4+qPytmG7yDVG6yS++pVbZwB4ikyKK5hdH7taC3hw63FialMN957huv40yuRbDMdHebf PNEhUFpoHj73mOPg9WppRa75OYuH4RtlTRia4w+qA2F5ZqHwg/C1DEmsoIwxvEHxkcGa 8y5K0pTOcp0Gq0Omg0CHmLrXlSi2gnl0BC2TTFAEjb5oM2MRisMls88tGxPLSa0x0LB0 63Xx7EJjZRsOOQV6B0STp9f4K8ycxxO+aCuWPLDTfvuumqdFw1FVzyGigq8GaMHeVdIp 5enA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=ifiSn1BV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r16-20020a170906a21000b0099b49483268si561121ejy.301.2023.07.20.04.17.07; Thu, 20 Jul 2023 04:17:32 -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=@protonmail.com header.s=protonmail3 header.b=ifiSn1BV; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbjGTKmk (ORCPT + 99 others); Thu, 20 Jul 2023 06:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbjGTKmj (ORCPT ); Thu, 20 Jul 2023 06:42:39 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E71910F1; Thu, 20 Jul 2023 03:42:38 -0700 (PDT) Date: Thu, 20 Jul 2023 10:42:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689849754; x=1690108954; bh=Y2JtQMmANk8Ycv1ygWijsVhzopEKF97I4GcrRrQYLhY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=ifiSn1BVQhYuF6auOiOe5xF4+dOBSMI5GX8fKT/+2qrBFGS8+RYiUgRzBvHyLJpU7 9vKNWuClzGiMUHSy+1He0DiT4ch14w1Bz3gnhfOVDMksEK6IzYKWaUfd0BjhJruH3N QjtsrwtIQHdbIovCpuULiJByjFYiet4/c4njYrmE0UIPXxYg7lkEEnq2NCySCqZf2V SYdkdupFOIUHkvLpFaT/Xk2Ej06PIHTK7lrnP3vo7+O/JhhP/oR0agsmakuAVQvhsW ecSET+iklcOJszEiSZ5FK4ooUf0M2UFnRkfsZONUH5EeaFzK8phKrYNnXniWM0QTKI rOP3V9YWPOxYA== To: Andy Shevchenko From: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Cc: linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Mark Gross , Hans de Goede , Armin Wolf Subject: Re: [RFC PATCH v1] platform/x86: wmi: Do not register driver with invalid GUID Message-ID: <_szgAop-lIsQt90xoCYXQbiJtrQclFitfhE2ak2omTiPCx37toqB4lq7OTmBD_vMEn6TonpAns5NgVH1xFpGQLyuLkd0pOGwRqrB8C9INRw=@protonmail.com> In-Reply-To: References: <20230715211604.1272227-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 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 Hi 2023. j=C3=BAlius 20., cs=C3=BCt=C3=B6rt=C3=B6k 10:36 keltez=C3=A9ssel, And= y Shevchenko =C3=ADrta: > On Wed, Jul 19, 2023 at 07:23:37PM +0000, Barnab=C3=A1s P=C5=91cze wrote: > > 2023. j=C3=BAlius 17., h=C3=A9tf=C5=91 13:31 keltez=C3=A9ssel, Andy She= vchenko =C3=ADrta: > > > On Mon, Jul 17, 2023 at 11:23:50AM +0000, Barnab=C3=A1s P=C5=91cze wr= ote: > > > > 2023. j=C3=BAlius 17., h=C3=A9tf=C5=91 11:49 keltez=C3=A9ssel, Andy= Shevchenko =C3=ADrta: > > > > On Sat, Jul 15, 2023 at 09:24:16PM +0000, Barnab=C3=A1s P=C5=91cze = wrote: >=20 > ... >=20 > > > > > Besides using wrong API (uuid_*() vs. guid_*() one), I don't > > > > > > > > As far as I can see `guid_parse()` also uses `uuid_is_valid()`, the= format is the same. > > > > > > Then add guid_is_valid() to complete the API. Perhaps with the renami= ng the > > > common part to something else. > > > > But that would be the exact same function. GUIDs are UUIDs, aren't they= ? >=20 > Yes and no. If we want to validate the respective bit for GUID vs. UUID, = they > will be different. Currently they are the same as validation is relaxed i= n the > kernel. I see. Regardless, that is the only check `guid_parse()` does, so I don't t= hink it is unreasonable to have only that check for the time being. >=20 > > > > > think we need to validate it here. Why not in file2alias.c? > > > > > [...] > > > > > > > > 1) that seems like a more complicated change (duplicating `uuid_is_= valid()`?); > > > > 2) that will only check the GUIDs specified by `MODULE_DEVICE_TABLE= ()`. > > > > > > > > Arguably the second point is not that significant since most users = will indeed > > > > use `MODULE_DEVICE_TABLE()`. But I think the first point has some m= erit. And > > > > furthermore, I think this check should be here regardless of whethe= r file2alias.c > > > > also contains an equivalent/similar check. > > > > > > Why do we need it? We never match against wrong GUID from ACPI, since= it would > > > be very weird ACPI table. > > > [...] > > > > The point is to catch typos in drivers' WMI ID tables. >=20 > Yes, that's what file2alias is for. We trust modules we build, right? > If you don't trust, then we have much bigger problem than this patch > tries to address. > [...] It seems we have to agree to disagree then. Regards, Barnab=C3=A1s P=C5=91cze