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:	Thu, 9 Apr 2009 15:37:06 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	steiner@....com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [patch 02/13] GRU - dump chiplet state

On Mon, 06 Apr 2009 11:08:11 -0500
steiner@....com wrote:

> From: Jack Steiner <steiner@....com>
> 
> Add support for dumpping the state of an entire GRU chiplet.
> 
> ...
>
> +static int gru_user_copy_handle(void __user **dp, void *s)
> +{
> +	if (copy_to_user(*(void __user **)dp, s, GRU_HANDLE_BYTES))

the typecast appears to be unneeded?

> +		return -1;
> +	*dp += GRU_HANDLE_BYTES;
> +	return 0;
> +}
> +
>
> ...
>
> --- linux.orig/drivers/misc/sgi-gru/grutables.h	2009-03-04 10:49:00.000000000 -0600
> +++ linux/drivers/misc/sgi-gru/grutables.h	2009-03-04 10:50:44.000000000 -0600
> @@ -554,6 +554,12 @@ struct gru_blade_state {
>  
>  /* Lock hierarchy checking enabled only in emulator */
>  
> +/* 0 = lock failed, 1 = locked */
> +static inline int __trylock_handle(void *h)
> +{
> +	return !test_and_set_bit(1, h);
> +}

It would be safer were this header to include bitops.h.
--
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