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 2E19EC43334 for ; Wed, 15 Jun 2022 19:06:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9BA316B0071; Wed, 15 Jun 2022 15:06:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 96A2A6B0072; Wed, 15 Jun 2022 15:06:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 831576B0074; Wed, 15 Jun 2022 15:06:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 73DD06B0071 for ; Wed, 15 Jun 2022 15:06:02 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 33F3C34B4F for ; Wed, 15 Jun 2022 19:06:02 +0000 (UTC) X-FDA: 79581400164.05.C6B7CC5 Received: from mail-vs1-f51.google.com (mail-vs1-f51.google.com [209.85.217.51]) by imf27.hostedemail.com (Postfix) with ESMTP id CE25840011 for ; Wed, 15 Jun 2022 19:06:01 +0000 (UTC) Received: by mail-vs1-f51.google.com with SMTP id q14so12612708vsr.12 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=1ZvOLRBkpHGuiQ1vMM9yFOqo4/uxuuLv7LmVULRlXszU+w8fD7Dcj5U+rzbjKarejZ yQ//6kpnJdh3KM8gHT09g3u0RzWCwfNlUFN5M683N/hutUe+0bIF93XjclicysOnJJcC UqMKYjIiC7Pfy0D5Sz4i5N7O75F5QfB/n7oAdhcBaLa0pUqwYQpCSyc0+N7n859W4QzM tUV3sDP+jgJqpr1GAwUl6FwNUqgg93Xq8COvAbbNXQG/wr4bepuBxTGC92yv1nQv4kCI MhguoRRhPzkqDY46+uSJforjsNUJkx7qEYpt/BwhpYlbXo33iaAGGkKr5lZDaU/NztzY qiTw== X-Gm-Message-State: AJIora9HCm0AHuMygwk9OTjGgpUeWOvh5QIeQpM6gWjJVZVuiOxdWoiv eiJjS0XxLIrcX4Zjfw61lJS40L9NIb/nOvC3ILWYSQ== X-Google-Smtp-Source: AGRyM1sW7wy5Ynw5WCENE6luw/+uXXck3ZA3cA2NeorCJCJ7vUrrUjtOWQ0KeUgOQoRe9nCWFOapwMKRGgXNKBBBsko= 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655319961; 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=0YPmuPkYl0+f4EwKvwkR94hcDDWbfroubDSxtV6XrJk=; b=ZQRc63JXpPROB6Vcn/AG+I+v84dZEMk+OiaGvdQsuZM+FPZIZI08LlpEya1efZikzomxPI eo3wr4rHlALKWP6OVgb0eKsbWhJe42V0FoAGg+dmiwDIuC/nrYA7RAKuvY4PxncnGGfrST v5Z/7kxUC+8SOMD189VDRAvvejTpXgo= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="FQ/qhlRv"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.51 as permitted sender) smtp.mailfrom=yuzhao@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655319961; a=rsa-sha256; cv=none; b=kq7aMRM1eVF8wgwk7ga6pbfCWiMiCNgwPsu8kpJsVbIx/+opODA3q4tEQtRf+z18O1DzOY X1JLIjYYZS7g8HRw0OstEA+vv7jz3J+WvRrDTvl76/o1rxRe0r0JTI3ctCZHKvuOOM2T+S fHBcE3BEDdFe0E24tqV+rYp60GuHARo= X-Stat-Signature: zuifnbcirw4aj8gyy5pks1d1e31g63e4 X-Rspamd-Queue-Id: CE25840011 X-Rspam-User: X-Rspamd-Server: rspam05 Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="FQ/qhlRv"; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf27.hostedemail.com: domain of yuzhao@google.com designates 209.85.217.51 as permitted sender) smtp.mailfrom=yuzhao@google.com X-HE-Tag: 1655319961-199346 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 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.