From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4E1D7138518 for ; Thu, 20 Oct 2016 08:35:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8A57EE0912; Thu, 20 Oct 2016 08:35:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D81CE0912 for ; Thu, 20 Oct 2016 08:35:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 33E04340EFD for ; Thu, 20 Oct 2016 08:35:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1A9A72ED for ; Thu, 20 Oct 2016 08:35:36 +0000 (UTC) From: "Alice Ferrazzi" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alice Ferrazzi" Message-ID: <1476952482.93de6abd2dbb94113170fc116514b46b910ed494.alicef@gentoo> Subject: [gentoo-commits] proj/linux-patches:4.7 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1008_linux-4.7.9.patch X-VCS-Directories: / X-VCS-Committer: alicef X-VCS-Committer-Name: Alice Ferrazzi X-VCS-Revision: 93de6abd2dbb94113170fc116514b46b910ed494 X-VCS-Branch: 4.7 Date: Thu, 20 Oct 2016 08:35:36 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 281c62a3-290f-45ec-962a-47b67f9cb872 X-Archives-Hash: 9afb15c17dcaa41f36025374d06601aa commit: 93de6abd2dbb94113170fc116514b46b910ed494 Author: Alice Ferrazzi gentoo org> AuthorDate: Thu Oct 20 08:33:28 2016 +0000 Commit: Alice Ferrazzi gentoo org> CommitDate: Thu Oct 20 08:34:42 2016 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=93de6abd Linux patch 4.7.9 0000_README | 4 +++ 1008_linux-4.7.9.patch | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/0000_README b/0000_README index 00700f9..dfea86d 100644 --- a/0000_README +++ b/0000_README @@ -75,6 +75,10 @@ Patch: 1007_linux-4.7.8.patch From: http://www.kernel.org Desc: Linux 4.7.8 +Patch: 1008_linux-4.7.9.patch +From: http://www.kernel.org +Desc: Linux 4.7.9 + Patch: 1500_XATTR_USER_PREFIX.patch From: https://bugs.gentoo.org/show_bug.cgi?id=470644 Desc: Support for namespace user.pax.* on tmpfs. diff --git a/1008_linux-4.7.9.patch b/1008_linux-4.7.9.patch new file mode 100644 index 0000000..c84f8fe --- /dev/null +++ b/1008_linux-4.7.9.patch @@ -0,0 +1,75 @@ +diff --git a/Makefile b/Makefile +index 4e17baa91e9c..cb3f64e40099 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,6 +1,6 @@ + VERSION = 4 + PATCHLEVEL = 7 +-SUBLEVEL = 8 ++SUBLEVEL = 9 + EXTRAVERSION = + NAME = Psychotic Stoned Sheep + +diff --git a/fs/xfs/xfs_xattr.c b/fs/xfs/xfs_xattr.c +index ea62245fee26..62900938f26d 100644 +--- a/fs/xfs/xfs_xattr.c ++++ b/fs/xfs/xfs_xattr.c +@@ -147,6 +147,7 @@ __xfs_xattr_put_listent( + arraytop = context->count + prefix_len + namelen + 1; + if (arraytop > context->firstu) { + context->count = -1; /* insufficient space */ ++ context->seen_enough = 1; + return 0; + } + offset = (char *)context->alist + context->count; +diff --git a/include/linux/mm.h b/include/linux/mm.h +index 317564b11dc7..7c3df8de0fe7 100644 +--- a/include/linux/mm.h ++++ b/include/linux/mm.h +@@ -2194,6 +2194,7 @@ static inline struct page *follow_page(struct vm_area_struct *vma, + #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */ + #define FOLL_MLOCK 0x1000 /* lock present pages */ + #define FOLL_REMOTE 0x2000 /* we are working on non-current tsk/mm */ ++#define FOLL_COW 0x4000 /* internal GUP flag */ + + typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, + void *data); +diff --git a/mm/gup.c b/mm/gup.c +index c057784c8444..2c764f0d71cc 100644 +--- a/mm/gup.c ++++ b/mm/gup.c +@@ -60,6 +60,16 @@ static int follow_pfn_pte(struct vm_area_struct *vma, unsigned long address, + return -EEXIST; + } + ++/* ++ * FOLL_FORCE can write to even unwritable pte's, but only ++ * after we've gone through a COW cycle and they are dirty. ++ */ ++static inline bool can_follow_write_pte(pte_t pte, unsigned int flags) ++{ ++ return pte_write(pte) || ++ ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pte_dirty(pte)); ++} ++ + static struct page *follow_page_pte(struct vm_area_struct *vma, + unsigned long address, pmd_t *pmd, unsigned int flags) + { +@@ -95,7 +105,7 @@ retry: + } + if ((flags & FOLL_NUMA) && pte_protnone(pte)) + goto no_page; +- if ((flags & FOLL_WRITE) && !pte_write(pte)) { ++ if ((flags & FOLL_WRITE) && !can_follow_write_pte(pte, flags)) { + pte_unmap_unlock(ptep, ptl); + return NULL; + } +@@ -409,7 +419,7 @@ static int faultin_page(struct task_struct *tsk, struct vm_area_struct *vma, + * reCOWed by userspace write). + */ + if ((ret & VM_FAULT_WRITE) && !(vma->vm_flags & VM_WRITE)) +- *flags &= ~FOLL_WRITE; ++ *flags |= FOLL_COW; + return 0; + } +