Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp25926929rwd; Mon, 3 Jul 2023 03:03:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/OuHZ8lUS96dEi02lc3/p/a7ECddNPGfNXFO5DyCOS3CleKONclvuyOC/FNfgLhBk5Xcm X-Received: by 2002:a17:902:c246:b0:1b2:4df5:c00e with SMTP id 6-20020a170902c24600b001b24df5c00emr5586459plg.35.1688378592895; Mon, 03 Jul 2023 03:03:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688378592; cv=none; d=google.com; s=arc-20160816; b=GKDTQbcug/0TlLN0bVhBxb66qgrN2tvSzhV6znS3HUHntslDF92F/pZpz0z3eZdw19 i0PmEmDENv+9OnY+19Az2C87EUYPmRT6EF8Y/mvw9I//yXlgqOPlDsrwxxpjd2horUzP z0NJJCzsI4qF7MPqCX3/Fh4LgSp9xJv7YqWSz4WdS9qM2EpCs+GSg7lHpcslZv+QeAo3 Ojq6aNQtbk+WtiqmkCedS+cBtQvErZWz0dpH8oQ41AoHC81uO1EZMPewHXViLcCZKnaF MDjlVnRQD4y+AVHwAd7vZUA+wgvChmNZkfPfUSTeEvsfgbyFz0j8Fbyc9S7oKh+qX7hR Z9DA== 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=IRKx7iLrXB3ROQpIdqwxxhbgMJLBow+B6szAcdx+g8A=; fh=AAHTBtkamJGz+LZlfjC9DlfyE+ZDxT9z/nGLJ4+qfqw=; b=DbO4JU3w9/695BiriV6T1G+CI+Yv0CeY1u1rfpr4ya9SF3aCJLO68x0EW96IcBvDVy ElYbe4LvALSLA5T+eZSH8dEmOhVCQZHO2/DUZguRM0jHhZ5vzRE5z8WtY8gpfDmZKmx5 ILYn2dfdAQfOlIVSw1q31OaVfHzaJqcsqswS/PqCXutM+XJcoBTyZazPW+f643QzLyTQ 808iO2VfjrCjKiSBBAEncfGOncCpNB+VyrJxCO1r60zzLi7wRyTtZ9SJiXEcPzr+bN0b c4FvE7yjbFKRgcs2dG6ZoMyAOxkOXfY63hWfmiam2AeS2nFA9YGQHphkdRbr6YRbhNAn KWnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=nhfQmJzn; 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 f13-20020a170902ce8d00b001b8945a0c3fsi2423979plg.143.2023.07.03.03.02.57; Mon, 03 Jul 2023 03:03:12 -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=nhfQmJzn; 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 S230427AbjGCJhI (ORCPT + 99 others); Mon, 3 Jul 2023 05:37:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229895AbjGCJhH (ORCPT ); Mon, 3 Jul 2023 05:37:07 -0400 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ED7C91; Mon, 3 Jul 2023 02:37:06 -0700 (PDT) Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2b6a152a933so63844031fa.1; Mon, 03 Jul 2023 02:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688377024; x=1690969024; 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=IRKx7iLrXB3ROQpIdqwxxhbgMJLBow+B6szAcdx+g8A=; b=nhfQmJzn+VpcTHIpPBE7RABFB9J2PRzyzxmbkai6nHDbcEQPUvQH+0E2KoAnUG/WNU 8zYDkOkx8LTEdDgOeITVI/luL/RCOLSf3BMcVR9ILoNoP0NOkFKlXzJPPlByW8tMw4jU EctJg+pEfLxaPwKnVKDY6fmOVZ21aBLpGQJ3P9n3sxquKf2KaMoeUbtxrMyque2i86Ra tKxiV5TU+g7P3fK81uL4wRxLCD00PoUEEhnQIDGZrN7sua/Ie5IWc/Xh8uwjXDCniliQ B1JKW3IKc49g+iap1lfW46t8ceW9jHzJlE4ICDjm5V9KKv6ycI102MAxNKRgY3tr0yg/ F0vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688377024; x=1690969024; 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=IRKx7iLrXB3ROQpIdqwxxhbgMJLBow+B6szAcdx+g8A=; b=gYq5zcbp9YizpiGvlxn7Ks4FaqSphbrsX9RuNfoc/h2nEKikVZICFnc4obCcuodGxJ ZaMCWb7CGqh245/Nh2gtgJqyDFsAobs07isIMFD8b3vn/ozgFTqIhWiFDwEgNhAfQHbZ 6k8e0OGN5W3S1sK0MRCHy0ayOcRK7K5yp+irWCGXkjnWuwZE5adnroK13+ryRzaTP/3i Y0RjOJLPdK5sceOjbMQQyAuT9wc6uvGIi95pFObDX0brHQAWixcZIljYbsxsDrO+Fm6B /4WZ3Y/wIZHenNHPBxYAzEZ+KFvGvzBWYac1mQbfXwmi3EBNKl1JrLJqXQitBvyLgIcT loFA== X-Gm-Message-State: ABy/qLYBR/5pDEUAeY/PzRAOpYikDiX8HSGse1ao1J6eLoMKo0ISbaYT 2PjFZJdtzQDi/Hvhe0eoZb21Rr7gXhnccjgDN5A= X-Received: by 2002:a2e:9f4e:0:b0:2b6:e618:b5a0 with SMTP id v14-20020a2e9f4e000000b002b6e618b5a0mr2058295ljk.6.1688377024117; Mon, 03 Jul 2023 02:37:04 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Puranjay Mohan Date: Mon, 3 Jul 2023 11:36:53 +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 Mon, Jun 26, 2023 at 11:04=E2=80=AFAM Puranjay Mohan wrote: > > 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 = running > > > > > Linux next-20230621 kernel. > > > > > > > > > > Reported-by: Linux Kernel Functional Testing > > > > > > > > > > boot log: > > > > > > > > > > [ 22.331748] Kernel text patching generated an invalid instruct= ion > > > > > 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 else= where, and > > > > given this is in the networking code I suspect this'll be related t= o 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 p= ads 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@FVFF77S0Q= 05N/ > > > > > > Puranjay verified that was causing the problem seen here: > > > > > > https://lore.kernel.org/linux-arm-kernel/CANk7y0h5ucxmMz4K8sGx7qogF= yx6PRxYxmFtwTRO7=3D0Y=3DB4ugw@mail.gmail.com/ > > > > > > Alexei has dropped this commit for now: > > > > > > https://lore.kernel.org/linux-arm-kernel/CAADnVQJqDOMABEx8JuU6r_Deh= yf=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? I think my previous email was missed. Can you test the V4 series in the same setup? This is still not applied to the bpf-next tree. Thanks, Puranjay.