Re: [PATCHv4 2/5] x86/mm: introduce mmap{,_legacy}_base

From: Thomas Gleixner
Date: Mon Feb 13 2017 - 08:13:45 EST


On Mon, 13 Feb 2017, Dmitry Safonov wrote:
> > That just makes me barf, really. I have to go and lookup how TASK_SIZE_MAX
> > is defined in order to read that code. TASK_SIZE_MAX as is does not give a
> > hint at all that it means TASK_SIZE_MAX of 64 bit tasks.
> >
> > You just explained me that you want stuff proper for clarity reasons. So
> > what's so wrong with adding a helper inline tasksize_64bit() or such?
>
> I thought about that, but I'll need to redefine it under ifdefs :-/
> I mean, for 32-bit native code.
> Hmm, I think, if I use is32bit parameter for __STACK_RND_MASK(),
> will it be more readable if I just compare to IA32_PAGE_OFFSET here?
> Or does it makes sence to introduce tasksize_32bit()?

Yes, having such a helper makes it immediately clear what this is
about. IA32_PAGE_OFFSET is not really helpful either.

Thanks,

tglx