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 153C8EB64D8 for ; Thu, 22 Jun 2023 09:52:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230471AbjFVJwC (ORCPT ); Thu, 22 Jun 2023 05:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbjFVJvs (ORCPT ); Thu, 22 Jun 2023 05:51:48 -0400 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: 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 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.