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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 E2704C433E0 for ; Mon, 22 Mar 2021 11:08:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 648A861931 for ; Mon, 22 Mar 2021 11:08:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 648A861931 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 481D26B00B0; Mon, 22 Mar 2021 06:49:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 431C46B00B2; Mon, 22 Mar 2021 06:49:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2D09C6B00B3; Mon, 22 Mar 2021 06:49:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0148.hostedemail.com [216.40.44.148]) by kanga.kvack.org (Postfix) with ESMTP id 0D9316B00B0 for ; Mon, 22 Mar 2021 06:49:26 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 765FD6D95 for ; Mon, 22 Mar 2021 11:08:16 +0000 (UTC) X-FDA: 77947236108.14.F3DCB68 Received: from ozlabs.org (ozlabs.org [203.11.71.1]) by imf02.hostedemail.com (Postfix) with ESMTP id 681414080F44 for ; Mon, 22 Mar 2021 11:08:15 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4F3sDT0lfsz9sS8; Mon, 22 Mar 2021 22:08:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1616411289; bh=uxa4pHHTMVzSJZOPCsz78YK8wlcYnsE951BCdVMBFh8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cFUGRWY/Qr86qwsUK1d49CiSAXP5qdPTyn3zQzF0R4HHxwcLccxcP0SLc9nzQn2+J 9gKFUP4LO8HRRZ6KQud4YGoe+r7qHqfCG0MDFn//jYBydvWrKeEuZU8i79EIaYT9W5 Rdmu/Md7ms21WOn2mLDRIFJFWMfe+tLCNZjioXivdjsNsbBwNiqfprfvYqBiYh3G77 22lkMpE52ooBfNdL2474eXWjEsltIIw5ajfcF41sfwpZvEJ7XoKm2cNSfbrai8pKNm cZGA/OSAHRB1NYjAIYC6fT1RHoXNhFFGD0lh7u2v/QIDupcGg02EU7/UhdXk0iZ0aZ IsibVdS+bb0RA== From: Michael Ellerman To: Daniel Axtens , Balbir Singh Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, kasan-dev@googlegroups.com, christophe.leroy@csgroup.eu, aneesh.kumar@linux.ibm.com Subject: Re: [PATCH v11 1/6] kasan: allow an architecture to disable inline instrumentation In-Reply-To: <87r1k8av4j.fsf@dja-thinkpad.axtens.net> References: <20210319144058.772525-1-dja@axtens.net> <20210319144058.772525-2-dja@axtens.net> <20210320014606.GB77072@balbir-desktop> <87r1k8av4j.fsf@dja-thinkpad.axtens.net> Date: Mon, 22 Mar 2021 22:08:05 +1100 Message-ID: <87v99jh2ei.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 681414080F44 X-Stat-Signature: 5gdt9cou9z53sfw3ra9tiun7wgy7ir96 Received-SPF: none (ellerman.id.au>: No applicable sender policy available) receiver=imf02; identity=mailfrom; envelope-from=""; helo=ozlabs.org; client-ip=203.11.71.1 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616411295-713180 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: Daniel Axtens writes: > Balbir Singh writes: > >> On Sat, Mar 20, 2021 at 01:40:53AM +1100, Daniel Axtens wrote: >>> For annoying architectural reasons, it's very difficult to support inline >>> instrumentation on powerpc64. >> >> I think we can expand here and talk about how in hash mode, the vmalloc >> address space is in a region of memory different than where kernel virtual >> addresses are mapped. Did I recollect the reason correctly? > > I think that's _a_ reason, but for radix mode (which is all I support at > the moment), the reason is a bit simpler. Actually Aneesh fixed that in: 0034d395f89d ("powerpc/mm/hash64: Map all the kernel regions in the same 0xc range") The problem we had prior to that was that the linear mapping was at (0xc << 60), vmalloc was at (0xd << 60), and vmemap was at (0xf << 60). Meaning our shadow region would need to be more than (3 << 60) in size. cheers