From patchwork Tue Jul 24 12:11:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirill A . Shutemov" X-Patchwork-Id: 10541995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5EC72112B for ; Tue, 24 Jul 2018 12:11:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 437AE2886F for ; Tue, 24 Jul 2018 12:11:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35CD628872; Tue, 24 Jul 2018 12:11:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0ACC22886F for ; Tue, 24 Jul 2018 12:11:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E835B6B0010; Tue, 24 Jul 2018 08:11:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E66AC6B026E; Tue, 24 Jul 2018 08:11:43 -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 CD3996B0266; Tue, 24 Jul 2018 08:11:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by kanga.kvack.org (Postfix) with ESMTP id 8FF1A6B0006 for ; Tue, 24 Jul 2018 08:11:43 -0400 (EDT) Received: by mail-pg1-f200.google.com with SMTP id m25-v6so2441756pgv.22 for ; Tue, 24 Jul 2018 05:11:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=OTrLBBeGRS/eVsHpTGbxWijTwCCITf1zwn7zS6GMgk0=; b=W7pccreiYlIo2TAvXsUGP9tdGYG9JShNOddibvooeIcOnD5n8AWmhqG/bgeOFTp0wS 249Y4rf3zI6YkR3EZWTpwZOMW5yy5jdOS3eudOlLoOGNZlGgdeX2eFdPtbo4MgwCcRVy hy8xaJ0+zsD1kOB6Vygjc6mpcUBekM+jErzY08vn8FzOg89YwVAw6Rr2oTocGa8Ps0fe 1Gdrmd7hwGCpKWOJ7zA9KljP6NnWmb8skw0EIQzOCMNN9TybaD+YcVX6E6PXaYd+Y98R u4HPpUe11tkKbvEj34wQp5OFhQR87Eq5CrTfSibLmkeMj1umvnmdRmsZwRggYS7ZYxP4 1vQg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of kirill.shutemov@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: AOUpUlGyhdIIIDwXzF9uwDGoUPxcK3AWUsvogpdhiZrbs45Fu9wiBNwG ZXnggiJ4fmrGwbfH9DTVxzWK01HZle0fcgrOwMVX4tTQqvShQ5kalYIUpQNPkOyjg6vFwGIPPXf ywOhkdFLfpgabdPu8J5y0EhfbnX8OvQgAR2UirK8pq1m627fL2fQx383OPRDG1p3lhQ== X-Received: by 2002:a17:902:7896:: with SMTP id q22-v6mr16781003pll.47.1532434303271; Tue, 24 Jul 2018 05:11:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpf3W0IQTcNeTuvOBGSc6lGdY9O1GCZCUD15Db8IuMM7MVW+X3fvst+lcsA2V6vbA9o1e7Z+ X-Received: by 2002:a17:902:7896:: with SMTP id q22-v6mr16780965pll.47.1532434302481; Tue, 24 Jul 2018 05:11:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532434302; cv=none; d=google.com; s=arc-20160816; b=bfqBchdm5CbRoKirgpWmcNqvleYf9Vu6fCe4jdSxQ+PkY82UNUeSUIGKWu50ej7YUC a4PqzTWCczAaZLJK5DToCkeNpxdLYMS7H/oh0dFlAXB/XV1FslHpgBSf4beMvd7piQZl IWN5ZwudOBDMR6Ssye0gsHFJ8FYrlwDc8mZpQ2hLwI6/yNJrMu0RjJYgjr73WSoZOeuW 94aVoxBZ8L5BIo1qIAZNO35MJmR5e+QiABSVI21dgwcm6sVoF0BWLYOlq2R2xfMofcAT zepln3T41Adj247SBwMNUJSv9GDjoJCUZxpQYVyLkFOC2t92kqa4UQ49yud9C9vux5LF EetA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=OTrLBBeGRS/eVsHpTGbxWijTwCCITf1zwn7zS6GMgk0=; b=o0S1gQtwA5Hcb+VdWbIudP5dMk0SgI96bMO5IE8Bl8mIKx7wii0JE6qJ97BzxR6Pg4 EuhL0H1kLX9OX36BKUfBUPY9OuFw0oKurkFOToWzfeaQsA3XnWoNlijXAe5RNiTYIWUG aG7deNRvTosDSpntqw0eIKt/BEYqaRg5enG28KwUUJ8dLOwNdY0scQUOP/aqJ2uQkC9w 1RaOuOYYssShFyQHGKxIKGPJOXMj8PFappZ/s1hXWuAm9ldTmX1xB7G1z8F6hFR3AfbV jxQxnYscFDsvzQRaNwyMijyS5zc9EstvB6kF/NBfjwNcjRsewuEtvqJq/eqZYEXAjtBl 9rAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of kirill.shutemov@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga07.intel.com (mga07.intel.com. [134.134.136.100]) by mx.google.com with ESMTPS id x3-v6si12443279pfj.289.2018.07.24.05.11.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 05:11:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of kirill.shutemov@linux.intel.com designates 134.134.136.100 as permitted sender) client-ip=134.134.136.100; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of kirill.shutemov@linux.intel.com designates 134.134.136.100 as permitted sender) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jul 2018 05:11:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,397,1526367600"; d="scan'208";a="218637833" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga004.jf.intel.com with ESMTP; 24 Jul 2018 05:11:39 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id C4941161; Tue, 24 Jul 2018 15:11:47 +0300 (EEST) From: "Kirill A. Shutemov" To: Andrew Morton , Linus Torvalds Cc: Dmitry Vyukov , Oleg Nesterov , Andrea Arcangeli , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Kirill A. Shutemov" Subject: [PATCHv3 0/3] Fix crash due to vma_is_anonymous() false-positives Date: Tue, 24 Jul 2018 15:11:36 +0300 Message-Id: <20180724121139.62570-1-kirill.shutemov@linux.intel.com> X-Mailer: git-send-email 2.18.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: X-Virus-Scanned: ClamAV using ClamSMTP Fix crash found by syzkaller. Build on top of Linus' changes in 4.18-rc6. Andrew, could you please drop mm-drop-unneeded-vm_ops-checks-v2.patch for now. Infiniband drivers have to be fixed first. Kirill A. Shutemov (3): mm: Introduce vma_init() mm: Use vma_init() to initialize VMAs on stack and data segments mm: Fix vma_is_anonymous() false-positives arch/arm/kernel/process.c | 1 + arch/arm/mach-rpc/ecard.c | 2 +- arch/arm64/include/asm/tlb.h | 4 +++- arch/arm64/mm/hugetlbpage.c | 7 +++++-- arch/ia64/include/asm/tlb.h | 2 +- arch/ia64/mm/init.c | 2 +- arch/x86/um/mem_32.c | 2 +- drivers/char/mem.c | 1 + fs/exec.c | 1 + fs/hugetlbfs/inode.c | 2 ++ include/linux/mm.h | 14 ++++++++++++++ kernel/fork.c | 6 ++---- mm/mempolicy.c | 1 + mm/mmap.c | 3 +++ mm/nommu.c | 2 ++ mm/shmem.c | 1 + 16 files changed, 40 insertions(+), 11 deletions(-)