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]
Date:	Fri, 18 Jan 2008 00:24:48 +0100
From:	"Andreas Herrmann3" <andreas.herrmann3@....com>
To:	"Venki Pallipadi" <venkatesh.pallipadi@...el.com>
cc:	"Ingo Molnar" <mingo@...e.hu>,
	"Siddha, Suresh B" <suresh.b.siddha@...el.com>, ak@....de,
	ebiederm@...ssion.com, rdreier@...co.com,
	torvalds@...ux-foundation.org, gregkh@...e.de, airlied@...net.ie,
	davej@...hat.com, tglx@...utronix.de, hpa@...or.com,
	akpm@...ux-foundation.org, arjan@...radead.org,
	jesse.barnes@...el.com, davem@...emloft.net,
	linux-kernel@...r.kernel.org
Subject: Re: [patch 0/4] x86: PAT followup - Incremental changes and bug
 fixes

On Thu, Jan 17, 2008 at 03:04:10PM -0800, Venki Pallipadi wrote:
> 
> Below is another potential fix for the problem here. Going through ACPI
> ioremap usages, we found at one place the mapping is cached for possible
> optimization reason and not unmapped later. Patch below always unmaps
> ioremap at this place in ACPICA.
> 
> Thanks,
> Venki
> 
> 
> Index: linux-2.6.git/drivers/acpi/executer/exregion.c
> ===================================================================
> --- linux-2.6.git.orig/drivers/acpi/executer/exregion.c	2008-01-17 03:18:39.000000000 -0800
> +++ linux-2.6.git/drivers/acpi/executer/exregion.c	2008-01-17 07:34:33.000000000 -0800
> @@ -48,6 +48,8 @@
>  #define _COMPONENT          ACPI_EXECUTER
>  ACPI_MODULE_NAME("exregion")
>  
> +static int ioremap_cache;
> +
>  /*******************************************************************************
>   *
>   * FUNCTION:    acpi_ex_system_memory_space_handler
> @@ -249,6 +251,13 @@
>  		break;
>  	}
>  
> +	if (!ioremap_cache) {
> +		acpi_os_unmap_memory(mem_info->mapped_logical_address,
> +		                     window_size);
> +		mem_info->mapped_logical_address = 0;
> +		mem_info->mapped_physical_address = 0;
> +		mem_info->mapped_length = 0;
> +	}
>  	return_ACPI_STATUS(status);
>  }
>  


Applying and compiling your patch I see:

  CC      drivers/acpi/executer/exregion.o
drivers/acpi/executer/exregion.c: In function 'acpi_ex_system_memory_space_handler':
drivers/acpi/executer/exregion.c:81: warning: 'window_size' may be used uninitialized in this function
 

After glancing through this file it seems that ioremap_cache is always 0
and acpi_os_unmap_memory will unconditionally be executed at end of this function.
I am not familiar with that code. But I just want to reinsure that this
is what you want. And if so, why is that variable needed?
But maybe I missed something ...
(I'll test it tomorrow, or I better should say later today.)


Andreas



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ