Re: [PATCH 32/32] aio: implement io_pgetevents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux