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: <alpine.DEB.2.21.2203041627150.47558@angie.orcam.me.uk>
Date:   Fri, 4 Mar 2022 17:05:46 +0000 (GMT)
From:   "Maciej W. Rozycki" <macro@...am.me.uk>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
cc:     Mike Rapoport <rppt@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Xuefeng Li <lixuefeng@...ngson.cn>, linux-mips@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 0/4] MIPS: Modify mem= and memmap= parameter

On Wed, 2 Mar 2022, Tiezhu Yang wrote:

> > As for memmap= option, it does not specify the memory map but rather alters
> > the memory map passed by the firmware. Particularity in MIPS implementation
> > it allows to add a single range of available or reserved memory.
> > 
> > AFAIU, for the kdump use-case mem=X@Y should suffice.
> 
> We can modify some code to make mem=X@Y work well,
> but according to Documentation/admin-guide/kernel-parameters.txt,
> the common way is mem=X and memmap=X@Y, so mem=X@Y for mips seems
> odd, the intention of this patchset is to make mem= and memmap=
> work well and consistent with the other archs.

 It is not the MIPS implementation that is odd, it is the others that have 
changed the semantics that are.

 When I added `mem=...' support to the MIPS platform, back on Dec 11th, 
2000, which I needed for a system with with memory holes until I got 
proper memory probing implemented, AFAIR the only other implementation was 
for the x86 and naturally what I did for the MIPS platform was exactly the 
same.  It used to be documented too, but the documentation was removed 
sometime back in 2003 when someone has changed the x86 semantics for 
reasons unknown to me and without letting people working on other 
platforms know, so things diverged.

 Please review:

<https://lore.kernel.org/linux-mips/alpine.LFD.2.21.2010050133330.333514@eddie.linux-mips.org/>

as it has been already discussed.

 If you have a system that hangs with `mem=3G' and which does have 
contiguous RAM available for the kernel to use from 0 through to 3GiB, 
then please either bisect the problem or try finding the root cause as it 
used to work at least those 21 years ago.  Conversely if your system does 
*not* have such RAM available, then use the correct option(s) instead that 
reflect your memory map.

 It is preferable that the memory map be determined automatically either 
by the firmware and then passed to the kernel somehow, or a device tree 
entry, or probed by the kernel itself.  You shouldn't have to specify 
`mem=...' by hand except for debugging or as a temporary workaround.

 For example I have an x86 system that Linux does not how to interrogate 
for RAM beyond 64MiB, so I do use `memmap=128M@0' (for legacy reasons the 
x86 platform has a special exception to always exclude area between 640K 
and 1M from being used even if not explicitly specified, but we do not 
have a need for such legacy such legacy concerns with the MIPS port).  I 
consider it an interim measure however until the kernel has been fixed.

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ