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: <5CD6EBAA-D0D6-434A-B9EA-B144C05711BC@ellerman.id.au>
Date:	Sat, 05 Dec 2015 22:43:57 +1100
From:	Michael Ellerman <michael@...erman.id.au>
To:	Mitchel Humpherys <mitchelh@...eaurora.org>
CC:	robh+dt@...nel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linuxppc-dev@...abs.org,
	frowand.list@...il.com, grant.likely@...aro.org
Subject: Re: [PATCH] of: Fix comparison of reserved memory regions



On 5 December 2015 04:07:39 GMT+11:00, Mitchel Humpherys <mitchelh@...eaurora.org> wrote:
>On Wed, Nov 18 2015 at 09:46:38 PM, Michael Ellerman
><mpe@...erman.id.au> wrote:
>> In order to check for overlapping reserved memory regions, we first
>need
>> to sort the array of memory regions. This is implemented using
>sort(),
>> and a custom comparison function __rmem_cmp().
>>
>> Unfortunatley __rmem_cmp() doesn't work in all cases. Because the two
>> base values are phys_addr_t, they may be u64 on some platforms, in
>which
>> case subtracting one from the other and then (implicitly) casting to
>int
>> does not give us the -ve/0/+ve value we need.
>>
>> This leads to incorrect reports about overlaps, eg:
>>
>>   ibm,slw-image@...e600000 (0x0000001ffe600000--0x0000001ffe700000)
>overlaps with
>>   ibm,firmware-allocs-memory@...0000000
>(0x0000001000000000--0x0000001000dc0200)
>>
>> Fix it by just doing the standard double if and return 0 logic.
>>
>> Fixes: ae1add247bf8 ("of: Check for overlap in reserved memory
>regions")
>> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
>> ---
>>  drivers/of/of_reserved_mem.c | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>
>Woops, thanks.
>
>Tested-by: Mitchel Humpherys <mitchelh@...eaurora.org>

Thanks for testing.

Rob, can we get this merged for 4.4 please?

cheers 

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
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