[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5165008C.1000504@redhat.com>
Date: Wed, 10 Apr 2013 14:02:52 +0800
From: Lingzhu Xiang <lxiang@...hat.com>
To: Matthew Garrett <matthew.garrett@...ula.com>
CC: matt.fleming@...el.com, linux-efi@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH 3/3] efi: Distinguish between "remaining space" and actually
used space
On 04/10/2013 10:41 AM, Matthew Garrett wrote:
> + if (!storage_size || size > remaining_size ||
> + ((active_size + size + VAR_METADATA_SIZE > storage_size / 2) &&
> + (remaining_size - size - VAR_METADATA_SIZE < storage_size / 2)))
This could overflow.
(u64)32768 - (u64)32768 - VAR_METADATA_SIZE < (u64)65536 / 2 == false
--
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