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: <20111108001402.3d1a8fb4@lxorguk.ukuu.org.uk>
Date:	Tue, 8 Nov 2011 00:14:02 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Bryan Freed <bfreed@...omium.org>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
	msb@...omium.org, marco.stornelli@...il.com, seiji.aguchi@....com
Subject: Re: [PATCH] ramoops: Add a device file for ramoops buffer access.


> +static int ramoops_open(struct inode *inode, struct file *file)
> +{
> +	file->private_data = &oops_cxt;

Well I guess you'll only have one..

> +	if (copy_to_user(buf, from, count))
> +		count = -EFAULT;
> +	else
> +		*ppos += count;

Mindnumbingly pedantically you should return -EFAULT only if none of the
bytes copied, otherwise the partial length. Do we actually care in a case
like this - not really.

Looks good to me and we really want to get away from using /dev/mem for
stuff. Ideally to a world where /dev/mem can be compiled out of any
normal system completely so

Acked-by: Alan Cox <alan@...ux.intel.com>
--
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