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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2778C433EF for ; Wed, 8 Jun 2022 05:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233694AbiFHF2c (ORCPT ); Wed, 8 Jun 2022 01:28:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233741AbiFHF2O (ORCPT ); Wed, 8 Jun 2022 01:28:14 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F7F177054 for ; Tue, 7 Jun 2022 19:42:41 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id s14so16425716plk.8 for ; Tue, 07 Jun 2022 19:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=eACAcP76K1gXeQHMPXfrh6MRwMHogkqclcM3ucohxaU=; b=DtL5BKl38TK1JmQCoo9VNTuilRXtIQQb8aA+2j5JWDKkTJMcHWV5I4ayrf85wEAp/D +SPamuT0V/GS1H3+TGA7bsJrj/vQJTAzHMhmUFqbAjw6QppecD8ydZLJWGxGusTbuS3B DrmzebuZhbfui1ZylFkqA44lBIOUX+RiD7kEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eACAcP76K1gXeQHMPXfrh6MRwMHogkqclcM3ucohxaU=; b=iW1aPxPC80cn8l4KCALpqOMXzRs2KSyPHS551ZcZ6+gvg1KYCNTuWmFu2ZLoP8WYrY dvmuK7FWhvhIeUK/jgyy0Lq5tznZKhiEV6KyPtFrGTYdSz0m34ykG06+lF5R8a8snzQV cDArt5X4gK3XCT94T1qnhR/XBhGCPw+OVR+L/8EWazgdMhv86fVEV5mUWwqCGFhOhl3d zyMVb/kKpkNsu8FJKUdVmpIrqFXR6xn4jkSMiXF3xgzr8t3jS3hExUBWbWhzFPV0GLz1 6za1nDBQFIfh4FNf8tF6yuddQRVbfh1mHHVAyHnXVkevkzcsc1q8px5yFu8uELFUkwZZ j/BA== X-Gm-Message-State: AOAM532Q1FSlYCToU1XRaleRl/2OBF3EotWaqkQ+cA4Eq3oDEBrLhHI1 tBkSC3kV8BJr+8hG9+JP4P82qg== X-Google-Smtp-Source: ABdhPJzYCcpDtcoi5LZAO+0GSYALVef0pXg5v/EV8ii/oeXqYV5OV4RF4wJ5iDiynw1qdkxhjkSp7A== X-Received: by 2002:a17:902:6bc6:b0:166:3c39:50a1 with SMTP id m6-20020a1709026bc600b001663c3950a1mr31493176plt.36.1654656158650; Tue, 07 Jun 2022 19:42:38 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:463d:a192:6128:66e]) by smtp.gmail.com with ESMTPSA id n7-20020aa78a47000000b0051bb61c0eacsm13512317pfa.20.2022.06.07.19.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:42:38 -0700 (PDT) Date: Wed, 8 Jun 2022 11:42:33 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Naresh Kamboju , open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Nitin Gupta , Sergey Senozhatsky Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On (22/06/08 11:39), Sergey Senozhatsky wrote: > On (22/06/07 16:52), Minchan Kim wrote: > > > rootfs: https://oebuilds.tuxbuild.com/29zhlbEc3EWq2wod9Uy964Bp27q/images/am57xx-evm/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4.gz > > > kernel: https://builds.tuxbuild.com/29zhqJJizU2Y7Ka7ArhryUOrNDC/zImage > > > > > > Boot command, > > > /usr/bin/qemu-system-aarch64 -cpu host,aarch64=off -machine > > > virt-2.10,accel=kvm -nographic -net > > > nic,model=virtio,maaacaddr=BA:DD:AD:CC:09:04 -net tap -m 2048 -monitor > > > none -kernel kernel/zImage --append "console=ttyAMA0 root=/dev/vda rw" > > > -hda rootfs/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4 > > > -m 4096 -smp 2 > > > > > > # cd /opt/kselftests/default-in-kernel/zram > > > # ./zram.sh > > > > > > Allow me sometime I will try to bisect this problem. > > > > Thanks for sharing the info. > > > > I managed to work your rootfs with my local arm build > > based on the problematic git tip. > > However, I couldn't suceed to reproduce it. > > > > I needed to build zsmalloc/zram built-in instead of modules > > Is it related? Hmm, > > > > Yeah, It would be very helpful if you could help to bisect it. > > This looks like a NULL lock->name dereference in lockdep. I suspect > that somehow local_lock doesn't get .dep_map initialized. Maybe running > the kernel with CONFIG_DEBUG_LOCK_ALLOC would help us? Naresh, can you > help us with this? Hmm, actually, hold on. mapping_area is per-CPU, so what happens if CPU get offlined and onlined again? I don't see us re-initializing mapping_area local_lock_init(&zs_map_area.lock) and so on. 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DFF0C433EF for ; Wed, 8 Jun 2022 02:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=PgPpVGTlcmMe/5wnJb/L5wOOyzN4c1tQJsGJP9HC54w=; b=jTJb0E+VIGnFA3 BxfD/HMk42+U8h7rgL48tEKw6XGKKozt/e2OH9OWzvJ8heoywGqimzOVg9WC4Kq2dk/snaPH9u2zN ocR+zVRGwGenyLgufryreRhKmwzauqKikVO5Bc1eaDxJB0zaVDaPZfWqOMj1m/Cqw92qdqp8doDsp ZRSdYp2kgrY6pmMswmRKnVc9NcGiC04GUC50lI8wWiPcyqbaxOrOG8I10XYd1dlffAD3a4h+ukpGr GJiHw6/XCmBr4XtN9WkkUSM9Kn1PcNfkx6jja6WDur1VyKA5FydZ1PSb7LfBSGakXR0ZkJTHSAnzj 11bAQi6M8e/dBWItd4kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyled-00APqN-NI; Wed, 08 Jun 2022 02:42:43 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nylea-00APpt-AN for linux-arm-kernel@lists.infradead.org; Wed, 08 Jun 2022 02:42:41 +0000 Received: by mail-pj1-x1036.google.com with SMTP id gc3-20020a17090b310300b001e33092c737so17109072pjb.3 for ; Tue, 07 Jun 2022 19:42:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=eACAcP76K1gXeQHMPXfrh6MRwMHogkqclcM3ucohxaU=; b=DtL5BKl38TK1JmQCoo9VNTuilRXtIQQb8aA+2j5JWDKkTJMcHWV5I4ayrf85wEAp/D +SPamuT0V/GS1H3+TGA7bsJrj/vQJTAzHMhmUFqbAjw6QppecD8ydZLJWGxGusTbuS3B DrmzebuZhbfui1ZylFkqA44lBIOUX+RiD7kEk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=eACAcP76K1gXeQHMPXfrh6MRwMHogkqclcM3ucohxaU=; b=R9n2t9T2yUxTN4EhWSl7ufCVWIiw1ZrEesasXbWBUJKeNEGeZ+7A1eGve0N2Fu+DsW Melvn7tcl8AMevAItkKLLaBlWHdCBlw3zE3UGFSsaFTVqGlGDAiChr7++M2Y1cb8a5C7 QecfKMWXtVzsrW3T8SlFbC8/UkuFChB5ln+XIMgAD/yPwpEwQN0p0C3F76IiXjxl6cjO GGZ6amOfcRvnLQcOeDY0GQPrq4lFBrtQuWk/RIBKJ6+ApY0VoI/I/soD6ZpEqEMXoYb/ Afr3CLu/F1LoOG+bQrhd0hkM1rCJEqAGbeHRLZPNb+2IfQbdzSPGTQlAsyH0hIE6u+ha Gr/A== X-Gm-Message-State: AOAM533JW0gs0Rj/pqgMUZqoSZtiUT1teW+djzMVKmixhVQRQxaiFNtW DR+jPTH5qwu85oFCx/SlJHLx/Q== X-Google-Smtp-Source: ABdhPJzYCcpDtcoi5LZAO+0GSYALVef0pXg5v/EV8ii/oeXqYV5OV4RF4wJ5iDiynw1qdkxhjkSp7A== X-Received: by 2002:a17:902:6bc6:b0:166:3c39:50a1 with SMTP id m6-20020a1709026bc600b001663c3950a1mr31493176plt.36.1654656158650; Tue, 07 Jun 2022 19:42:38 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:463d:a192:6128:66e]) by smtp.gmail.com with ESMTPSA id n7-20020aa78a47000000b0051bb61c0eacsm13512317pfa.20.2022.06.07.19.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:42:38 -0700 (PDT) Date: Wed, 8 Jun 2022 11:42:33 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Naresh Kamboju , open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Nitin Gupta , Sergey Senozhatsky Subject: Re: qemu-arm: zram: mkfs.ext4 : Unable to handle kernel NULL pointer dereference at virtual address 00000140 Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_194240_397855_14C1DBF5 X-CRM114-Status: GOOD ( 17.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 (22/06/08 11:39), Sergey Senozhatsky wrote: > On (22/06/07 16:52), Minchan Kim wrote: > > > rootfs: https://oebuilds.tuxbuild.com/29zhlbEc3EWq2wod9Uy964Bp27q/images/am57xx-evm/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4.gz > > > kernel: https://builds.tuxbuild.com/29zhqJJizU2Y7Ka7ArhryUOrNDC/zImage > > > > > > Boot command, > > > /usr/bin/qemu-system-aarch64 -cpu host,aarch64=off -machine > > > virt-2.10,accel=kvm -nographic -net > > > nic,model=virtio,maaacaddr=BA:DD:AD:CC:09:04 -net tap -m 2048 -monitor > > > none -kernel kernel/zImage --append "console=ttyAMA0 root=/dev/vda rw" > > > -hda rootfs/rpb-console-image-lkft-am57xx-evm-20220601222434.rootfs.ext4 > > > -m 4096 -smp 2 > > > > > > # cd /opt/kselftests/default-in-kernel/zram > > > # ./zram.sh > > > > > > Allow me sometime I will try to bisect this problem. > > > > Thanks for sharing the info. > > > > I managed to work your rootfs with my local arm build > > based on the problematic git tip. > > However, I couldn't suceed to reproduce it. > > > > I needed to build zsmalloc/zram built-in instead of modules > > Is it related? Hmm, > > > > Yeah, It would be very helpful if you could help to bisect it. > > This looks like a NULL lock->name dereference in lockdep. I suspect > that somehow local_lock doesn't get .dep_map initialized. Maybe running > the kernel with CONFIG_DEBUG_LOCK_ALLOC would help us? Naresh, can you > help us with this? Hmm, actually, hold on. mapping_area is per-CPU, so what happens if CPU get offlined and onlined again? I don't see us re-initializing mapping_area local_lock_init(&zs_map_area.lock) and so on. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel