From patchwork Tue Oct 13 01:34:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Safonov X-Patchwork-Id: 11834685 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D16D697 for ; Tue, 13 Oct 2020 01:34:23 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2FC2A2087E for ; Tue, 13 Oct 2020 01:34:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=arista.com header.i=@arista.com header.b="KdByimee" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FC2A2087E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=arista.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CA2BF940008; Mon, 12 Oct 2020 21:34:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C2163900002; Mon, 12 Oct 2020 21:34:21 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AF00B940008; Mon, 12 Oct 2020 21:34:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id 771DC900002 for ; Mon, 12 Oct 2020 21:34:21 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 18D9F181AE865 for ; Tue, 13 Oct 2020 01:34:21 +0000 (UTC) X-FDA: 77365181922.25.smoke32_370df20271ff Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id E2F601804E3A0 for ; Tue, 13 Oct 2020 01:34:20 +0000 (UTC) X-Spam-Summary: 1,0,0,3c9ceb355cb644b9,d41d8cd98f00b204,dima@arista.com,,RULES_HIT:41:69:355:379:541:800:960:973:988:989:1260:1311:1314:1345:1431:1437:1515:1535:1542:1711:1730:1747:1777:1792:1801:2198:2199:2393:2559:2562:2693:2890:2899:3138:3139:3140:3141:3142:3353:3865:3867:3868:3870:3872:4042:4321:4605:5007:6121:6261:6653:6742:6743:7875:10004:11026:11658:11914:12043:12266:12296:12297:12438:12517:12519:12555:12679:12895:12986:13548:13846:13894:14096:14181:14394:14721:21080:21365:21433:21444:21450:21451:21627:30001:30012:30054:30064:30070,0,RBL:209.85.221.67:@arista.com:.lbl8.mailshell.net-62.14.0.100 66.201.201.201;04yrtrb9b3nd7qcnc6qr4ibjf51njypm5gnbwe8yt61fo1rdw53p59emhhtwsc1.5fyxhwt8bbo3din66exjpxsj51awdwn997ye5ami7n7h9knz73m4ocae77tmwa4.k-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:33,LUA_SUMMARY:none X-HE-Tag: smoke32_370df20271ff X-Filterd-Recvd-Size: 5979 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 13 Oct 2020 01:34:20 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id n15so21857740wrq.2 for ; Mon, 12 Oct 2020 18:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arista.com; s=googlenew; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m0fVYo23z5sDnIdO7CmhPP5/mdbbm0UqpjwBNjbmzHo=; b=KdByimeexhgK1iSMzLpxP57NJAb2JWybo82tdWaJCPrSR7jPuYXzi7z6AI04ExzEDF rns0T5/jh1vW9+BXPef9x3z9htEdn/PF5Z7GFYPlz549XuaDu8sz7EK1eqPynqoTEMlT v9uozVeynaN7X7iAGyN1HO2j6/3NfcDmew2EU6yiRPSZDRG6mO/CPAWUN45x5PBNiqy3 0MirEi4xSdE7tG1kqjYNTiqVfEnwYmGNEoTLyOvJZST9etlU2L2kE1ZYKtLEvCDJhA46 9axx2nBVhBGLTW2YrUl7rO628XbQLNS5Y96xHh/B7ifPka+9/LJfE0iiuP9shnRstOda sl7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=m0fVYo23z5sDnIdO7CmhPP5/mdbbm0UqpjwBNjbmzHo=; b=lBccbBVnUoLoQw+8oessmn2l/3URUcOVK9OiiqtVLgxO0tzP6lyUa0KrcO9Cnu0e0M PnYLuF4RVAvXo7Zi52/GGnE2EOSkUV2/LuhZKXU5Dvuk1zF75YynOaH7BUTrMWaY1j5v 5HsKFKjx01FRLq1XlAjrMZps0S6XoHG7fWI3EOXI2Ahz082eoz1l2mIRMN0Mza/w0d8b P4n93banmtXE9U3fk7prrtJDwMW5ezGW0dzODCVeR5jWOZE5I6hkc7v7RZkiYf43XBNc aOW9QLvxbczUew4iBiUlK7Sx7XmkKcaiUiJN5xJQuVY0YwCID0LCGnhWKJwAREpuebbd CPgA== X-Gm-Message-State: AOAM532KMCwAu3iCFVGA93bkboAbN4NwEC90tSvtFaYp8iqAnwsgPd6+ y5AGky2dZxSUtMC87E12gnOVHQ== X-Google-Smtp-Source: ABdhPJylxMFP/0l6plAG1lC4wZxbS5FXIxuQm/csHMG5nqpO55kqKEuOOVOpMKsiWO9QwuFzHnQgrQ== X-Received: by 2002:adf:fd82:: with SMTP id d2mr33017560wrr.304.1602552858954; Mon, 12 Oct 2020 18:34:18 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:e84:2480:228:f8ff:fe6f:83a8]) by smtp.gmail.com with ESMTPSA id d23sm24825325wmb.6.2020.10.12.18.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2020 18:34:18 -0700 (PDT) From: Dmitry Safonov To: linux-kernel@vger.kernel.org Cc: Dmitry Safonov <0x7f454c46@gmail.com>, Dmitry Safonov , Alexander Viro , Andrew Morton , Andy Lutomirski , Brian Geffon , Catalin Marinas , Dan Williams , Dave Jiang , Hugh Dickins , Ingo Molnar , "Kirill A. Shutemov" , Mike Kravetz , Minchan Kim , Russell King , Thomas Bogendoerfer , Thomas Gleixner , Vishal Verma , Vlastimil Babka , Will Deacon , linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 0/6] mremap: move_vma() fixes Date: Tue, 13 Oct 2020 02:34:10 +0100 Message-Id: <20201013013416.390574-1-dima@arista.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 1 - seems to be historical issue on a rarely taken path 2,3 - fixes related to the new mremap() flag 5 - dax device/hugetlbfs possible issue 4,6 - refactoring As those seems to be actual issues, sending this during the merge-window. (Changes to architecture code are in the 6 patch, but Cc'ing maintainers on cover for the context, I hope it's fine). Cc: Alexander Viro Cc: Andrew Morton Cc: Andy Lutomirski Cc: Brian Geffon Cc: Catalin Marinas Cc: Dan Williams Cc: Dave Jiang Cc: Hugh Dickins Cc: Ingo Molnar Cc: Kirill A. Shutemov Cc: Mike Kravetz Cc: Minchan Kim Cc: Russell King Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vishal Verma Cc: Vlastimil Babka Cc: Will Deacon Cc: linux-aio@kvack.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Dmitry Safonov (6): mm/mremap: Account memory on do_munmap() failure mm/mremap: For MREMAP_DONTUNMAP check security_vm_enough_memory_mm() mremap: Don't allow MREMAP_DONTUNMAP on special_mappings and aio vm_ops: Rename .split() callback to .may_split() mremap: Check if it's possible to split original vma mm: Forbid splitting special mappings arch/arm/kernel/vdso.c | 9 ---- arch/arm64/kernel/vdso.c | 41 ++----------------- arch/mips/vdso/genvdso.c | 4 -- arch/s390/kernel/vdso.c | 11 +---- arch/x86/entry/vdso/vma.c | 17 -------- arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 2 +- drivers/dax/device.c | 4 +- fs/aio.c | 5 ++- include/linux/mm.h | 5 ++- ipc/shm.c | 8 ++-- mm/hugetlb.c | 2 +- mm/mmap.c | 22 ++++++++-- mm/mremap.c | 50 +++++++++++------------ 13 files changed, 63 insertions(+), 117 deletions(-) base-commit: bbf5c979011a099af5dc76498918ed7df445635b