Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1854503rdb; Mon, 9 Oct 2023 05:19:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGZpuVS6fw1EUPUyALBYx3Wz5dEbSOFR4h1id7BVyykjJWq+o07f/Dmc9QYukh43idlM42g X-Received: by 2002:a05:6a20:42a8:b0:158:f65:12d5 with SMTP id o40-20020a056a2042a800b001580f6512d5mr15666169pzj.43.1696853983018; Mon, 09 Oct 2023 05:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696853983; cv=none; d=google.com; s=arc-20160816; b=Zc15ojLz15Zs/+SpJn3IfhGROPuDjoSejZncYPwWJmUZeMKPdgt5kNOy38Ow6LyWGA P96Hf/vA8wnP/yZZ7HCym0jai//pYdj0uRXo3/fN3dFOWJc7j3HbEI6/QPtbmGhPuYWH iW9jVQuHttO0C00P316FDW8fwYSp6Y5kQAthZJnVfjN4RA52dN+cfdHBCxw0Am6STIsz 89XfD//Y8rYzyq7tKDdGrXcwSngztrgQvpMx4FQ7/aCUV/5ZYHGcXgP/5TGI6wRHHmME ZCobBKh+WRVsv6n83Xv9ZW06rF9qnCF08T2aqaqse+vRtaHcZD9labTtdhYiSRUpRVdS 83uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iw95tEeWB9saYTjeuqfwDCk67AfASMwamONQ4Q2lXGY=; fh=Vxv8GWGH9lQmhEoAE2yCk/ylzZGDpbMQIsU7b5w2E5Y=; b=YAlOplJTZp4+bJecJiO+ZSZyTBdo30oEsnBl644lxguHCjldLUBg1c4hEJlvS1z32l MtfeCMWgwR++AqYsyQYuZdnCu9xRlDJS4HuMkNDsM92M8qchUqLbKtKkK+WJNkeXggtH VUSJ0fOL/6snlscDZ3egBdD7zG2fMupkabRz35vzV+gKrV364I4mXFnmleTUYUQA8ERG 6HJY7ArxN8FuXPYkn43MT1KPUrN7GmchOKcZlH058JwQDDlsZVF8cJA14HZnjUg/0JSz vCe5VReEMQZ8u3KwcMRga2tXzokH2XcdIkYbBBidt2DVzzDqc+eHDlcmKykbAqA/uBx+ 911g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D7fYYAak; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id dw26-20020a056a00369a00b00690d8c05582si7207200pfb.372.2023.10.09.05.19.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 05:19:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D7fYYAak; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 13BAB805D297; Mon, 9 Oct 2023 05:19:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376284AbjJIMTU (ORCPT + 99 others); Mon, 9 Oct 2023 08:19:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346558AbjJIMSv (ORCPT ); Mon, 9 Oct 2023 08:18:51 -0400 Received: from mail-qv1-xf2f.google.com (mail-qv1-xf2f.google.com [IPv6:2607:f8b0:4864:20::f2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D90E93870 for ; Mon, 9 Oct 2023 05:16:02 -0700 (PDT) Received: by mail-qv1-xf2f.google.com with SMTP id 6a1803df08f44-65afd746330so27322966d6.3 for ; Mon, 09 Oct 2023 05:16:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696853762; x=1697458562; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iw95tEeWB9saYTjeuqfwDCk67AfASMwamONQ4Q2lXGY=; b=D7fYYAak61ciJboQ4Wt9EBlt0lhIx4vvspagxHDouOBQ5BPQeGpbhMpQmVTA1vF8UE KEIFIKfd5QW5QQLsB1aKaXun6chYdOC+Qt1h8vZxX3IP+gDoeHINv4geS36ZQ3Lgtqwv YAphlcclHpi4yKKqikC1L6GbYT0JcnvqlyNNVyGgcOEcUSmY2g4wqo3XrQuj64p6MV/f i96w/+cx/yqMESo1OPl304jNaQ63wZ1lbBkIojW7DBMaCRVa0HUEpFl6AcxvdSVvWbvW Niqn+cbyhI0++IIvqMCT9aXFOtT3Qu71MDdc/ZjzyGO7w9TM6m98xrtiYJ/ZpbURolao sHbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696853762; x=1697458562; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iw95tEeWB9saYTjeuqfwDCk67AfASMwamONQ4Q2lXGY=; b=QvFJMFJ33PEgKq2JPBRE+daDVdt6aCGv+LLh3+r3Aa0arcxZ8pyXVz16XP/v3unc6r XSrXbGUc6c53gI7s4v1xI9KeSeRzBxbmOM+QEPX33ce1PZf0oBLrYZ95+CFNpalY67EP c4ho5wNVzO/CJjHJ9wF+gvxeWUHypwZdZYKuJNLXBsJ3Po05cOu+IFn1gACqaUYpJ7sA gposo2uEw8rd4UkqaCIKIYvyCTLlj9RtiZSIZ+n+0oHMeRDdLiNZsxLM5T/xBDOvSSSX c0/TXW5oMj7U4uWKFZp98ptHtzsBGr9D9NVMBJpdsGU+t/tpJ75/MzKoK9NnyI0NuOBG nMlw== X-Gm-Message-State: AOJu0Yw4yERiQNb8mZdItbRfKm8cQC+VYh75HizTTap3dH3KBspuzQdm XJt8PIZ4vqQMr8camaIwh7UkoHSscop+f923anQuIw== X-Received: by 2002:ad4:55d3:0:b0:641:8b09:98ac with SMTP id bt19-20020ad455d3000000b006418b0998acmr13512054qvb.37.1696853761812; Mon, 09 Oct 2023 05:16:01 -0700 (PDT) MIME-Version: 1.0 References: <20230916174334.GA1030024@mutt> <20230916130412.bdd04e5344f80af583332e9d@linux-foundation.org> In-Reply-To: <20230916130412.bdd04e5344f80af583332e9d@linux-foundation.org> From: Alexander Potapenko Date: Mon, 9 Oct 2023 14:15:25 +0200 Message-ID: Subject: Re: [PATCH v2 12/19] lib/stackdepot: use list_head for stack record links To: Andrew Morton , andrey.konovalov@linux.dev Cc: Anders Roxell , Marco Elver , Andrey Konovalov , Dmitry Vyukov , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , Oscar Salvador , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , arnd@arndb.de, sfr@canb.auug.org.au Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 09 Oct 2023 05:19:39 -0700 (PDT) On Sat, Sep 16, 2023 at 10:04=E2=80=AFPM Andrew Morton wrote: > > On Sat, 16 Sep 2023 19:43:35 +0200 Anders Roxell wrote: > > > 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 reco= rds > > > 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. > > > > ... > > > > The full log can be found [1] and the .config file [2]. I bisected down > > to this commit, see the bisect log [3]. I am also seeing similar crashes on an x86 KMSAN build. They are happening when in the following code: list_for_each(pos, bucket) { found =3D list_entry(pos, struct stack_record, list); if (found->hash =3D=3D hash && found->size =3D=3D size && !stackdepot_memcmp(entries, found->entries, size)) return found; } `found` is NULL @Andrey, could you please take a look?