[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230504132148.182960-1-broonie@finisterre.sirena.org.uk>
Date: Thu, 4 May 2023 22:21:48 +0900
From: Mark Brown <broonie@...isterre.sirena.org.uk>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Lorenzo Stoakes <lstoakes@...il.com>,
Rick Edgecombe <rick.p.edgecombe@...el.com>
Subject: linux-next: manual merge of the tip tree with the mm-unstable tree
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
mm/gup.c
between commit:
2353d85b4e9c2 ("mm/gup: disallow FOLL_LONGTERM GUP-nonfast writing to file-backed mappings")
from the mm-unstable tree and commit:
75818f575af6d ("mm: Don't allow write GUPs to shadow stack memory")
from the tip tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc mm/gup.c
index 802dbe46a401a,80258a640135a..0000000000000
--- a/mm/gup.c
+++ b/mm/gup.c
@@@ -1017,11 -978,7 +1017,11 @@@ static int check_vma_flags(struct vm_ar
return -EFAULT;
if (write) {
+ if (!vma_anon &&
+ !writable_file_mapping_allowed(vma, gup_flags))
+ return -EFAULT;
+
- if (!(vm_flags & VM_WRITE)) {
+ if (!(vm_flags & VM_WRITE) || (vm_flags & VM_SHADOW_STACK)) {
if (!(gup_flags & FOLL_FORCE))
return -EFAULT;
/* hugetlb does not support FOLL_FORCE|FOLL_WRITE. */
Powered by blists - more mailing lists