Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1065231iog; Mon, 13 Jun 2022 20:38:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0LS03S4DabytV/QAwKJQR1AXRWRttU2IEhaSUrj+n/lr+C0OOebIFWDNFpRC/q0bsJO5Q X-Received: by 2002:a05:6a00:124d:b0:51b:f2ac:ef8a with SMTP id u13-20020a056a00124d00b0051bf2acef8amr2502784pfi.72.1655177912604; Mon, 13 Jun 2022 20:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655177912; cv=none; d=google.com; s=arc-20160816; b=tFSxIqwUbyftSFXlj2wbWKFPgDHPpZxpmMkeT1K/dZLPFmzQhtdtAZJ5u5NamhZyng PG55v8mqLIvT+ZvxIWOQzSR664bIMNhFaBwmBGBDqsVsb8g7DIQ4xOUBhTXhwcmGjL4X CKYhhEpTF9lUQhv/EpVAGnI2kugY+hYcRMdkUEVrsiW6V/H6e2SyCQ1Vd+zfqgmoumM0 bU1KfdglI2C/0AOWqsKUFQ7wMgANGOyJFO0ckoqt/OnVaN3o923l5KIyBCX0pCtnWHR8 PETKXBdUv0NAloWeNGwPtUhUWe4iQBGlSCLwOuyBewibONWjR2GMEEhpAbEAAPprf7Ud 0nOw== 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:dkim-signature; bh=7L8e1Wz/Bd9z7iLzaFmqZHzg9hGkFUKT87XneuMBC4s=; b=g5sw0/EXDhelDEo0mmfxicy33/kb/ETNbrSKLuju+UfXRfnA7ORSjSvH8lvz5jkUUa WCPoANzuK0JGYWbNqdULjkCbpzx9aSSZD2BFjvx1rLRMmq54F7fmndkz5QMlvCFvEekR 3NNgm9AvsMSR1U27cVnpvvb00NwnPw0vuV2roLiCYZ7lhB2RcaBp8FYt6V35cDZs5XRs BXDUajAT9kJ+Q2QDE1mca5hgHsNfJPamhxNXq15OYxq2JfYEbVn2cuTgL6n/Z6cbH2FO Gr/WBdJGkA7FJS/Cp2vjSnhuYGxb79xr0D1Ll9BJU5hCBS+TEIXYFIY70l9dprVU/F+J ZzeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UXGxXFis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a2-20020a056a000c8200b0051bac3bbca0si13265488pfv.174.2022.06.13.20.38.20; Mon, 13 Jun 2022 20:38:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=UXGxXFis; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240926AbiFNDTi (ORCPT + 99 others); Mon, 13 Jun 2022 23:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350441AbiFNDTc (ORCPT ); Mon, 13 Jun 2022 23:19:32 -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 35C7B2E696 for ; Mon, 13 Jun 2022 20:19:31 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id 3-20020a17090a174300b001e426a02ac5so10603788pjm.2 for ; Mon, 13 Jun 2022 20:19:31 -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=7L8e1Wz/Bd9z7iLzaFmqZHzg9hGkFUKT87XneuMBC4s=; b=UXGxXFisJTDA5eg/7J+MzK1OfxHBFi3fX5Hr9jfiVqSYvKefez4KuMeV9V2EJcHwyS u0p2ak8L1LS9b0xqmMzO4boRwj+o88ckA/SQhGa0etdFy4Sb+OYvBc1GdtRO9SKYMoLV E/bBmZBENCoJN1eexVato9L4Ks2NmoR5u9fRU= 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=7L8e1Wz/Bd9z7iLzaFmqZHzg9hGkFUKT87XneuMBC4s=; b=Y0cIssAgysb9YnBTdxOtspMAFa2+9GHdsu0O+1enlpfFc7MOhuDb9SIJn0sEkWMLDc RruaArJLgA2XUN0efZ4Eu2g/NBa1PA4vS9dpKSem3aYeBiZkEKj3fKT8ILXVF12VaQRY ugk0OLrOIpmw09pAE6SDvyX9eCD1zzFkOM70WZIlJVD+Cb28yW49+n8TUkjvGaJcrL2b zdkbnPz6jvGuZO4ZJRuESoTUke3//d6cOMlCDKcZaCpy3TTNO38UL03gS1OpmTzva2WI QAQtSN62NBt2K7RYkXkbmZye2oq/B4Ve3io96MyGebylEKOHMzNIvvIvFTi2tAAZGzvw HYfw== X-Gm-Message-State: AJIora+vBsWiA1ofAm9HsUe/LowsNUcO+6Xm96QWX//YRF8eWD8iHVnn bFwmGHC/mtSjS276xoIxI/HxtTFoSuxamg== X-Received: by 2002:a17:90a:c7cf:b0:1e8:2b77:7835 with SMTP id gf15-20020a17090ac7cf00b001e82b777835mr2163700pjb.109.1655176770633; Mon, 13 Jun 2022 20:19:30 -0700 (PDT) Received: from google.com ([2401:fa00:8f:203:580a:28cf:a82b:5610]) by smtp.gmail.com with ESMTPSA id b6-20020a170902650600b0015ee985999dsm5905819plk.97.2022.06.13.20.19.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 20:19:29 -0700 (PDT) Date: Tue, 14 Jun 2022 12:19:24 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , umgwanakikbuti@gmail.com, bigeasy@linutronix.de, 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 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=-3.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 (22/06/13 09:49), Minchan Kim wrote: > > Many thanks for the tests. > > > > Quite honestly I was hoping that the patch would not help :) Well, ok, > > we now know that it's mapping area lock and the lockdep part of its > > memory is zero-ed out. The question is - "why?" It really should not > > be zeroed out. > > Ccing Mike and Sebastian who are author/expert of the culprit patch > > Naresh found zsmalloc crashed on the testing [1] and confirmed > that Sergey's patch[2] fixed the problem. > However, I don't understand why we need reinit the local_lock > on cpu_up handler[3]. > > Could you guys shed some light? My guess is that it's either something very specific to Naresh's arch/config or a bug somewhere, which memset() per-CPU memory. Not sure how to track it down. KASAN maybe? We certainly don't expect that static DEFINE_PER_CPU(struct mapping_area, zs_map_area) = { .lock = INIT_LOCAL_LOCK(lock), }; would produce un-initialized dep_map. So I guess we start off with a valid per-CPU lock, but then it somehow gets zeroed-out.