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: <277127DD-9294-46D7-B05D-15275EF1B93B@oracle.com>
Date:   Tue, 23 Feb 2021 17:54:39 +0000
From:   Saeed Mirzamohammadi <saeed.mirzamohammadi@...cle.com>
To:     Baoquan He <bhe@...hat.com>, Kairui Song <kasong@...hat.com>
CC:     "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "Peter Zijlstra (Intel)" <peterz@...radead.org>,
        Christian Brauner <christian.brauner@...ntu.com>,
        Ingo Molnar <mingo@...nel.org>,
        Jonathan Corbet <corbet@....net>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Sami Tolvanen <samitolvanen@...gle.com>,
        Dave Young <dyoung@...hat.com>,
        Vivek Goyal <vgoyal@...hat.com>,
        John Donnelly <john.p.donnelly@...cle.com>,
        Kees Cook <keescook@...omium.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Andrey Konovalov <andreyknvl@...gle.com>,
        Frederic Weisbecker <frederic@...nel.org>,
        "Guilherme G. Piccoli" <gpiccoli@...onical.com>,
        "Steven Rostedt (VMware)" <rostedt@...dmis.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        Randy Dunlap <rdunlap@...radead.org>,
        kexec mailing list <kexec@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        YiFei Zhu <yifeifz2@...inois.edu>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mike Rapoport <rppt@...nel.org>,
        Mike Kravetz <mike.kravetz@...cle.com>
Subject: Re: [PATCH v3 1/1] kernel/crash_core: Add crashkernel=auto for vmcore
 creation



> On Feb 23, 2021, at 5:56 AM, Baoquan He <bhe@...hat.com> wrote:
> 
> On 02/23/21 at 08:01pm, Kairui Song wrote:
>> On Thu, Feb 18, 2021 at 10:03 AM Baoquan He <bhe@...hat.com> wrote:
>>> 
>>> On 02/11/21 at 10:08am, Saeed Mirzamohammadi wrote:
> ...
>>>> diff --git a/arch/Kconfig b/arch/Kconfig
>>>> index af14a567b493..f87c88ffa2f8 100644
>>>> --- a/arch/Kconfig
>>>> +++ b/arch/Kconfig
>>>> @@ -14,6 +14,30 @@ menu "General architecture-dependent options"
>>>> config CRASH_CORE
>>>>      bool
>>>> 
>>>> +if CRASH_CORE
>>>> +
>>>> +config CRASH_AUTO_STR
>>>> +     string "Memory reserved for crash kernel"
>>>> +     depends on CRASH_CORE
>>>> +     default "1G-64G:128M,64G-1T:256M,1T-:512M"
>>>> +     help
>>>> +       This configures the reserved memory dependent
>>>> +       on the value of System RAM. The syntax is:
>>>> +       crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset]
>>>> +                   range=start-[end]
>>>> +
>>>> +       For example:
>>>> +           crashkernel=512M-2G:64M,2G-:128M
>>>> +
>>>> +       This would mean:
>>>> +
>>>> +           1) if the RAM is smaller than 512M, then don't reserve anything
>>>> +              (this is the "rescue" case)
>>>> +           2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
>>>> +           3) if the RAM size is larger than 2G, then reserve 128M
>>>> +
>>>> +endif # CRASH_CORE
>>> 
>>> Wondering if this CRASH_CORE ifdeffery is a little redundent here
>>> since CRASH_CORE dependency has been added. Except of this, I like this
>>> patch. As we discussed in private threads, we can try to push it into
>>> mainline and continue improving later.
>>> 
>> 
>> I believe "if CRASH_CORE" is not needed as it already "depends on
>> CRASH_CORE", tested with CRASH_CORE=y or 'not set', it just works.
> 
> Thanks for testing and confirmation, Kairui.
> 
> Saeed, can you post a v4 with CRASH_CORE ifdeffery removed? Maybe this
> week?

Thanks Kairui and Baoquan for testing and review. I just sent the v4. Hope we move forward and apply this week.

Saeed

> 
> Thanks
> Baoquan
> 
>> 
>>>> +
>>>> config KEXEC_CORE
>>>>      select CRASH_CORE
>>>>      bool
>>>> diff --git a/kernel/crash_core.c b/kernel/crash_core.c
>>>> index 106e4500fd53..ab0a2b4b1ffa 100644
>>>> --- a/kernel/crash_core.c
>>>> +++ b/kernel/crash_core.c
>>>> @@ -7,6 +7,7 @@
>>>> #include <linux/crash_core.h>
>>>> #include <linux/utsname.h>
>>>> #include <linux/vmalloc.h>
>>>> +#include <linux/kexec.h>
>>>> 
>>>> #include <asm/page.h>
>>>> #include <asm/sections.h>
>>>> @@ -250,6 +251,12 @@ static int __init __parse_crashkernel(char *cmdline,
>>>>      if (suffix)
>>>>              return parse_crashkernel_suffix(ck_cmdline, crash_size,
>>>>                              suffix);
>>>> +#ifdef CONFIG_CRASH_AUTO_STR
>>>> +     if (strncmp(ck_cmdline, "auto", 4) == 0) {
>>>> +             ck_cmdline = CONFIG_CRASH_AUTO_STR;
>>>> +             pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n");
>>>> +     }
>>>> +#endif
>>>>      /*
>>>>       * if the commandline contains a ':', then that's the extended
>>>>       * syntax -- if not, it must be the classic syntax
>>>> --
>>>> 2.27.0
>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> kexec mailing list
>>> kexec@...ts.infradead.org
>>> https://urldefense.com/v3/__http://lists.infradead.org/mailman/listinfo/kexec__;!!GqivPVa7Brio!MaBAPZr-j_WcNPodmosfVOyl0ipO6u22Ex-7gSi--wlwbmTgmkhsf-0yftioew3jnkS5WV5v$ 
>>> 
>> 
>> 
>> -- 
>> Best Regards,
>> Kairui Song
>> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ