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: <CABKxMyNj7Oo3X47APa8Ro-CCK3=XFogorJ2maTCstgsrrC28kg@mail.gmail.com>
Date:   Mon, 25 Jul 2022 21:30:41 +0800
From:   黄杰 <huangjie.albert@...edance.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Eric Biederman <ebiederm@...ssion.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Kuppuswamy Sathyanarayanan 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Michael Roth <michael.roth@....com>,
        Nathan Chancellor <nathan@...nel.org>,
        Ard Biesheuvel <ardb@...nel.org>,
        Joerg Roedel <jroedel@...e.de>,
        Mark Rutland <mark.rutland@....com>,
        Peter Zijlstra <peterz@...radead.org>,
        Sean Christopherson <seanjc@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        linux-kernel@...r.kernel.org, kexec@...ts.infradead.org,
        linux-kbuild@...r.kernel.org
Subject: Re: [External] Re: [PATCH 1/4] kexec: reuse crash kernel reserved
 memory for normal kexec

Jason A. Donenfeld <Jason@...c4.com> 于2022年7月25日周一 20:02写道:
>
> Hi Albert,
>
> On Mon, Jul 25, 2022 at 04:38:53PM +0800, Albert Huang wrote:
> > The kexec userspace tool also needs to add parameter options(-r) that
> > support the use of reserved memory (see another patch for kexec)
> >
> > [...]
> >
> > -     if (kexec_on_panic) {
> > +     if (kexec_on_panic && kexec_on_reserved) {
>
> Two small questions related to this:
>
> - Why does kexec-tools need an option, or more specifically, why does
>   userspace need to communicate about this at all? Can't the kernel just
>   automatically use the available reserved memory in the case that's not
>   already being used by the panic handler kernel? I'm curious about
>   whether there are caveats that would make this occasionally
>   undesirable, hence suggesting an option.

Because the crash kernel will also use this part of the memory,
so do not use this mechanism unless explicitly specified. So I tend to
add an option

>
> - I don't totally understand how this works, so I might be a bit off
>   here, but is there any chance that this could be made to co-exist with
>   kexec_on_panic? Can a larger region just be reserved, specifically for
>   this, rather than piggy backing on the panic handler region?
>
> > +static struct page *kimage_alloc_reserverd_control_pages(struct kimage *image,
> > +     case KEXEC_TYPE_RESERVED_MEM:
> > +             pages = kimage_alloc_reserverd_control_pages(image, order);
>
> Nit:
>   reserverd -> reserved

thanks for that, I will correct it

>
> Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ