Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5453218rwp; Mon, 17 Jul 2023 04:36:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlGclamA5kEnrlPpfwR6Om8i8Vzi+ty4mKby7Whzp9WqvGmOeoveCw3ylCtcnwwZ4TGNNY/l X-Received: by 2002:a05:6a20:734d:b0:134:15df:b148 with SMTP id v13-20020a056a20734d00b0013415dfb148mr8964824pzc.29.1689593804624; Mon, 17 Jul 2023 04:36:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689593804; cv=none; d=google.com; s=arc-20160816; b=BkCac+u9pZLsx6MDhWxTb9zNqOc/gqyBjlSuyZ7cJKQZaWa4/B1tt9X/u08zPEVxQP eEYjr+eefrF0ikjf/MZg7Jykf/2wcVAC43W/qC/sk5qt3SbJiAXe3H3JQvQBGjW7sWTq I7hG1vls19FRPYH1wlD50URvNE0GI9y3K/I5kH/+n8XvjslYOOg2eiSaPmwPS+/UxAT5 pnfnfyRgLVb0cbJXUlfwx9QFAKq3+EzSEP8hy9SKtGOgtSvvJDlc8OhNVggb3qgvvlIU 4Djq/t/873EVoYJ8BJr6HUh+4ZoBD4MXH+20wsI1WUIOOYgx7vLCHDhbe0TGP/vV92mv GxWw== 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=VisGer6pcwmKhIhRJUINjYI7Kih/EL7BPAocL+KcM+s=; fh=vug2zQoNlU40N3EuTBan5uRckbXw+ovr92G4tx8AH/I=; b=UJf4jIGHw5uWXjdxLOCI0j9UJ5FNXcIPhDYZopqYC9JlpbYvySFVG9ZASzynwjpV49 u6TUgKi2ksXCIBMF+bOXHPxhowHS/fvrXbtQO3CF/kLZ+5jvMNW6p/5L6bWsskQ8MloQ 3sOzKHNEHk2EhZjaVnIBRrXbWlBqf6tLgKI4qtPKUThSDjoSVfGXDB4NjUKjKYsf3yEz 4kMMCmJXmMcB1FKWlX+zLuKdYVolCzpd19kfDprWJcz7euT4qnaW4z1LOq6CDG0DgZVG oyMGge9K2w/ZfC3EoccHaVm8LgT0mw2FEFArPREU0apgLi3QQZd1XtVNLhwJtgByI0jZ Y3nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=fgvP9bzd; 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 m16-20020a63fd50000000b0053b8c98d14bsi11484815pgj.859.2023.07.17.04.36.31; Mon, 17 Jul 2023 04:36:44 -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=fgvP9bzd; 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 S229537AbjGQLYF (ORCPT + 99 others); Mon, 17 Jul 2023 07:24:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjGQLYD (ORCPT ); Mon, 17 Jul 2023 07:24:03 -0400 Received: from mail-0201.mail-europe.com (mail-0201.mail-europe.com [51.77.79.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B614E4E; Mon, 17 Jul 2023 04:24:02 -0700 (PDT) Date: Mon, 17 Jul 2023 11:23:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1689593039; x=1689852239; bh=VisGer6pcwmKhIhRJUINjYI7Kih/EL7BPAocL+KcM+s=; 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=fgvP9bzdaHZScJHTz1babtwqmTkgM5nVhVbBss/+nV6qwYqhhQ4BiTgvblRhHttyt iUfm3efyWdPEpZbwZDYEKthJLfAGe1Yujaofc5UU7Bopcq89GZnYawjeDl3J86GJu8 Dj42noCgN+Y12rLguXbapC/pTDTw+4mrxGlk7EYLPiZfzlTrWVdDxMVsUauYNmewrx +zwG1nRpSHo/+W6qc6d2/ZJNhAEFbz8bfC3ymlEOEH0zgyUg5LFkR9GlCBVBaFYgfR FEhJYvCIK8yiTA9f4fKMXwYjalWkJrbcZrsW2GGjW9O93VXkL9rtnV5uL8UOwgtwnd DFHQrFQs2iGqg== 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: 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 17., h=C3=A9tf=C5=91 11:49 keltez=C3=A9ssel, Andy Shevche= nko =C3=ADrta: On Sat, Jul 15, 2023 at 09:24:16PM +0000, Barnab=C3=A1s P=C5=91cze wrote: > > Since a WMI driver's ID table contains strings it is relatively > > easy to make mistakes. At the moment, there is no feedback > > if any of the specified GUIDs are invalid (since > > 028e6e204ace1f080cfeacd72c50397eb8ae8883). > > > > So check if the GUIDs in the driver's ID table are valid, > > print all invalid ones, and refuse to register the driver > > if any of the GUIDs are invalid. >=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. > 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 ind= eed use `MODULE_DEVICE_TABLE()`. But I think the first point has some merit. An= d furthermore, I think this check should be here regardless of whether file2a= lias.c also contains an equivalent/similar check. Regards, Barnab=C3=A1s P=C5=91cze