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, 16 Mar 2007 11:14:06 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Pierre.Peiffer@...l.net
Cc:	akpm@...ux-foundation.org, mingo@...e.hu, drepper@...hat.com,
	linux-kernel@...r.kernel.org, jean-pierre.dion@...l.net
Subject: Re: [PATCH 2.6.21-rc3-mm2 3/4] futex_requeue_pi optimization

On Tue, 2007-03-13 at 10:52 +0100, Pierre.Peiffer@...l.net wrote:
> plain text document attachment (futex-requeue-pi.diff)
> This patch provides the futex_requeue_pi functionality.
> 
> This provides an optimization, already used for (normal) futexes, to be used for
> PI-futexes.
> 
> This optimization is currently used by the glibc in pthread_broadcast, when
> using "normal" mutexes. With futex_requeue_pi, it can be used with PRIO_INHERIT
> mutexes too.
> 
> Signed-off-by: Pierre Peiffer <pierre.peiffer@...l.net>
> 
> ---

>  /*
> + * Retrieve the original address used to compute this key
> + */
> +static void *get_futex_address(union futex_key *key)
> +{
> +	void *uaddr;
> +
> +	if (key->both.offset & 1) {
> +		/* shared mapping */
> +		uaddr = (void*)((key->shared.pgoff << PAGE_SHIFT)
> +				+ key->shared.offset - 1);
> +	} else {
> +		/* private mapping */
> +		uaddr = (void*)(key->private.address + key->private.offset);
> +	}
> +
> +	return uaddr;
> +}

This will not work for nonlinear vmas, granted, not a lot of ppl stick
futexes in nonlinear vmas, but the futex_key stuff handles it, this
doesn't.


-
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