Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811701/?format=api
{ "id": 811701, "url": "http://patchwork.ozlabs.org/api/patches/811701/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504891961-22990-2-git-send-email-laurent.du4@free.fr/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<1504891961-22990-2-git-send-email-laurent.du4@free.fr>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/1504891961-22990-2-git-send-email-laurent.du4@free.fr/", "date": "2017-09-08T17:32:22", "name": "[v3,01/20] mm: Dont assume page-table invariance during faults", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "eb65d4396c0e5116177125787cbcb65cb19321e7", "submitter": { "id": 72322, "url": "http://patchwork.ozlabs.org/api/people/72322/?format=api", "name": "Laurent Dufour", "email": "laurent.du4@free.fr" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/1504891961-22990-2-git-send-email-laurent.du4@free.fr/mbox/", "series": [ { "id": 2257, "url": "http://patchwork.ozlabs.org/api/series/2257/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=2257", "date": "2017-09-08T17:32:21", "name": "Speculative page faults", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/2257/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811701/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811701/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>", "X-Original-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Delivered-To": [ "patchwork-incoming@ozlabs.org", "linuxppc-dev@lists.ozlabs.org" ], "Received": [ "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpkzj4QtFz9s8J\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 9 Sep 2017 03:37:37 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xpkzj2crxzDrbW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 9 Sep 2017 03:37:37 +1000 (AEST)", "from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xpkwW1CxyzDrbY\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tSat, 9 Sep 2017 03:34:51 +1000 (AEST)", "from nimbus.lab.toulouse-stg.fr.ibm.com (unknown [78.220.147.143])\n\t(Authenticated sender: laurent.du4)\n\tby smtp3-g21.free.fr (Postfix) with ESMTPSA id 1E38113F8B5;\n\tFri, 8 Sep 2017 19:33:45 +0200 (CEST)" ], "Authentication-Results": "ozlabs.org; spf=none (mailfrom) smtp.mailfrom=free.fr\n\t(client-ip=212.27.42.3; helo=smtp3-g21.free.fr;\n\tenvelope-from=laurent.du4@free.fr; receiver=<UNKNOWN>)", "From": "Laurent Dufour <laurent.du4@free.fr>", "To": "paulmck@linux.vnet.ibm.com, peterz@infradead.org,\n\takpm@linux-foundation.org, kirill@shutemov.name, ak@linux.intel.com, \n\tmhocko@kernel.org, dave@stgolabs.net, jack@suse.cz,\n\tMatthew Wilcox <willy@infradead.org>, benh@kernel.crashing.org,\n\tmpe@ellerman.id.au, paulus@samba.org,\n\tThomas Gleixner <tglx@linutronix.de>, \n\tIngo Molnar <mingo@redhat.com>, hpa@zytor.com,\n\tWill Deacon <will.deacon@arm.com>,\n\tSergey Senozhatsky <sergey.senozhatsky@gmail.com>", "Subject": "[PATCH v3 01/20] mm: Dont assume page-table invariance during faults", "Date": "Fri, 8 Sep 2017 19:32:22 +0200", "Message-Id": "<1504891961-22990-2-git-send-email-laurent.du4@free.fr>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504891961-22990-1-git-send-email-laurent.du4@free.fr>", "References": "<1504891961-22990-1-git-send-email-laurent.du4@free.fr>", "X-BeenThere": "linuxppc-dev@lists.ozlabs.org", "X-Mailman-Version": "2.1.23", "Precedence": "list", "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>", "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>", "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>", "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>", "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>", "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>", "Cc": "linuxppc-dev@lists.ozlabs.org, x86@kernel.org,\n\tlinux-kernel@vger.kernel.org, npiggin@gmail.com, linux-mm@kvack.org,\n\tTim Chen <tim.c.chen@linux.intel.com>, \n\tharen@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com", "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org", "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>" }, "content": "From: Peter Zijlstra <peterz@infradead.org>\n\nOne of the side effects of speculating on faults (without holding\nmmap_sem) is that we can race with free_pgtables() and therefore we\ncannot assume the page-tables will stick around.\n\nRemove the reliance on the pte pointer.\n\nSigned-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>\n---\n mm/memory.c | 29 -----------------------------\n 1 file changed, 29 deletions(-)", "diff": "diff --git a/mm/memory.c b/mm/memory.c\nindex ec4e15494901..30bccfa00630 100644\n--- a/mm/memory.c\n+++ b/mm/memory.c\n@@ -2270,30 +2270,6 @@ int apply_to_page_range(struct mm_struct *mm, unsigned long addr,\n }\n EXPORT_SYMBOL_GPL(apply_to_page_range);\n \n-/*\n- * handle_pte_fault chooses page fault handler according to an entry which was\n- * read non-atomically. Before making any commitment, on those architectures\n- * or configurations (e.g. i386 with PAE) which might give a mix of unmatched\n- * parts, do_swap_page must check under lock before unmapping the pte and\n- * proceeding (but do_wp_page is only called after already making such a check;\n- * and do_anonymous_page can safely check later on).\n- */\n-static inline int pte_unmap_same(struct mm_struct *mm, pmd_t *pmd,\n-\t\t\t\tpte_t *page_table, pte_t orig_pte)\n-{\n-\tint same = 1;\n-#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT)\n-\tif (sizeof(pte_t) > sizeof(unsigned long)) {\n-\t\tspinlock_t *ptl = pte_lockptr(mm, pmd);\n-\t\tspin_lock(ptl);\n-\t\tsame = pte_same(*page_table, orig_pte);\n-\t\tspin_unlock(ptl);\n-\t}\n-#endif\n-\tpte_unmap(page_table);\n-\treturn same;\n-}\n-\n static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va, struct vm_area_struct *vma)\n {\n \tdebug_dma_assert_idle(src);\n@@ -2854,11 +2830,6 @@ int do_swap_page(struct vm_fault *vmf)\n \n \tif (vma_readahead)\n \t\tpage = swap_readahead_detect(vmf, &swap_ra);\n-\tif (!pte_unmap_same(vma->vm_mm, vmf->pmd, vmf->pte, vmf->orig_pte)) {\n-\t\tif (page)\n-\t\t\tput_page(page);\n-\t\tgoto out;\n-\t}\n \n \tentry = pte_to_swp_entry(vmf->orig_pte);\n \tif (unlikely(non_swap_entry(entry))) {\n", "prefixes": [ "v3", "01/20" ] }