[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202007281152.6B15179@keescook>
Date: Tue, 28 Jul 2020 12:25:16 -0700
From: Kees Cook <keescook@...omium.org>
To: Arvind Sankar <nivedita@...m.mit.edu>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/8] x86/kaslr: Simplify __process_mem_region
On Mon, Jul 27, 2020 at 07:07:58PM -0400, Arvind Sankar wrote:
> Get rid of unnecessary temporary variables and redundant tests in
> __process_mem_region.
>
> Fix one minor bug: in case of an overlap, the beginning of the region
> should be used even if it is exactly image_size, not just strictly
> larger.
>
> Change type of minimum/image_size arguments in process_mem_region to
> unsigned long. These actually can never be above 4G (even on x86_64),
> and they're unsigned long in every other function except this one.
>
> Signed-off-by: Arvind Sankar <nivedita@...m.mit.edu>
Please split this up (which I think is already planned):
- bug fix (which looks like a correct fix to me)
- arg type size changes
- refactoring
I don't currently agree that the refactoring makes things easier to
read, but let's see v3. :)
--
Kees Cook
Powered by blists - more mailing lists