From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752270AbdJFQr2 (ORCPT ); Fri, 6 Oct 2017 12:47:28 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:45639 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbdJFQr0 (ORCPT ); Fri, 6 Oct 2017 12:47:26 -0400 Date: Fri, 6 Oct 2017 09:47:24 -0700 From: Darren Hart To: Andy Shevchenko Cc: Hans de Goede , Andy Shevchenko , Kai Heng Feng , Platform Driver , "linux-kernel@vger.kernel.org" , stable@vger.kernel.org Subject: Re: [PATCH] platform/x86: peaq-wmi: Add DMI check before binding to the WMI interface Message-ID: <20171006164724.GD12321@fury> References: <20171005180404.15044-1-hdegoede@redhat.com> <20171005180404.15044-2-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 05, 2017 at 09:19:23PM +0300, Andy Shevchenko wrote: > On Thu, Oct 5, 2017 at 9:04 PM, Hans de Goede wrote: > > It seems that the WMI GUID used by the PEAQ 2-in-1 WMI hotkeys is not > > as unique as a GUID should be and is used on some other devices too. > > > > This is causing spurious key-press reports on these other devices. > > > > This commits adds a DMI check to the PEAQ 2-in-1 WMI hotkeys driver to > > ensure that it is actually running on a PEAQ 2-in-1, fixing the > > spurious key-presses on these other devices. > > Thanks! > > One comment though. > > > static void __exit peaq_wmi_exit(void) > > { > > + if (!dmi_check_system(peaq_dmi_table)) > > + return; > > + > > if (!wmi_has_guid(PEAQ_DOLBY_BUTTON_GUID)) > > return; > > I was thinking, after got kbuid bot complains on Kai's patch on > sections mismatch, do we need these checks at all? > How would be possible to get a module loaded in the first place if > system is not in whitelist? > I was wondering this myself. -- Darren Hart VMware Open Source Technology Center