lkml.org 
[lkml]   [2017]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Adjusting further size determinations?
    From
    Date
    >> If you want 'security' for kmalloc() then:
    >>
    >> #define KMALLOC_TYPE(flags) (type *)kmalloc(sizeof (type), flags)
    >> #define KMALLOC(ptr, flags) *(ptr) = KMALLOC_TYPE(typeof *(ptr), flags)

    Such an approach might help.


    >> and change:
    >> ptr = kmalloc(sizeof *ptr, flags);
    >> to:
    >> KMALLOC(&ptr, flags);
    >>
    >> But it is all churn for churn's sake.
    >
    > Please don't.

    Interesting …


    > Coccinelle won't find real problems with kmalloc any more if this is done.

    The corresponding source code analysis will become different
    (or more challenging) then. Are you still looking for related solutions?

    Regards,
    Markus

    \
     
     \ /
      Last update: 2017-10-22 17:13    [W:4.132 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site