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: <20170427054409.GA14079@dhcp-128-65.nay.redhat.com>
Date:   Thu, 27 Apr 2017 13:44:09 +0800
From:   Dave Young <dyoung@...hat.com>
To:     xlpang@...hat.com
Cc:     Juergen Gross <jgross@...e.com>, linux-s390@...r.kernel.org,
        linux-ia64@...r.kernel.org, Baoquan He <bhe@...hat.com>,
        Petr Tesarik <ptesarik@...e.cz>, kexec@...ts.infradead.org,
        linux-kernel@...r.kernel.org,
        Eric Biederman <ebiederm@...ssion.com>,
        Hari Bathini <hbathini@...ux.vnet.ibm.com>,
        akpm@...ux-foundation.org,
        Michael Holzheu <holzheu@...ux.vnet.ibm.com>
Subject: Re: [PATCH v4 1/3] kexec: Move vmcoreinfo out of the kernel's .bss
 section

Hi Xunlei,

On 04/27/17 at 01:25pm, Xunlei Pang wrote:
> On 04/27/2017 at 11:06 AM, Dave Young wrote:
> > [snip]
> >>>>>  
> >>>>>  static int __init crash_save_vmcoreinfo_init(void)
> >>>>>  {
> >>>>> +	/* One page should be enough for VMCOREINFO_BYTES under all archs */
> >>>> Can we add a comment in the VMCOREINFO_BYTES header file about the one
> >>>> page assumption?
> >>>>
> >>>> Or just define the VMCOREINFO_BYTES as PAGE_SIZE instead of 4096
> >>> Yes, I considered this before, but VMCOREINFO_BYTES is also used by VMCOREINFO_NOTE_SIZE
> >>> definition which is exported to sysfs, also some platform has larger page size(64KB), so
> >>> I didn't touch this 4096 value.
> >>>
> >>> I think I should use kmalloc() to allocate both of them, then move this comment to Patch3 
> >>> kimage_crash_copy_vmcoreinfo().
> >> But on the other hand, using a separate page for them seems safer compared with
> >> using frequently-used slab, what's your opinion?
> > I feel current page based way is better.
> >
> > For 64k page the vmcore note size will increase it seems fine. Do you
> > have concern in mind?
> 
> Since tools are supposed to acquire vmcoreinfo note size from sysfs, it should be safe to do so,
> except that there is some waste in memory for larger PAGE_SIZE.

Either way is fine to me, I think it is up to your implementation, if
choose page alloc then modify the macro with PAGE_SIZE looks better.

Thanks
Dave

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ