Sam Leffler [Fri, 4 Oct 2002 20:31:23 +0000 (20:31 +0000)]
In-kernel crypto framework derived from openbsd. This facility provides
a consistent interface to h/w and s/w crypto algorithms for use by the
kernel and (for h/w at least) by user-mode apps. Access for user-level
code is through a /dev/crypto device that'll eventually be used by openssl
to (potentially) accelerate many applications. Coming soon is an IPsec
that makes use of this service to accelerate ESP, AH, and IPCOMP protocols.
Included here is the "core" crypto support, /dev/crypto driver, various
crypto algorithms that are not already present in the KAME crypto area,
and support routines used by crypto device drivers.
John Baldwin [Fri, 4 Oct 2002 20:19:36 +0000 (20:19 +0000)]
Fix a bogon in previous commit. bcopy() from the malloc'd memory that we
already copied into, rather than doing the bcopy() from the userland
pointer. "Oops."
Daniel Eischen [Fri, 4 Oct 2002 14:50:55 +0000 (14:50 +0000)]
Add another temporary hack to allow running older i386 binaries.
This will be removed when new versions of syscalls sigreturn()
and sigaction() are added (mini is working on this but is in
the middle of a move).
Unhook the SCSI CD driver from the disk "mini-layer" and/or GEOM.
SCSI disks are too square pegs for the round holes in both of these.
And since atapi-cd has clearly shown that there are better acccess
models for CD media than trying to pretend to be a classical disk,
we stop the masquerade rather than patch up the costume.
But do implement the DIOCGMEDIASIZE and DIOCGSECTORSIZE so it will
be possible to manually attach to GEOM, should some the need arise.
Ideally, this driver should do media-detection and call make_dev()
when a CD is inserted and destroy_dev() when it is removed, this
would allow our future devd(8) to automount etc etc but coding that
takes SCSI-clue beyond anything I posses.
Bruce Evans [Fri, 4 Oct 2002 12:54:36 +0000 (12:54 +0000)]
Use the -mno-align-long-strings on i386's to debloat the kernel a little.
This reduces the size of GENERIC's text space by 73999 bytes (about 2%).
The bloat is from approximately 3437 strings longer than 31 characters
being padded to a 32-byte boundary.
Ok, concensus was to install libexpat under a "private brandname", and after
some deliberation the name "libbsdxml" was chosen since it conveys the two
most important attributes: "Private to FreeBSD" and "XML".
Add a skeleton man-page to give the credit and point for further
documentation. (If somebody wants to write a true mdoc manpage for
this I am sure both the eXpat people and I will be grateful).
Tim J. Robbins [Fri, 4 Oct 2002 03:18:26 +0000 (03:18 +0000)]
Add a placeholder implementation of wcscoll() and wcsxfrm() which gives
locale-sensitive collation only in single-byte locales, and just does
binary comparison for the others with extended character sets.
Garrett Wollman [Fri, 4 Oct 2002 03:06:16 +0000 (03:06 +0000)]
Yesterday, FreeBSD-current ate my disklabel.
Today, I wrote a program to tell me where the partitions used to be.
Now I have my /media filesystem back.
Peter Wemm [Fri, 4 Oct 2002 01:31:39 +0000 (01:31 +0000)]
Add some unspeakable hackery to the tree under #ifdef __ia64__ to work
around limitations in the ia64 kernel stack handling code. Basically
preallocate a bunch of threads (and hence kstacks) while contigmalloc()
still works, and never free them back to the general memory pool. After
the system has been running for a while, contigmalloc() eventually fails
at a critical momemt and panics the system.
Peter Wemm [Fri, 4 Oct 2002 01:00:35 +0000 (01:00 +0000)]
Do a bit of rude hackery to get clock interrupts on all CPUs. This
is partly based on the Alpha system which duplicates the clock to
each cpu, instead of doing a clock roundrobin like on i386. This means
we get hz * ncpu clocks per second and so we have to seperate clock
sampling from actual 'do the work' clock processing. The BSP runs the
complete processing, the rest just sample state etc.
Using the on-cpu interval timer is not ideal as it will drift. There
is more to be done here, we should use an external clock source.
Peter Wemm [Fri, 4 Oct 2002 00:24:31 +0000 (00:24 +0000)]
Drop login.c and logwtmp.c from the library build. None of the apps
that we build use it, and any that do should be using the official
login()/logwtmp() in libutil.
Robert Watson [Thu, 3 Oct 2002 21:50:37 +0000 (21:50 +0000)]
Correct a problem wherein NFS servers running NFSv2 would not return
certain classes of failure responses to the client during a failed
remove operation.
Peter Wemm [Thu, 3 Oct 2002 20:30:09 +0000 (20:30 +0000)]
Move swblk_t from sys/types.h to sys/dmap.h, the only include that uses
it. It's also only used in vm/vm_swap.c, but that is also the only source
file that #include's <sys/dmap.h>. sys/dmap.h could probably be embedded
entirely in vm_swap.c since that is the only consumer of it.
Mike Barcroft [Thu, 3 Oct 2002 18:34:13 +0000 (18:34 +0000)]
Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tabs in typedef and #define.
o Reversed comment for #endif.
Hajimu UMEMOTO [Thu, 3 Oct 2002 17:25:33 +0000 (17:25 +0000)]
Allocate 64K recieve buffer for DNS responses.
Though res_query.c also defines and refers MAXPACKET, it is not
related to ansbuf. So, I didn't touch res_query.c.
Bruce Evans [Thu, 3 Oct 2002 15:00:07 +0000 (15:00 +0000)]
Use a non-bogus type for representing the values of offsets in structs.
off_t is for offsets in files, and it is signed so it was no better
than the original type of int for avoiding warnings from broken lints,
except accidentally on machines like i386's where size_t is smaller
than off_t.
Tim J. Robbins [Thu, 3 Oct 2002 11:23:06 +0000 (11:23 +0000)]
Document towlower() and towupper() in separate manual pages instead of
trying to confusingly document both on the same page. The new manual pages
are based on tolower(3) and toupper(3) instead of the old towlower(3).
Tim J. Robbins [Thu, 3 Oct 2002 11:14:00 +0000 (11:14 +0000)]
Point out that although toupper() and tolower() really accept rune_t's
and not just unsigned char's, callers should use towupper() and towlower()
instead when working with wide characters if portability is a concern.
Don Lewis [Thu, 3 Oct 2002 06:03:26 +0000 (06:03 +0000)]
hashinit() calls MALLOC(), so release the filedesc lock in knote_attach()
before calling hashinit() and relock afterwards, taking care to see that
we don't lose a race.
Juli Mallett [Thu, 3 Oct 2002 04:32:47 +0000 (04:32 +0000)]
In lieu of a good way to prevent every possible looping in make(1), stop
there from being more than 500 processes forked by make(1), to prevent a
forkbomb from happening, in a dumb and mechanical way.
Juli Mallett [Thu, 3 Oct 2002 04:09:00 +0000 (04:09 +0000)]
XXX Add a check for p->p_limit being NULL before dereferencing it. This is
totally bogus but will hide the occurances of access of 0xbc(NULL) which
people have run into lately. This is not a proper fix, just a bandaid, until
the cause of this happening is tracked down and fixed.
Don Lewis [Thu, 3 Oct 2002 02:13:00 +0000 (02:13 +0000)]
In an SMP environment post-Giant it is no longer safe to blindly
dereference the struct sigio pointer without any locking. Change
fgetown() to take a reference to the pointer instead of a copy of the
pointer and call SIGIO_LOCK() before copying the pointer and
dereferencing it.
Mike Barcroft [Wed, 2 Oct 2002 23:25:38 +0000 (23:25 +0000)]
Fix various style(9) bugs:
o Unusual order of #ifndef _FOO_H_, followed by license.
o Missing tab in struct sched_param between type and member name.
o Space used, instead of tab, after #define.
o Reversed comment for #endif.
o Irregular comment block.
o Space used, instead of tab, to seperate return value type from
function name.
o Unordered function prototypes.
John Baldwin [Wed, 2 Oct 2002 20:31:47 +0000 (20:31 +0000)]
Rename the mutex thread and process states to use a more generic 'LOCK'
name instead. (e.g., SLOCK instead of SMTX, TD_ON_LOCK() instead of
TD_ON_MUTEX()) Eventually a turnstile abstraction will be added that
will be shared with mutexes and other types of locks. SLOCK/TDI_LOCK will
be used internally by the turnstile code and will not be specific to
mutexes. Making the change now ensures that turnstiles can be dropped
in at a later date without affecting the ABI of userland applications.