Received: by 10.223.185.116 with SMTP id b49csp923957wrg; Wed, 21 Feb 2018 09:06:08 -0800 (PST) X-Google-Smtp-Source: AH8x224iF5tLQUnoEO7N2nY20Wo6Du0pfgILzHnBy2Ydy4VC5vhGefPJNtYfeaWToeGpr26yJrea X-Received: by 2002:a17:902:8f97:: with SMTP id z23-v6mr3774202plo.162.1519232768408; Wed, 21 Feb 2018 09:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519232768; cv=none; d=google.com; s=arc-20160816; b=yzjhmNCPpPZ2Oi1W9FoIbBLKoi6fU+qmx5cKD6h5ulSLkIVi+6d/lF7kLU0CTNbq8Y dfGBMffTj/gW5xuwucX4MvAf9iXFKNNy5UESG3idEmVPa6tmtXe8RoGrgzbh6V+LisA8 QXPm61UjN4qeli/e1mb+jYNa0dmfNNYjcqFquwRP9sukrF1UX6/v9/uqnFONl5zt9BZS TYT/MLG571qYgUZa7k5Bco7joccKoFGq7QrPLH+6st3CNFH834qzM/S1mQBoF+nd93Bh /E2YRM79wLPAd/eGGIVGfjyi9HQfRc5zpojV6mRnH1mqVDBLB5YWrr0I2F/DMz0FUNav ROHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=u2tvB4vk9SaCcCPmYHD8/7quy/UHULSgod1RPctuzCQ=; b=1EHpbwHpLJ/R2FAQhRmB2Ds50rXXLpdSXxgIRAHQ/dpUzYxcxZ2JJ/1nWJ8vHZdK8M B/+oQ4Z6A+/WCFfhtn15ohSuYQ2uPMvanYB1Xc5CdJOLaUnyXYbPk1mI1hgfr9Y0grc8 s2GlsmlodO1gm7g73IQ1OWK8M/08L2GaFFcdVHvlba1WR1FrRK6W4TOP3V8dTqq3AgKW HYjecexN2y30S5P4RXwURVmCqO7cYYna7XDa504lMocexTMp9aIg5SAedbMBhy18PUZV JKcGOt46S3gmIN9vAVIvuEuZR7KvMvVnlezvewNIb28QXexkYAZ0vA8Mt56nljGVEVCJ ZJfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EoCGENOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g13-v6si1565448plo.243.2018.02.21.09.05.36; Wed, 21 Feb 2018 09:06:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=EoCGENOv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754218AbeBUMYx (ORCPT + 99 others); Wed, 21 Feb 2018 07:24:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36078 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbeBUMYv (ORCPT ); Wed, 21 Feb 2018 07:24:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=u2tvB4vk9SaCcCPmYHD8/7quy/UHULSgod1RPctuzCQ=; b=EoCGENOvHJ1RI7ua4msSbAcT2 Vo/vWoqYw6pzy6yFvpEtgXtsTTrArd0K9K3da25HE3FJCOjF6ufqTR/bjxD+NyAg9tBgjNfXrGoSU BDbiln+Xkxubw3m2AT+Z7ufXCNhQhuMUubJ5ffA+MFrcGKMJyjsEG4t0jhXVAbPshqsjFzQj8IDmV ObMnsgBKZLLB4ITnQV9vRsX9ru9DfnmH9zgBVGMzpKRA23WXPEfFHYbxyNcBBhlWgI1LskI/38rXP r4Ur2iBwQDPN1Stx6zCbj5MLvGXhRMYGwjuz6Fe+gUPtvfz+xDJG0YHNmv2M/S4AqmAYw5Ga3ENfh adfy93LGA==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1eoTS1-0003TZ-GX; Wed, 21 Feb 2018 12:24:45 +0000 Date: Wed, 21 Feb 2018 04:24:45 -0800 From: Matthew Wilcox To: Konstantin Khlebnikov Cc: Dave Hansen , linux-kernel@vger.kernel.org, Christoph Hellwig , linux-mm@kvack.org, Andy Lutomirski , Andrew Morton , Andrey Ryabinin , kasan-dev@googlegroups.com Subject: Re: [PATCH 1/4] vmalloc: add vm_flags argument to internal __vmalloc_node() Message-ID: <20180221122444.GA11791@bombadil.infradead.org> References: <151670492223.658225.4605377710524021456.stgit@buzz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <151670492223.658225.4605377710524021456.stgit@buzz> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 23, 2018 at 01:55:22PM +0300, Konstantin Khlebnikov wrote: > This allows to set VM_USERMAP in vmalloc_user() and vmalloc_32_user() > directly at allocation and avoid find_vm_area() call. While reviewing this patch, I came across this infelicity ... have I understood correctly? diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index e13d911251e7..9060f80b4a41 100644 --- a/mm/kasan/kasan.c +++ b/mm/kasan/kasan.c @@ -631,11 +631,10 @@ int kasan_module_alloc(void *addr, size_t size) ret = __vmalloc_node_range(shadow_size, 1, shadow_start, shadow_start + shadow_size, GFP_KERNEL | __GFP_ZERO, - PAGE_KERNEL, VM_NO_GUARD, NUMA_NO_NODE, + PAGE_KERNEL, VM_NO_GUARD | VM_KASAN, NUMA_NO_NODE, __builtin_return_address(0)); if (ret) { - find_vm_area(addr)->flags |= VM_KASAN; kmemleak_ignore(ret); return 0; }