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=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 766E6C433DB for ; Thu, 21 Jan 2021 14:54:32 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2B49B238E3 for ; Thu, 21 Jan 2021 14:54:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B49B238E3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hk1qJiirIgf9nl9fe+6QqBVOLvnCY3WWcGSxaRPAu3w=; b=SaoV0Ztvl1lEw5PkiY0bwL2E/ UlbMXZc/wqn7YifYY1vwe9O0LnDoFcyfkw3X/Jt10QCxWVT0tD0ikFDyP74d1gNfe1yqxZp/D0c9S g9Sw576hWYR+qvaJxWUxMW2v7uXGjtqcMxl3/eu72G0rgYm+Sv0wqIMgkCQrViI84YgjdndDxn+Zg k2oLJG+Z11JpJF9ojgRI3I/r/OGr5TsmbhLlzJKR5jMwTLYRPAVul3291p9MO/b/YFAOoi5sxqpKA CQiaobiwQsDAwvMAoaRpznX2t5/xgp+WJFLPnOqrPa1DXqmijRMR+ITfK9J4PaSjV3wfYAPzBTN8n boTN5HIGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2bKS-0001s1-8l; Thu, 21 Jan 2021 14:52:56 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2bKP-0001rc-Ar for linux-arm-kernel@lists.infradead.org; Thu, 21 Jan 2021 14:52:54 +0000 Received: by mail-lf1-x12b.google.com with SMTP id v24so2872572lfr.7 for ; Thu, 21 Jan 2021 06:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pj1k4tZdyOybbXZMQ1aye2tDNTPXV8JLnKiAXS+mxPg=; b=mBZ0FAgNdSYys7PDYlqKiLi2mN4Q/6Xrz/Lc2K54dDa2qir9ACj3dpIQfgKaAJmwzq j+VZxiQk6zry63+tTCiy/LzDf34u29oQ3nnh3XVjE6axHEggM0sJjH5ojFHx/lKeyPYH +nzUeWGmmtkg6ryP8ubdQea4PXT2APQb2ulm0UGmjlPwHRRTMzRFU5wkGVoPJ49NYi5e Ycab8+a2rDE/57ddmWqyJgyiyJl/a2fdmef0Gd00Zc6xqpqvWk/KGyN9WYNP/c3o/keW C9p7GxnKBX41kDKmrqvxBnOrn8bw1p8Fksbr3gbUxtiWK9IJuqGgsoP0s+DrVlxFi/Ni VDrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pj1k4tZdyOybbXZMQ1aye2tDNTPXV8JLnKiAXS+mxPg=; b=q3G3wtOrkkfkKFVQQcnhXyVjDZ/V+hF6R+DvW+uhoKsEW0RK8i7D47MDBW2/feTVQ4 N4Mrv/mJsnaMv7VNoZPXRtIjac+BJJlIXLK0P+6jYZ2ypq79NKbVdQILpe3hEVCYOvTi +fSQ5fRnhGuPtH/iCL2UawpE/Dn6a/ej4TydlKEo2sw14zAZw3QrShzCW9NY8ZG0H/81 ewoexDteNShjAhnh9cUzNA1xbcW5i3SoRIOu7h+YOOhyKfoPGFzctJPyGH+t9IOCfjC4 TrxnpAXBlTrKCjq4lx8UhMZAws8c0AVILPVo+zobVcrlIh/ZxZwhGwMYAm26PMKaI0YN 1J8w== X-Gm-Message-State: AOAM533kNh1MCAiRJxjU9sQKdqkYkJi8Jer2nZxxwFzxWXBQHY1svB9A Cq9bFMuLUIvTST0KH6Bu9R1KLhLcBqifjRjTIHdiSQ== X-Google-Smtp-Source: ABdhPJwDz/S7hC+VdPvNVEplRyaQ0gFGWzPbJPOXTqTQ8q8BSB+LAqVzkNhOFCiU95IYgAnhFc1+89pmZpWQodbAQz8= X-Received: by 2002:a19:495d:: with SMTP id l29mr6551541lfj.465.1611240769943; Thu, 21 Jan 2021 06:52:49 -0800 (PST) MIME-Version: 1.0 References: <20210119111319.GH1551@shell.armlinux.org.uk> <20210119114341.GI1551@shell.armlinux.org.uk> <20210119123659.GJ1551@shell.armlinux.org.uk> <20210119194827.GL1551@shell.armlinux.org.uk> In-Reply-To: From: Linus Walleij Date: Thu, 21 Jan 2021 15:52:38 +0100 Message-ID: Subject: Re: Arm + KASAN + syzbot To: Dmitry Vyukov X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210121_095253_513815_C9A8F0CF X-CRM114-Status: GOOD ( 17.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnd Bergmann , Hailong Liu , Russell King - ARM Linux admin , kasan-dev , syzkaller , Krzysztof Kozlowski , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 21, 2021 at 2:59 PM Dmitry Vyukov wrote: > I think allowing qemu to modify dtb on the fly (rather than appending > it to the kernel) may be useful for testing purposes. Agree. > In future we > will probably want to make qemu emulate as many devices as possible to > increase testing coverage. Passing dtb separately will allow qemu to > emulate all kinds of devices that are not originally on the board. At one point I even suggested we extend QEMU with some error injection capabilities. For example PCI bridges can generate a lot of error states but the emulated bridges are exposing kind of ideal behavior. It would be an interesting testing vector to augment QEMU devices (I was thinking of PCI hosts but also other things) to randomly misbehave and exercise the error path of the drivers and frameworks. > However, I hit the next problem. > If I build a kernel with KASAN, binaries built from Go sources don't > work. dhcpd/sshd/etc start fine, but any Go binaries just consume 100% > of CPU and do nothing. The process state is R and it manages to create > 2 child threads and mmap ~800MB of virtual memory, which I suspect may > be the root cause (though, actual memory consumption is much smaller, > dozen of MB or so). The binary cannot be killed with kill -9. I tried > to give VM 2GB and 8GB, so it should have plenty of RAM. These > binaries run fine on non-KASAN kernel... It looks like Go uses a lot of memory right? Your .config says: CONFIG_VMSPLIT_2G=y # CONFIG_VMSPLIT_1G is not set CONFIG_PAGE_OFFSET=0x80000000 CONFIG_KASAN_SHADOW_OFFSET=0x5f000000 This means that if your process including children start using close to 2GB +/- it runs out of virtual memory and start thrashing. Yours, Linus Walleij _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel