From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5F303AA8D for ; Thu, 22 Jun 2023 09:42:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 46BD955A4; Thu, 22 Jun 2023 02:42:17 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E8EF51042; Thu, 22 Jun 2023 02:43:00 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.25.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B98963F663; Thu, 22 Jun 2023 02:42:14 -0700 (PDT) Date: Thu, 22 Jun 2023 10:42:12 +0100 From: Mark Rutland To: Naresh Kamboju Cc: Linux ARM , open list , linux-rpi-kernel@lists.infradead.org, Netdev , lkft-triage@lists.linaro.org, Arnd Bergmann , Dan Carpenter , Linus Walleij , Catalin Marinas , Will Deacon , Anshuman Khandual , Puranjay Mohan , Song Liu , Alexei Starovoitov Subject: Re: next: Rpi4: Unexpected kernel BRK exception at EL1 Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 On Wed, Jun 21, 2023 at 01:57:21PM +0100, Mark Rutland wrote: > On Wed, Jun 21, 2023 at 06:06:51PM +0530, Naresh Kamboju wrote: > > Following boot warnings and crashes noticed on arm64 Rpi4 device running > > Linux next-20230621 kernel. > > > > Reported-by: Linux Kernel Functional Testing > > > > boot log: > > > > [ 22.331748] Kernel text patching generated an invalid instruction > > at 0xffff8000835d6580! > > [ 22.340579] Unexpected kernel BRK exception at EL1 > > [ 22.346141] Internal error: BRK handler: 00000000f2000100 [#1] PREEMPT SMP > > This indicates execution of AARCH64_BREAK_FAULT. > > That could be from dodgy arguments to aarch64_insn_gen_*(), or elsewhere, and > given this is in the networking code I suspect this'll be related to BPF. > > Looking at next-20230621 I see commit: > > 49703aa2adfaff28 ("bpf, arm64: use bpf_jit_binary_pack_alloc") > > ... which changed the way BPF allocates memory, and has code that pads memory > with a bunch of AARCH64_BREAK_FAULT, so it looks like that *might* be related. For the benefit of those just looknig at this thread, there has been some discussion in the original thread for this commit. Summary and links below. We identified a potential issue with missing cache maintenance: https://lore.kernel.org/linux-arm-kernel/ZJMXqTffB22LSOkd@FVFF77S0Q05N/ Puranjay verified that was causing the problem seen here: https://lore.kernel.org/linux-arm-kernel/CANk7y0h5ucxmMz4K8sGx7qogFyx6PRxYxmFtwTRO7=0Y=B4ugw@mail.gmail.com/ Alexei has dropped this commit for now: https://lore.kernel.org/linux-arm-kernel/CAADnVQJqDOMABEx8JuU6r_Dehyf=SkDfRNChx1oNfqPoo7pSrw@mail.gmail.com/ Thanks, Mark.