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=-11.9 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 453D3C2D0A8 for ; Mon, 28 Sep 2020 11:54:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E00022074A for ; Mon, 28 Sep 2020 11:54:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="FrUJQhU8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E00022074A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2A1036B005D; Mon, 28 Sep 2020 07:54:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 22A886B0062; Mon, 28 Sep 2020 07:54:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0F3096B0068; Mon, 28 Sep 2020 07:54:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0237.hostedemail.com [216.40.44.237]) by kanga.kvack.org (Postfix) with ESMTP id E9F966B005D for ; Mon, 28 Sep 2020 07:54:08 -0400 (EDT) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 922C53631 for ; Mon, 28 Sep 2020 11:54:08 +0000 (UTC) X-FDA: 77312311776.22.head78_411546027181 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id 68DEE18038E60 for ; Mon, 28 Sep 2020 11:54:08 +0000 (UTC) X-HE-Tag: head78_411546027181 X-Filterd-Recvd-Size: 5925 Received: from mail-oo1-f67.google.com (mail-oo1-f67.google.com [209.85.161.67]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Sep 2020 11:54:07 +0000 (UTC) Received: by mail-oo1-f67.google.com with SMTP id m25so228260oou.0 for ; Mon, 28 Sep 2020 04:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qVxE17p4zsLCszLlrp2+yy6w1PaUWdFxLyFkrOjdfgU=; b=FrUJQhU8kLw5wzKwxdDxIRtiVoZ4lfeEZwy4LJPWfKENd3ZpDBr+fUeXyts5ABr4TM ZH5Q5AUVRyledcZkhZFHMj1Xb7lLb7lvKlji7ROGvzgo5ad7SJnlL95Wct+/0nKk++lq wYWBtVoulBHcCIV7zqSRjVQeTpnuEVHGkiONEu3FSe0BhD/SwyM/JVJg1Di8LjLpUzMQ Ed0RQHWOFbz70PZpdJtw4ZCSz3+jgk5repK1v2BzNhFohtN0QypxHHQD9EbCKbCxyof+ XI+394+OH71KeoWaiKUNCaoq1tLs3vkcMfYf4L9lvcLWzyN3U+23iR3Pz3G1aYmjKf0n RJPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qVxE17p4zsLCszLlrp2+yy6w1PaUWdFxLyFkrOjdfgU=; b=Rf1pn9aT9JkOwVI6muiG2o7LxNPmqXv0zDVpC+zzbEoUD0/sieUlmdrL0XdKmwkxEP Pjy5IWnDHI+EDd2o7wr5kWmnjI/BUy4M0zZkyjSc9f3oFk0TljDvzc+qkb7idO37Joyi 1iCap3PG6kYu2wNbayInOra+WMx7s/QQg6Xw9xrenNJ8ARynleuMwbBVXYx710xwHrAi rdGQfAGZAi4t9A5EUksYbNTnIHTQs/W1M8FeT1PzyJU893Q1yIchjIVv6tE6adKq41BU h2cbHXTANxLwOfmuBjmYht8Q14vd8GaDSRrzCJzM1GQj/e0mEOaaH47At47pyIvKHXBD 7/sQ== X-Gm-Message-State: AOAM531fkTSIKyaGeow0u0Ja72pCMMngbRh338jenZmoVumeNL3FPDfg sp/yIBxMBo5Z9cx+7A7bEESKE1KmV/7UIMii/MjdXA== X-Google-Smtp-Source: ABdhPJzpY53/CL/rlGYhaAH12AEPiz652/Rpx7oha4MEk7h+kTfhAQNGeyGlFXmxe76ygSbGoIxkc8SQ6hVOJ6Wmhdo= X-Received: by 2002:a4a:a58f:: with SMTP id d15mr554121oom.36.1601294046985; Mon, 28 Sep 2020 04:54:06 -0700 (PDT) MIME-Version: 1.0 References: <20200921132611.1700350-1-elver@google.com> <20200921132611.1700350-4-elver@google.com> <20200921143059.GO2139@willie-the-truck> In-Reply-To: <20200921143059.GO2139@willie-the-truck> From: Marco Elver Date: Mon, 28 Sep 2020 13:53:55 +0200 Message-ID: Subject: Re: [PATCH v3 03/10] arm64, kfence: enable KFENCE for ARM64 To: Will Deacon , Alexander Potapenko , Andrew Morton Cc: "H. Peter Anvin" , "Paul E. McKenney" , Andrey Konovalov , Andrey Ryabinin , Andy Lutomirski , Borislav Petkov , Catalin Marinas , Christoph Lameter , Dave Hansen , David Rientjes , Dmitry Vyukov , Eric Dumazet , Greg Kroah-Hartman , Hillf Danton , Ingo Molnar , Jann Horn , Jonathan Cameron , Jonathan Corbet , Joonsoo Kim , Kees Cook , Mark Rutland , Pekka Enberg , Peter Zijlstra , SeongJae Park , Thomas Gleixner , Vlastimil Babka , "the arch/x86 maintainers" , "open list:DOCUMENTATION" , LKML , kasan-dev , Linux ARM , Linux Memory Management List Content-Type: text/plain; charset="UTF-8" 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: On Mon, 21 Sep 2020 at 16:31, Will Deacon wrote: > On Mon, Sep 21, 2020 at 03:26:04PM +0200, Marco Elver wrote: > > Add architecture specific implementation details for KFENCE and enable > > KFENCE for the arm64 architecture. In particular, this implements the > > required interface in . Currently, the arm64 version does > > not yet use a statically allocated memory pool, at the cost of a pointer > > load for each is_kfence_address(). [...] > > For ARM64, we would like to solicit feedback on what the best option is > > to obtain a constant address for __kfence_pool. One option is to declare > > a memory range in the memory layout to be dedicated to KFENCE (like is > > done for KASAN), however, it is unclear if this is the best available > > option. We would like to avoid touching the memory layout. > Given that the pool is relatively small (i.e. when compared with our virtual > address space), dedicating an area of virtual space sounds like it makes > the most sense here. How early do you need it to be available? Note: we're going to send a v4 this or next week with a few other minor fixes in it. But I think we just don't want to block the entire series on figuring out what the static-pool arm64 version should do, especially if we'll have a few iterations with only this patch here changing. So the plan will be: 1. Send v4, which could from our point-of-view be picked up for merging. Unless of course there are more comments. 2. Work out the details for the static-pool arm64 version, since it doesn't seem trivial to do the same thing as we do for x86. In preparation for that, v4 will allow the __kfence_pool's attributes to be defined entirely by , so that we can fiddle with sections etc. 3. Send patch switching out the simpler arm64 version here for one that places __kfence_pool at a static location. Hopefully that plan is reasonable. Thanks, -- Marco