Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp800461pxb; Wed, 16 Feb 2022 04:51:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBnIGUSEH1o3Uui/2KonxPdoY4+yDxZ4AKfQIEcgS+GSRynqkAtd7M3vOkZdGFU8mOxEY3 X-Received: by 2002:aa7:dd9a:0:b0:410:b875:ab95 with SMTP id g26-20020aa7dd9a000000b00410b875ab95mr2785075edv.248.1645015908722; Wed, 16 Feb 2022 04:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645015908; cv=none; d=google.com; s=arc-20160816; b=A9AFSjMYdhRhujUjCAHqPWIlTNgH2WLqJF3LlRsrOjzTwUbM7DyOzyMywZJWkeRooa +CnG5gLsDLGhLJOX+3Arz4LJPzgmGCl5ynkgGYvdFvaloeK9nQZfsIh7zZe7onsuN/z7 k6Z1x1++BPUNX8mwjBGmtf+QLfJmEsptaeqtJ80n1mT7YXyEbx1nYDc8Gxl0NYo15UfQ iTBxf5+pURG121CmYfOp+T6D6KOyojhi0DSC7dwO76HWGFPc1+995BPzMqc8UlBkz8h/ XUOheC0z4SUOAUJoG+mphfSQemCl4ki7FCl8WnV1dUHIiNuSFBWuMqD24z6sCu2usQME o4eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fhNx+q9flxByCxUrkRhgBlwV1E/I95+1uqa0YFgkq6g=; b=ERL8DtVQaSAG4AzifFf+E1ZPkFzXHi1cwFFREJf5zZz5GBgklQ7ZPYqlV5b+K1s2B4 2OnQ4iibbOqKNC0Y8lVmzZznmhQmlBTn9avRVISCvhUvC3SNq74Pu2QzO5I+BuV1KR3p jUYjEb7vU6X00PqBDkLEnrbG9LT8EvockFxz83SfNClkx599UM2rBUAI4pOzHLY1UQt9 vHALC26YFMwC1ZNRHlDb182NA3zipaJotDo/RHsuK3NolPPvS8xKt1wb2JMhQUYiSpPH ARguEt1Eojcj8N+eU5JJk6JB9GRm7QRfgsk9RNLErP/Vj7bZ3uJItieT1OOm455+hHmo T7wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=iT2AEWwx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5si16596537eje.504.2022.02.16.04.51.24; Wed, 16 Feb 2022 04:51:48 -0800 (PST) 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=@google.com header.s=20210112 header.b=iT2AEWwx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232769AbiBPL4b (ORCPT + 99 others); Wed, 16 Feb 2022 06:56:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:50972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232504AbiBPL4a (ORCPT ); Wed, 16 Feb 2022 06:56:30 -0500 Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFC77267257 for ; Wed, 16 Feb 2022 03:56:17 -0800 (PST) Received: by mail-ot1-x335.google.com with SMTP id r18-20020a05683001d200b005ac516aa180so1358884ota.6 for ; Wed, 16 Feb 2022 03:56:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fhNx+q9flxByCxUrkRhgBlwV1E/I95+1uqa0YFgkq6g=; b=iT2AEWwx2kmQ/iEeYiUslVDYol+IJWHOCYAu/EndEGVOjCfpvlr0+SBUUSbi8FTybM ViaOLETa4pUXEQQKqZRHMBUEdJHHhYoHeZsbhXrrdxh6UPjfJUyqjINuilJFbR3+8+hd kV1wldLn71EV40AfChJgJykO8eqA0bD0K5q2aHvqQ1KFxyMz8sDtBDq4Fj63YMRrvGrz tCDIgChVCL+KleGxb4+j70F/J4XkfNF4Jq0WBS88H/chcvOCf988pr7hxkkmNknOydGB Q1WdtqRfSwb1teC1XM/RmGtWDnm9tu1SPlC13uBHMtvpFGwc3TjXBh4gdD8igcbC8SiN 4CkA== 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=fhNx+q9flxByCxUrkRhgBlwV1E/I95+1uqa0YFgkq6g=; b=v0/rnn/SnZKM/Q0TrgR7kB6Oov+mOUuIr04GOjdRg1uvDQZvn3pjYAPLjLg3ojEdNr T5QcKoWdw6Rc8MSJggzySwV1KsHAWxas56n9E/SPKSqST2E+E3Joh3jQdhlchZMGazor aslxeEf06nLB6CoT8TtF0WRAWWFH3juTMqG72wK+bXp/4w0VigFU2JOFOBjjIavto+7k /AdMangcmnyhTVicnSVMzjcXZhm90+aOjDFmKt0WYZV6XkbI/RzMY97jk5EPILWSwxFN KVBfdyMEyzkhES6s0zne8hx5iWl2NzjtQ0UBOUCtLecUQg5QA0GZ36LsoK5HaXHcQeRg TRgQ== X-Gm-Message-State: AOAM5314H8PzeKFTCTjyB0leDS8eckg+o2bp2Qd1NcFEGMo2BRImLNaQ iGddh65dQx4+LL750Mf6cEfXrEyIeBtnek6SjYx0Tg== X-Received: by 2002:a9d:77c4:0:b0:5a3:326f:9236 with SMTP id w4-20020a9d77c4000000b005a3326f9236mr676453otl.196.1645012577018; Wed, 16 Feb 2022 03:56:17 -0800 (PST) MIME-Version: 1.0 References: <00000000000038779505d5d8b372@google.com> In-Reply-To: From: Dmitry Vyukov Date: Wed, 16 Feb 2022 12:56:06 +0100 Message-ID: Subject: Re: [syzbot] riscv/fixes boot error: can't ssh into the instance To: Aleksandr Nogikh Cc: Alexandre Ghiti , Alexandre Ghiti , linux-riscv@lists.infradead.org, kasan-dev , Palmer Dabbelt , syzbot , LKML , syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 On Wed, 16 Feb 2022 at 12:47, Aleksandr Nogikh wrote: > > On Wed, Feb 16, 2022 at 11:37 AM Aleksandr Nogikh wrote: > > > > Hi Alex, > > > > On Wed, Feb 16, 2022 at 5:14 AM Alexandre Ghiti wrote: > > > > > > Hi Dmitry, > > > > > > On 2/15/22 18:12, Dmitry Vyukov wrote: > > > > On Wed, 2 Feb 2022 at 14:18, Alexandre Ghiti > > > > wrote: > > > >> Hi Aleksandr, > > > >> > > > >> On Wed, Feb 2, 2022 at 12:08 PM Aleksandr Nogikh wrote: > > > >>> Hello, > > > >>> > > > >>> syzbot has already not been able to fuzz its RISC-V instance for 97 > > > >> That's a longtime, I'll take a look more regularly. > > > >> > > > >>> days now because the compiled kernel cannot boot. I bisected the issue > > > >>> to the following commit: > > > >>> > > > >>> commit 54c5639d8f507ebefa814f574cb6f763033a72a5 > > > >>> Author: Alexandre Ghiti > > > >>> Date: Fri Oct 29 06:59:27 2021 +0200 > > > >>> > > > >>> riscv: Fix asan-stack clang build > > > >>> > > > >>> Apparently, the problem appears on GCC-built RISC-V kernels with KASAN > > > >>> enabled. In the previous message syzbot mentions > > > >>> "riscv64-linux-gnu-gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU > > > >>> Binutils for Debian) 2.35.2", but the issue also reproduces finely on > > > >>> a newer GCC compiler: "riscv64-linux-gnu-gcc (Debian 11.2.0-10) > > > >>> 11.2.0, GNU ld (GNU Binutils for Debian) 2.37". > > > >>> For convenience, I also duplicate the .config file from the bot's > > > >>> message: https://syzkaller.appspot.com/x/.config?x=522544a2e0ef2a7d > > > >>> > > > >>> Can someone with KASAN and RISC-V expertise please take a look? > > > >> I'll take a look at that today. > > > >> > > > >> Thanks for reporting the issue, > > > > > > > > > > I took a quick look, not enough to fix it but I know the issue comes > > > from the inline instrumentation, I have no problem with the outline > > > instrumentation. I need to find some cycles to work on this, my goal is > > > to fix this for 5.17. > > > > Thanks for the update! > > > > Can you please share the .config with which you tested the outline > > instrumentation? > > I updated the syzbot config to use KASAN_OUTLINE instead of KASAN_INLINE, > > but it still does not boot :( > > > > Here's what I used: > > https://gist.github.com/a-nogikh/279c85c2d24f47efcc3e865c08844138 > > Update: it doesn't boot with that big config, but boots if I generate > a simple one with KASAN_OUTLINE: > > make defconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- > ./scripts/config -e KASAN -e KASAN_OUTLINE > make olddefconfig ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- > > And it indeed doesn't work if I use KASAN_INLINE. It may be an issue with code size. Full syzbot config + KASAN + KCOV produce hugely massive .text. It may be hitting some limitation in the bootloader/kernel bootstrap code.