Skip Menu |
 

From: raeburn@mit.edu
Subject: CVS Commit
This seems to speed up creating a krb5_context a little bit, when it happens
a lot in multiple threads.

* prng.c (yarrow_lock): Rename to krb5int_yarrow_lock via macro, and change to
be non-static.
(krb5int_prng_init): Call do_yarrow_init here.
(krb5_c_random_add_entropy): Don't call it here. Don't lock the mutex, either.
(krb5_c_random_make_octets): Don't lock the mutex.
* yarrow/ylock.h: Include k5-thread.h.
(krb5int_yarrow_lock): Declare.
(LOCK, UNLOCK): Define as macros using the k5_mutex_ macros.


To generate a diff of this commit:



cvs diff -r5.168 -r5.169 krb5/src/lib/crypto/ChangeLog
cvs diff -r5.20 -r5.21 krb5/src/lib/crypto/prng.c
cvs diff -r1.17 -r1.18 krb5/src/lib/crypto/yarrow/ChangeLog
cvs diff -r1.3 -r1.4 krb5/src/lib/crypto/yarrow/ylock.h
Cc: Ken Raeburn <raeburn@mit.edu>, krb5-prs@mit.edu
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #2755] CVS Commit
Date: Sat, 30 Oct 2004 05:05:42 -0400
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
Oops. There are some locking bugs in the yarrow code. Working on it.
To: krb5-bugs@mit.edu
From: Ken Raeburn <raeburn@mit.edu>
Date: Mon, 1 Nov 2004 16:52:54 -0500
Subject: yarrow locking broken on 1.4 branch
Download (untitled) / with headers
text/plain 1.1KiB
Sorry, should've opened a ticket when I checked this in...

Begin forwarded message:

Show quoted text
> From: raeburn@MIT.EDU
> Date: November 1, 2004 16:33:09 EST
> To: cvs-krb5@mit.edu
> Subject: CVS report: krb5/src/lib/crypto/yarrow ChangeLog yarrow.c
> Reply-To: krbdev@MIT.EDU, raeburn@MIT.EDU
> X-Spam-Score: -5.651
>
> Module Name: krb5
> Committed By: raeburn
> Date: Mon Nov 1 21:33:06 UTC 2004
>
> Modified Files:
> krb5/src/lib/crypto/yarrow/ChangeLog
> krb5/src/lib/crypto/yarrow/yarrow.c
> Added Files:
>
> Removed Files:
>
>
> Log Message
> * yarrow.c (krb5int_yarrow_input, krb5int_yarrow_final): Don't check
> for
> forking here.
> (yarrow_output_locked): Split out from krb5int_yarrow_output, without
> locking.
> (krb5int_yarrow_output): Do locking and call yarrow_output_locked.
> (yarrow_gate_locked): New function; uses yarrow_output_locked.
> (krb5int_yarrow_output_Block): Use yarrow_gate_locked.
>
>
> To generate a diff of this commit:
> cvs diff -r1.18 -r1.19 krb5/src/lib/crypto/yarrow/ChangeLog
> cvs diff -r1.11 -r1.12 krb5/src/lib/crypto/yarrow/yarrow.c
> _______________________________________________
> cvs-krb5 mailing list
> cvs-krb5@mit.edu
> https://mailman.mit.edu/mailman/listinfo/cvs-krb5
To: rt@krbdev.mit.edu
Cc:
Subject: Re: [krbdev.mit.edu #2758] yarrow locking broken on 1.4 branch
From: Sam Hartman <hartmans@mit.edu>
Date: Tue, 02 Nov 2004 10:41:05 -0500
RT-Send-Cc:
Where do you end up doing the fork check then?
Cc: Ken Raeburn <raeburn@mit.edu>, krb5-prs@mit.edu
From: Ken Raeburn <raeburn@MIT.EDU>
Subject: Re: [krbdev.mit.edu #2758] yarrow locking broken on 1.4 branch
Date: Tue, 2 Nov 2004 13:06:42 -0500
To: rt-comment@krbdev.mit.edu
RT-Send-Cc:
On Nov 2, 2004, at 10:41, Sam Hartman via RT wrote:

Show quoted text
> Where do you end up doing the fork check then?

There's still a check before generating output. That should be enough,
shouldn't it?
The alpha-netbsd build is failing nightly tests with:

KRB5_CONFIG=./../../../config-files/krb5.conf ./t_cksum4 "this is a test"
assertion "(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED"
failed: file "yarrow.c", line 174, function "krb5int_yarrow_init"
[1] Abort trap (core dumped) KRB5_CONFIG=./.....
*** Error code 134
Show quoted text
> The alpha-netbsd build is failing nightly tests with:
> assertion "(&(&_m->os)->n)->initialized == K5_MUTEX_DEBUG_INITIALIZED"
> failed: file "yarrow.c", line 174, function "krb5int_yarrow_init"

Oops again. This checkin should fix that:

2004-11-17 Ken Raeburn <raeburn@mit.edu>

* prng.c (do_yarrow_init): Move mutex initialization here.
(krb5int_prng_init): Don't do it here.

lib/crypto/prng.c 5.22
lib/crypto/ChangeLog 5.171
From: raeburn@mit.edu
Subject: CVS Commit
KDC on Tru64 was hanging because of another case where Yarrow code
assumes locks are recursive. Probably didn't trigger on Linux,
Solaris, or NetBSD because they have /dev/random and Tru64 does not.

* yarrow.c (yarrow_input_maybe_locking): Renamed from
yarrow_input_maybe_locking, made static. New argument indicates whether or not
to do locking.
(krb5int_yarrow_input): New wrapper function.
(yarrow_input_locked): New wrapper function.
(Yarrow_detect_fork): Call yarrow_input_locked.


To generate a diff of this commit:



cvs diff -r1.20 -r1.21 krb5/src/lib/crypto/yarrow/ChangeLog
cvs diff -r1.12 -r1.13 krb5/src/lib/crypto/yarrow/yarrow.c
Seems to be ready.
From: tlyu@mit.edu
Subject: CVS Commit
pullup from trunk


To generate a diff of this commit:



cvs diff -r5.168.4.1 -r5.168.4.2 krb5/src/lib/crypto/ChangeLog
cvs diff -r5.20 -r5.20.4.1 krb5/src/lib/crypto/prng.c
cvs diff -r1.17.4.1 -r1.17.4.2 krb5/src/lib/crypto/yarrow/ChangeLog
cvs diff -r1.11 -r1.11.4.1 krb5/src/lib/crypto/yarrow/yarrow.c
cvs diff -r1.3 -r1.3.10.1 krb5/src/lib/crypto/yarrow/ylock.h