Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp5875857pxb; Tue, 16 Feb 2021 09:37:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxoR4IywWhja2X9xANgUFQFldpIemLSbAaMbHdHMEPOyWEyVYF1dEfdloetsokrOPm4nj6u X-Received: by 2002:a17:907:1b12:: with SMTP id mp18mr22186327ejc.128.1613497056668; Tue, 16 Feb 2021 09:37:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613497056; cv=none; d=google.com; s=arc-20160816; b=KaObkixQmbxrtetEv1Llr5b9f4/rYWACg22qT0DUxtQTwO/pNnFR1qD839eLoqQG+F fK4LUAhMq8X9t41wc+/KSaMFpwaeIB6zDeeHE7HHaEROJ67k1PccpPeTPSwHemnlTaFC DKTiN4ymLw5PSyC6fXPqgkzbxBXNzqpKjEqNfCEMvTA2Hn+HpqlHmbWdf6uFF1XQJD2F LycdFaO8ozM0eSehN8MjXDKHC/hcumcW2qYqLv2kHY2ps/FpxV9Fz9GTaxNjH9uOHdXq 8WI4izMPGjA8bdkPP1sh7WC+JlIvovzZRZLML4JrnkOy0Iyv9RDlbeNbLsh4Fbwp9iDH 7dAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=t7URP9MIAn3CgzZNmIdD/d1dXeJ82YbblqizSazqVcE=; b=Y6d+g4Fc3OMH7TSrFpXQnBb0rB5mSBhRcV4pG/k9y2IUyA8zQ6t4/raIMfxrYUhlBT vE3b+eT4NpoukQPPN22BkPbgybF5ERR6ktXw6FdsU0SSCO1R3XWijMhIeHZsVXF1bofV 5HSY7/AoovLZ90jEa1Ja8em6a7ZNuTX9AEDVAFnTaNUB0x+SWb/g6+gDaADbcbVUV+Tj hqiLSQlkTe5P5CMBWNvENee9wItkCIw2qBHe+4wSPrIa1oW6CZWcGpI8bdE8N/m8J8XH Tq6o7NX3kZGEt4RA/ZZnoF67bAK5i0ZXBtLvvWGUPff8T1EfX2Q4Zxx3RDPIQ8JJEEMw 1fow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg27si14220631edb.283.2021.02.16.09.37.13; Tue, 16 Feb 2021 09:37:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbhBPRgY (ORCPT + 99 others); Tue, 16 Feb 2021 12:36:24 -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