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 1D7FFC10F14 for ; Tue, 15 Oct 2019 06:32:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D2DD520872 for ; Tue, 15 Oct 2019 06:32:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=axtens.net header.i=@axtens.net header.b="AAAw2I6J" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2DD520872 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 7367F8E0006; Tue, 15 Oct 2019 02:32:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6E5398E0001; Tue, 15 Oct 2019 02:32:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5FBA08E0006; Tue, 15 Oct 2019 02:32:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id 3E33E8E0001 for ; Tue, 15 Oct 2019 02:32:14 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id BEAEF181AEF30 for ; Tue, 15 Oct 2019 06:32:08 +0000 (UTC) X-FDA: 76045049136.24.war99_12aaec23dd00b X-HE-Tag: war99_12aaec23dd00b X-Filterd-Recvd-Size: 3854 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 15 Oct 2019 06:32:08 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id i76so11508847pgc.0 for ; Mon, 14 Oct 2019 23:32:07 -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=ocFENo40eBkOamSyXJJZMLvSNduSNIAZPjJ2SmsMR/E=; b=AAAw2I6JicRTwP1XQ0Mh+Yf7oGvbrwyVbwgzWtL+OohVihJM7BnkTspwNITR/85fii CyRw8980Lw/qYHLo0fK9SRqJB2hxVndfjPwJE0pYel9OIy3uyAJ9ws0VAx2iuFbM6Mz+ qRU4d+kp7W/TtFg44B6fpgznp1dJM2QAK2aUo= 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=ocFENo40eBkOamSyXJJZMLvSNduSNIAZPjJ2SmsMR/E=; b=POx4pgh0sGbyzk7eWYzuwA4GKfVFZLcjiZJPWwFUxlOhyQ9C8BXerx7v4GhDvOZNje EyuzrA1aoNS4ACs/Suebf8NNkZXn30G6hLeMXacoBcolG+Lgdq5Zbmek6yoypaGOJ6uN WdH9OuIvxCTqrZtklOvrwSHQRUAG+uuFuKHNjioMCpmTowiFSUaXN3Je4sd9ifWEf6XC J1kJIqpX0sqLbR8Zbu6HsiTFZA8XYp1WkagtRHG41WUfyKrsMkMchS+rwFJsr4VtFeWN TOxWpk8wODDY/QHLHlWn65k+Pmkt/PHgrcqEQS72gUFmsXmsDW4fPaIQ0/g/UMekL0BO mK2g== X-Gm-Message-State: APjAAAUfW9GSbiY3wBxQ/xG3qXEC3flrb91hEHhMcQNC7Qq34lx+oNEv Lk/FSZ/5aNi0d6aSMEJcNFbsmA== X-Google-Smtp-Source: APXvYqy12kiIddn/cKAZnrFSYzEeliZZBLeUJMlvZ7ea/7DvNH++JQuArzk3aup3MdDRAMq5RabnqA== X-Received: by 2002:a63:7405:: with SMTP id p5mr37573902pgc.264.1571121127089; Mon, 14 Oct 2019 23:32:07 -0700 (PDT) Received: from localhost (ppp167-251-205.static.internode.on.net. [59.167.251.205]) by smtp.gmail.com with ESMTPSA id i1sm24230357pfg.2.2019.10.14.23.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Oct 2019 23:32:06 -0700 (PDT) From: Daniel Axtens To: Mark Rutland Cc: Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, x86@kernel.org, glider@google.com, luto@kernel.org, linux-kernel@vger.kernel.org, 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: <20191014152717.GA20438@lakrids.cambridge.arm.com> References: <20191001065834.8880-1-dja@axtens.net> <20191001065834.8880-2-dja@axtens.net> <352cb4fa-2e57-7e3b-23af-898e113bbe22@virtuozzo.com> <87ftjvtoo7.fsf@dja-thinkpad.axtens.net> <20191014152717.GA20438@lakrids.cambridge.arm.com> Date: Tue, 15 Oct 2019 17:32:03 +1100 Message-ID: <875zkqtt7g.fsf@dja-thinkpad.axtens.net> MIME-Version: 1.0 Content-Type: text/plain 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: > There is a potential problem here, as Will Deacon wrote up at: > > https://lore.kernel.org/linux-arm-kernel/20190827131818.14724-1-will@kernel.org/ > > ... in the section starting: > > | *** Other architecture maintainers -- start here! *** > > ... whereby the CPU can spuriously fault on an access after observing a > valid PTE. > > For arm64 we handle the spurious fault, and it looks like x86 would need > something like its vmalloc_fault() applying to the shadow region to > cater for this. I'm not really up on x86 - my first thought would be that their stronger memory ordering might be sufficient but I really don't know. Reading the thread I see arm and powerpc discussions but nothing from anyone else, so I'm none the wiser there... Andy, do you have any thoughts? Regards, Daniel > > Thanks, > Mark.