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 722A6ECAAA1 for ; Thu, 27 Oct 2022 20:22:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E946A6B0071; Thu, 27 Oct 2022 16:22:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1CF16B0073; Thu, 27 Oct 2022 16:22:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBE5E6B0074; Thu, 27 Oct 2022 16:22:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id BA3476B0071 for ; Thu, 27 Oct 2022 16:22:12 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 951D4140CE7 for ; Thu, 27 Oct 2022 20:22:12 +0000 (UTC) X-FDA: 80067851304.29.E68F820 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 0E8FBA000D for ; Thu, 27 Oct 2022 20:22:11 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id 233CDB82638; Thu, 27 Oct 2022 20:22:10 +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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666902132; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=TUZ/4T5VuhkUC9hde0U0Eez69i/JpvcoSK3GNqUWMnE=; b=5oDLAIyVjc2/F15lClO4k27r7pS3CBlZ2pxghe8cf6AiGS2IYbkTZf8LFQ31lbW9P1Zldz I/XX2EGgB5MspXKaKmaS7SwBMVZtrZpDf4zgu/aOovxTL12dfb+3ctX+KvirhvXbDkZ/BU jBCkNpcEoOm7CfQAM/J+tfZ66V+BT+k= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=hbkKtTIy; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666902132; a=rsa-sha256; cv=none; b=Q6LC7ycMoRZ1Ux4amOab0XjxDMyEZm2skuNrpw/6vIDluSVDeigxtCsBkmJQOiFQBLDZEp FtgghhOHiLZISvx/R72MVI3wuh4uEa7rdwkipDqSdbRyAldXZt6VC2+Tsmw1QkG0aD5gSA 9teqk88iDFBG28/ZH7PkEatA07n6PdY= X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 0E8FBA000D Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=hbkKtTIy; dmarc=none; spf=pass (imf15.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-Stat-Signature: gpo6xwuf3zdnytiecds9genwyuzktjqg X-Rspam-User: X-HE-Tag: 1666902131-758006 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, 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?