Re: [PATCH v2 11/17] selftests/x86/ldt_gdt: Prepare for access bit forced
From: Andy Lutomirski
Date: Thu Dec 14 2017 - 17:30:42 EST
> On Dec 14, 2017, at 2:15 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
>> On Thu, Dec 14, 2017 at 2:11 PM, Andy Lutomirski <luto@xxxxxxxxxxxxxx> wrote:
>>
>> That seems to rather defeat the point of using a VMA, though.
>
> There never was any point in using a VMA per se.
>
> The point was always to just map the damn thing in the user page
> tables, wasn't it?
>
> The vma bit was just an implementation detail.
And all this is why I dislike using a VMA. My patch puts it at a negative address. We could just as easily put it just above TASK_SIZE_MAX, but I'm a bit nervous about bugs that overrun an access_ok check by a small amount. IIRC I found one of those in the net code once, and I didn't look very hard.