Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 525D8C6FD19 for ; Thu, 16 Mar 2023 12:41:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229629AbjCPMly (ORCPT ); Thu, 16 Mar 2023 08:41:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbjCPMlw (ORCPT ); Thu, 16 Mar 2023 08:41:52 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28D8DB0B92 for ; Thu, 16 Mar 2023 05:41:50 -0700 (PDT) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 7C20C3F22A for ; Thu, 16 Mar 2023 12:41:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1678970508; bh=0pyT45jGFslmx3X3EIC6TC1Ls4szNKSRMgbKXJ/ytIk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=HPzPo9DuU+0teu/rhIR9t59N0iGpxKFJTawAy8H8jWtkI54LSNz/Db9a4DAXlXp+3 M7cquTYxxDLMpc1xex0fKv/NLrUEaCPiyWXlE4Wo6alHaIxLs1z+nmemDIpjVM68Xx Xe0RtKH+Uy1DyzwPSeXz7nU7bQhG2myn7F1uPjlExwQG3DJqgFHOVyicsyYlfS4Yzj EdCzmCGwv0wOAEZdpZ+BWvflHrfPPQV14ag+lySZeDopwrdlTq1Q19/8SZt8Fdb2Ap c0C8q5FKXtqo+ClJQ1VkFifVtRo71UikBiwkHqd4ZUQw4ozfA1OaJNbupBY4/pBN+2 062E1gW4bqISA== Received: by mail-ed1-f69.google.com with SMTP id y24-20020aa7ccd8000000b004be3955a42eso2861320edt.22 for ; Thu, 16 Mar 2023 05:41:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678970508; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0pyT45jGFslmx3X3EIC6TC1Ls4szNKSRMgbKXJ/ytIk=; b=OIe9a0mY+05IbSzpU2skjp/dGQF9hQUbcgg1RCmHADStW8E7jnXSkWzrEog9LhbB7z 9dck6x3rCam7q1qMe/iyNX4fMHNPgztmPuzKsMBI6gkAui0N1co0rSZ620yz85VImHVq KE+P28qqCTOPxfs2iPapYMH48KF8ps9KLeVPStivTulmgIgrMGE3MRY0/opBTQrzN51h k/gDSE8JP/JQraDhcqJ6wpx0mOCF4PlEAmlmc1KmGk00je0QXhXqeig60TMSHU6JfZgB lNa1AAZ9UApRBHqiDiUOX9Lpl0p6sI07D3jwABKEbrybfmy31uTG7gFfsGnE4YUGUvpX fkRg== X-Gm-Message-State: AO0yUKWM0BXyv5dQKsAQWlPPh8C52/Q2RlcUeYzJuiz8cXI637gZGit8 RQJgdBvp3YVjMkyjMaShu3riNTJRxMf0doTpjYmk3xk/IUTbl8/DTs2xpdmKcNGVoH7yz9VVGr+ NniI+UM0TkuL5dhlMLsLTWjeDMI75gsXaefvRMKiVHg== X-Received: by 2002:a17:906:5945:b0:888:9bd6:34d2 with SMTP id g5-20020a170906594500b008889bd634d2mr8643996ejr.63.1678970508193; Thu, 16 Mar 2023 05:41:48 -0700 (PDT) X-Google-Smtp-Source: AK7set/EWxsZt3eyGkFD5QDfqRBo8DD51mYYArCgq0v7oDskDMs+nKK5dd92m3qcERtsr+vgh0Ujeg== X-Received: by 2002:a17:906:5945:b0:888:9bd6:34d2 with SMTP id g5-20020a170906594500b008889bd634d2mr8643978ejr.63.1678970507894; Thu, 16 Mar 2023 05:41:47 -0700 (PDT) Received: from localhost (host-79-53-23-214.retail.telecomitalia.it. [79.53.23.214]) by smtp.gmail.com with ESMTPSA id jz26-20020a17090775fa00b008e309da3253sm3791482ejc.202.2023.03.16.05.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 05:41:47 -0700 (PDT) Date: Thu, 16 Mar 2023 13:41:46 +0100 From: Andrea Righi To: Ard Biesheuvel Cc: "Jason A. Donenfeld" , Paolo Pisati , linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Darren Hart Subject: Re: kernel 6.2 stuck at boot (efi_call_rts) on arm64 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 16, 2023 at 01:38:30PM +0100, Ard Biesheuvel wrote: > On Thu, 16 Mar 2023 at 13:21, Ard Biesheuvel wrote: > > > > On Thu, 16 Mar 2023 at 12:34, Andrea Righi wrote: > > > > > > On Thu, Mar 16, 2023 at 11:18:21AM +0100, Ard Biesheuvel wrote: > > > > On Thu, 16 Mar 2023 at 11:03, Andrea Righi wrote: > > > > > > > > > > On Thu, Mar 16, 2023 at 10:55:58AM +0100, Ard Biesheuvel wrote: > > > > > > (cc Darren) > > > > > > > > > > > > On Thu, 16 Mar 2023 at 10:45, Andrea Righi wrote: > > > > > > > > > > > > > > On Thu, Mar 16, 2023 at 08:58:20AM +0100, Ard Biesheuvel wrote: > > > > > > > > Hello Andrea, > > > > > > > > > > > > > > > > On Thu, 16 Mar 2023 at 08:54, Andrea Righi wrote: > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > > > > > the latest v6.2.6 kernel fails to boot on some arm64 systems, the kernel > > > > > > > > > gets stuck and never completes the boot. On the console I see this: > > > > > > > > > > > > > > > > > > [ 72.043484] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: > > > > > > > > > [ 72.049571] rcu: 22-...0: (30 GPs behind) idle=b10c/1/0x4000000000000000 softirq=164/164 fqs=6443 > > > > > > > > > [ 72.058520] (detected by 28, t=15005 jiffies, g=449, q=174 ncpus=32) > > > > > > > > > [ 72.064949] Task dump for CPU 22: > > > > > > > > > [ 72.068251] task:kworker/u64:5 state:R running task stack:0 pid:447 ppid:2 flags:0x0000000a > > > > > > > > > [ 72.078156] Workqueue: efi_rts_wq efi_call_rts > > > > > > > > > [ 72.082595] Call trace: > > > > > > > > > [ 72.085029] __switch_to+0xbc/0x100 > > > > > > > > > [ 72.088508] 0xffff80000fe83d4c > > > > > > > > > > > > > > > > > > After that, as a consequence, I start to get a lot of hung task timeout traces. > > > > > > > > > > > > > > > > > > I tried to bisect the problem and I found that the offending commit is > > > > > > > > > this one: > > > > > > > > > > > > > > > > > > e7b813b32a42 ("efi: random: refresh non-volatile random seed when RNG is initialized") > > > > > > > > > > > > > > > > > > I've reverted this commit for now and everything works just fine, but I > > > > > > > > > was wondering if the problem could be caused by a lack of entropy on > > > > > > > > > these arm64 boxes or something else. > > > > > > > > > > > > > > > > > > Any suggestion? Let me know if you want me to do any specific test. > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the report. > > > > > > > > > > > > > > > > This is most likely the EFI SetVariable() call going off into the > > > > > > > > weeds and never returning. > > > > > > > > > > > > > > > > Is this an Ampere Altra system by any chance? Do you see it on > > > > > > > > different types of hardware? > > > > > > > > > > > > > > This is: Ampere eMAG / Lenovo ThinkSystem HR330a. > > > > > > > > > > > > > > > > > > > > > > > Could you check whether SetVariable works on this system? E.g. by > > > > > > > > updating the EFI boot timeout (sudo efibootmgr -t )? > > > > > > > > > > > > > > ubuntu@kuzzle:~$ sudo efibootmgr -t 10 > > > > > > > ^C^C^C^C > > > > > > > > > > > > > > ^ Stuck there, so it really looks like SetVariable is the problem. > > > > > > > > > > > > > > > > > > > Could you please share the output of > > > > > > > > > > > > dmidecode -s bios > > > > > > dmidecode -s system-family > > > > > > > > > > $ sudo dmidecode -s bios-vendor > > > > > LENOVO > > > > > $ sudo dmidecode -s bios-version > > > > > hve104r-1.15 > > > > > $ sudo dmidecode -s bios-release-date > > > > > 02/26/2021 > > > > > $ sudo dmidecode -s bios-revision > > > > > 1.15 > > > > > $ sudo dmidecode -s system-family > > > > > Lenovo ThinkSystem HR330A/HR350A > > > > > > > > > > > > > Thanks > > > > > > > > Mind checking if this patch fixes your issue as well? > > > > > > > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/commit/?h=altra-fix&id=77fa99dd4741456da85049c13ec31a148f5f5ac0 > > > > > > Unfortunately this doesn't seem to be enough, I'm still getting the same > > > problem also with this patch applied. > > > > > > > Thanks for trying. > > > > How about the last 3 patches on this branch? > > > > https://git.kernel.org/pub/scm/linux/kernel/git/ardb/linux.git/log/?h=efi-smbios-altra-fix > > Actually, that may not match your hardware. > > Does your kernel log have a line like > > SMCCC: SOC_ID: ID = jep106:036b:0019 Revision = 0x00000102 > > ? $ sudo dmesg | grep "SMCCC: SOC_ID" [ 5.320782] SMCCC: SOC_ID: ARCH_SOC_ID not implemented, skipping .... -Andrea