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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA7A8C2BA15 for ; Sat, 16 Sep 2023 17:43:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE86B6B041F; Sat, 16 Sep 2023 13:43:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C98D86B0420; Sat, 16 Sep 2023 13:43:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B60826B0421; Sat, 16 Sep 2023 13:43:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id A938C6B041F for ; Sat, 16 Sep 2023 13:43:42 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 6E900C093A for ; Sat, 16 Sep 2023 17:43:42 +0000 (UTC) X-FDA: 81243183084.12.A6B99A1 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by imf27.hostedemail.com (Postfix) with ESMTP id 676BA4001B for ; Sat, 16 Sep 2023 17:43:39 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=swuEZrvB; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf27.hostedemail.com: domain of anders.roxell@linaro.org designates 209.85.167.41 as permitted sender) smtp.mailfrom=anders.roxell@linaro.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694886219; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TIVt11VXEPQxcMmnR7p7Lc2b9PwXHp0ElLuvknOACcw=; b=mp9q4XQsmnypColWdTO7iqRQAyPIl5B37bXat8HjkOl8cliT3ZPsqug4+bGhXSCMywoipk KZcuHgeUHjm+NdjhvimB3PBkZvhdtDxnPTR5WpY6DdQtmsUn3BSDIKG3VNhCZK6LB32Ins iaiB8+LmtKj2ZB7ZEAztrh048l+h2y0= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linaro.org header.s=google header.b=swuEZrvB; dmarc=pass (policy=none) header.from=linaro.org; spf=pass (imf27.hostedemail.com: domain of anders.roxell@linaro.org designates 209.85.167.41 as permitted sender) smtp.mailfrom=anders.roxell@linaro.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694886219; a=rsa-sha256; cv=none; b=H/nmty0wio8brghD/FXyXGS9urkWPU9Q8Fp80V7U4D7HfLRgDWLjREQng7yIaDKPziMwRl 8bUcxUzqG2qf/iHOFJRJZJjgS34wIbfnFwgvq7MZp79EsWkQamRpK+/QRgfLH7iz2AjojV Fj9ZFNpzj0johTWSgRsnIo8dTWpVVGI= Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-502fd1e1dd8so1441220e87.1 for ; Sat, 16 Sep 2023 10:43:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694886217; x=1695491017; darn=kvack.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=TIVt11VXEPQxcMmnR7p7Lc2b9PwXHp0ElLuvknOACcw=; b=swuEZrvBz0Dt+3C4fiaktqJYDd2EXgjKJcDZtoO2ERI5exTMbRJs8tqG5tebt+axjA mzxZGCTmX2RxetCAx5xk3WHpMJNuDnOvSyRITTLNL980LVmHhKTtqygd6eCuklgJntXt i7aCTUvWrTDaqsgUzKddVP8yBJCf6iANv7SAb7u9jjiWeWf70jwGKl//mKc+9dQ1/yTV Q8Nd5kNIPCq2DwGGY7G/WeAbod0ihMfjmunj+pBV+tCWuek0f8g8940hoLToKd68qdvo v218Cxjqy5e4W/xibvsj1omt28xUNz8HmGkbebbMTLqV+F047M6LiXeBAMyvGZUJAb5W c0Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694886217; x=1695491017; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TIVt11VXEPQxcMmnR7p7Lc2b9PwXHp0ElLuvknOACcw=; b=UUk+Z70p7fJE/JUrQAprPV0FCvuA/iBCzkcWupeTSeeereZKYdxEbvKsYmnxmgD0tt A/6YROGZT4UNliOmDJQXmnfetO0yc5aP7+FwrAwpbNv76+eOUoySi2XLiS3MEZlCE+F9 if3i6il41nwUwrQZJPIoAIQOJanBPXZ32ASxcMlFEUXtbvFLfyZKT4o0x0tvazJ+wBSt q53XDjm+AXzkbKARe1AUW0cI7eZB6J3rW+huIK2tyrOdPotTL6e1Gsal/1K1JvKDynOU oR9JhiIKsxBByGCUBOscLUWfx07T8RAHFzg/2fN2l6Bm+BLIPGv79N8pYJ+U1uFD42/T di0w== X-Gm-Message-State: AOJu0Yz3kSigEA8H0S5AoHZ90kByL65b4Q6eoE15rdf1WoLEg4hXPTVa S9fjexLUXkdNCARelzIw86Og3w== X-Google-Smtp-Source: AGHT+IEHywx+IdLPBKdiSYcGSmJF+BwP9LP1gn12kM7MQoC51Mwh5zkrKUcRErYNvh+ZG67AtLACOQ== X-Received: by 2002:ac2:5976:0:b0:4fb:911b:4e19 with SMTP id h22-20020ac25976000000b004fb911b4e19mr4035596lfp.35.1694886217563; Sat, 16 Sep 2023 10:43:37 -0700 (PDT) Received: from mutt (c-9b0ee555.07-21-73746f28.bbcust.telenor.se. [85.229.14.155]) by smtp.gmail.com with ESMTPSA id w10-20020ac254aa000000b004fdc0f2caafsm1103942lfk.48.2023.09.16.10.43.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Sep 2023 10:43:36 -0700 (PDT) Date: Sat, 16 Sep 2023 19:43:35 +0200 From: Anders Roxell To: andrey.konovalov@linux.dev Cc: Marco Elver , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , arnd@arndb.de, sfr@canb.auug.org.au Subject: Re: [PATCH v2 12/19] lib/stackdepot: use list_head for stack record links Message-ID: <20230916174334.GA1030024@mutt> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 676BA4001B X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: tb1w8rpaxehsiwfdk7od7tt45chwn83x X-HE-Tag: 1694886219-318714 X-HE-Meta: U2FsdGVkX18qRHjA/4ScDCXYRWhifcue8gPAWGq6P9ITeJia6c/pFAcOKzmeYpxWi1tcBnwxhmhghqi50nB63KySj642+8bfUsTF+xqqb20ndPLKKAU0t+h/2JY0vtQ/lyf133Ws35vrI8tbo3A7IHZk5JPqXo/mjrAl+ws5YDKWt8OUmGt+qBn5MVURSkAKsOkeiasDqQD9F2WO5t36f5R/Qg8+hYT6GzmR63nsIIuVwSH8w4Em/Geiy5tlNFv8oWhUzIQDMUrrz5riyRkEuZKRstwgGTm8hvLD5QFkXU0wHi1rV6//FyhWHxJNA+BQtftHeEP3qotItD4Cu/lftwEoBGXCJaMwVcH82E9K0yDOHdpdzAZ4CalsCjOoj3muk2n0S2GXwtCLQKVddLJ2qHayfNH8mr6o4xXGwem9cJPRZ8/5Xl38T30o1KknVDqaWqh5ey42A6KPVShPMmJl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SU3peVpWYklkXiV9hqughxEQkSa0P2hw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 2023-09-13 19:14, andrey.konovalov@linux.dev wrote: > From: Andrey Konovalov > > Switch stack_record to use list_head for links in the hash table > and in the freelist. > > This will allow removing entries from the hash table buckets. > > This is preparatory patch for implementing the eviction of stack records > from the stack depot. > > Signed-off-by: Andrey Konovalov > Building on an arm64 kernel from linux-next tag next-20230915, and boot that in QEMU. I see the following kernel panic. [ 67.398850][ T1] Unable to handle kernel read from unreadable memory at virtual address 0000000000000010 [ 67.407996][ T1] Mem abort info: [ 67.411023][ T1] ESR = 0x0000000096000004 [ 67.414757][ T1] EC = 0x25: DABT (current EL), IL = 32 bits [ 67.419945][ T1] SET = 0, FnV = 0 [ 67.423172][ T1] EA = 0, S1PTW = 0 [ 67.426669][ T1] FSC = 0x04: level 0 translation fault [ 67.431357][ T1] Data abort info: [ 67.434593][ T1] ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000 [ 67.439801][ T1] CM = 0, WnR = 0, TnD = 0, TagAccess = 0 [ 67.444948][ T1] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [ 67.449910][ T1] [0000000000000010] user address but active_mm is swapper [ 67.456236][ T1] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP [ 67.462181][ T1] Modules linked in: [ 67.465435][ T1] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G T 6.6.0-rc1-next-20230915 #2 e95cf19845fbc1e6a5f0694214d59e527e463469 [ 67.477126][ T1] Hardware name: linux,dummy-virt (DT) [ 67.481994][ T1] pstate: 804000c5 (Nzcv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 67.488454][ T1] pc : stack_depot_save_flags+0x2a8/0x780 [ 67.493348][ T1] lr : stack_depot_save_flags+0x2a8/0x780 [ 67.498339][ T1] sp : ffff80008000b870 [ 67.501670][ T1] x29: ffff80008000b870 x28: 00000000650dddc5 x27: 0000000000000000 [ 67.508658][ T1] x26: ffff80008470a000 x25: ffff80008000b9e8 x24: 0000000000000001 [ 67.515564][ T1] x23: 000000000000000e x22: ffff80008000b988 x21: 0000000000000001 [ 67.522430][ T1] x20: ffff00007b40d070 x19: 000000006ee80007 x18: ffff80008000d080 [ 67.529365][ T1] x17: 0000000000000000 x16: 0000000000000000 x15: 2030303178302f30 [ 67.536101][ T1] x14: 0000000000000000 x13: 205d315420202020 x12: 0000000000000000 [ 67.542985][ T1] x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000000 [ 67.549863][ T1] x8 : 0000000000000000 x7 : 0000000000000000 x6 : 0000000000000000 [ 67.556764][ T1] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000 [ 67.563687][ T1] x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 [ 67.570500][ T1] Call trace: [ 67.573275][ T1] stack_depot_save_flags+0x2a8/0x780 [ 67.577794][ T1] stack_depot_save+0x4c/0xc0 [ 67.582062][ T1] ref_tracker_alloc+0x354/0x480 [ 67.586273][ T1] sk_alloc+0x280/0x5f8 [ 67.590064][ T1] __netlink_create+0x84/0x200 [ 67.594009][ T1] __netlink_kernel_create+0x11c/0x500 [ 67.598816][ T1] rtnetlink_net_init+0xc4/0x180 [ 67.603052][ T1] ops_init+0x100/0x2c0 [ 67.606827][ T1] register_pernet_operations+0x228/0x480 [ 67.611568][ T1] register_pernet_subsys+0x5c/0xc0 [ 67.616282][ T1] rtnetlink_init+0x60/0xb00 [ 67.620086][ T1] netlink_proto_init+0x374/0x400 [ 67.624465][ T1] do_one_initcall+0x2c8/0x840 [ 67.628518][ T1] do_initcalls+0x21c/0x340 [ 67.632527][ T1] kernel_init_freeable+0x3b0/0x480 [ 67.636905][ T1] kernel_init+0x58/0x380 [ 67.640768][ T1] ret_from_fork+0x10/0x40 [ 67.644606][ T1] Code: eb1b029f 540008c0 91004360 97caa437 (b9401360) [ 67.650293][ T1] ---[ end trace 0000000000000000 ]--- [ 67.654948][ T1] Kernel panic - not syncing: Oops: Fatal exception [ 67.660229][ T1] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]--- The full log can be found [1] and the .config file [2]. I bisected down to this commit, see the bisect log [3]. When reverted these two commits I managed to build and the kernel booted. 47590ecf1166 ("lib/stackdepot: use list_head for stack record links") 8729f3c26fc2 ("lib/stackdepot: allow users to evict stack traces") Cheers, Anders [1] http://ix.io/4GyE [2] https://people.linaro.org/~anders.roxell/next-20230915.config [3] http://ix.io/4GyG