Re: [PATCH v4 00/14] Provide generic top-down mmap layout functions

From: Alex Ghiti
Date: Fri May 31 2019 - 01:08:56 EST


On 5/29/19 4:16 PM, Kees Cook wrote:
On Sun, May 26, 2019 at 09:47:32AM -0400, Alexandre Ghiti wrote:
This series introduces generic functions to make top-down mmap layout
easily accessible to architectures, in particular riscv which was
the initial goal of this series.
The generic implementation was taken from arm64 and used successively
by arm, mips and finally riscv.
As I've mentioned before, I think this is really great. Making this
common has long been on my TODO list. Thank you for the work! (I've sent
separate review emails for individual patches where my ack wasn't
already present...)


Thanks :)


- There is no common API to determine if a process is 32b, so I came up with
!IS_ENABLED(CONFIG_64BIT) || is_compat_task() in [PATCH v4 12/14].
Do we need a common helper for this idiom? (Note that I don't think it's
worth blocking the series for this.)


Each architecture has its own way of finding that out, it might be interesting if there are other
places in generic code to propose something in that sense.
I will search for such places if they exist and come back with something.

Thanks Kees for your time,

Alex



-Kees