Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2775299iog; Mon, 20 Jun 2022 04:40:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ssRtCTxTTiCxhRVbQ7WoOtsXZ5rjt7Wp31lj/CI4/vftdx7tLhgUdzVRnBhOMQetdm3DvL X-Received: by 2002:a17:90b:1d06:b0:1e6:7a84:3c6e with SMTP id on6-20020a17090b1d0600b001e67a843c6emr26800721pjb.202.1655725249204; Mon, 20 Jun 2022 04:40:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655725249; cv=none; d=google.com; s=arc-20160816; b=R1XWJyyT9rxLfL63hiA4nU7hfQfBgtaUbbrg+05x5/YCnpUJolshmXuEv/Hy6jkDiF kJWJ516Cr1mwYuSVN9NhMKmx9ttkejfPtU+pb6Zk5IFN7/uE4+/BNS4kiylvxDnAD6br BwS7tRzWHrdPMCoF3cbYuF+1vsTyMbI6Q93prJYKKim1wdTiftvCswmnkLhE5KV7oJwL b2eucDF0GdoiqA3EiYmsKTt8AClCW5lD6gbtYJB9xQUrdN7IrY3ziUoT8uo4WkVRsDp5 kCxhQ/EUXYvB/JYlux9+MuqFWbEZ49AZSlFYT2krxFpeE+E01uQDPue53KyokSb4W2iy vu2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6Yt7N7lIt6rrL+t7Ro4DPilPiH3bCntuNreRubvS7Kc=; b=xUUFqd1HlnBDJLgG/jH1J2mFRu0Qw/jT6YbR1es25WLZva4YWTia3Fnh6OE0Ugwx08 nb81KZmd9Eqc/hKDyIGTBf6be4GeTwwb/ssMalba8bfemw0efTs31QJA1DSc9zPOxGSl 9hPPG6aogALp5GmVBDd+T+9hBnM80Ff6v5WHzpwm3JxgZNGFKAXIs5adObnf2wKJlmoc NEVR/U5lSIrRgoVMrPWTMlNbysj+1A0Ar4jpbAewMw6QdL2KeJwPjvb3R7KNWguWGek/ xq0ribGsQT5JLZom8zmiT61WvXSg1jo5+u1wluX04Qv4XyaZZEsAPRfJnWtPTuZimz5y dA9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P86niLyE; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a656108000000b00408a86aeba9si15579095pgu.74.2022.06.20.04.40.37; Mon, 20 Jun 2022 04:40:49 -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=@gmail.com header.s=20210112 header.b=P86niLyE; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241211AbiFTLYI (ORCPT + 99 others); Mon, 20 Jun 2022 07:24:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiFTLYG (ORCPT ); Mon, 20 Jun 2022 07:24:06 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1C2715830 for ; Mon, 20 Jun 2022 04:24:05 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id v8so11533512ljj.8 for ; Mon, 20 Jun 2022 04:24:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6Yt7N7lIt6rrL+t7Ro4DPilPiH3bCntuNreRubvS7Kc=; b=P86niLyEltitD6qcrewvCIeD/Op6qsjJFYmoGU6u+gtc6fVIqmPbQhGFZEkDLgI6OI BXArQyWCEe/Cyz8l5OJ3nYOh+qih2Kxxycb2IrB1x91kOt1hBtAcm8Ms7plCV9r3Sw02 BDdJBwuF5+ZhxP8OIygE9OSGlfvj1YA8GBERqjBNiHmTHtPc002LYYI/WdFffSmVbFp7 ss5zm6nJOmHMP5dnB8lYHWM97VavfT7DzMnxXQ6bP5emyjiGDGqPvQkfKWXHTzLppgpl vmz0e+IzsOKiUPE8lJjv/rRI2sxRvUDpLWNXXZ00Tvx0CTMU593HWGFbs/WjimSaAeo7 98BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6Yt7N7lIt6rrL+t7Ro4DPilPiH3bCntuNreRubvS7Kc=; b=3ZxDXQ92oDJaMzNGhzwoQPbYH07zLk6GtwDWlzjZH3HS9Dyd/M34SvHg5XAID+ClNj PWXCH+ircUsuxlXtoXWIWAlW0Vj+etNqJVLaXzYH8C9vK4Y952jyKz6y2EJVqGAfcRPZ KVVEFIOyAOrrvcH08EJd6VFGFeVuMlIikNkyHq835QOF4NFCnu/LxPIG8EnOOrvYmYSb Z+A34toZnbQ7cei6n20YQHnCbc5OMweYV76C21ov7utcKTOM5Rf9ZrMCKg61lH0cXTWP EIqFyDDJsJ5FaWFxUpNxFJzOWnhdJZjvp7nRs97mVAxbrEezfifXhMOVNj8JCGTNX5Nr oBtw== X-Gm-Message-State: AJIora9AwTQagzrnrfTOHjsFfjIdkftQDaV4Q21Vu9UWXnM50h0T8Vaw EZ5Mv/VVt0BGHc2lk+3G/jEIyQlXnx1kmhmHZIA= X-Received: by 2002:a2e:7d17:0:b0:25a:6ccd:ab6 with SMTP id y23-20020a2e7d17000000b0025a6ccd0ab6mr3048176ljc.114.1655724244209; Mon, 20 Jun 2022 04:24:04 -0700 (PDT) MIME-Version: 1.0 References: <1653447164-15017-1-git-send-email-zhaoyang.huang@unisoc.com> In-Reply-To: From: Zhaoyang Huang Date: Mon, 20 Jun 2022 19:23:34 +0800 Message-ID: Subject: Re: [PATCH] mm: fix racing of vb->va when kasan enabled To: Uladzislau Rezki Cc: "zhaoyang.huang" , Andrew Morton , "open list:MEMORY MANAGEMENT" , LKML , Ke Wang , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 Mon, Jun 20, 2022 at 6:44 PM Uladzislau Rezki wrote: > > > > > > > > Is it easy to reproduce? If so could you please describe the steps? As i see > > > the freeing of the "vb" is RCU safe whereas vb->va is not. But from the first > > > glance i do not see how it can accessed twice. Hm.. > > It was raised from a monkey test on A13_k515 system and got 1/20 pcs > > failed. IMO, vb->va which out of vmap_purge_lock protection could race > > with a concurrent ra freeing within __purge_vmap_area_lazy. > > > Do you have exact steps how you run "monkey" test? There are about 30+ kos inserted during startup which could be a specific criteria for reproduction. Do you have doubts about the test result or the solution? > > -- > Uladzislau Rezki