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: <200905011135.15137.arnd@arndb.de>
Date:	Fri, 1 May 2009 11:35:14 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	Russell King <rmk+lkml@....linux.org.uk>
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 17/27] add generic lib/checksum.c

On Friday 01 May 2009, Russell King wrote:
> Since when has 'memcpy' been valid from user addresses?

It's an artifact from the microblaze code, I found it after
submitting the patches when running sparse over it (yes, I
know I should do these things in a different order).

The s390 version seems to get this right, so I'll use this:

static inline __wsum
csum_partial_copy_from_user(const void __user *src, void *dst,
                                          int len, __wsum sum,
                                          int *err_ptr)
{
	int missing;

	missing = copy_from_user(dst, src, len);
	if (missing) {
		memset(dst + len - missing, 0, missing);
		*err_ptr = -EFAULT;
	}

	return csum_partial(dst, len, sum);
}

On microblaze, the old code was only correct for NOMMU.

Thanks,

	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