Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2210854iof; Tue, 7 Jun 2022 23:19:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwkNQEVL0mEkilnjcZVFSym6Nj0EsjZk9VgzTo1K9nfPa3WrH7xqfyVykT8C/GRFS7wh9B X-Received: by 2002:a17:903:2444:b0:167:5fe8:4a16 with SMTP id l4-20020a170903244400b001675fe84a16mr21409609pls.20.1654669157915; Tue, 07 Jun 2022 23:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654669157; cv=none; d=google.com; s=arc-20160816; b=zMwrba4P9yuRQXz8SRWpOql+j5KbOzDE1kdVxEudXGqOeKYbd6nWEY24+Bjpp69wk3 ppPKtfe0vbxquoy1aRbk5noxTYldJ1pDtCnCvYMVnd55Fdcf/19GIom5r0c7/GCuJACG r8mFv7WVJmw6YxfnlaQfnVBREdS0sTMAEwGcVfhCHQOSJmUdY05iavJ7BnvM08dPlbHX GbIxMefyhvwWxSol9Nlhvcbwbn7IFGl7CyF6Xi/t0p/c1ELdEWjDVnpfP9yQRmP58pfi uMzKBx1qzboQ3gWrcWe5806ePub77kwcDfWOaYj8O1X6lM30kzIzockuIBoFHlG2VfGk TTjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=b3NZKzwwnS36QL4ucaqxtIuHPEUyyTomuKdcLQyEKAY=; b=J7/h0mZh19KJnS0GdO9m3X4qsLDa4Sb6gxkXSobRiBe0twmqD9aej3Iu7KA0qFUzN7 SS+xMGXF+qfHea2y1DBoBmnHkFSl2SZ1LRSHgg0j3hXuzJAxIsCMn/wOqmdf8Dkrcf8I 64Nok0+RJrI7UWej/zI8uD56S4xhKzUeZsm2R59BIFbtoVlemR6ubOdjs11VjCiZ7N9n e0sszTJ1dwhSNLcbGCOo+ueta78UmIlEo4v+4UYHWgikd0akUtQ92OuaDzOlYlj3UWT/ 86JXW3Moq7M0ubOvn9COGOF0ozy745R7CIAg/YsuzkW1TJ5Oxp5v+qLNtOBFBDyYu0em Icww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gf7bKdJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c6-20020a170902d48600b0015a7e9bbe73si26429520plg.425.2022.06.07.23.19.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:19:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Gf7bKdJ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 12D0C3A0E7D; Tue, 7 Jun 2022 22:41:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442792AbiFHCBK (ORCPT + 99 others); Tue, 7 Jun 2022 22:01:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1839311AbiFHAC5 (ORCPT ); Tue, 7 Jun 2022 20:02:57 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2ED511CB7F; Tue, 7 Jun 2022 16:52:07 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id l20-20020a17090a409400b001dd2a9d555bso16851699pjg.0; Tue, 07 Jun 2022 16:52:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=b3NZKzwwnS36QL4ucaqxtIuHPEUyyTomuKdcLQyEKAY=; b=Gf7bKdJ2hUOr/LphELuKt2o2il5QdNDO4rPQYRQp+1RKXfjR13N6bKmp5cYllzWRT1 xhWgDv9jhC081rAPWRyoHtai4YiXoOEshYmG98xEi3wfEpFCM2PDCdIuy+YcJ0chYvKT atBYZkLGl8/N43pToDTwRSTpFzFaMaAypJvvAQf+dndtlcYidM4/cRGYnwFcXWEtFEWi Tcg9DoCiNNhHm/4hSnGnujiO9+rEPF9ieyuGMobYFn67e4mR2wStVhet3fN/z1EhPV1t aMmWf/7BmFv9yBtn8Iwp64KBjrIImavp8mV1C3jBkHuJyJPrwDy+v+PnhrbQjoGDC5sB 2t0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=b3NZKzwwnS36QL4ucaqxtIuHPEUyyTomuKdcLQyEKAY=; b=PMNOqZv0gYYje7LKbxAyJDyL+ZlHZfMhp5bM+Gk/YtCO37w6dt/stbuRPAuHeIQxEU W/9lu/ToLXXewh7L2Dp0vLRwzv3rrH3vq7aHe/XbS947qmv4b9OyOVqtmqtUaiNXoMnT 0VC86ADX/oAYxpXqrBh0FK1wBuYB/5BebDWAs10wjvToBJt151B9sM6ZuoHGamjimXMw rdeJTuxFqN88UTCvNS7E4h8+EPKJYxzxiXiDNkjJYNJSMScfxEHhelqBPQC9dcXiOwWi 9qAnrgYpRHQ7b7/V4xZPg5i4FfbQf4Zc1Qs2zXqvXmSbfbK+/iKTsGAhg90+IKW4mdqC rwjA== X-Gm-Message-State: AOAM533xkF3DKvaZ61c7W0Rhme3N5NdJlRfA9RnL3Pf0QGFDFR7ZHWue lk613blWefXo7l5Xb85Ya34= X-Received: by 2002:a17:902:ce11:b0:167:7d4a:964b with SMTP id k17-20020a170902ce1100b001677d4a964bmr12617889plg.37.1654645927119; Tue, 07 Jun 2022 16:52:07 -0700 (PDT) Received: from google.com ([2620:15c:211:201:f30f:4d03:66e6:b121]) by smtp.gmail.com with ESMTPSA id t9-20020a1709027fc900b00167863f0e68sm4026924plb.237.2022.06.07.16.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 16:52:06 -0700 (PDT) Sender: Minchan Kim Date: Tue, 7 Jun 2022 16:52:04 -0700 From: Minchan Kim To: Naresh Kamboju Cc: open list , linux-fsdevel@vger.kernel.org, Linux ARM , "open list:KERNEL SELFTEST FRAMEWORK" , linux-block , regressions@lists.linux.dev, Jens Axboe , Sergey Senozhatsky , Nitin Gupta 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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 07, 2022 at 06:51:27AM +0530, Naresh Kamboju wrote: > On Mon, 6 Jun 2022 at 23:06, Minchan Kim wrote: > > > > On Thu, Jun 02, 2022 at 02:19:34PM +0530, Naresh Kamboju wrote: > > > The following kernel crash reported while running selftests: zram: zram.sh > > > test case on qemu-arm with Linux mainline v5.18.0 kernel version. > > > > > > Reported-by: Linux Kernel Functional Testing > > > > > > Started noticing from kernel crash from > > > BAD: git_sha: cdeffe87f790dfd1baa193020411ce9a538446d7 > > > GOOD: git_sha: babf0bb978e3c9fce6c4eba6b744c8754fd43d8e > > > > > > # git log --oneline > > > babf0bb978e3c9fce6c4eba6b744c8754fd43d8e..cdeffe87f790dfd1baa193020411ce9a538446d7 > > > -- drivers/block/ > > > 98931dd95fd4 Merge tag 'mm-stable-2022-05-25' of > > > git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm > > > 6140ae41effe zram: fix Kconfig dependency warning > > > b3fbd58fcbb1 mm: Kconfig: simplify zswap configuration > > > e7be8d1dd983 zram: remove double compression logic > > > a2ad63daa88b VFS: add FMODE_CAN_ODIRECT file flag > > > 30226b69f876 zram: add a huge_idle writeback mode > > > > Hi Nalesh, > > > > Thanks for the reporting the bug! > > > > I locally ran the test in my x86 KVM machine but couldn't reproduce it. > > How is it easy to reproduce? Could you help to bisect it? > > It works on qemu_x86-64 > It is always reproducible in qemu arm32 environment. > > steps to reproduce: > # Please download and use this rootfs and kernel zImage > > 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. Thanks! === &< ==== create '1' zram device(s) zram modules already loaded, kernel supports zram-control interface [ 936.188541] zram: Added device: zram1 all zram devices (/dev/zram1~1 successfully created set max_comp_streams to zram device(s) The device attribute max_comp_streams was deprecated in 4.7 set disk size to zram device(s) /sys/block/zram1/disksize = '1048576' zram set disksizes: OK set memory limit to zram device(s) [ 936.214438] zram1: detected capacity change from 0 to 2048 /sys/block/zram1/mem_limit = '1M' zram set memory limit: OK make swap with zram device(s) [ 936.608854] Adding 1020k swap on /dev/zram1. Priority:-2 extents:1 across:1020k SS done with /dev/zram1 zram making zram mkswap and swapon: OK zram swapoff: OK zram cleanup [ 937.063416] zram1: detected capacity change from 2048 to 0 [ 937.189223] zram: Removed device: zram1 zram02 : [PASS] root@am57xx-evm:/opt/kselftests/default-in-kernel/zram# uname -r 5.18.0-11934-g54eb8462f21f