Closed Bug 309576 Opened 19 years ago Closed 19 years ago

Softtoken and SSL libraries should link directly with freebl

Categories

(NSS :: Libraries, defect)

3.10
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: saul.edwards.bugs, Assigned: saul.edwards.bugs)

Details

Attachments

(1 file)

Although this bug is related to the checkins from bug 303508, I wanted to start
a new bug because that one has too many attachments and comments.

The advantages of linking directly to freebl rather than using loader.c, which
is currently linked directly into the libraries, are:
1.) Performance.  With loader, each call to a freebl function must first resolve
into a stub in ldvector.c.  Each instruction in the ldvector function is
additional overhead compared to direct linking.
2.) Eliminating loader would simplify solutions to the setuid problems described
in bugs such as 274984.
Surprisingly, my tests show that in optimized builds, when we remove
loader/ldvector code from the picture, the performance is virtually identical. 
In fact, some tests showed a small but measurable performance degradation with
loader removed.

Since I have a preexisting installation on Solaris 10 AMD64, I used a popular
webserver benchmark for the comparison:

Use loader: 5083 ops/sec
No loader : 5050 ops/sec

For Solaris Sparc 32-bit ABI with FPU arithmetic, I used selfserv and strsclnt
on a v440 at 1.06 GHz.
With loader:
No  restart handshakes: 500 handshakes/sec
All restart handshakes: 986 handshakes/sec
Without loader:
No  restart handshakes: 501 handshakes/sec
All restart handshakes: 982 handshakes/sec

Based on these numbers, I can't really recommend eliminating loader for
performance reasons.  A further impediment to this solution is that export
control must approve of exposing the freebl functions in its mapfile.  I will
mark this bug as WONTFIX.  The data is still useful to have around to remind us
later of why we made this decision.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WONTFIX
Note: the attached patch is only for testing the upper bound of possible
performance improvements from linking directly to freebl, using filter libraries
on Solaris Sparc and HPUX.  It is not for checkin.  Please do not review.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: