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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09B11C433DB for ; Tue, 16 Feb 2021 17:36:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7AB564E08 for ; Tue, 16 Feb 2021 17:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbhBPRg0 (ORCPT ); Tue, 16 Feb 2021 12:36:26 -0500 Received: from sym2.noone.org ([178.63.92.236]:41682 "EHLO sym2.noone.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229876AbhBPRgV (ORCPT ); Tue, 16 Feb 2021 12:36:21 -0500 Received: by sym2.noone.org (Postfix, from userid 1002) id 4Dg7RF0q3kzvjfn; Tue, 16 Feb 2021 18:35:36 +0100 (CET) Date: Tue, 16 Feb 2021 18:35:36 +0100 From: Tobias Klauser To: Dmitry Vyukov Cc: Alex Ghiti , Albert Ou , Bjorn Topel , Palmer Dabbelt , LKML , nylon7@andestech.com, syzkaller , Andreas Schwab , Paul Walmsley , linux-riscv Subject: Re: riscv+KASAN does not boot Message-ID: <20210216173534.54vzyfzdm5ioxu7t@distanz.ch> References: <20210118145310.crnqnh6kax5jqicj@distanz.ch> <6e9ee3a1-0e16-b1fc-a690-f1ca8e9823a5@ghiti.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-16 at 12:17:30 +0100, Dmitry Vyukov wrote: > On Fri, Jan 29, 2021 at 9:11 AM Dmitry Vyukov wrote: > > > I was fixing KASAN support for my sv48 patchset so I took a look at your > > > issue: I built a kernel on top of the branch riscv/fixes using > > > https://github.com/google/syzkaller/blob/269d24e857a757d09a898086a2fa6fa5d827c3e1/dashboard/config/linux/upstream-riscv64-kasan.config > > > and Buildroot 2020.11. I have the warnings regarding the use of > > > __virt_to_phys on wrong addresses (but that's normal since this function > > > is used in virt_addr_valid) but not the segfaults you describe. > > > > Hi Alex, > > > > Let me try to rebuild buildroot image. Maybe there was something wrong > > with my build, though, I did 'make clean' before doing. But at the > > same time it worked back in June... > > > > Re WARNINGs, they indicate kernel bugs. I am working on setting up a > > syzbot instance on riscv. If there a WARNING during boot then the > > kernel will be marked as broken. No further testing will happen. > > Is it a mis-use of WARN_ON? If so, could anybody please remove it or > > replace it with pr_err. > > > Hi, > > I've localized one issue with riscv/KASAN: > KASAN breaks VDSO and that's I think the root cause of weird faults I > saw earlier. The following patch fixes it. > Could somebody please upstream this fix? I don't know how to add/run > tests for this. Thanks. I've tested the fix locally using vDSO selftests and sent the fix upstream [1] [1] https://lore.kernel.org/linux-riscv/20210216173305.2500-1-tklauser@distanz.ch/T/#u