lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ed1f9f544937b5c82ab380a4977e5ae22a98c43.camel@intel.com>
Date:   Mon, 13 Jun 2022 11:26:55 +0800
From:   Ying Huang <ying.huang@...el.com>
To:     "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>,
        linux-mm@...ck.org, akpm@...ux-foundation.org
Cc:     Wei Xu <weixugc@...gle.com>, Greg Thelen <gthelen@...gle.com>,
        Yang Shi <shy828301@...il.com>,
        Davidlohr Bueso <dave@...olabs.net>,
        Tim C Chen <tim.c.chen@...el.com>,
        Brice Goglin <brice.goglin@...il.com>,
        Michal Hocko <mhocko@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Hesham Almatary <hesham.almatary@...wei.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Alistair Popple <apopple@...dia.com>,
        Dan Williams <dan.j.williams@...el.com>,
        Feng Tang <feng.tang@...el.com>,
        Jagdish Gediya <jvgediya@...ux.ibm.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        David Rientjes <rientjes@...gle.com>
Subject: Re: [PATCH v6 03/13] mm/demotion: Return error on write to
 numa_demotion sysfs

On Fri, 2022-06-10 at 19:22 +0530, Aneesh Kumar K.V wrote:
> With CONFIG_MIGRATION disabled return EINVAL on write.
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
> ---
>  mm/memory-tiers.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/mm/memory-tiers.c b/mm/memory-tiers.c
> index 9c6b40d7e0bf..c3123a457d90 100644
> --- a/mm/memory-tiers.c
> +++ b/mm/memory-tiers.c
> @@ -105,6 +105,9 @@ static ssize_t numa_demotion_enabled_store(struct kobject *kobj,
>  {
>  	ssize_t ret;
>  
> 
> +	if (!IS_ENABLED(CONFIG_MIGRATION))
> +		return -EINVAL;
> +

How about enclose numa_demotion_enabled_xxx related code with CONFIG_MIGRATION?

>  	ret = kstrtobool(buf, &numa_demotion_enabled);
>  	if (ret)
>  		return ret;

Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ