Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1160454rwe; Sat, 27 Aug 2022 01:56:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR74FjAUVxsJC8buH0ibRIUZTG8HB+SoSpI6WEDhSIzU7B/+Lj6URMnOk2FXipqYGveUVCKp X-Received: by 2002:a17:902:d4c2:b0:172:c519:9004 with SMTP id o2-20020a170902d4c200b00172c5199004mr7272049plg.154.1661590613527; Sat, 27 Aug 2022 01:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661590613; cv=none; d=google.com; s=arc-20160816; b=DBrqEw+6q9hgcZVYCE9Ikg3XIHUmjmGI4auAHIau4///USjdkQduvC98tAKn6uyQNn knSNY+7MwyVNOMXsW74+b8N6PJ2mrXvj71Vot1ZJCmuUnYWrWwbKSJYtYHWoTKFx29D9 GYk7O9Z//lq65ZVuWyxxc8lUzZSfrLtzE85zSClO5vq2Q4FfeSh2XCpzuFwszOZqsCmT 3cPQYTaGpChloF5o3isCAHUzIezjVdVIQQg3q4K2U8aIt/Njxo+qLIkSUGfPpjtbE63a JgzrLRjEffMn7WnmqkfnG2ivM3rHUNbHZpFhB+6jz5MMoYCZC8f1nKg8ok/PYc9wzSy9 UEXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=KxvlGB8SaXAMkxOej08ij1ovWmRGqx7ZcAzrOyoP74Y=; b=wIjpTuQUkWk61Ds7E4Ybjwk0RwqwYT1IROjaAZTjKAJmvaiUVhVojzo7IX/laJFv9U a/f0zP+eR6w4iHMMgcTpR+o7vV9VLX9n2cT5QptFCLcZpTpwnkOESJUa+RbXspJrhvWG 9W6PUknJS8sS8R4j/sbJMfeNM7OhyDxpkKuSjleRC2ut8veFeROIEzyfsY2ed6P7hv5d mEGqNken2Vlb9B3DXK/U7jAu8rcyUUvuWSmT3+TQtHKQDL7W5/yezkPdZT9Hffu91/dE PIcURaFgMeZUdi+lI1yOHpFm8R1ZnUmIIaV0PmX4mJrkdp2NVbQTmTlsBNea6FY2Q4sS w24A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BOfe8z/2"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a170903018c00b0017127a4e742si3987040plg.443.2022.08.27.01.56.42; Sat, 27 Aug 2022 01:56:53 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="BOfe8z/2"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232557AbiH0Imt (ORCPT + 99 others); Sat, 27 Aug 2022 04:42:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230499AbiH0Ims (ORCPT ); Sat, 27 Aug 2022 04:42:48 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7993CD784 for ; Sat, 27 Aug 2022 01:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661589767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KxvlGB8SaXAMkxOej08ij1ovWmRGqx7ZcAzrOyoP74Y=; b=BOfe8z/2KtuCpzYWH2iaMu7yw3Z7DNX8IugiHUiqditOKC8wA3NMk01/GTJoClaxT+b6Fj NujynhITYDa5PhWrDMs3zHmF+LjavAfMHvCB1efVZaXbpLFgQGblxjPtGBC5/ZFUpB6Ebm X+qN6B3U1l2mY5AcJjRILmR4ygQ0g0w= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-288-YC8p255FNcWIac-8YjY4IA-1; Sat, 27 Aug 2022 04:42:41 -0400 X-MC-Unique: YC8p255FNcWIac-8YjY4IA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 571B21C05AAB; Sat, 27 Aug 2022 08:42:40 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 158762026D64; Sat, 27 Aug 2022 08:42:40 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id 27R8geEL007403; Sat, 27 Aug 2022 04:42:40 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id 27R8gb4e007399; Sat, 27 Aug 2022 04:42:37 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Sat, 27 Aug 2022 04:42:37 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Ard Biesheuvel cc: Will Deacon , Linus Torvalds , Alan Stern , Andrea Parri , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] wait_on_bit: add an acquire memory barrier In-Reply-To: Message-ID: References: <20220826112327.GA19774@willie-the-truck> <20220826174352.GA20386@willie-the-truck> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Sat, 27 Aug 2022, Ard Biesheuvel wrote: > On Sat, 27 Aug 2022 at 08:32, Ard Biesheuvel wrote: > > > > On Fri, 26 Aug 2022 at 21:10, Mikulas Patocka wrote: > > > > > > > > > > > > On Fri, 26 Aug 2022, Ard Biesheuvel wrote: > > > > > > > Could you try booting with earlycon? > > > > > > > > Just 'earlycon' and if that does not help, > > > > > > It doesn't help. > > > > > > > 'earlycon=uart8250,mmio32,' [IIRC, mcbin uses 16550 > > > > compatible UARTs, right?] > > > > > > mcbin is the host system (running a stable kernel fine). The crash happens > > > in a virtual machine. The vm uses /dev/ttyAMA0 as a console: > > > > > > Serial: AMBA PL011 UART driver > > > 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 45, base_baud = 0) is a PL011 rev1 > > > printk: console [ttyAMA0] enabled > > > > > > I tried earlycon=pl011,mmio32,0x9000000 - but it doesn't help, it hangs > > > without printing anything. > > > > > > > If you are using pl011, you should drop the mmio32 - it only takes a > > physical address (and optionally baud rate etc, but QEMU doesn't need > > those) > > Could you try the diff below please? > > --- a/arch/arm64/kernel/head.S > +++ b/arch/arm64/kernel/head.S > @@ -371,7 +371,9 @@ SYM_FUNC_END(create_idmap) > SYM_FUNC_START_LOCAL(create_kernel_mapping) > adrp x0, init_pg_dir > mov_q x5, KIMAGE_VADDR // compile time __va(_text) > +#ifdef CONFIG_RELOCATABLE > add x5, x5, x23 // add KASLR displacement > +#endif > adrp x6, _end // runtime __pa(_end) > adrp x3, _text // runtime __pa(_text) > sub x6, x6, x3 // _end - _text > Yes - this patch fixes the crash. Mikulas