lkml.org 
[lkml]   [2021]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/8] cxl/mem: Add basic IOCTL interface
On Sun, Feb 14, 2021 at 11:50:12PM +0000, Al Viro wrote:
> check that len is reasonable
> p = kmalloc(offsetof(struct foo, string[len]), GFP_KERNEL);
> copy_from_user(p, user_object, len);
offsetof(struct foo, string[len]), that is

\
 
 \ /
  Last update: 2021-02-15 00:59    [W:0.081 / U:1.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site