Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1393626rdh; Fri, 24 Nov 2023 11:23:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEDL+Z9V5irQby5JOuxT2aqUyQkaXXX2SShnoXLVUaGu+5w4WQ5OAtVYKm1DpcESCflsu2S X-Received: by 2002:a05:6a20:bb08:b0:18b:ca68:4e9a with SMTP id fc8-20020a056a20bb0800b0018bca684e9amr5163995pzb.28.1700853803165; Fri, 24 Nov 2023 11:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700853803; cv=none; d=google.com; s=arc-20160816; b=vQAZ0GqOOKvxtpkXX7o8M05GVIgtgoU6XL5ObChLSfFYEsVcqcPhMunFHOwk0c775d qr0ZaEnKz2nyunVIaCquDWS92nX4nRu9KoD3ngjKqzRQmGqGoUE1moXuYrA66NHuSSIy sfRPJo5PvIc345mkG2c0LiEsCUloqrGYJ4+sfO1DahLfVrbpKXKrM73kgIbKscQOoB/o bOJhwS0rDPQ17yfH/suDIcs7UxObZJ6Ajm4HVlelT0YJdC6Tq/kdAmHNUGgYbvwEhXE9 rEyTBuWASurbvsZAoryF63BWjlVdkiDOhED8lGLHCu3ia/bW54l4yWY852XhUZyu9zWN trvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DnRjKZNqJzMYYk6NIdJzgSC6rTHCy3nzvXr+pmTv2O0=; fh=PIgnOrZabTtA3MGUNOowP9ECgtGXQFGdRoIg0quA9eo=; b=Z5wpOKLJnOkwPA7PQHhHHMvELHBG4c39JU8nCTo0AcNmEKPqOrHFXuPJ2w0d8Van8z mEgcH/ng26ov0PlFvkw4lChbw/7JUSlxKwT29WvyQU/9mSaQddZZ4dyzq5qLxIav+Hdf +ALlruG2oqWbP4F/zEzwgAIOr4osA3zBUDXvSyaGYk3faLCzp7X6XX0L/IwwKPOCQXfI K4ekb66Av9ORdaXks9zS+XAEHCFuThX0ap46Fk7Qf+f9QXKO3a8Ln/9r56elk4snu4vY CZVzxgW2fzWqcibV6TuBKlVkXPjjAiB80Kh+P2AwK6xrJN+hf1plKnQSy5RL91Ex812I pJpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DFOanidt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id h12-20020a65518c000000b005b86119661esi4122812pgq.86.2023.11.24.11.23.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 11:23:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=DFOanidt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id C0571806CC10; Fri, 24 Nov 2023 11:21:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345973AbjKXTU4 (ORCPT + 99 others); Fri, 24 Nov 2023 14:20:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345799AbjKXTUy (ORCPT ); Fri, 24 Nov 2023 14:20:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 553FE2D70 for ; Fri, 24 Nov 2023 11:21:00 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B112BC433C8; Fri, 24 Nov 2023 19:20:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1700853660; bh=nQVW2dMy9yA8GkygUW3RYmgYGtlSCcH2tlyJG94T0vk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=DFOanidtMr9Mclmk1xNHvjSbwLvUxMF3K5iuXJnSUpHnEW20JOv4kv9f83H3MDLIr 1SNwStuejzoeq0JmX+Gx7lEEsaMNiv72t2LW8VVbCExfPIcQ5HQkhj1+6kZw+NuxrS yTZDDaNyH1MdqBsizgPxrMDi31upEH5xZwDxHxbk= Date: Fri, 24 Nov 2023 11:20:59 -0800 From: Andrew Morton To: Peter Xu Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Dan Williams , Mel Gorman , Matthew Wilcox , "Aneesh Kumar K . V" , Christoph Hellwig Subject: Re: [PATCH] mm/gup: Fix follow_devmap_p[mu]d() on page==NULL handling Message-Id: <20231124112059.3519d6fdfe71f846f8bf726f@linux-foundation.org> In-Reply-To: <20231123180222.1048297-1-peterx@redhat.com> References: <20231123180222.1048297-1-peterx@redhat.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 24 Nov 2023 11:21:10 -0800 (PST) On Thu, 23 Nov 2023 13:02:22 -0500 Peter Xu wrote: > This is a bug found not by any report but only by code observations. > > When GUP sees a devpmd/devpud and if page==NULL is returned, it means a > fault is probably required. Here falling through when page==NULL can cause > unexpected behavior. > Well this is worrisome. We aren't able to construct a test case to demonstrate this bug? Why is that? Is it perhaps just dead code?