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]
Date:   Fri, 22 Jun 2018 13:45:50 -0400
From:   Rik van Riel <riel@...riel.com>
To:     Dave Hansen <dave.hansen@...ux.intel.com>,
        linux-kernel@...r.kernel.org
Cc:     luto@...nel.org, mingo@...nel.org, tglx@...utronix.de,
        efault@....de, songliubraving@...com, kernel-team@...com
Subject: Re: [PATCH 1/7] mm: allocate mm_cpumask dynamically based on
 nr_cpu_ids

On Fri, 2018-06-22 at 08:10 -0700, Dave Hansen wrote:
> On 06/20/2018 12:56 PM, Rik van Riel wrote:
> >  	/*
> > -	 * FIXME! The "sizeof(struct mm_struct)" currently
> > includes the
> > -	 * whole struct cpumask for the OFFSTACK case. We could
> > change
> > -	 * this to *only* allocate as much of it as required by
> > the
> > -	 * maximum number of CPU's we can ever have.  The
> > cpumask_allocation
> > -	 * is at the end of the structure, exactly for that
> > reason.
> > +	 * The mm_cpumask is located at the end of mm_struct, and
> > is
> > +	 * dynamically sized based on nr_cpu_ids.
> >  	 */
> > +	mm_size = sizeof(struct mm_struct) + cpumask_size();
> > +
> >  	mm_cachep = kmem_cache_create_usercopy("mm_struct",
> > -			sizeof(struct mm_struct),
> > ARCH_MIN_MMSTRUCT_ALIGN,
> > +			mm_size, ARCH_MIN_MMSTRUCT_ALIGN,
> 
> Could you add a bit to that comment, like "dynamically sized based on
> nr_cpu_ids" ... which is sized based on the number of possible CPUs.
> 
> I found myself wondering how that interacts with hotplug.

Improved in my tree for v2.  Thank you.

-- 
All Rights Reversed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ