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=-5.4 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,USER_AGENT_SANE_1 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 462C3C433DB for ; Tue, 19 Jan 2021 11:45:33 +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 CE03022DD3 for ; Tue, 19 Jan 2021 11:45:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE03022DD3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk 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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kxPBzVW5Krw2+8BJ+nyLczDsmQnxBaBSWQmGFeFkxjY=; b=HW0CiPj6nyvggrWZOTPNDteo0 8JKcs9E3pJd38jJuqxdN5EpU3skc/Q8pnQqnda6c0ZIbrPymfKqt4z8celFTsyd6+lf/goeD8KQZH swSWRQUeOubMusJ7+ThymdUwgzfXtMmD/8WMbHV+L0cYbtfvxuU31+rbOC6A/ZzyjpZz/BBZzGDTw SUd1gBXIqF5+s/WJtQBoCImasXdA0pz2jtRtr3qZ4D5K+2WG8vmoEgamgghaQRmraDdSf/aHrEg5c 9dCiaTQPwjznq5zc8PxfpA64UPVfE0M+hx97LhjK0EVfM53pYaM6uQIkxWzjkYEKE5CvaCDQl/hvk vB9rJd4jw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1pQN-0005Dy-TJ; Tue, 19 Jan 2021 11:43:51 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l1pQK-0005DB-Nl for linux-arm-kernel@lists.infradead.org; Tue, 19 Jan 2021 11:43:49 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wfa5HkXGhmSraClnejxdxh1CPG1ZunD0LmRA0qG/zE4=; b=zXu5n6CJUEmd96ZiCWSPjjAOG BOPFbk8OIlBkbZt1GXsv5dS76d3xNxPWBNMuOyRqYsOuICu3var1KDGuNzBdcvLjQSdepqUmgTI/n Eze0rcezA1T+YNyZ/ASfix9Dxz1WMA25WBE/p4GIvgB5efzp8WTcX93gxHrsai066shQ/U7j8KiHy wb9wV5wMhenDH5TycU0a0Czh5rCY60XknZRk+6P1yx063wLVlkSfcmNISVU/W5eSVPd81sYjvYgKy s5B2NvaM00eF7EwOr3S/nqDpDgmiYvpO1VUAu3xnZvgnCNXv0gQMegjyO6kvgmv/pessF6QgZyxFy TFQSgmidg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:49946) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1pQE-0007KJ-MZ; Tue, 19 Jan 2021 11:43:43 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1l1pQD-0004zW-5L; Tue, 19 Jan 2021 11:43:41 +0000 Date: Tue, 19 Jan 2021 11:43:41 +0000 From: Russell King - ARM Linux admin To: Dmitry Vyukov Subject: Re: Arm + KASAN + syzbot Message-ID: <20210119114341.GI1551@shell.armlinux.org.uk> References: <20210119111319.GH1551@shell.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210119_064348_795904_91BF998E X-CRM114-Status: GOOD ( 27.96 ) 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 , Linus Walleij , Krzysztof Kozlowski , syzkaller , kasan-dev , Hailong Liu , 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 Tue, Jan 19, 2021 at 12:17:37PM +0100, Dmitry Vyukov wrote: > On Tue, Jan 19, 2021 at 12:13 PM Russell King - ARM Linux admin > wrote: > > > > On Tue, Jan 19, 2021 at 12:05:01PM +0100, Dmitry Vyukov wrote: > > > But I also spied this in your makefile: > > > > > > config-earlydebug: config-base > > > $(CURDIR)/scripts/config --file $(config_file) \ > > > --enable DEBUG_LL \ > > > --enable EARLY_PRINTK \ > > > --enable DEBUG_VEXPRESS_UART0_RS1 \ > > > > > > With these configs, qemu prints something more useful: > > > > > > pulseaudio: set_sink_input_volume() failed > > > pulseaudio: Reason: Invalid argument > > > pulseaudio: set_sink_input_mute() failed > > > pulseaudio: Reason: Invalid argument > > > Error: invalid dtb and unrecognized/unsupported machine ID > > > r1=0x000008e0, r2=0x00000000 > > > Available machine support: > > > ID (hex) NAME > > > ffffffff Generic DT based system > > > ffffffff Samsung Exynos (Flattened Device Tree) > > > ffffffff Hisilicon Hi3620 (Flattened Device Tree) > > > ffffffff ARM-Versatile Express > > > Please check your kernel config and/or bootloader. > > > > > > > > > What does this mean? And is this affected by KASAN?... I do specify > > > the ARM-Versatile Express machine... > > > > > > Can it be too large kernel size which is not supported/properly > > > diagnosed by qemu/kernel? > > > > It means that your kernel only supports DT platforms, but there was > > no DT passed to the kernel (r2 is the pointer to DT). Consequently > > the kernel has no idea what hardware it is running on. > > > > I don't use qemu very much, so I can't suggest anything. > > I do pass DT and it boots fine w/o KASAN, so it seems to be poor > diagnostics of something else. It is the best we can do at that time. Consider yourself lucky that you can even get _that_ message since the kernel has no clue what hardware is available, and there is no standardised hardware. All that the kernel knows at this point is that (1) the machine ID in r1 does not match anything the kernel knows about (which are all DT platforms), and r2 is NULL, meaning no DT was passed to the decompressed kernel. There is no further information that the kernel knows. I suppose we could hexdump random bits of memory space through the serial port or whatever, but that would be very random. I'm not sure what else you think the kernel could do at this point. > It seems to be due to kernel size. I enabled CONFIG_KASAN_OUTLINE=y > and CONFIG_CC_OPTIMIZE_FOR_SIZE=y and now it boots... So, likely the DT was obliterated. How are you passing the DT? If you are passing it via qemu, then qemu's placement of DT is too close to the kernel. > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 0 at kernel/printk/printk.c:2790 > register_console+0x2f4/0x3c4 kernel/printk/printk.c:2790 > console 'earlycon0' already registered Two "earlycons" or whatever the early console kernel parameter is? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel