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.2106080215490.1601@angie.orcam.me.uk>
Date:   Tue, 8 Jun 2021 02:16:54 +0200 (CEST)
From:   "Maciej W. Rozycki" <macro@...am.me.uk>
To:     Youling Tang <tangyouling@...ngson.cn>
cc:     Jiaxun Yang <jiaxun.yang@...goat.com>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
        Huacai Chen <chenhuacai@...nel.org>
Subject: Re: [PATCH] mips: kdump: Crash kernel should be able to see old
 memories

On Tue, 20 Apr 2021, Youling Tang wrote:

> > Why depend on a config instead of a runtime variable?
> > 
> If not depend on config, we can determine whether the command line contains
> the "elfcorehdr=" parameter, because the "mem=" and "elfcorhdr=" parameters
> are automatically added in kexec-tools. So if there is an "elfcorehdr="
> parameter in the command line, it means that the currently running kernel
> is a capture kernel, and the memblock_remove() operation is not called.
> 
> The revised patch is as follows:
>         if (usermem == 0) {
>                 usermem = 1;
> -               memblock_remove(memblock_start_of_DRAM(),
> -                       memblock_end_of_DRAM() - memblock_start_of_DRAM());
> +               if (!strstr(boot_command_line, "elfcorehdr")) {
> +                       memblock_remove(memblock_start_of_DRAM(),
> +                               memblock_end_of_DRAM() -
> memblock_start_of_DRAM());
> +               }
> 
> Do you think it is feasible?

 This looks like a hack to me.  How do other platforms solve it, e.g. x86?

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ