From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF18BC352AA for ; Wed, 2 Oct 2019 01:23:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6F8CD2133F for ; Wed, 2 Oct 2019 01:23:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="oEyO3Jbn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F8CD2133F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=axtens.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0B1C48E000C; Tue, 1 Oct 2019 21:23:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 03B368E0001; Tue, 1 Oct 2019 21:23:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E44158E000C; Tue, 1 Oct 2019 21:23:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id BDD358E0001 for ; Tue, 1 Oct 2019 21:23:12 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 62934689A for ; Wed, 2 Oct 2019 01:23:12 +0000 (UTC) X-FDA: 75997096224.23.frame06_39062249b5c15 X-HE-Tag: frame06_39062249b5c15 X-Filterd-Recvd-Size: 3677 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by imf32.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Oct 2019 01:23:11 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id v4so9403919pff.6 for ; Tue, 01 Oct 2019 18:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=/C36wUinGnzT8rrY5Cyg+JNcSuMeir+tSfeOcjZGD7Q=; b=oEyO3JbnfIMqMzafNHHg54f0APQRylbM/MziaBN0Tl76MDxdcN7kvP8rZLEY65LWJl ZkmB53wVKnOWptMEs6NKncv6Mw0uEZ+RIEdpQM3f2YmIaKQ0uNmZa/rTyDi21nxUSxoD 7hyZZf1UnkOhzSIWf32UyhfgNdWxnxJoi2HXo= 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:in-reply-to:references:date :message-id:mime-version; bh=/C36wUinGnzT8rrY5Cyg+JNcSuMeir+tSfeOcjZGD7Q=; b=Xc95xGKcUePYP2uIEjik403jHOH7tYdKblSYwNeVDS2s75JVLfWy6peXChhVrI+E4J GG+Llk/0s4aw7Y6zOvPoOz2HWrWiJED5Fj+2fqf6xpup/duvD6q6gG+OdjcK0kiTcbxf QNnwicql2ok2y5/HFOE2DUvmCygj+d8lqkEVigoCHkxcJmG+pMRMMJpDflEPJ7timpkU HbV0jSeaOPeG0krWmSzl//wmQyWDQmTEM4p//Ty0GacXgv2WcP4CAQ4QUkbMmkqvZO6g pYbrJiSz1wcS6M0E2d9Ch3y5wmICPfADP7NkWFCUUPlStntsDBYQyKXiqUu/K5R3UPWM P+6A== X-Gm-Message-State: APjAAAU5udtFhdPvIsgFw/XoiGN7O0vwnqU5abslLqOVIE2yg1ILQ4Bf hVlmL8YwymU0mNabvpWX1USp+A== X-Google-Smtp-Source: APXvYqzGuf68jpYONt9jUaE/QZfzyFEfhgDb7lWE4iWG3aqIQx4VlrFOIeTrDSkYMG7TTPlhj3siAQ== X-Received: by 2002:a62:82c8:: with SMTP id w191mr1456666pfd.99.1569979390621; Tue, 01 Oct 2019 18:23:10 -0700 (PDT) Received: from localhost ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id ev20sm3561837pjb.19.2019.10.01.18.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 18:23:09 -0700 (PDT) From: Daniel Axtens To: Uladzislau Rezki Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, x86@kernel.org, aryabinin@virtuozzo.com, glider@google.com, luto@kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, dvyukov@google.com, christophe.leroy@c-s.fr, linuxppc-dev@lists.ozlabs.org, gor@linux.ibm.com Subject: Re: [PATCH v8 1/5] kasan: support backing vmalloc space with real shadow memory In-Reply-To: <20191001101707.GA21929@pc636> References: <20191001065834.8880-1-dja@axtens.net> <20191001065834.8880-2-dja@axtens.net> <20191001101707.GA21929@pc636> Date: Wed, 02 Oct 2019 11:23:06 +1000 Message-ID: <87zhik2b5x.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi, >> /* >> * Find a place in the tree where VA potentially will be >> * inserted, unless it is merged with its sibling/siblings. >> @@ -741,6 +752,10 @@ merge_or_add_vmap_area(struct vmap_area *va, >> if (sibling->va_end == va->va_start) { >> sibling->va_end = va->va_end; >> >> + kasan_release_vmalloc(orig_start, orig_end, >> + sibling->va_start, >> + sibling->va_end); >> + > The same. The call to kasan_release_vmalloc() is a static inline no-op if CONFIG_KASAN_VMALLOC is not defined, which I thought was the preferred way to do things rather than sprinkling the code with ifdefs? The complier should be smart enough to eliminate all the orig_state/orig_end stuff at compile time because it can see that it's not used, so there's no cost in the binary. Regards, Daniel