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: <20190320092911.GO18740@MiWiFi-R3L-srv>
Date:   Wed, 20 Mar 2019 17:29:11 +0800
From:   Baoquan He <bhe@...hat.com>
To:     Michal Hocko <mhocko@...nel.org>,
        David Hildenbrand <david@...hat.com>
Cc:     linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
        osalvador@...e.de, richard.weiyang@...il.com, rppt@...ux.ibm.com
Subject: Re: [PATCH] mm, memory_hotplug: Fix the wrong usage of N_HIGH_MEMORY

On 03/20/19 at 10:11am, David Hildenbrand wrote:
> On 20.03.19 10:06, Baoquan He wrote:
> > On 03/20/19 at 09:46am, Michal Hocko wrote:
> >> On Wed 20-03-19 16:07:32, Baoquan He wrote:
> >>> In function node_states_check_changes_online(), N_HIGH_MEMORY is used
> >>> to substitute ZONE_HIGHMEM directly. This is not right. N_HIGH_MEMORY
> >>> always has value '3' if CONFIG_HIGHMEM=y, while ZONE_HIGHMEM's value
> >>> is not. It depends on whether CONFIG_ZONE_DMA/CONFIG_ZONE_DMA32 are
> >>> enabled. Obviously it's not true for CONFIG_ZONE_DMA32 on 32bit system,
> >>> and CONFIG_ZONE_DMA is also optional.
> >>>
> >>> Replace it with ZONE_HIGHMEM.
> >>
> >> N*MEMORY is confusing as hell but I am really curious whether we have
> >> ZONE_DMA32 and ZONE_HIGMEM together?
> > 
> > Not sure. AFAIK, on x86_32 it can't be.
> > 
> >>
> >> That being said N.*MEMORY is intended to check for nodes rather than
> >> zones so the patch looks good to me but I think the above explanation is
> >> misleading and will add even more mud to the picture when somebody tries
> >> to understand what the heck is going on here.
> > 
> > Yes, agree. I also thought this again after I sent out patch, feel log is not
> > good. As you said, they are value of enum node_states and enum zone_type
> > separately.
> > 
> > How about this:
> > 
> > ~~~
> > In function node_states_check_changes_online(), N_HIGH_MEMORY is used
> > to substitute ZONE_HIGHMEM directly. This is not right. N_HIGH_MEMORY
> > is to mark the memory state of node. Here zone index is checked, which
> > should be compared with 'ZONE_HIGHMEM' accordingly.
> > 
> > Replace it with ZONE_HIGHMEM.
> 
> Reviewed-by: David Hildenbrand <david@...hat.com>

Thanks, both. Will use this log and repost.

Thanks
Baoquan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ