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: <618f5695-73e4-3f28-c874-4f12966dee51@gmail.com>
Date:   Tue, 10 Dec 2019 20:41:33 +1100
From:   Balbir Singh <bsingharora@...il.com>
To:     David Hildenbrand <david@...hat.com>, Baoquan He <bhe@...hat.com>,
        linux-kernel@...r.kernel.org
Cc:     linux-mm@...ck.org, mhocko@...nel.org, jgross@...e.com,
        akpm@...ux-foundation.org
Subject: Re: [Patch v2] mm/hotplug: Only respect mem= parameter during boot
 stage



On 10/12/19 8:37 pm, David Hildenbrand wrote:
> On 10.12.19 10:36, David Hildenbrand wrote:
>> On 10.12.19 10:24, Balbir Singh wrote:
>>>
>>>
>>> On 10/12/19 7:44 pm, Baoquan He wrote:
>>>> In commit 357b4da50a62 ("x86: respect memory size limiting via mem=
>>>> parameter") a global varialbe global max_mem_size is added to store
>>>                   typo ^^^
>>>> the value parsed from 'mem= ', then checked when memory region is
>>>> added. This truly stops those DIMM from being added into system memory
>>>> during boot-time.
>>>>
>>>> However, it also limits the later memory hotplug functionality. Any
>>>> memory board can't be hot added any more if its region is beyond the
>>>> max_mem_size. System will print error like below:
>>>>
>>>> [  216.387164] acpi PNP0C80:02: add_memory failed
>>>> [  216.389301] acpi PNP0C80:02: acpi_memory_enable_device() error
>>>> [  216.392187] acpi PNP0C80:02: Enumeration failure
>>>>
>>>> From document of 'mem= ' parameter, it should be a restriction during
>>>> boot, but not impact the system memory adding/removing after booting.
>>>>
>>>>   mem=nn[KMG]     [KNL,BOOT] Force usage of a specific amount of memory
>>>> 	          ...
>>>>
>>>> So fix it by also checking if it's during boot-time when restrict memory
>>>> adding. Otherwise, skip the restriction.
>>>>
>>>
>>> The fix looks reasonable, but I don't get the use case. Booting with mem= is
>>> generally a debug option, is this for debugging memory hotplug + limited memory?
>>
>> Some people/companies use "mem=" along with KVM e.g., to avoid
>> allocating memmaps for guest backing memory and to not expose it to the
>> buddy across kexec's. The excluded physical memory is then memmap into
> 
> s/memmap/mmaped/
> 
>> the hypervisor process and KVM can deal with that. I can imagine that
>> hotplug might be desirable as well for such use cases.

Makes sense, sounds hacky, but it seems like mem= is no longer a debug
option

Acked-by: Balbir Singh <bsingharora@...il.com>

>>
>>>
>>> Balbir
>>>
>>
>>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ