[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220509203742.0f4adfa4004e51e66c1c9a20@linux-foundation.org>
Date: Mon, 9 May 2022 20:37:42 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: Kees Cook <keescook@...omium.org>, linux-mm@...ck.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH 1/4] mm/usercopy: Check kmap addresses properly
On Mon, 10 Jan 2022 23:15:27 +0000 "Matthew Wilcox (Oracle)" <willy@...radead.org> wrote:
> If you are copying to an address in the kmap region, you may not copy
> across a page boundary,
In the source, the destination or in both, and why may we not?
> no matter what the size of the underlying
> allocation. You can't kmap() a slab page because slab pages always
> come from low memory.
Why not? kmap() does
if (!PageHighMem(page))
addr = page_address(page);
else
addr = kmap_high(page);
Powered by blists - more mailing lists