Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5363274ybi; Wed, 12 Jun 2019 01:00:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyAjNy6x5R2LzVsBSgqpluTjL657H/FgDb1qCNUnzdMB2sVPNcU3D2lcS7Unq6cTMWCdj2Y X-Received: by 2002:a63:231c:: with SMTP id j28mr23677029pgj.430.1560326428054; Wed, 12 Jun 2019 01:00:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560326428; cv=none; d=google.com; s=arc-20160816; b=G8/m/QLVzqCTMMmYI84yNVu0P253Zk31KYBO/ZB+NqUNuPNZCGgZpnXq2YrW4GL5nq vU8T8HQUcOAeb6LBqmFs4/QyiMr7S3Tp27zQteZ3bOOJooXWFfbCZAJOWGgA/77rWzkZ jh4xfnRiykrpHGBB4D4+P+xzH3xl3y67qLzBn1X4qg85MYEfmfPpKTeayUummwzdaFEo gt1PwnsEc3jwj3s9xNDYOeSFoYgdmvFAE4+uEJYy8RXtWIWn0O9rDhr79fjh5sk1S3hB 5CGUc9NqerRhevdZvvczxf8kVjdvhw+DUhg8R3TCG54ZCGm3rHMMv+ZstTmv5lOgRTjo qFAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=93//PyZUdsuDALuaNcw2K4uMBOp6khiPeD/bG5cJjJA=; b=YpEBIPpLYVz6a5ZaN4x+5hFemHqVZDBW5M0BjUWZMGmM928HQEU0DIHH4SE8CK1wRY FzlTDFHzQgvC3meaFhxthmXkq4b0Qvg6fq02JcdoDSGSZGOQnXCu/e40DVpKhRq6i3YB 6YqiH54WegibU4r9deatNtiy1n151MjnnGphj0FKFE/7IqFNIi4dRyHLqMZwXzAvFueA h0eFI/cfllzD3SttHmfFoQM/B/kDgeFIvtlEYuRInvYsVvcgT7QjQ6sO1MFJ9K0gQ3SX rop9YmMGyXEj/jHAbO0L/90uRmLMn1hEvSepLh7Qpa0GUwZGeSzN+1MAHEWlufI+2jDa XnYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s59si14716770plb.294.2019.06.12.01.00.13; Wed, 12 Jun 2019 01:00:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730444AbfFLE7N (ORCPT + 99 others); Wed, 12 Jun 2019 00:59:13 -0400 Received: from ozlabs.org ([203.11.71.1]:40361 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730393AbfFLE7M (ORCPT ); Wed, 12 Jun 2019 00:59:12 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 45NvmH0kL6z9sBr; Wed, 12 Jun 2019 14:59:10 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: c21f5a9ed85ca3e914ca11f421677ae9ae0d04b0 X-Patchwork-Hint: ignore In-Reply-To: <90d30adb0943a11ab127808c03229ba657478df4.1559566521.git.christophe.leroy@c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Mathieu Malaterre From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/32s: fix booting with CONFIG_PPC_EARLY_DEBUG_BOOTX Message-Id: <45NvmH0kL6z9sBr@ozlabs.org> Date: Wed, 12 Jun 2019 14:59:10 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-06-03 at 13:00:51 UTC, Christophe Leroy wrote: > When booting through OF, setup_disp_bat() does nothing because > disp_BAT are not set. By change, it used to work because BOOTX > buffer is mapped 1:1 at address 0x81000000 by the bootloader, and > btext_setup_display() sets virt addr same as phys addr. > > But since commit 215b823707ce ("powerpc/32s: set up an early static > hash table for KASAN."), a temporary page table overrides the > bootloader mapping. > > This 0x81000000 is also problematic with the newly implemented > Kernel Userspace Access Protection (KUAP) because it is within user > address space. > > This patch fixes those issues by properly setting disp_BAT through > a call to btext_prepare_BAT(), allowing setup_disp_bat() to > properly setup BAT3 for early bootx screen buffer access. > > Reported-by: Mathieu Malaterre > Fixes: 215b823707ce ("powerpc/32s: set up an early static hash table for KASAN.") > Signed-off-by: Christophe Leroy > Tested-by: Mathieu Malaterre Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/c21f5a9ed85ca3e914ca11f421677ae9 cheers