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
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
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