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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140116112633.GA28584@aepfle.de>
Date:	Thu, 16 Jan 2014 12:26:33 +0100
From:	Olaf Hering <olaf@...fle.de>
To:	"K. Y. Srinivasan" <kys@...rosoft.com>
Cc:	gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
	devel@...uxdriverproject.org, apw@...onical.com,
	jasowang@...hat.com
Subject: Re: [PATCH V2 1/1] Drivers: hv: Implement the file copy service

On Tue, Jan 14, K. Y. Srinivasan wrote:

This function should return valid numbers:

> +static ssize_t fcopy_write(struct file *file, const char __user *buf,
> +			size_t count, loff_t *ppos)
> +{
> +	int error = 0;
> +
> +	if (count != sizeof(int))
> +		return 0;

Should be an error.

> +
> +	if (copy_from_user(&error, buf, sizeof(int)))
> +		return -EFAULT;
> +
> +	if (in_hand_shake) {
> +		fcopy_handle_handshake();
> +		return 0;

Should be sizeof(int).

> +	}
> +
> +	/*
> +	 * Complete the transaction by forwarding the result
> +	 * to the host. But first, cancel the timeout.
> +	 */
> +	if (cancel_delayed_work_sync(&fcopy_work))
> +		fcopy_respond_to_host(error);
> +
> +	return sizeof(int);
> +}

--
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