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: <4BF1BF61.4030605@zytor.com>
Date:	Mon, 17 May 2010 15:12:49 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC:	Yinghai <yinghai.lu@...cle.com>, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 01/35] lmb: prepare x86 to use lmb to replace early_res

On 05/17/2010 03:02 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2010-05-17 at 11:03 -0700, H. Peter Anvin wrote:
>> On 05/14/2010 01:09 AM, Benjamin Herrenschmidt wrote:
>>>
>>> No. That is not the point. Read the rest of my email !
>>>
>>> We need to -sanitize- those errors. _Maybe_ exposing LMB_ERROR is the
>>> right way to do so, but in that case, we need to make -all- function use
>>> the same error code. Right now, some fail with 0 and some with
>>> LMB_ERROR.
>>>
>>
>> Using errnos like the rest of the kernel seems like the right thing to
>> do, IMO.
> 
> Maybe. The allocator/find functions return a physical address. If we all
> agree that a physical address between -PAGE_SIZE and 0 is never valid,
> then we can overlay the negative errno codes like we do for pointers.
> 
> I'll have a look at that, it shouldn't be very hard.
> 

For x86 with 64-bit resource_t, this is always true (physical addresses
are never negative.)  For x86 with 32-bit resource_t negative physical
addresses can be negative, but the top of the address space will always
be occupied by the boot ROM (it's a hardware constraint.)

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