[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171114202102.crpgiwgv2lu5aboq@node.shutemov.name>
Date: Tue, 14 Nov 2017 23:21:02 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andy Lutomirski <luto@...capital.net>,
Nicholas Piggin <npiggin@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 1/2] x86/mm: Do not allow non-MAP_FIXED mapping across
DEFAULT_MAP_WINDOW border
On Tue, Nov 14, 2017 at 05:01:50PM +0100, Thomas Gleixner wrote:
> @@ -198,11 +199,14 @@ arch_get_unmapped_area_topdown(struct fi
> /* requesting a specific address */
> if (addr) {
> addr = PAGE_ALIGN(addr);
> + if (!mmap_address_hint_valid(addr, len))
> + goto get_unmapped_area;
> +
Here and in hugetlb_get_unmapped_area(), we should align the addr after
the check, not before. Otherwise the alignment itself can bring us over
the borderline as we align up.
--
Kirill A. Shutemov
Powered by blists - more mailing lists