Messages in this thread | | | Date | Fri, 30 Mar 2012 08:30:13 -0700 | From | Greg KH <> | Subject | Re: [PATCH] kmsg: Use vmalloc instead of kmalloc when writing |
| |
On Fri, Mar 30, 2012 at 01:04:27PM -0400, Sasha Levin wrote: > There are no size checks in kmsg_write(), and we try allocating enough > memory to store everything userspace gave us, which may be too much for > kmalloc to allocate.
Really? Have you seen this fail? As only root can do this, is this really a problem?
> One option would be to limit it to something, but we can't come up with > a number that would make sense. > > Instead, just use vmalloc so that nothing would break with large amounts > of data.
Are you sure this will work properly? Have you tested it with large amounts of data?
thanks,
greg k-h
| |