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: <d152f185-d34f-4a06-be85-9bffd10175fc@linux.intel.com>
Date: Sun, 25 Feb 2024 22:41:33 -0800
From: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
To: Armin Wolf <W_Armin@....de>, Shyam-sundar.S-k@....com,
 mika.westerberg@...ux.intel.com
Cc: hdegoede@...hat.com, ilpo.jarvinen@...ux.intel.com,
 platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] platform/x86/amd/pmf: Add missing __iomem
 attribute to policy_base


On 2/23/24 8:38 AM, Armin Wolf wrote:
> The value of policy_base is the return value of a devm_ioremap call,
> which returns a __iomem pointer instead of an regular pointer.
> Add the missing __iomem attribute.
>
> Compile-tested only.
>
> Signed-off-by: Armin Wolf <W_Armin@....de>
> ---
Looks good to me.

Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@...ux.intel.com>
>  drivers/platform/x86/amd/pmf/pmf.h    | 2 +-
>  drivers/platform/x86/amd/pmf/tee-if.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmf/pmf.h b/drivers/platform/x86/amd/pmf/pmf.h
> index 16999c5b334f..bcf777a5659a 100644
> --- a/drivers/platform/x86/amd/pmf/pmf.h
> +++ b/drivers/platform/x86/amd/pmf/pmf.h
> @@ -229,7 +229,7 @@ struct amd_pmf_dev {
>  	struct delayed_work pb_work;
>  	struct pmf_action_table *prev_data;
>  	u64 policy_addr;
> -	void *policy_base;
> +	void __iomem *policy_base;
>  	bool smart_pc_enabled;
>  };
>
> diff --git a/drivers/platform/x86/amd/pmf/tee-if.c b/drivers/platform/x86/amd/pmf/tee-if.c
> index f8c0177afb0d..16973bebf55f 100644
> --- a/drivers/platform/x86/amd/pmf/tee-if.c
> +++ b/drivers/platform/x86/amd/pmf/tee-if.c
> @@ -346,7 +346,7 @@ static int amd_pmf_get_bios_buffer(struct amd_pmf_dev *dev)
>  	if (!dev->policy_base)
>  		return -ENOMEM;
>
> -	memcpy(dev->policy_buf, dev->policy_base, dev->policy_sz);
> +	memcpy_fromio(dev->policy_buf, dev->policy_base, dev->policy_sz);
>
>  	amd_pmf_hex_dump_pb(dev);
>  	if (pb_side_load)
> --
> 2.39.2
>
-- 
Sathyanarayanan Kuppuswamy
Linux Kernel Developer


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ