Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp578566ybt; Fri, 19 Jun 2020 08:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy50taqKsjAFbUuWhk8onXsCrl+wtS7aeqTst2TgNu/lYCCgZ4511OnMV1k165HTgCn+rHW X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr3849749edr.264.1592580880259; Fri, 19 Jun 2020 08:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592580880; cv=none; d=google.com; s=arc-20160816; b=COv7ywlTyewD16a7WyOG+1ipwz7Hp6btTBTdTJ26rwwSgvkwRkxU2A9MRNATkn7KSo t8LbR/oheeBGF1SgFuEpG5xH4PazrEEwuPKAxqb+PvO34HFHt7DP49DofQlxCKzWxAIg o6I9dLCbnYpFpj3Vhd6rxYSBXiTYM/Cl4zVCGOTGFcHPCa6KtHmaV0l+eo1DVdqYZRQT ixC9jDSQEyoVKLloDwzwC9HHP2hA9KRh9gVpv9afcc+4TlBTuaPP2ozQYu7kHW22BGEe 4OyXuye5rDOfLOUi0xG3WA8dcq8wEotd8evHodMzyVmkxFIYPgggBdeMZNu2Kbe8OgUX V7Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PCOoWxHb7vgqrMLCHKgYsh9EaaIzFdZoZ0M7aQy3HSA=; b=AXAu8weU8KyM6rwGpOLjdQ5LL8/w5/ZjEmHSxD4nah0fRAODkAQQtcazN4lkJNEbSy f9mCYrnTQ4eLE+zAKLYAo3th/Ukdo4YVvO/B3El4tM5bwpmzUziu4w5FKJF9fHn2vmXx OxA2D46JF/A6Ajd4gsCpl016m5UHlTyL51F1Abum+QLQVWh0F3Fsz4+93/R7baxyaNWL rX+EMetemKqFypdGJuwRu5+TQP04jO9dXeojw7bnn/TH+Y5eCDnBM88263xzHYSRLL7Q 646ADXgLYpHE+vxGHbdp7iGnPJQQeOSeil4Gx1c8HAW0Tp7ZaOGiLTDBjw2mi20gRFbK CkJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oNWJivng; 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 d15si3947266ejt.482.2020.06.19.08.34.18; Fri, 19 Jun 2020 08:34:40 -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=@kernel.org header.s=default header.b=oNWJivng; 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 S2404848AbgFSPb3 (ORCPT + 99 others); Fri, 19 Jun 2020 11:31:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:35376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393817AbgFSPbW (ORCPT ); Fri, 19 Jun 2020 11:31:22 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A0D362193E; Fri, 19 Jun 2020 15:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592580682; bh=r2yHVLBRkViANlrNr1ctGy2yImraShqdjiFxyaql51U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oNWJivngs82eemhTvekDlFttaYZZ1diMB6IyWkGNiLdhgcheos1AKveHrwQQtbwFV rX3j0+ynGLYKt0SUZLxRJQGfBCUtATA7TYb8HH3pM1KvjLZ9hMRL9y2CjTe5V6rNdP QZ3J0huZrZFNrFBUNjp+HEFL4BPVFrTMhW4AO4jw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Christophe Leroy , Michael Ellerman Subject: [PATCH 5.7 341/376] powerpc/32: Disable KASAN with pages bigger than 16k Date: Fri, 19 Jun 2020 16:34:19 +0200 Message-Id: <20200619141726.474527078@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141710.350494719@linuxfoundation.org> References: <20200619141710.350494719@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy commit 888468ce725a4cd56d72dc7e5096078f7a9251a0 upstream. Mapping of early shadow area is implemented by using a single static page table having all entries pointing to the same early shadow page. The shadow area must therefore occupy full PGD entries. The shadow area has a size of 128MB starting at 0xf8000000. With 4k pages, a PGD entry is 4MB With 16k pages, a PGD entry is 64MB With 64k pages, a PGD entry is 1GB which is too big. Until we rework the early shadow mapping, disable KASAN when the page size is too big. Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Cc: stable@vger.kernel.org # v5.2+ Reported-by: kbuild test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7195fcde7314ccbf7a081b356084a69d421b10d4.1590660977.git.christophe.leroy@csgroup.eu Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -170,8 +170,8 @@ config PPC select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU select HAVE_ARCH_JUMP_LABEL - select HAVE_ARCH_KASAN if PPC32 - select HAVE_ARCH_KASAN_VMALLOC if PPC32 + select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14 + select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14 select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT