lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v10 17/17] kasan: enable instrumentation of global variables
On Fri, 30 Jan 2015 20:47:13 +0300 Andrey Ryabinin <a.ryabinin@samsung.com> wrote:

> >> +struct kasan_global {
> >> + const void *beg; /* Address of the beginning of the global variable. */
> >> + size_t size; /* Size of the global variable. */
> >> + size_t size_with_redzone; /* Size of the variable + size of the red zone. 32 bytes aligned */
> >> + const void *name;
> >> + const void *module_name; /* Name of the module where the global variable is declared. */
> >> + unsigned long has_dynamic_init; /* This needed for C++ */
> >
> > This can be removed?
> >
>
> No, compiler dictates layout of this struct. That probably deserves a comment.

I see. A link to the relevant gcc doc would be good.

Perhaps the compiler provides a header file so clients of this feature
don't need to write their own?


\
 
 \ /
  Last update: 2015-01-30 23:01    [W:0.155 / U:3.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site