Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp786879iog; Wed, 15 Jun 2022 12:17:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tCXUrMmADoJ0Ci5uu/BYoVwbKP+fBHkMbgNTgvlXb/KM3DZvvjNYio2yRNgTKFwWUMH0Xv X-Received: by 2002:a50:c407:0:b0:431:39ed:1c5e with SMTP id v7-20020a50c407000000b0043139ed1c5emr1603108edf.402.1655320663581; Wed, 15 Jun 2022 12:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655320663; cv=none; d=google.com; s=arc-20160816; b=Wi3q9ncmL5lLiyafadU5lhRcLybCVXDfYB1nN5PU4lpGBxNdo0OS1aikFeK5/yD3uk DwpCNrVMFYGQ4DAkTATesLl+QlCwz7kW9HThGTui0uEtlq37lJScgVYOIiQOpLPlaPSu 0FDlQCuz3ex162Z/5a/A31dN8uaOdLFio7ME64x+oLaw+UZkw8cmWfzs0iFrtAE1Gtat CD7nykfnNZpkDyuXHrADWFCOv2Y/A6NGtfNUTamWifOxv8KvCUdu3EpO9j9D5jXLQTJk NPdsYEfFqePOq0ni6x3F1bMW2yqZQwjU3KhejGaa9ktb6V5hv764Y7eFhXueTVqF1f1q Z1dQ== 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=0YPmuPkYl0+f4EwKvwkR94hcDDWbfroubDSxtV6XrJk=; b=rwXOpfHuGvmuLBO0DdmaP8u8BdtZ4y1MuiRDy/qb36Hi3uxA+Sik6uInc+49PcqLUc gRiPO7/dvQCNhawDbdICUATzJltplO9tIseG2feaQCqAonjS+gxUy9Bduk/60enfauI4 Ec0bkoEYqiqs7Sozx8cMpzkFB5Y6NT3HR5hsZO2Ydj4LAVkMLa6wPHTGvlxCx8t4DD9G 5foU7OuBa9c1cm56x3Vcy5n9iNqHqAK0gBw2k9+MJ3Vfwv64LWV8yn6wyIMm+WsNQfkH NDvmqVImLtuPRkBjuj++pmChmrn9G/6ESIKflul+oGuuEgfdy/Zg+pemGDURp+NGbtKo dRjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="FQ/qhlRv"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z30-20020a509e21000000b0042dd0747a72si11702ede.114.2022.06.15.12.17.17; Wed, 15 Jun 2022 12:17:43 -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=@google.com header.s=20210112 header.b="FQ/qhlRv"; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349399AbiFOTGF (ORCPT + 99 others); Wed, 15 Jun 2022 15:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbiFOTGD (ORCPT ); Wed, 15 Jun 2022 15:06:03 -0400 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0011B24F3F for ; Wed, 15 Jun 2022 12:06:01 -0700 (PDT) Received: by mail-vs1-xe34.google.com with SMTP id x9so12615920vsg.13 for ; Wed, 15 Jun 2022 12:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0YPmuPkYl0+f4EwKvwkR94hcDDWbfroubDSxtV6XrJk=; b=FQ/qhlRv8hx6Bd4PeajepawLIblvaLISMFzjT4ybhPnGP1kq1WZDkl7g//j7cFtaWf z+fHgn2dCBibpgTPnIKawpFhRo5MpUTExvaCFdn7i61PuZyY6dMReJyQzsEPDKa5tx1X NjyfJgqqoPiBDTVVwGDAIjFSmOV0ZHEktmnpEsMlgRgJQEmVcuMFCCLDfRz/cERl4dRx /cHA5RHceTg7yG9ZDXEU2aosUg9rHI9bhbs5TEchEdp0zbUMqxPE0AkikVR22IQoTFHw BoM25WSNb85pdkvRsX4ZAiY6KGAyHWNlHbIqfpWeEZf6OpHl5wbXoi2tFyiTo0rYFXb5 o8Hg== 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=0YPmuPkYl0+f4EwKvwkR94hcDDWbfroubDSxtV6XrJk=; b=B2UPJ8rFEcYE/zYfbzP8fidHtBcsqdQPMXvcqFL+F7o1TTLp0jFKyYIKojdHXnrD5A ucg0KpU4o4bYEmpC8/hjK+1MhLovRs+Xqr/dELkdT8VkUcHafcBE3/g9j7Gvu9qmYEKe SLUKW408IAhlpu4NrsG667zNBLxivnjVcLXoALAEPl0XjsX9aGECxUd/Vpfw3by+rwyg 8OKkie4bLCj7Cnkw4R3SoMCnte0sbtnOlIRi2eokMzGmETwEC4M0LOxh854WTZ5kfx5T XKukGDQVaaTpOClHdbX8m6SW3T71Yj8LfmBhmvAFoEQmJAkb9D+VG6ay726I2588ONWE tJYQ== X-Gm-Message-State: AJIora+XGe0uMC/GuOb/flOmct+kvTP8OCD/HEOEYMtuVEyVXDZ20ZEX T4mcbHKX6YQY7XvSEjjO2ejAoiBwK/seHob1nCHsgg== X-Received: by 2002:a05:6102:214c:b0:34b:b31d:1a50 with SMTP id h12-20020a056102214c00b0034bb31d1a50mr589718vsg.41.1655319960891; Wed, 15 Jun 2022 12:06:00 -0700 (PDT) MIME-Version: 1.0 References: <20220504002554.654642-1-Liam.Howlett@oracle.com> <20220504011345.662299-1-Liam.Howlett@oracle.com> <20220504011345.662299-13-Liam.Howlett@oracle.com> <20220606161940.fh5edq5nyz4jru2u@revolver> <20220615142508.mtp65w6tdiurtvcn@revolver> <20220615185500.i5bzt7srzm6q72na@revolver> In-Reply-To: <20220615185500.i5bzt7srzm6q72na@revolver> From: Yu Zhao Date: Wed, 15 Jun 2022 13:05:24 -0600 Message-ID: Subject: Re: [PATCH v9 28/69] mm/mmap: reorganize munmap to use maple states To: Liam Howlett Cc: Qian Cai , "maple-tree@lists.infradead.org" , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Andrew Morton Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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 Wed, Jun 15, 2022 at 12:55 PM Liam Howlett wrote: > > * Yu Zhao [220615 14:08]: > > On Wed, Jun 15, 2022 at 8:25 AM Liam Howlett wrote: > > > > > > * Yu Zhao [220611 17:50]: > > > > On Sat, Jun 11, 2022 at 2:11 PM Yu Zhao wrote: > > > > > > > > > > On Mon, Jun 6, 2022 at 10:40 AM Qian Cai wrote: > > > > > > > > > > > > On Mon, Jun 06, 2022 at 04:19:52PM +0000, Liam Howlett wrote: > > > > > > > Does your syscall fuzzer create a reproducer? This looks like arm64 > > > > > > > and says 5.18.0-next-20220603 again. Was this bisected to the patch > > > > > > > above? > > > > > > > > > > > > This was triggered by running the fuzzer over the weekend. > > > > > > > > > > > > $ trinity -C 160 > > > > > > > > > > > > No bisection was done. It was only brought up here because the trace > > > > > > pointed to do_mas_munmap() which was introduced here. > > > > > > > > > > Liam, > > > > > > > > > > I'm getting a similar crash on arm64 -- the allocator is madvise(), > > > > > not mprotect(). Please take a look. > > > > > > > > Another crash on x86_64, which seems different: > > > > > > Thanks for this. I was able to reproduce the other crashes that you and > > > Qian reported. I've sent out a patch set to Andrew to apply to the > > > branch which includes the fix for them and an unrelated issue discovered > > > when I wrote the testcases to cover what was going on here. > > > > Thanks. I'm restarting the test and will report the results in a few hours. > > > > > > BUG: KASAN: slab-out-of-bounds in mab_mas_cp+0x2d9/0x6c0 > > > > Write of size 136 at addr ffff88c5a2319c80 by task stress-ng/18461 > > ^^^^^^^^^ > > > > > As for this crash, I was unable to reproduce and the code I just sent > > > out changes this code a lot. Was this running with "trinity -c madvise" > > > or another use case/fuzzer? > > > > This is also stress-ng (same as the one on arm64). The test stopped > > before it could try syzkaller (fuzzer). > > Thanks. What are the arguments to stress-ng you use? I've run > "stress-ng --class vm -a 20 -t 600s --temp-path /tmp" until it OOMs on > my vm, but it only has 8GB of ram. Yes, I used the same parameters with 512GB of RAM, and the kernel with KASAN and other debug options.