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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jan 2022 17:45:08 +0200
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Andy Pont <andy.pont@...systems.com>
Cc:     Paul Menzel <pmenzel@...gen.mpg.de>,
        Zha Qipeng <qipeng.zha@...el.com>, linux-kernel@...r.kernel.org
Subject: Re: mfd/intel_pmc_bxt: `intel_pmc_get_resources()` results in page
 fault

Hi,

On Tue, Jan 25, 2022 at 02:54:53PM +0000, Andy Pont wrote:
>    Hello Mika
> 
>    `intel_pmc_get_resources()` does not set the name member in the
>    `resource`
> 
>    struct `gcr_res` resulting in a page fault.
> 
> 
> 
>    On which system you reproduce this,
> 
> 
> 
>    The dump contains the name:
> 
> 
> 
>    Hardware name: Star Labs Lite/Lite, BIOS 8 01/24/2022
> 
>    The Star Labs Lite platform is based on the Gemini Lake N5000 CPU and
>    the test hardware is running Ubuntu 20.04 (Ubuntu
>    5.13.0-27.29~20.04.1-generic 5.13.19).
> 
>    and how?
> 
>    It happens every system boot.  The boot process is coreboot, tianocore
>    as a payload then Ubuntu.
> 
>    Can you also share ACPI dump from that system.
> 
>    I have attached the dsdt.asl file from the coreboot build process.

Thanks! The dump looks OK to me wrt. the PMC device. However, I think I
found the bug.

Can you try if the below hack fixes the issue?

diff --git a/drivers/mfd/intel_pmc_bxt.c b/drivers/mfd/intel_pmc_bxt.c
index 9f01d38acc7f..96a0aa316925 100644
--- a/drivers/mfd/intel_pmc_bxt.c
+++ b/drivers/mfd/intel_pmc_bxt.c
@@ -304,7 +304,7 @@ static int intel_pmc_get_resources(struct platform_device *pdev,
 				   struct intel_pmc_dev *pmc,
 				   struct intel_scu_ipc_data *scu_data)
 {
-	struct resource gcr_res;
+	struct resource gcr_res = {};
 	size_t npunit_res = 0;
 	struct resource *res;
 	int ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ