lkml.org 
[lkml]   [2017]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 02/18] vchecker: introduce the valid access checker
Date
js1304@gmail.com writes:

> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Looks useful. Essentially unlimited hardware break points, combined
with slab.

Didn't do a full review, but noticed some things below.
> +
> + buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
> + if (!buf)
> + return -ENOMEM;
> +
> + if (copy_from_user(buf, ubuf, cnt)) {
> + kfree(buf);
> + return -EFAULT;
> + }
> +
> + if (isspace(buf[0]))
> + remove = true;

and that may be uninitialized.

and the space changes the operation? That's a strange syntax.


> + buf[cnt - 1] = '\0';

That's an underflow of one byte if cnt is 0.


-Andi

\
 
 \ /
  Last update: 2017-11-28 20:42    [W:0.233 / U:2.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site