lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c9acadcd3e19e7dafb8ba4cf1f0abb0200b18b1a.camel@intel.com>
Date:   Wed, 11 Jan 2023 07:25:10 +0000
From:   "Zhang, Rui" <rui.zhang@...el.com>
To:     "rjw@...ysocki.net" <rjw@...ysocki.net>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Chen, Yu C" <yu.c.chen@...el.com>
Subject: Re: [PATCH v1] ACPI: PNP: Introduce list of known non-PNP devices

On Tue, 2023-01-10 at 18:58 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> In some cases, PNP device IDs from acpi_pnp_device_ids[] are returned
> by
> _CID for devices for which matching platform drivers are present in
> the
> kernel and should be bound to them.  However, the IDs coming from
> _CID
> cause the PNP scan handler to attach to those devices which prevents
> platform device objects from being created for them.
> 
> Address this by introducing a list of known non-PNP device IDs into
> acpi_pnp.c such that if a device ID is there in that list, it cannot
> be
> attached to by the PNP scan handler and add the platform runtime
> update
> and telemetry device IDs to that list to start with.
> 
> Reported-by: Chen Yu <yu.c.chen@...el.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> ---
>  drivers/acpi/acpi_pnp.c |   14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> Index: linux-pm/drivers/acpi/acpi_pnp.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/acpi_pnp.c
> +++ linux-pm/drivers/acpi/acpi_pnp.c
> @@ -348,10 +348,22 @@ static bool acpi_pnp_match(const char *i
>  	return false;
>  }
>  
> +/*
> + * If one of the device IDs below is present in the list of device
> IDs of a
> + * given ACPI device object, the PNP scan handler will not attach to
> that
> + * object, because there is a proper non-PNP driver in the kernel
> for the
> + * device represented by it.
> + */
> +static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
> +	{"INTC1080"},
> +	{"INTC1081"},
> +	{""},
> +};
> +
>  static int acpi_pnp_attach(struct acpi_device *adev,
>  			   const struct acpi_device_id *id)
>  {
> -	return 1;
> +	return !!acpi_match_device_ids(adev, acpi_nonpnp_device_ids);

acpi_match_device_ids() returns True if the id matches, and in this
case, acpi_pnp_attach() should return false, right?

thanks,
rui

>  }
>  
>  static struct acpi_scan_handler acpi_pnp_handler = {
> 
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ