Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9234176rwl; Wed, 11 Jan 2023 03:18:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXui8GdfRMpkwj1Ugmj8vQWO2rSEbD+iBqVfi8J+pOX0KwPPUe8ZOT5zEGqOKJFJjw7ELDd8 X-Received: by 2002:a17:902:aa8a:b0:192:c930:a7e2 with SMTP id d10-20020a170902aa8a00b00192c930a7e2mr33351459plr.58.1673435898595; Wed, 11 Jan 2023 03:18:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673435898; cv=none; d=google.com; s=arc-20160816; b=dd2bLhxLw+gjdsbVfQ1qkkjNVZbvafShHnLaI3Dwn1j9Xd9SSpQ/CYJKZoEw9Pi8sY h8bJ70KSRmCujqdiU7YGfvwcHiB8+KkZRSt/AYYlBd84avLpGHsWWH6PbS0HbP4DaN3m mZ78Jqvv4/P0jXd0V0DleVceoyjvhvdL4Mu7ZcmtPNu/XPbFO7p4XCujvsW9Rad0PEJc D7mZOXrHmfeWvFXMYSgwlteZ2zVod2wnqlDBWflfRqEIlyp/bpYUZH2yJyE3apytWWew KKWA0jQELgwqDf1gvvw22Lk5U/wEM/4TXL5db5ul61MrmOOp66b25e+CGu6xwC4iUc+2 cNoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :reply-to:cc:to:from:content-language:subject:user-agent :mime-version:date:message-id; bh=TSzOZRGqV3PU3fn73Csm6WikInBSzTCXrwZ1xs73Jj0=; b=TgP6gg4Ou5iqaJcV6XaBTe9KrPavEM+92lGYx9+HhEDbacZg9RCIYoz69T0UmcEOZq eZEFWYzO9OX+pTDMV30DbAs4IjXGJUPSZvgtmlh0DwnTQkk2ACQ2QwAQ5bjWHfWWor+/ RmIXHe7+7JQLBF7utqn+xodnFlp1cr1sq5EI4YHAMLIboNVeJrpbbkcna4tynBhpCIjs CMpr+opu8u4KrV/l+ywn+pBLNAHnBkB6tSW+hXcChmjCtagTvAzaag1tsOEx7C0+Xo9b 7JwWMts8MxxDi6zgEFegl2w7J7WsICKHCSGDMbhugRlYGq75GvR3VJ45j6pfhLJa5x6A cnCg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a170902ed9300b001866341b823si13194740plj.322.2023.01.11.03.18.12; Wed, 11 Jan 2023 03:18:18 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233266AbjAKKyv (ORCPT + 53 others); Wed, 11 Jan 2023 05:54:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238612AbjAKKyp (ORCPT ); Wed, 11 Jan 2023 05:54:45 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45FDF101D for ; Wed, 11 Jan 2023 02:54:44 -0800 (PST) Received: from [2a02:8108:963f:de38:eca4:7d19:f9a2:22c5]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1pFYkj-0005L4-PZ; Wed, 11 Jan 2023 11:54:42 +0100 Message-ID: Date: Wed, 11 Jan 2023 11:54:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: =?UTF-8?Q?Re=3a_=5bRegression=5d_Bug=c2=a0216911_-_get=5funmapped?= =?UTF-8?Q?=5farea_returns_addresses_below_mmap=5fmin=5faddr?= Content-Language: en-US, de-DE From: "Linux kernel regression tracking (Thorsten Leemhuis)" To: "Liam R. Howlett" , "Matthew Wilcox (Oracle)" Cc: "regressions@lists.linux.dev" , LKML , Linux-MM , Amanieu d'Antras , "maple-tree@lists.infradead.org" , Andrew Morton Reply-To: Linux regressions mailing list , Linux regressions mailing list References: <0b9f5425-08d4-8013-aa4c-e620c3b10bb2@leemhuis.info> In-Reply-To: <0b9f5425-08d4-8013-aa4c-e620c3b10bb2@leemhuis.info> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1673434484;3b4d95a9; X-HE-SMSGID: 1pFYkj-0005L4-PZ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 [resent with akpm's proper email address (either me or my mailer did something stupid; sorry for the noise)] On 11.01.23 11:46, Linux kernel regression tracking (Thorsten Leemhuis) wrote: > Hi, I noticed a regression report in bugzilla.kernel.org. As many > (most?) kernel developer don't keep an eye on it, I decided to forward > it by mail. Quoting from > https://bugzilla.kernel.org/show_bug.cgi?id=216911 : > >> Amanieu d'Antras 2023-01-11 02:10:02 UTC >> >> Created attachment 303572 [details] >> Program which demonstrates this issue >> >> The vm_unmapped_area function doesn't seem to respect info.low_limit and will sometimes return an address below this limit. This can result in addresses below mmap_min_addr being returned. >> >> I bisected it down to this range of commits (I stopped since I was hitting kernel crashes): >> 3499a13168da mm/mmap: use maple tree for unmapped_area{_topdown} >> 7fdbd37da5c6 mm/mmap: use the maple tree for find_vma_prev() instead of the rbtree >> be8432e7166e mm/mmap: use the maple tree in find_vma() instead of the rbtree. >> 2e3af1db1744 mmap: use the VMA iterator in count_vma_pages_range() >> f39af05949a4 mm: add VMA iterator >> d4af56c5c7c6 mm: start tracking VMAs with maple tree > > [those are all from the Maple Tree introduction series] > >> I've attached a test program which attempts to allocate the entire address space. On affected kernels, this triggers one of the 2 assertions (depending on whether you are running as root): >> - NULL is returned, which means memory below mmap_min_addr was allocated. >> - EPERM is returned, which really shouldn't happen when MAP_FIXED is not used (ENOMEM should be returned instead). > > See the ticket for more details. > > BTW, let me use this mail to also add the report to the list of tracked > regressions to ensure it's doesn't fall through the cracks: > > #regzbot introduced: d4af56c5c7c6..3499a13168da > https://bugzilla.kernel.org/show_bug.cgi?id=216911 > #regzbot title: mm: get_unmapped_area returns addresses below mmap_min_addr > #regzbot ignore-activity > > Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) > -- > Everything you wanna know about Linux kernel regression tracking: > https://linux-regtracking.leemhuis.info/about/#tldr > If I did something stupid, please tell me, as explained on that page.