lkml.org 
[lkml]   [2020]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 2/3] binder: do not initialize locals passed to copy_from_user()
    On Tue, Mar 03, 2020 at 12:38:32PM +0300, Dan Carpenter wrote:
    > The real fix is to initialize everything manually, the automated
    > initialization is a hardenning feature which many people will disable.

    I cannot disagree more with this sentiment. Linus has specifically said he
    wants this initialization on by default[1], and the major thing holding
    that back from happening is that no one working on GCC has had time to
    add this feature there. All the kernels I know of that are built with
    Clang (Android, Chrome OS, OpenMandriva) either already have this turned
    on or have plans to do so shortly.

    > So I don't think the hardenning needs to be perfect, it needs to simple
    > and fast.

    I think it should be able to be intelligently optimized, so I'm all for
    finding ways to mark function arguments as "will be initialized" in some
    fashion.

    -Kees

    [1] "Oh, I love that patch." https://lore.kernel.org/lkml/CA+55aFykZL+cSBJjBBts7ebEFfyGPdMzTmLSxKnT_29=j942dA@mail.gmail.com/

    --
    Kees Cook

    \
     
     \ /
      Last update: 2020-03-04 19:14    [W:2.607 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site