[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200302173852.GB109022@kroah.com>
Date: Mon, 2 Mar 2020 18:38:52 +0100
From: Greg KH <gregkh@...uxfoundation.org>
To: glider@...gle.com
Cc: tkjos@...gle.com, keescook@...omium.org, arve@...roid.com,
mingo@...hat.com, dvyukov@...gle.com, jannh@...gle.com,
devel@...verdev.osuosl.org, peterz@...radead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] binder: do not initialize locals passed to
copy_from_user()
On Mon, Mar 02, 2020 at 02:04:29PM +0100, glider@...gle.com wrote:
> Certain copy_from_user() invocations in binder.c are known to
> unconditionally initialize locals before their first use, like e.g. in
> the following case:
>
> struct binder_transaction_data tr;
> if (copy_from_user(&tr, ptr, sizeof(tr)))
> return -EFAULT;
>
> In such cases enabling CONFIG_INIT_STACK_ALL leads to insertion of
> redundant locals initialization that the compiler fails to remove.
> To work around this problem till Clang can deal with it, we apply
> __no_initialize to local Binder structures.
I would like to see actual benchmark numbers showing this is
needed/useful otherwise it's going to just be random people adding this
marking to random places with no real reason.
thanks,
greg k-h
Powered by blists - more mailing lists