[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180117042721.GT13338@ZenIV.linux.org.uk>
Date: Wed, 17 Jan 2018 04:27:21 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: Jeff Moyer <jmoyer@...hat.com>
Cc: Christoph Hellwig <hch@....de>, Avi Kivity <avi@...lladb.com>,
linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
netdev@...r.kernel.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 32/32] aio: implement io_pgetevents
On Tue, Jan 16, 2018 at 07:41:24PM -0500, Jeff Moyer wrote:
> if (sigmask) {
> - if (copy_from_user(&ksigmask, sigmask, sizeof(ksigmask)))
> + if (!access_ok(VERIFY_READ, sigmask,
> + sizeof(void *) + sizeof(size_t)) ||
> + __get_user(up, (sigset_t __user * __user *)sigmask) ||
> + __get_user(sigsetsize,
> + (size_t __user *)(sigmask + sizeof(void *))))
> return -EFAULT;
How about copy_from_user() on a struct? Making eyes bleed is fun, but
people tend to get annoyed when you do it to them...
Powered by blists - more mailing lists