Re: [PATCH 02/36] usercopy: Include offset in overflow report

2018-01-10 Thread Kees Cook
On Wed, Jan 10, 2018 at 7:25 AM, Christopher Lameter wrote: > On Tue, 9 Jan 2018, Kees Cook wrote: > >> -static void report_usercopy(unsigned long len, bool to_user, const char >> *type) >> +int report_usercopy(const char *name, const char *detail, bool to_user, >> + unsigned long

Re: [PATCH 02/36] usercopy: Include offset in overflow report

2018-01-10 Thread Christopher Lameter
On Tue, 9 Jan 2018, Kees Cook wrote: > -static void report_usercopy(unsigned long len, bool to_user, const char > *type) > +int report_usercopy(const char *name, const char *detail, bool to_user, > + unsigned long offset, unsigned long len) > { > - pr_emerg("kernel memory %s

[PATCH 02/36] usercopy: Include offset in overflow report

2018-01-09 Thread Kees Cook
This refactors the hardened usercopy reporting code so that the object offset can be included in the report. Having the offset can be much more helpful in understanding usercopy bugs. Signed-off-by: Kees Cook --- include/linux/slab.h| 11 +++-- include/linux/thread_info.h | 2 + mm/sl