Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2968204pxb; Tue, 12 Oct 2021 17:51:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd2fWMmNuNyPepCd+CMAWlTqBzK8PHjqVft0HN2FILQzx/c5UQ1gQfrH6UkwQ4OUVzw69P X-Received: by 2002:a62:64c9:0:b0:44d:27ba:9a8e with SMTP id y192-20020a6264c9000000b0044d27ba9a8emr11396087pfb.2.1634086275916; Tue, 12 Oct 2021 17:51:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634086275; cv=none; d=google.com; s=arc-20160816; b=GdRwcJIgTsYWPXan1fUb6PR1ySYnReVJXPJ7MmIemdis4wyfFVJY3StKsm/+MlMK4P NEsp/tuCS6VmzlvGmB3C/5p/Q/N8/YA2JPcDSNbWw2vDxtq2TPqZkT3BQkeKx+r88m7w x1LikLPA8hhudXDuwqXVMFAoDaAanF9TP967np9jZOyGv37rS5WWrSOmKx775Ca+/il3 4SfqJpkbBEa9kBup6UHgiYfAQfhV1Bd32qcp9jhrztPL2rlzWMvqNy/Q4WbRMJZE08tx xO0ai78kkkbLt81NBqEuKhM3A2eE3JG+7YAnOEwTQkp2N/AJGsVoYx4xsG7YDI4yyyNI a1RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=0MAC1u3ATdxVjyD5EZoT+QRVzUt/R1FkYBNmkt5DGd0=; b=nGeeY6nO2GiAqUzkuOekulwACHJ96+Cc7nlv1CmSxBZsuHkSPiVfxVUOwZCd/8EuLq BjA/SU+TbVYU2JFVjPVgXxDfyIQ87ZQ125xec6tI1vOdQOMvQ8w8ilcaYeSwaIAqAdse 5WT1TBuUUb7kY9+2NuED5MmEbox/BmgyutriUNzv1/7zt41WtS9RdSZmsFYYVX57Bp0C zcjGBfrP/hgfLFiReDeyxQ8effHchIewRpnz1aRII+b4lqG7tqWPWvhuTDDervP9Gvns +hnbZ8w/DnVyXKUt2OpEqEdwZeGgIR7eVw9NsOUm9Xqw0XVUiKnl1jMuTYTriQy9+ss/ X0lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=fGfVx6FR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m14si16484866pls.371.2021.10.12.17.51.03; Tue, 12 Oct 2021 17:51:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=fGfVx6FR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235403AbhJMAuZ (ORCPT + 99 others); Tue, 12 Oct 2021 20:50:25 -0400 Received: from gandalf.ozlabs.org ([150.107.74.76]:34163 "EHLO gandalf.ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234265AbhJMAuY (ORCPT ); Tue, 12 Oct 2021 20:50:24 -0400 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 4HTYmh52HYz4xbG; Wed, 13 Oct 2021 11:48:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1634086101; bh=0MAC1u3ATdxVjyD5EZoT+QRVzUt/R1FkYBNmkt5DGd0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=fGfVx6FRe6q9AL6bIxKEFSRpZA6dRKPC8cL7lvPyM5n4SayPEXkfOTraMGb3foyPm NqyiEKc5l2dhffhCj6L6Qln2ZmtYOwy1VMgh13Ad7aIebskCayASa1PkTQTOi3Ntb6 epHqWjUnZz4YiqaayoW1b09Z02R+zJLGXSwCqSZSemhF18x2ScJX1CuLUqkUp4O5ye epcyAZVKVHkB/K/mxqG1qhKOwui2+fGhbEpzy8MdzvEus6D7IljelO/YILBv4veWog kOcoKLikSTAyYKW9R1MdVXh8dHRmyTlsWdcR4Gu6QRCuPM5kIdZMTAIeZZD+sZStNu DIWRiTBoTLPoA== From: Michael Ellerman To: Christophe Leroy , Liu Shixin , Marco Elver , Benjamin Herrenschmidt , Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: don't select KFENCE on platform PPC_FSL_BOOK3E In-Reply-To: <9c1ee778-b38b-3d41-37f3-5ea22dca063b@csgroup.eu> References: <20210924063927.1341241-1-liushixin2@huawei.com> <77ce95e4-1af1-6536-5f0c-a573c648801a@huawei.com> <87bl3u7oay.fsf@mpe.ellerman.id.au> <9c1ee778-b38b-3d41-37f3-5ea22dca063b@csgroup.eu> Date: Wed, 13 Oct 2021 11:48:20 +1100 Message-ID: <8735p57nsb.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > Le 12/10/2021 =C3=A0 08:24, Michael Ellerman a =C3=A9crit=C2=A0: >> Liu Shixin writes: >>> kindly ping. >>=20 >> I was under the impression you were trying to debug why it wasn't >> working with Christophe. > > The investigation was a bit dormant to be honest since Liu confirmed=20 > that neither KFENCE not DEBUG_PAGEALLOC works. No worries. Sorry it fell to you to do the investigation. > I now looked at the effort to make it work, and it is not trivial. > At the time being, all linear space is mapped with pinned TLBs and=20 > everything is setup for space 0, with space 1 being used temporarily=20 > when doing heavy changes to space 0. > > We can't use standard pages for linear space on space 0 because we need=20 > memory mapped at all time for exceptions (on booke exception run with=20 > MMU on in space 0). > > In order to use standard pages, we'd need to reorganise the kernel to=20 > have it run mostly in space 1 (for data at least) where we would map=20 > almost everything with standard pages, and keep pinned TLB to map linear= =20 > space on space 0 for TLB miss exceptions. Then we'd do more or less like= =20 > book3s/32 and switch back into space 1 into other exceptions prolog. > > That could be good to do it as we could maybe have more code in common=20 > with non booke 32 bits, but it is not a trivial job. > > So I suggest that for now, we just make KFENCE and DEBUG_PAGEALLOC=20 > unselectable for booke/32 (e500 and 44x). Yep seems reasonable. cheers