From mboxrd@z Thu Jan 1 00:00:00 1970 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 D6B88C43334 for ; Thu, 14 Jul 2022 14:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238713AbiGNOGG (ORCPT ); Thu, 14 Jul 2022 10:06:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231844AbiGNOGE (ORCPT ); Thu, 14 Jul 2022 10:06:04 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B927388 for ; Thu, 14 Jul 2022 07:06:03 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id m16so2532753edb.11 for ; Thu, 14 Jul 2022 07:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dsg8YYc09ufj/733yPHJPZ/Qpv37mtovDB2OzYPiOCE=; b=iyA5BWSyZmGW4efDa6L9cV0aNwgKlR+5yS7SzaiI9KYAEnIuWEyZXLb7TSJvCHKTTu EzyMVH+I+dhprih3HMM+Hh2bJ+uh9pi1OuSVBXLvVHU1Qn+0MqxUiXL2Z+otHuexdKzr k4CscznuGXiGQWNNKzf3DZ/VSTXcuboA2aCNYRoVnN4zLbOO+5kwVqFB4bIXk7mobSfk l4UTmYdXVO4r0KKxVQyqUgMaRkk7rnFqk6lB7vQOBLWdnU2hEevkbfockM/5TtEBGvg0 OcjS+oX7HD1V1v5vYkVDoer7flIyGJR3QpzXsn3DlY1/gjscA4nkX2YtM+uYz2Z9YOPh HHrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dsg8YYc09ufj/733yPHJPZ/Qpv37mtovDB2OzYPiOCE=; b=gwXXdjwgPiReqV2f1Sh43Imiuq6ol7BW35AaoTx1qaoEbwZwA1n+25UxC/PH9Of/WJ dzr1VXft/etr+VsiArDwSGRdmS7UgV5MM1M31nU9rrvejkhkD1rbXwonMUwGO2Wfyvkh jGPnJPssCjfYYMKgE4Va8KhiKnD+ljrNfDx+giDZb0KizYyMvOiP6UVP9xAuySAaaldS vGOT7jEUrIyWCdJbMC2eOD4CosfxElrDYWSTEcm4j9NfGNfYxtMLD/Eho4tHxUH8h8eY u1OVzUX1qXi49ahEMJazxCa5KmhbqNuCvCNJEuxAh4gig/p4dChOBGUmPLgya2jERAS2 z3sw== X-Gm-Message-State: AJIora/cliJAtTx3au47CWnGlApk/Kf/QFc2rhTa2apsMcNpCv+hBtoX PK0eBVTczfZCQIixzwoXBK5ipJotl5Wmq0YLunEIrQ== X-Google-Smtp-Source: AGRyM1vX01PFbMINeoOPTOuuGCFZGYjM8LyoidrJ7hG1Tp+ZGVJW1QxJ9117n1TmMCi2JTzT4+sr76nJbMp6U7tiyLM= X-Received: by 2002:a05:6402:1d53:b0:43a:9ba7:315b with SMTP id dz19-20020a0564021d5300b0043a9ba7315bmr12606977edb.350.1657807561607; Thu, 14 Jul 2022 07:06:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Naresh Kamboju Date: Thu, 14 Jul 2022 19:35:50 +0530 Message-ID: Subject: Re: FVP: kernel BUG at arch/arm64/kernel/traps.c:497 - Internal error: Oops - BUG: 0 To: Mark Rutland Cc: Mark Brown , open list , Linux-Next Mailing List , Linux ARM , lkft-triage@lists.linaro.org, regressions@lists.linux.dev, Catalin Marinas , Will Deacon , Arnd Bergmann , Anders Roxell , Aishwarya TCV Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mark, On Thu, 14 Jul 2022 at 19:09, Mark Rutland wrote: > > On Thu, Jul 14, 2022 at 02:06:28PM +0100, Mark Rutland wrote: > > > ... and I've just reproduced the issue by running the script from a different > > directory, since apprarently the semihosting interface just grabs the file from > > the current directory. > > > > I'm pretty sure this means that *something* is clobbering the Image early on > > during boot, and the semihisting loading happens to refresh it. > > I had a go with my own kernel built from my arm64/traps/rework branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/traps/rework > > ... and Naresh's config: > > https://builds.tuxbuild.com/2BnQMpJj3kDTJXoCwd2pY5gW9CN/config > > When *only* using the initial loading into memory, that blows up in stackdepot > and with a subsequent bogus pointer dereference (full log below), and when > loaded via semihosting that just works. Note that my kernel is based on the > arm64 for-next/core branch, which itself is based on v5.19-rc3. > > My failing kernel Image is ~47M, as is Naresh's original Image. When using > smaller Images (as large as 43M so far), I don't see any issues. > > I also note that if I enable KASAN_OUTLINE, the kernel is so big that it > clobbers the DTB, and cannot be booted. So this looks liek a problem with tha > arbitrary placement / limits chosen for U-Boot being too small, and this is not > a kernel bug. Now I have understood the reason. > Naresh, please can you fix your boot flow before reporting any further issues? Yes. > This sort of corruption will manifest in a number of ways, and we need to rule > that out for any other bug reports. Any further reports I will do needful initial investigation. - Naresh