All of
 help / color / mirror / Atom feed
From: David Hildenbrand <>
To: David Laight <David.Laight@ACULAB.COM>,
	"" <>
Cc: "" <>,
	"" <>,
	Linus Torvalds <>,
	Andrew Morton <>,
	Greg Kroah-Hartman <>,
	Axel Rasmussen <>,
	Nadav Amit <>, Peter Xu <>,
	Hugh Dickins <>,
	Andrea Arcangeli <>,
	Matthew Wilcox <>,
	Vlastimil Babka <>,
	John Hubbard <>,
	Jason Gunthorpe <>
Subject: Re: [PATCH v2] mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW
Date: Wed, 10 Aug 2022 11:18:16 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 10.08.22 11:12, David Laight wrote:
> From: David Hildenbrand
>> Sent: 09 August 2022 21:57
> ...
> These two functions seem to contain a lot of the same tests.

Yes, but after Linus and I discussed to not even reuse is_cow_mapping()
but instead to spell it out, I refrained from factoring common checks
out here to harm readability.


> Perhaps only the initial call (common success path?) should
> be inlined?
> With the flags and vma tests being moved to an inline helper.

Do we really care enough to hurt readability? I mean, most things here
are simple bit checks, not expensive function calls.

inline is only a hint to the compiler after all. Please correct me if
I'm wrong.

Now, I don't have any strong opinion, but I do want to make progress for
this because -stable trees still need fixing and I'll be posting the
reproducer on Monday.



David / dhildenb

      reply	other threads:[~2022-08-10  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 20:56 [PATCH v2] mm/gup: fix FOLL_FORCE COW security issue and remove FOLL_COW David Hildenbrand
2022-08-10  9:12 ` David Laight
2022-08-10  9:18   ` David Hildenbrand [this message]

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:

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

  git send-email \ \ \
    --cc=David.Laight@ACULAB.COM \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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.