Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1180447ybg; Tue, 2 Jun 2020 03:29:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwO8oGcOhS9514fiYzoM+37G3QrkTme/x8t+RFHtQgQRoZmVBfxDBCCPydFIeb58+kCCSCE X-Received: by 2002:a17:906:27c2:: with SMTP id k2mr22474152ejc.239.1591093760186; Tue, 02 Jun 2020 03:29:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591093760; cv=none; d=google.com; s=arc-20160816; b=xs8AFffDUcvLHOLvJME3tBhrWXrO7oPgpUxw/JithxUyAcDdFM4Cf71AeoxiE/KU8V bYTeNMeQjEwz5x9AgAS+7dFMSfXbANZn/Xs3q2U5LFgbwGzr4RNT1tNwdS4y071KgZbm Dl3ZJ4CH2zwA0j6OsWqQ0vLKUNqMogj+MNECIk4qR499apvgm+hKkdt4H/0LU0ovSZlf Vaaur4G3nDQzhH5q9OSyVKqV5YcBb7tFR5JABI1mt+UiVFcRu324oRnqZhIzgJqSJJf7 8MEBx35xPPTCD1cH5ZrcDAU1bMa2DafaTXyGDHlMUQW5/yfgh8+gCwoxi/4HwLsqllkg NzzA== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=Jcqt7hfuim046WDLkxIWmA2G3o95vtjGSmh/TUVNIhs=; b=zZX/C01A6R3oD3x0iiCUqfyl1IykXq0wzGh1XvOiBjodbjuL/4nkLlWYlWCDF5UAoa fj4ULR4q1IR8FdOoz+HDaTfz+ZaYMJcc3NBVJKQvCGpNs6amSI//LrdYz1Fy1LrEzRia r35DInH+nDKBJfm9sWY39GxW9oKhky9pMBRoJPWd2jZ18AiRU36pmwM0Eb15nR0SBtBN m0gGErteMbnPLND6PTdEoLXvCt9V08WoQdKPKWutfsdhcM+GgyFzjpmuD3iB7gZzhlG1 6MXD1AFj4/3S25SkAEHO8mti4meipK+YZAIOuLCIYdBgN/SpbpDDZhyK3iQlJPlmforb NLgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="R1/NZBR1"; 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 m3si1273596edv.247.2020.06.02.03.28.57; Tue, 02 Jun 2020 03:29:20 -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="R1/NZBR1"; 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 S1728103AbgFBK0F (ORCPT + 99 others); Tue, 2 Jun 2020 06:26:05 -0400 Received: from ozlabs.org ([203.11.71.1]:39659 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727788AbgFBKZ0 (ORCPT ); Tue, 2 Jun 2020 06:25:26 -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 49bp8N3T04z9sSg; Tue, 2 Jun 2020 20:25:24 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1591093524; bh=bN3rqa6f6l9DlK7L1JNF8T+VNnchQEaRZ8dgVazwIy8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=R1/NZBR10nlS7ll7pX2mk/fNINJZy+PwyKktbGIg2EldKGyP0lxI5mgaKPeLTkw0J Hvmu/kSOTp6jQk7f4Agg10q2+XVIS+yJmDllATSjHioYsrlvDS6zl2VVvZf1sp0nk4 ZIJ8LLounljxtQZLdSkXQeszAvrAzyWj7rNLXtT280ij0Khs1Ft2Vv4IICTNrtVbE3 RhOmX5FIAprMv5VTOhaK1SqrgvflqBIGCut8PW2ETD2y0VFUxVDbs1pNsasLeNDHGk LtEM42rX1w91hdpauSeBzYJtNrjkN9jlVUnxQn6cxo6+eLpw4foZIhPeTLZhoZ7xaw t9t9p1jZvievw== From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/32: disable KASAN with pages bigger than 16k In-Reply-To: References: <7195fcde7314ccbf7a081b356084a69d421b10d4.1590660977.git.christophe.leroy@csgroup.eu> Date: Tue, 02 Jun 2020 20:25:48 +1000 Message-ID: <87ftbdix1v.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy writes: > Le 28/05/2020 =C3=A0 12:17, Christophe Leroy a =C3=A9crit=C2=A0: >> 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. >>=20 >> The shadow area has a size of 128Mbytes starting at 0xf8000000. >> With 4k pages, a PGD entry is 4Mbytes >> With 16k pages, a PGD entry is 64Mbytes >> With 64k pages, a PGD entry is 256Mbytes which is too big. > > That's for 32k pages that a PGD is 256Mbytes. > > With 64k pages, a PGD entry is 1Gbytes which is too big. > > Michael, can you fix the commit log ? Yes. powerpc/32: Disable KASAN with pages bigger than 16k =20=20 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. =20=20 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. =20=20 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 cheers