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] [day] [month] [year] [list]
Date:	Wed, 14 Jan 2009 20:16:32 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Suresh Siddha <suresh.b.siddha@...el.com>
Cc:	hpa@...or.com, tglx@...utronix.de, venkatesh.pallipadi@...el.com,
	linux-kernel@...r.kernel.org
Subject: Re: [patch] x86, pat: fix free_memtype() for legacy 1MB range


* Suresh Siddha <suresh.b.siddha@...el.com> wrote:

> -	is_range_ram = pagerange_is_ram(start, end);
> -	if (is_range_ram == 1)
> -		return free_ram_pages_type(start, end);
> -	else if (is_range_ram < 0)
> -		return -EINVAL;
> +	/*
> +	 * For legacy reasons, some parts of the physical address range in the
> +	 * legacy 1MB region is treated as non-RAM (even when listed as RAM in
> +	 * the e820 tables).  So we will track the memory attributes of this
> +	 * legacy 1MB region using the linear memtype_list always.
> +	 */
> +	if (end >= ISA_END_ADDRESS) {
> +		is_range_ram = pagerange_is_ram(start, end);
> +		if (is_range_ram == 1)
> +			return free_ram_pages_type(start, end);
> +		else if (is_range_ram < 0)
> +			return -EINVAL;
> +	}

this logic is now repeated in an open-coded way in two places in pat.c. 
Could you please send another delta patch that consolidates them into a 
single helper function, which is used both in free_memtype() and 
reserve_memtype()?

Thanks,

	Ingo
--
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