Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp268852imn; Fri, 29 Jul 2022 06:23:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR7utMK66kXqdfJ6MpGIm1ewLxw8KUfOIBuZ1idixpFPOX8ZuLRgzjB8zrgp3BJi6pekAgcb X-Received: by 2002:a17:90b:1987:b0:1f3:2700:775e with SMTP id mv7-20020a17090b198700b001f32700775emr4136708pjb.54.1659101031800; Fri, 29 Jul 2022 06:23:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659101031; cv=none; d=google.com; s=arc-20160816; b=06M5hRq4YIolWTXyoe3kJtYNRf9QNh5dNwX3DbgL+WjfgCB4V2R9OaHcU9k9kC7GI/ sAmAAZtwn4QXeQiGUkWqZRRNby9G7CDYqtZVhWeY1SXmByVRZmzzmVcbsBTQ/0lr2EoS b7KLMiZ5JyvLxXZScyNioDSkDLSlSiVVWDaT57zpqBT3+Z3IwgWC5kROLl5KEZQx5aP2 RSt4WSCSq3Q72t7nw9Eji2OZg9umXeXFFVsg1nTwqZTlJKCXSuzr5kxq6U6PP0nJ0eC4 Fot1hRiWpGYTgd61RZ0Lk8IVlRtt/5BJJSjfRs1sBhWaeKA7zALSs9PcBhDnNOaeonVD qwvg== 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:date :message-id:subject:references:in-reply-to:cc:to:from; bh=Dre+Hg1sua5eW1KpnFdEEhnidEx70mXNiCwKtJbdn3g=; b=Mhsi78qi6/65NTNSDYnHa25b1yhxYgqWm9tHnVan3EPI3MPtumdlng/x6Cb7rYZCty ysOY0XVRk2O8am1e6U/T6Ql9KHFI6kC74yIIv4tWoeTschS4r8EnBphtaGYCQ7pO4+AX D/BtvMaUh0FbZRAzHZsM60PQiTJLI/V7BhLzljB/cS7vK7T9+FGDnKjpUBNDtu++j52e kKfH363GJSvtsANO9Y1GaRTKR2yOQds08QUShUQAmyqInvese/a6On1arEuotHg0GlBs gnhtXJIcT5zmtwoTRIDeuXmP9D0pN6vwKAuzK6zjqY01mhlGURb0BBm9ImQbDeyHpEJq gfUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x8-20020a17090a8a8800b001f061a4d77fsi7680018pjn.42.2022.07.29.06.23.35; Fri, 29 Jul 2022 06:23:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236535AbiG2NL1 (ORCPT + 99 others); Fri, 29 Jul 2022 09:11:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236550AbiG2NKv (ORCPT ); Fri, 29 Jul 2022 09:10:51 -0400 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 791813AE69 for ; Fri, 29 Jul 2022 06:10:49 -0700 (PDT) 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 4LvSYy5XDWz4xG0; Fri, 29 Jul 2022 23:10:46 +1000 (AEST) From: Michael Ellerman To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, Erhard Furtner , linux-kernel@vger.kernel.org In-Reply-To: <2ee707512b8b212b079b877f4ceb525a1606a3fb.1656655567.git.christophe.leroy@csgroup.eu> References: <2ee707512b8b212b079b877f4ceb525a1606a3fb.1656655567.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH] powerpc/32s: Fix boot failure with KASAN + SMP + JUMP_LABEL_FEATURE_CHECK_DEBUG Message-Id: <165909975339.253830.11928843532091953158.b4-ty@ellerman.id.au> Date: Fri, 29 Jul 2022 23:02:33 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 Jul 2022 08:06:15 +0200, Christophe Leroy wrote: > Since commit 4291d085b0b0 ("powerpc/32s: Make pte_update() non > atomic on 603 core"), pte_update() has been using > mmu_has_feature(MMU_FTR_HPTE_TABLE) to avoid a useless atomic > operation on 603 cores. > > When kasan_early_init() sets up the early zero shadow, it uses > __set_pte_at(). On book3s/32, __set_pte_at() calls pte_update() > when CONFIG_SMP is selected in order to ensure the preservation of > _PAGE_HASHPTE in case of concurrent update of the PTE. But that's > too early for mmu_has_feature(), so when > CONFIG_JUMP_LABEL_FEATURE_CHECK_DEBUG is selected, mmu_has_feature() > calls printk(). That's too early to call printk() because KASAN > early zero shadow page is not set up yet. It leads to a deadlock. > > [...] Applied to powerpc/next. [1/1] powerpc/32s: Fix boot failure with KASAN + SMP + JUMP_LABEL_FEATURE_CHECK_DEBUG https://git.kernel.org/powerpc/c/6042a1652d643d1d34fa89bb314cb102960c0800 cheers