Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1272202rwi; Thu, 27 Oct 2022 13:35:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UL2VUoVTF/fOx7Dbo7SHOxzp5lKcAIPn3Iq8AXe0AW7ZHugZ7MXvljq34sw0IVeeSDIkN X-Received: by 2002:a17:902:720a:b0:181:150c:fcc4 with SMTP id ba10-20020a170902720a00b00181150cfcc4mr51865976plb.109.1666902938414; Thu, 27 Oct 2022 13:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666902938; cv=none; d=google.com; s=arc-20160816; b=TOvz8CW9YE/kyPGhbZhrxZ2Vd8X+WhVJQpFQzfrnE5tjOD/HgP8jtA/NXHgzh+eI0N 2XjneGiQWYT8ifs4VAwjywRg/ieqsSQoZfppxMMMh1z7b9ar3p34oMN4pSzaXAJWM7kO 7fw09KMs/3ZQa/D71oQL7dPA6dtK1NYmcA8UjrWfiS86K2XgeW3LaXP1gosc2CIOcDUE E55GU/ItTM5E6Lhm9TLEGsbgi6v5hoEYAnSsSOPJ6/DS+Cl3i54Q9L+VZbYMgCP0WJFx TaIq+trVfqqOcbBngRJnAhCA5m5HLdo4dRvGvgR/z/0jPPALeyL1RxqdAgDAvL5djNM+ 1o2g== 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=TUZ/4T5VuhkUC9hde0U0Eez69i/JpvcoSK3GNqUWMnE=; b=hwxKLAII0Mtk9+U9Vh5BrSiHDyM86wXoGC5ut37GBq6ui9i/ctPxP2+qPro1rtOL2B tgcoZqpYEZ3TS6xq6iHNpBO1cXNy0KCKhqet/frxJSU0cv70zaMY0CPETfDBphB4RMN4 vVoVk6NnA6mBvvfxnsCqP6o039q0LnAp44GjrBZ+PmhR77U6brXUpAgT9sCNk/ur73Tc C+6R9LlVDaKU6/9cJuYyL7D6sQYxIF26gvJPxk6WnH11lLUr13sik5NId5hFlj+9GjYU Klyz1DE7nzm0IqVK5H4sQA4ClObWhBRSkYhXzplVjq4kfPzflT+e9z4rby3wP1sugV3d g8yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=hbkKtTIy; 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 pv10-20020a17090b3c8a00b0020befc1a93asi2419628pjb.100.2022.10.27.13.35.26; Thu, 27 Oct 2022 13:35:38 -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=@linux-foundation.org header.s=korg header.b=hbkKtTIy; 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 S235514AbiJ0UWM (ORCPT + 99 others); Thu, 27 Oct 2022 16:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236888AbiJ0UWK (ORCPT ); Thu, 27 Oct 2022 16:22:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE5B6F27E; Thu, 27 Oct 2022 13:22:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6DF96624E5; Thu, 27 Oct 2022 20:22:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18707C433D6; Thu, 27 Oct 2022 20:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1666902128; bh=3qACGMX98yNt/3+nPW3vdpznrRqLQ2kS8CcfASjlmbg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hbkKtTIysV9PMJ78KqpXKvMrnvmJ01ezXuXhmojF+U0SBu7ob4dsv3K0fuS7k+xDh FXZ6CV2dWY7Hxyg1T2+rzUTbApbnK+04khXHcCbybviTCBfC61gIFoFdOzj60d2NhP Bw/1aOHhb9wzi0eNJ8bbg1rZK2snI43tc3z5UFKk= Date: Thu, 27 Oct 2022 13:22:07 -0700 From: Andrew Morton To: Wei Liu Cc: Shradha Gupta , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Dexuan Cui , Michael Kelley Subject: Re: [PATCH v2 1/2] mm/page_reporting: Add checks for page_reporting_order param Message-Id: <20221027132207.bb4e9408e1ca94b3dfaca405@linux-foundation.org> In-Reply-To: References: <1664447081-14744-1-git-send-email-shradhagupta@linux.microsoft.com> <1664517699-1085-1-git-send-email-shradhagupta@linux.microsoft.com> <1664517699-1085-2-git-send-email-shradhagupta@linux.microsoft.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, 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 On Wed, 26 Oct 2022 15:33:47 +0000 Wei Liu wrote: > On Thu, Sep 29, 2022 at 11:01:38PM -0700, Shradha Gupta wrote: > > Current code allows the page_reporting_order parameter to be changed > > via sysfs to any integer value. The new value is used immediately > > in page reporting code with no validation, which could cause incorrect > > behavior. Fix this by adding validation of the new value. > > Export this parameter for use in the driver that is calling the > > page_reporting_register(). > > This is needed by drivers like hv_balloon to know the order of the > > pages reported. Traditionally the values provided in the kernel boot > > line or subsequently changed via sysfs take priority therefore, if > > page_reporting_order parameter's value is set, it takes precedence > > over the value passed while registering with the driver. > > > > Signed-off-by: Shradha Gupta > > Andrew and other MM reviewers, can I get an ack / nack for this patch? Looks OK to me. Can this be merged via the hyperv tree?