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 A5A36C43334 for ; Tue, 14 Jun 2022 03:19:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350410AbiFNDTh (ORCPT ); Mon, 13 Jun 2022 23:19:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350725AbiFNDTf (ORCPT ); Mon, 13 Jun 2022 23:19:35 -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 36BE12E69C for ; Mon, 13 Jun 2022 20:19:31 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id e9so7340004pju.5 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=qjg6qnmOPqqckojx60vl7quoyZLThT7ecgSBq0IVG/ftOMb6t9nFV9beIIPROPZPWG AsS+5SxUICQFHcC8YWQ4AIDYH8n2Ck7/DP5orIssuhVSKcXknftvu9y80bGl8yFbXwrJ XyquyKhW5WVeG+aDs6o5kcbrwf5hwB3i/sgTUjnFluwb+DWVzk3umGqn+dIPgMAOc5KV ch+hHTuLr+AFNjYYPytTslyBYBLt5O763sTcYAmBD/AeNI6TLxoharMPH6dKX9UioRC/ gX8BfV7e7XEOOqFa+bBljVrX3mEe0Nk9rhE7oc8bJqGGgm/wzoqdK1GaI6UVXF8Sfup2 zAgQ== X-Gm-Message-State: AJIora8Gw2TgPECIFfDffdVZuhJWAJRdkrDp3u9IIqAzFBgTc2npvdAj ScDh/u86gZ033ljCHJDxCJKDag== X-Google-Smtp-Source: AGRyM1vWB6bubOckC1eBAZ912PtyRJ9dDViWlYRgpIAHNDPo8sztccizLgEYqmphzjIE3Rz/945vWA== 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: Precedence: bulk List-ID: X-Mailing-List: linux-block@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. 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 9E8A8C43334 for ; Tue, 14 Jun 2022 03:20:49 +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=PmnPbK1bB8R9xtFQ+YIQyLEB0YO40G+7GZ2y2d6XUTE=; b=MYwn1dDDb5l3Xw WBdnHu9L4mpFC/hBINwULFjZLpAkTTkZEsdoMIXUC64VImQwGMIquuzzgQbG0CUrld1qoDiZkkxtx npDlcL8+RC7RyzeJufoXQz8KR2hGoXuaLlLYYeY24M/EICI6JbD78bfQ9rfthVMO6ZTUOWBg+8psG jHSYbeE6abhHjmGJlMzluzhCuSvRsoUnxcn2YqSPeF8nHWg5TuR5DJFRC5Dk3oXT1bUWFOivSHhrz zaiCM1k9EtJ+HprrWKOOUWHTD0M8hJar9bZThSrx02unPOTQiIiuoMC9TPPJE6Hfw4IauhZRvGkgC fqG2sDHItyLHm6yx8EWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0x5c-006skO-CH; Tue, 14 Jun 2022 03:19:36 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0x5Z-006sje-Kv for linux-arm-kernel@lists.infradead.org; Tue, 14 Jun 2022 03:19:34 +0000 Received: by mail-pj1-x1030.google.com with SMTP id o6-20020a17090a0a0600b001e2c6566046so10621755pjo.0 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=0pvyYOQktlccpDW9BaOT6JFshmwoBPlWTWcN1KoQjWhZxWbXDm3cXpIbyWIYmimPjS Z73BEv7Q/hIZP254mxExJWmw2VBUFRn7Hrrx0jaLdJBErsK/oCJZaiPN9DINotkogOwB a1RfvCQ7aXuJRT2chrW2vkZu2wHJGqCQ0D6zo8zhKenkeMUW5FMBEeVKQgJ2OA1g1Ioj jJbvOTHST/uSfRPORRPkpbUIDfZ5Els2aXX0Z8ijOzoGAxmsLeOddi6Aet0k41w7iScx IvXHZHUzxvyURQ/XYib0TkH0He5lhslhOlHz/1iw0fOZyfOYXje6McO5CRpBCRWFCDAk GoeA== X-Gm-Message-State: AJIora9n0q5F9tyG9Oyp5EkCjj/S3x9ZWkG5ssJlGHI//FIgvX+5Y7I8 bkVC5G1gj/oLcxkuGrAsyrZ76Q== X-Google-Smtp-Source: AGRyM1vWB6bubOckC1eBAZ912PtyRJ9dDViWlYRgpIAHNDPo8sztccizLgEYqmphzjIE3Rz/945vWA== 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_201933_745550_7D7C9572 X-CRM114-Status: GOOD ( 17.55 ) 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/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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel