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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 27 Jul 2009 20:18:33 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	monstr@...str.eu
Cc:	Linux Kernel list <linux-kernel@...r.kernel.org>,
	John Williams <john.williams@...alogix.com>
Subject: Re: generic uaccess.h

On Monday 27 July 2009, Michal Simek wrote:
> I am getting any short write error. It is caused with adding access_ok macro.
> It is weird.

Your implementation of access_ok() is minimal, but should be ok
in theory. Note that even on nommu, it might make sense
to check for kernel addresses here and implement get_fs/set_fs,
e.g.

int access_ok(int type, unsigned long addr, size_t len)
{
	/* check wraparound */
	if (addr + len < addr)
		return 0;

	if (addr < memory_start || addr + len > memory_start)
		return 0;

	/* don't allow access to kernel memory */
	if (get_fs() == USER_DS) {
		if (is_kernel(addr) || is_kernel(addr + len))
			return 0;
	}

	return 1;
}

> I have more important work in front of me - I take a look at it later.

ok. When you get to debug this, I guess the easiest way is to stick
some printk into your access_ok() function.

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