Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15853768rwd; Mon, 26 Jun 2023 02:10:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5NEtOLI/JVQcY/fc4eiCKjOYE5PTywxgfO1kIDH7A/dBfuloSb60tQ6R+ibhvSNuG842KZ X-Received: by 2002:a17:907:934d:b0:957:2e48:5657 with SMTP id bv13-20020a170907934d00b009572e485657mr23126125ejc.68.1687770606561; Mon, 26 Jun 2023 02:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687770606; cv=none; d=google.com; s=arc-20160816; b=zkcSjJBNyGGE0qsS8e+boKLL+2dBDgHIgRzNy7KmOtBI5dNw/U0elK0jGlHpR2lzxC Kz1x6FNVRqIDDKtEjR57G00jvDy5cLI8fKu3VD9o9uQDUqQYElOpnv6+MKvTBCbGwaj4 nkcrEG4yxwtIAAgwTi1Blbd5F9MYLMk0KrmsW9AQJe4o4J/I0daaYS3nY4/gT5tFOk5f iFweTlL4LMIZu+lAp1cgVa1Vv5u6F4eF45qeMDUyMRH+hIvQtlHRFwArayoooCrnhm0g b+jPMLlyS2CIBiIIHaNzRdgEGFn9KJKBOReWJeC7s32FuuZWd7X88ck/6FMYyVl9xKlC enXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=CU/NM81Ebj1GKHm4Cv2oRZR+V4v1s5qM9KflRxjnHHk=; fh=AAHTBtkamJGz+LZlfjC9DlfyE+ZDxT9z/nGLJ4+qfqw=; b=kswrgPOSBHvsWvQATif/hYEx9p+HDO40WWTu2DQ/ola+NHs6V8p7Uy+MnOohf5ONyN ZWp8w+1q0cjg9+vAnyN11xDwYeiKhbdiVU6uSujl6s+0KQiLw5Xx8/nWZA9VwLQ4XOsE FdypEj3dE/jgJakMRnfiJeITVki9aQjOEmcaXza7MkvhsQk7ewASgAUS0dfMnDagZBje 8A5jX55gW14/PHrMKRaAGHkuFZOxXPCNtW1lGzEot1moD7cf/n/vwwOE1UtRhfadHr9b OQI0RLyIMt1IrDqD9u3hKLSNezFpfmUb8Kk+8bOjeBVSnLwcAElufOF664bh1MAsrzt/ sxeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=pU9LqCNa; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gz18-20020a170906f2d200b009878b67e843si2675853ejb.932.2023.06.26.02.09.41; Mon, 26 Jun 2023 02:10:06 -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=@gmail.com header.s=20221208 header.b=pU9LqCNa; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229648AbjFZJIQ (ORCPT + 99 others); Mon, 26 Jun 2023 05:08:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjFZJHu (ORCPT ); Mon, 26 Jun 2023 05:07:50 -0400 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B4FB297E; Mon, 26 Jun 2023 02:05:01 -0700 (PDT) Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2b5c231c23aso23618271fa.0; Mon, 26 Jun 2023 02:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687770300; x=1690362300; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CU/NM81Ebj1GKHm4Cv2oRZR+V4v1s5qM9KflRxjnHHk=; b=pU9LqCNabfMbko4C2PyFqG+qzOZANgWkRMEM/wCeO+WMUOinTbiakGZyJlp2fjr/oV DSYxEzVDZ6CeZ1q26+Bv2cTfMm6w0NT+c4FEMwGMz+1nffR820P3z4javqdB7MDTRRPA TemXIcFkrc/aBjSpaBqZm6KLkunD8li1az5YK72FbuJxBBf5LvKJWPIRq+oSA0s2O63B TTYXbRYinloBMQo7Pa99mngUFLsfp9NZJCZg8mwRNWam73MGC5Y0Br9pddcipfm0ddP8 ToTHNjBY7wbRdNXeTSL0RFyW/4pYg8R/S0OlWkqlHhvaiYEsW2ynk3qEVyqYiiDdPBqa FtEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687770300; x=1690362300; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CU/NM81Ebj1GKHm4Cv2oRZR+V4v1s5qM9KflRxjnHHk=; b=ZfV5jgFOl2dxhCgee3vbm+N16lfzaxAg8lILjhE3tXqUQ2OwmobLjTj9M+QAXus02L TrNTsFhdR0LF9HatbGgBKfwHCcaH8E0+q/cf5mjohLiRb/7CNPLCECkiNZXQWuFC9ppS MzCkne+5rjiFGCsXiiwzuPPyzHjRVrOhT1L5sGFRrC8az5TLXNl719tfKhMHZAAVjPiw YNsmLyNav7acD0ne8BrZm5In/wQyNVF2NtMBTQQw/btzM+q/p60c4GCX0EhSmdRSIcvC CZds7fBEYAxCHgJghkAJUgyf6HLHcCW/1+qJW4C9e0qk7/7ahq1Jc5E1nlzjAQeeM5Km e1Mg== X-Gm-Message-State: AC+VfDyl4hjFsBr1z105c9E27iaOq1j8i4C5Xh7CuiJXVVthEyPW+gh/ wMvDl4x4UCJ2cdbj/ZNuQ//ovF4oGH8iMpqeEus= X-Received: by 2002:a2e:9f04:0:b0:2b6:9859:d96c with SMTP id u4-20020a2e9f04000000b002b69859d96cmr2089755ljk.51.1687770299501; Mon, 26 Jun 2023 02:04:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Puranjay Mohan Date: Mon, 26 Jun 2023 11:04:48 +0200 Message-ID: Subject: Re: next: Rpi4: Unexpected kernel BRK exception at EL1 To: Naresh Kamboju Cc: Mark Rutland , 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 , Song Liu , Alexei Starovoitov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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 Hi Naresh, On Thu, Jun 22, 2023 at 2:35=E2=80=AFPM Naresh Kamboju wrote: > > Hi Mark, > > On Thu, 22 Jun 2023 at 15:12, Mark Rutland wrote: > > > > 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 ru= nning > > > > Linux next-20230621 kernel. > > > > > > > > Reported-by: Linux Kernel Functional Testing > > > > > > > > boot log: > > > > > > > > [ 22.331748] Kernel text patching generated an invalid instructio= n > > > > at 0xffff8000835d6580! > > > > [ 22.340579] Unexpected kernel BRK exception at EL1 > > > > [ 22.346141] Internal error: BRK handler: 00000000f2000100 [#1] P= REEMPT SMP > > > > > > This indicates execution of AARCH64_BREAK_FAULT. > > > > > > That could be from dodgy arguments to aarch64_insn_gen_*(), or elsewh= ere, 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 pad= s 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 so= me > > discussion in the original thread for this commit. Summary and links be= low. > > > > We identified a potential issue with missing cache maintenance: > > > > https://lore.kernel.org/linux-arm-kernel/ZJMXqTffB22LSOkd@FVFF77S0Q05= N/ > > > > Puranjay verified that was causing the problem seen here: > > > > https://lore.kernel.org/linux-arm-kernel/CANk7y0h5ucxmMz4K8sGx7qogFyx= 6PRxYxmFtwTRO7=3D0Y=3DB4ugw@mail.gmail.com/ > > > > Alexei has dropped this commit for now: > > > > https://lore.kernel.org/linux-arm-kernel/CAADnVQJqDOMABEx8JuU6r_Dehyf= =3DSkDfRNChx1oNfqPoo7pSrw@mail.gmail.com/ > > Thanks for the detailed information. > I am happy to test any proposed fix patches. I have sent the v4 of the patch series: https://lore.kernel.org/bpf/20230626085811.3192402-1-puranjay12@gmail.com/T= /#t This works on my raspberry pi 4 setup. If possible can you test this on the similar setup where it was failing earlier? > > > > > > Thanks, > > Mark. > > - Naresh Thanks, Puranjay