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]
Date:	Fri, 1 May 2009 11:22:06 +0100
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arch@...r.kernel.org, Michal Simek <monstr@...str.eu>,
	Remis Lima Baima <remis.developer@...glemail.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 12/27] asm-generic: add a NOMMU uaccess.h

On Thu, Nov 06, 2008 at 04:31:03PM +0100, Arnd Bergmann wrote:
> +#define put_user(x, ptr) (				\
> +	access_ok(VERIFY_WRITE, ptr, sizeof (*ptr)) ?	\
> +		__put_user(x, ptr) :			\
> +		-EFAULT)
> +
> +#ifndef __get_user
> +#define __get_user(x, ptr)				\
> +({							\
> +	int __gu_err = 0;				\
> +	unsigned long __gu_val = (unsigned long)*ptr;	\
> +	switch (sizeof(*(ptr))) {			\
> +	case 1:						\
> +	case 2:						\
> +	case 4:						\
> +	case 8:						\
> +		break;					\

If sizeof(unsigned long) = 4, then how can the sizeof(*(ptr)) > 4 case
work?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
--
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