lkml.org 
[lkml]   [2016]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 2/3] Mark functions with the latent_entropy attribute
On Tue, 24 May 2016 10:16:09 -0700
Kees Cook <keescook@chromium.org> wrote:

> On Mon, May 23, 2016 at 3:16 PM, Emese Revfy <re.emese@gmail.com> wrote:
> > +#ifdef CONFIG_MEMORY_HOTPLUG
> > +#define add_meminit_latent_entropy
> > +#else
> > +#define add_meminit_latent_entropy __latent_entropy
> > +#endif
> > +
> > /* These are for everybody (although not all archs will actually
> > discard it in modules) */
> > -#define __init __section(.init.text) __cold notrace
> > +#define __init __section(.init.text) __cold notrace __latent_entropy
> > #define __initdata __section(.init.data)
> > #define __initconst __constsection(.init.rodata)
> > #define __exitdata __section(.exit.data)
> > @@ -92,7 +98,7 @@
> > #define __exit __section(.exit.text) __exitused __cold notrace
> >
> > /* Used for MEMORY_HOTPLUG */
> > -#define __meminit __section(.meminit.text) __cold notrace
> > +#define __meminit __section(.meminit.text) __cold notrace add_meminit_latent_entropy
> > #define __meminitdata __section(.meminit.data)
> > #define __meminitconst __constsection(.meminit.rodata)
> > #define __memexit __section(.memexit.text) __exitused __cold notrace
>
> I was confused by these defines. :) Maybe "add_meminit_latent_entropy"
> should be named "__memory_hotplug_only_latent_entropy" or something
> like that?

I think the plugin doesn't cause a significant slowdown when CONFIG_MEMORY_HOTPLUG is enabled so I would rather always add the __latent_entropy attribute to __meminit.

--
Emese

\
 
 \ /
  Last update: 2016-05-24 23:01    [W:0.060 / U:0.784 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site