Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp840908lfb; Fri, 13 May 2022 21:28:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvLc4mlU0Dg1Rr1TCkMcHX3v/HUSASKZPnPviUB5G9ZFh258Wd9eEDsJsFIGyza0Fzqf5r X-Received: by 2002:a05:6000:715:b0:20c:5a15:9409 with SMTP id bs21-20020a056000071500b0020c5a159409mr6359483wrb.146.1652502481266; Fri, 13 May 2022 21:28:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652502481; cv=pass; d=google.com; s=arc-20160816; b=taszK25q0ffbFrC+WvGC+fSRD6yeKSzO2thzhzEO9aVd6VPdNwlhiYm1IYGVuwRJnK k7boCBc7DQWI/8mCNZXG5ZDLRIOvSqDaI83XOjEhx+9daqPdN+ZNTfa494gFcnVVy9aO dftmlRFjZwBnqqrPKZ5QOV5uDuLF8HoyrihCuCC6h1WZ9phKX53O8fAh5Opc35TVlLwr c96a0BR1XoDkurr8XlJS0/ZB64IhuryVY10lH37k+NZEpj+CpUfYlHukuuulEUjP3myD rC7VH5d1En78rQ818rBTx+o5HVTyiLYQlkRQKWwaLIoZIhQyQQxRAeAT1SWmx+RfCbrW dmFQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:references:cc:to:from:content-language:subject :user-agent:date:message-id:dkim-signature; bh=gKNhYaITQXlGsXPpemM8JYG+kVtYTvvRwSk+5YSl8Yc=; b=Teox0ejWEJD4jcjFiHLtcmPyvALVD7wAHPGRWJit7ajZEukjEHms0g1CMpmWhaT7it M9uOtwj35rOoEf2k/WpQ2nkMGnLGUrntL7RRqZSbVrPXVWRIpfIb0y+Guh8yuZN2sZui Mp19TLCeuw75R7ip9HkIN5+t7AeZm1hHPPawlDws6VKyn2VI/D1NQ6hR+0HiWpsZF2/x o2SoQTAHlvyNP6n1sRILUkcowZeZEy79QIm454ULEeqIlXA45E2BXvLHYt0tpgbgrcFv X0fkm3iuIrZLX68uFccxNKZshVptg74ComU8GjQ//EhleHCJlvbOHWHjHjhvrWRNoLvP 7ATg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="s988/GBv"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g5-20020adffc85000000b00207a7d7ba74si3713614wrr.64.2022.05.13.21.28.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 21:28:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="s988/GBv"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5492434A965; Fri, 13 May 2022 19:55:25 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230092AbiENCzN (ORCPT + 99 others); Fri, 13 May 2022 22:55:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbiENCzK (ORCPT ); Fri, 13 May 2022 22:55:10 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2084.outbound.protection.outlook.com [40.107.101.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D0B381314 for ; Fri, 13 May 2022 18:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HiLGXwqEprSre6+aRdij5+S4eG+UtThDHgcx46TGt7TIsDde/0XVFi3EzYsM5Wuu2+/+7oY6TYdmYopQXAJSZmSJSsnOVuqYXoRT4GjSRUWXt/SF//GD8d988b79ESJXZEeEVWPj4aAduyVyk7kxqrWBd/wjQ/5EVST1C9NX/Y+eUWnAfeyPr0VHkXVwN7m+lXSZyN7ks+dJK7sZDRL2/swIZBqEzL8fzGR2A9ZhggXcn52Qr3WNsWs0JPG5LiWKZ2+YOB2Hb879YDx0B3YuoHxWjUFV9UjhO3GuMQBf0ndBSxQ3mOSDSbEr36rjl6hz2QkENO83VSA8pn5M/G7gLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gKNhYaITQXlGsXPpemM8JYG+kVtYTvvRwSk+5YSl8Yc=; b=gRcFRy4uDVkAOeRm8UdEuoaIrVN5kcSEoKclK/jhX10zn/Hgck7XGdyp1KZUsScUfZOrXBKLt/zGXbdNR0D/RM3cGUem/wYW8mHVC3ac+K7ceDMkDcmtQFNac5hy8WAiKh47joMjZjxMNSDVnjY0dH6nzMw1zpbKvXCd511yEqnwLUdsIGXVklDQmEAEA+9zZOhBdkyExp6GYAPqCTlrc1PpvCIOC5VNeCh4ZmkmTQ3VekFWInY9kMOE1bLwfw9BEACtNw5HWgWpCzxcgUQJYF/pJxxS2qaeTHIQ0FaFWmZhley23DU6rdpJOZa206TBoA1qjH5lcTptnoWv8+Lt8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gKNhYaITQXlGsXPpemM8JYG+kVtYTvvRwSk+5YSl8Yc=; b=s988/GBvbNh/DxEzjeEf1L5QS9X5z1s7vNK994IOKVOjNbQXjHfjGHm0qaVpqC3pYP6Yta8NjM4UPbBobIkxIw+HxehSXeWzoXuTpraTX027pN75hSabE4XLXnZUm3zFXYnDKbNL4w1RUsC/IUnr1l+sYUtIkyTN6SXxyWnLaQyLyRI0nY9TEUf1FErVUcix3AWVHk/1J6ttbsC/uXjSCZaV0qHum4hmtpQ2dK8MEBYAKNAi2epbSXsgYSyY7WcDbJlApJXRv3Pco/uSYOvzBH7QfEtRni89R0NGqOwDzi7Aclrp1cVLxr9EG8JJqqk9IrOb4zzSG9AGXRGPH1U78A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) by SN6PR12MB2717.namprd12.prod.outlook.com (2603:10b6:805:68::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Sat, 14 May 2022 01:16:48 +0000 Received: from BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::15e3:d746:57e8:4de0]) by BY5PR12MB4130.namprd12.prod.outlook.com ([fe80::15e3:d746:57e8:4de0%7]) with mapi id 15.20.5250.017; Sat, 14 May 2022 01:16:48 +0000 Message-ID: <1c6405b0-271e-22b8-961e-629a2a8bbcf0@nvidia.com> Date: Fri, 13 May 2022 18:16:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [syzbot] WARNING in follow_hugetlb_page Content-Language: en-US From: John Hubbard To: Minchan Kim Cc: Andrew Morton , Mike Kravetz , syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, llvm@lists.linux.dev, nathan@kernel.org, ndesaulniers@google.com, syzkaller-bugs@googlegroups.com, trix@redhat.com, Matthew Wilcox , Stephen Rothwell , David Hildenbrand References: <000000000000ef451a05dee0f2b1@google.com> <00000000000077377c05dee75f63@google.com> <20220513102617.c464c4f566052838e911a3ec@linux-foundation.org> <75f09063-d184-7d44-17a1-ed04be5eb953@oracle.com> <20220513161910.d1b73583cdb2e33562aa86e5@linux-foundation.org> <4809b134-a37a-50b8-4c25-44548bc1048f@nvidia.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY5PR20CA0029.namprd20.prod.outlook.com (2603:10b6:a03:1f4::42) To BY5PR12MB4130.namprd12.prod.outlook.com (2603:10b6:a03:20b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 759e57e0-94e8-4b02-fb58-08da35476b16 X-MS-TrafficTypeDiagnostic: SN6PR12MB2717:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: In5f1jTxODfLcXamYcgIRW+Dwd8KFMAj3RH93kHL7mXU8cJ3CmbQzKmZEMsmctFKKZhY4YfZYcThs/+ukLWesdJ/dl+USA8JN440lggeJcDIHr238JG2vlRg71lTzusQF6IxjxzIga60r8F2jCmQhpIZiTpY//K9jJ4MIaimoAHfaAQDO8od0ULQhjWo/C4ml+NL9uIHL5KpQahP2rCBNniqwiUIqJmpQ+9hh61d9JUNqjFQKHpiTna1Cku1DIzCaiTz1jFUK0SYvGr4Mnirr0zzu+blNmajhP1dueBqsYQvFsNgo2aVGKHMmuPiGSK+x6yJLXpNG+xlFOEsYJljKP2fs3/sXSTD8cDieKfD0MC69I9n2QUpKi9QQNkGycIX914AzKepWPV6mr4wc+MM1IHmw/jxflsmBxbyZwARaOlN+cOw66N2Hqwr7WI069vUuYshZhWDEA9DQVKd0YLZ7m/EVO5d5TDjuXN1QWr5578S9qHDI4eD2fXOhovoOKVSmu8iDgyUJllzpNow2uXhL8AlxaNslzWbu/EqgEYa8xAAtMHZcseT8YJq90gx9zQhlAGgFWrd/gLjO2Xt0ldY3SiHKKy5+Us6U3kNBlGAhpcTUknWCVnmKT/JkjDtpRnIIF6WFGzCHrONWsKhjll+oybreJcR//KqqnRAkdc8ezGovhzG7LWg6Irrc4B0a3MW3PzlA8ntWK/RpL9cBJ+6mXLnMCUFZ3pfkvCsa7lCn8nlphN2jfCowO28DMbc/KbZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB4130.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(83380400001)(31686004)(2616005)(6512007)(26005)(2906002)(36756003)(5660300002)(8936002)(508600001)(38100700002)(6486002)(86362001)(7416002)(31696002)(66476007)(54906003)(6506007)(6916009)(66946007)(316002)(53546011)(8676002)(4326008)(66556008)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M21jeVE5dytCRXhVT04zczAxN1ZodC9DVVg1UmxKWEoxUzhtM0Mwd05Oa0Ru?= =?utf-8?B?VU1qM0R0eCsweUxMYmxzQk50KzE2SVBYNWNZR0d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0VsbGpxd2lKWG1GcUZRT0dhWk5pNFFETE01aXY3aHpQ?= =?utf-8?B?ZHVoNkhtTmdram1qd213SDBOWFdVOEdjc2NpMCtGU2ZVWEZYei9yWC9ZUmU5?= =?utf-8?B?dzBYS3ZqTEtyaFVHczVLV291MGQ5S3JmcUthbGRYMzdPY2t3d1lLM0hGaGpz?= =?utf-8?B?b1ZvRHhqWXhWQmdrVUNCQ014TnBuV3ozWDZFanBmWUFGTkJsWHlvZ0NyRDZk?= =?utf-8?B?a1NmRG1wclBIcGJHS0xPbUhOcnFtb01pN2pEUnhnK1lKd3U4eTZyUDgwYk9m?= =?utf-8?B?K0pPMjhMQjZTdG02MXpHb3BZcndZaSsyd1F3SDhVWXBNREs0aEFQNXBDNHVJ?= =?utf-8?B?RXZMOTJTZ1N5WitwOVZqMGlENUxmd0pTYjd2VlhvY0FsZjNySWtIYlhJczI2?= =?utf-8?B?TEw2OXNlb01ndFpjS0cvaWdSOFBuaHI5Q2V4Zzg4QjRNS3BRdCt4QT09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 759e57e0-94e8-4b02-fb58-08da35476b16 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4130.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2022 01:16:48.3058 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5uPi5f4nMKQRT8rQEi1d6QvYBPfiwRwL8w4vd7FA2CaDO4p3WBFQ/2uiWiwBajDlV9if2EikHa8f5XgI0bf6EQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR12MB2717 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 5/13/22 17:56, John Hubbard wrote: > On 5/13/22 17:26, Minchan Kim wrote: >> Anything else further can we get insight from the warning? >> >> For example, pin_user_pages going on against a hugetlb page >> which are concurrently running alloc_contig_range(it's >> exported function so anyone can call randomly) so >> alloc_contig_range changes pageblock type as MIGRATE_ISOLATE >> under us so the hit at the warning? > > Well, yes. First of all, the comments above the warning that fired have > gone a little bit stale: they claim that we can only hit the warning if > the page refcount overflows. However, we almost certainly got here via: > > try_grab_folio() >     /* >      * Can't do FOLL_LONGTERM + FOLL_PIN gup fast path if not in a >      * right zone, so fail and let the caller fall back to the slow >      * path. >      */ >     if (unlikely((flags & FOLL_LONGTERM) && >              !is_pinnable_page(page))) /* which we just changed */ Specifically, the recent patch effectively acted as an error injection test, by forcing is_pinnable_page() to always return true (if CONFIG_CMA is defined). Because: MIGRATE_CMA|MIGRATE_ISOLATE == 7, which will match any of the MIGRATE_* enums when checked with bitwise AND. I suspect this particular error path has not been exercised much, or if it has, not reported here anyway. Until now. thanks, -- John Hubbard NVIDIA