All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Kees Cook <keescook@chromium.org>,
	linux-mm@kvack.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH 1/4] mm/usercopy: Check kmap addresses properly
Date: Mon, 9 May 2022 20:37:42 -0700	[thread overview]
Message-ID: <20220509203742.0f4adfa4004e51e66c1c9a20@linux-foundation.org> (raw)
In-Reply-To: <20220110231530.665970-2-willy@infradead.org>

On Mon, 10 Jan 2022 23:15:27 +0000 "Matthew Wilcox (Oracle)" <willy@infradead.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);



  reply	other threads:[~2022-05-10  3:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 23:15 [PATCH 0/4] Assorted improvements to usercopy Matthew Wilcox (Oracle)
2022-01-10 23:15 ` [PATCH 1/4] mm/usercopy: Check kmap addresses properly Matthew Wilcox (Oracle)
2022-05-10  3:37   ` Andrew Morton [this message]
2022-05-10 22:01     ` Kees Cook
2022-01-10 23:15 ` [PATCH 2/4] mm/usercopy: Detect vmalloc overruns Matthew Wilcox (Oracle)
2022-01-10 23:15 ` [PATCH 3/4] mm/usercopy: Detect large folio overruns Matthew Wilcox (Oracle)
2022-01-31 14:28   ` David Hildenbrand
2022-01-10 23:15 ` [PATCH 4/4] usercopy: Remove HARDENED_USERCOPY_PAGESPAN Matthew Wilcox (Oracle)
2022-01-12 23:08   ` Kees Cook
2022-01-31 14:27   ` David Hildenbrand
2022-01-31 19:27     ` Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220509203742.0f4adfa4004e51e66c1c9a20@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=keescook@chromium.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.