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: <fff39213-5824-4bd6-f0cd-699358eb5361@huawei.com>
Date:   Sat, 3 Jun 2023 15:42:29 +0800
From:   Hanjun Guo <guohanjun@...wei.com>
To:     Robin Murphy <robin.murphy@....com>, <will@...nel.org>
CC:     <mark.rutland@....com>, <suzuki.poulose@....com>,
        <bwicaksono@...dia.com>, <ilkka@...amperecomputing.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Sudeep Holla <sudeep.holla@....com>
Subject: Re: [PATCH 2/4] ACPI/APMT: Don't register invalid resource

On 2023/6/1 19:59, Robin Murphy wrote:
> Don't register a resource for the second page unless the dual-page
> extension flag is actually present to say it's valid.
> 
> CC: Lorenzo Pieralisi <lpieralisi@...nel.org>
> CC: Hanjun Guo <guohanjun@...wei.com>
> CC: Sudeep Holla <sudeep.holla@....com>
> Signed-off-by: Robin Murphy <robin.murphy@....com>
> ---
> 
> Not a critical fix, since the driver currently works around this itself,
> but patch #4 would like to clean that up.
> 
>   drivers/acpi/arm64/apmt.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/acpi/arm64/apmt.c b/drivers/acpi/arm64/apmt.c
> index 8cab69fa5d59..aa7d5c3c0dd8 100644
> --- a/drivers/acpi/arm64/apmt.c
> +++ b/drivers/acpi/arm64/apmt.c
> @@ -35,11 +35,13 @@ static int __init apmt_init_resources(struct resource *res,
>   
>   	num_res++;
>   
> -	res[num_res].start = node->base_address1;
> -	res[num_res].end = node->base_address1 + SZ_4K - 1;
> -	res[num_res].flags = IORESOURCE_MEM;
> +	if (node->flags & ACPI_APMT_FLAGS_DUAL_PAGE) {
> +		res[num_res].start = node->base_address1;
> +		res[num_res].end = node->base_address1 + SZ_4K - 1;
> +		res[num_res].flags = IORESOURCE_MEM;
>   
> -	num_res++;
> +		num_res++;
> +	}
>   
>   	if (node->ovflw_irq != 0) {
>   		trigger = (node->ovflw_irq_flags & ACPI_APMT_OVFLW_IRQ_FLAGS_MODE);

Good catch,

Reviewed-by: Hanjun Guo <guohanjun@...wei.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ