lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B600AB7.3070705@gmail.com>
Date:	Wed, 27 Jan 2010 10:43:19 +0100
From:	Jiri Slaby <jirislaby@...il.com>
To:	linux-kernel@...r.kernel.org
CC:	akpm@...ux-foundation.org, mm-commits@...r.kernel.org,
	joe@...ches.com, bzolnier@...il.com, jens.axboe@...cle.com,
	marcin.slusarz@...il.com, shemminger@...tta.com
Subject: Re: + drivers-block-floppyc-remove-copyin-copyout-and-ecall-macros.patch
 added to -mm tree

On 01/27/2010 01:37 AM, akpm@...ux-foundation.org wrote:
> @@ -3145,7 +3136,9 @@ static inline int raw_cmd_copyout(int cm
>  	int ret;
>  
>  	while (ptr) {
> -		COPYOUT(*ptr);
> +		ret = copy_to_user((void __user *)param, ptr, sizeof(*ptr));
> +		if (ret)
> +			return -EFAULT;
>  		param += sizeof(struct floppy_raw_cmd);
>  		if ((ptr->flags & FD_RAW_READ) && ptr->buffer_length) {
>  			if (ptr->length >= 0 &&
> @@ -3195,7 +3188,9 @@ static inline int raw_cmd_copyin(int cmd
>  		if (!ptr)
>  			return -ENOMEM;
>  		*rcmd = ptr;
> -		COPYIN(*ptr);
> +		ret = copy_from_user(ptr, (void __user *)param, sizeof(*ptr));

Actually the casts are not needed anymore, are they?

-- 
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ