]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
22 years agoThis commit was generated by cvs2svn to compensate for changes in r81630,
ru [Tue, 14 Aug 2001 15:19:35 +0000 (15:19 +0000)]
This commit was generated by cvs2svn to compensate for changes in r81630,
which included commits to RCS files with non-trunk default branches.

22 years agoFrom ChangeLog:
ru [Tue, 14 Aug 2001 15:19:35 +0000 (15:19 +0000)]
From ChangeLog:

: 2001-08-13  Ruslan Ermilov  <ru@FreeBSD.org>
:
:  * tmac/doc.tmac (Rv): Implement support for 0 or more than 1
:  argument.
:  * tmac/groff_tmac.man: Updated.

All of the following are now valid:

.Rv -std f1
.Rv -std f1 f2
.Rv -std f1 f2 f3
.Rv -std

The last form is useful where the standard return behavior is applicable
to all of the functions described in this particular manpage.  Look, for
example, at the stat(2), setresuid(2), and utimes(2) manpages.

The form with >1 functions is useful in a mixed environment.  See the
fhopen(2) manpage for an example.

Prodded by: yar

22 years agoUse the ".Rv" mdoc(7) macro where appropriate.
yar [Tue, 14 Aug 2001 14:20:35 +0000 (14:20 +0000)]
Use the ".Rv" mdoc(7) macro where appropriate.

Reviewed by: ru

22 years agostyle(9) tweak
obrien [Tue, 14 Aug 2001 14:14:20 +0000 (14:14 +0000)]
style(9) tweak

Approved by: dd

22 years agoIsolate the ERRORS section from the RETURN VALUES one.
yar [Tue, 14 Aug 2001 14:10:01 +0000 (14:10 +0000)]
Isolate the ERRORS section from the RETURN VALUES one.

Reviewed by: ru

22 years agomdoc(7) police: removed final dot from the .Nd call.
ru [Tue, 14 Aug 2001 11:58:07 +0000 (11:58 +0000)]
mdoc(7) police: removed final dot from the .Nd call.

22 years agoFix INT 10:09 (write char) and INT 10:0a (write char and attribute)
tg [Tue, 14 Aug 2001 11:57:14 +0000 (11:57 +0000)]
Fix INT 10:09 (write char) and INT 10:0a (write char and attribute)
when cursor is at the lower right corner.

PR: 29574 29601
Submitted by: Nils M Holm <nmh@t3x.org>

22 years agoMove update of BIOS variable at 0x6c (time counter) completely to timer.c.
tg [Tue, 14 Aug 2001 11:54:37 +0000 (11:54 +0000)]
Move update of BIOS variable at 0x6c (time counter) completely to timer.c.

Suggested by: Igor Serikov <bt@turtle.pangeatech.com>

22 years agomdoc(7) police: s/BSD/.Bx/ where appropriate.
ru [Tue, 14 Aug 2001 10:01:54 +0000 (10:01 +0000)]
mdoc(7) police: s/BSD/.Bx/ where appropriate.

22 years agoFor TI12xx and newer, clear register 0x84. This is the "Multimedia"
imp [Tue, 14 Aug 2001 07:31:47 +0000 (07:31 +0000)]
For TI12xx and newer, clear register 0x84.  This is the "Multimedia"
register.  It enables Zoom Video.  It appears that on at least one
card that Monzoon is using sets these bits by default.  Nothing works
when these bits are set, everything works when they are clear.

Add commentary on some of the ti bits.  Make code a little clearer.
Also remove a call to pcic_pci_pd6729 which was prematurely added in
the last commit.

22 years ago linux ls fails on DEVFS /dev because linux_getdents fails because
phk [Tue, 14 Aug 2001 06:42:32 +0000 (06:42 +0000)]
 linux ls fails on DEVFS /dev because linux_getdents fails because
     linux_getdents uses VOP_READDIR( ..., &ncookies, &cookies ) instead of
     VOP_READDIR( ..., NULL, NULL ) because it seems to need the offsets for
     linux_dirent and sizeof(dirent) != sizeof(linux_dirent)...

PR: 29467
Submitted by: Michael Reifenberger <root@nihil.plaut.de>
Reviewed by: phk

22 years agoAn empty at.deny doesn't mean everyone can use at.
dd [Tue, 14 Aug 2001 06:41:20 +0000 (06:41 +0000)]
An empty at.deny doesn't mean everyone can use at.

PR: 29549
Submitted by: swear@aa.net

22 years agoSync the code that sucks in rc.conf and friends with what's in
dd [Tue, 14 Aug 2001 05:50:19 +0000 (05:50 +0000)]
Sync the code that sucks in rc.conf and friends with what's in
rc.firewall6.  Specifically, don't do anything
if [ -z ${source_rc_confs_defined} ].  Not doing this leads to a problem
with dependencies: chkdepend will set, e.g., portmap_enable to YES if
some service that needs portmap is enabled, but rc.network sources
rc.firewall, which used to source defaults/rc.conf unconditionally,
which would result in portmap_enable being set back to NO.

PR: 29631
Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org>

22 years agoTry to support the Cirrus Logic PD6833 better in pci mode. This is
imp [Tue, 14 Aug 2001 05:31:56 +0000 (05:31 +0000)]
Try to support the Cirrus Logic PD6833 better in pci mode.  This is
done from the datasheets since I'm ahving problems with my laptop that
has the 6833 in it...

Minor rework of TI code.  Should be the same as before.

22 years agoAdd missing commas.
jasone [Tue, 14 Aug 2001 05:10:07 +0000 (05:10 +0000)]
Add missing commas.

22 years agoAdd a GENERIC kernel config for sparc64.
jake [Tue, 14 Aug 2001 03:27:02 +0000 (03:27 +0000)]
Add a GENERIC kernel config for sparc64.

22 years agoAdd some definitions that got left out, *blush*.
jake [Tue, 14 Aug 2001 03:10:41 +0000 (03:10 +0000)]
Add some definitions that got left out, *blush*.

22 years agoDon't define ELF_RTLD_ADDR twice.
jake [Tue, 14 Aug 2001 03:09:19 +0000 (03:09 +0000)]
Don't define ELF_RTLD_ADDR twice.

22 years agoIn prom_halt(), set the halt restart flags on the current CPU, not the
jhb [Mon, 13 Aug 2001 22:44:55 +0000 (22:44 +0000)]
In prom_halt(), set the halt restart flags on the current CPU, not the
boot CPU.  This was the reason reboots on SMP systems could result in
weird hangs.  Unlike the x86, we do not need to switch back to the boot
CPU in order to reboot the machine.  See Section 3.4.5 of Part III
(Console Interface Architecture) from the Alpha Architecture Reference
Manual (aka the Brown Book) for more info.

22 years agoRemove IPI_HALT to make way for a more correct fix for halts and restarts
jhb [Mon, 13 Aug 2001 22:41:15 +0000 (22:41 +0000)]
Remove IPI_HALT to make way for a more correct fix for halts and restarts
on SMP alphas.

22 years agoMinor style nits: cleanup and add some function prototypes.
jhb [Mon, 13 Aug 2001 22:38:36 +0000 (22:38 +0000)]
Minor style nits: cleanup and add some function prototypes.

22 years agoInitialize outfile in main()
peter [Mon, 13 Aug 2001 21:59:04 +0000 (21:59 +0000)]
Initialize outfile in main()

22 years agoInitialize msg in main()
peter [Mon, 13 Aug 2001 21:58:16 +0000 (21:58 +0000)]
Initialize msg in main()

22 years agoInitialize fp in main()
peter [Mon, 13 Aug 2001 21:57:12 +0000 (21:57 +0000)]
Initialize fp in main()

22 years agoInitialize debugf in main()
peter [Mon, 13 Aug 2001 21:56:39 +0000 (21:56 +0000)]
Initialize debugf in main()

22 years agoftrace is already initialized
peter [Mon, 13 Aug 2001 21:56:09 +0000 (21:56 +0000)]
ftrace is already initialized

22 years agomsg_out is already initialized
peter [Mon, 13 Aug 2001 21:55:41 +0000 (21:55 +0000)]
msg_out is already initialized

22 years agoInitialize infp at main()
peter [Mon, 13 Aug 2001 21:55:04 +0000 (21:55 +0000)]
Initialize infp at main()

22 years agoInitialize listf at main()
peter [Mon, 13 Aug 2001 21:54:47 +0000 (21:54 +0000)]
Initialize listf at main()

22 years agoRip out the old __stdin/out/err stuff. It was completely 100% useless. :-(
peter [Mon, 13 Aug 2001 21:48:44 +0000 (21:48 +0000)]
Rip out the old __stdin/out/err stuff. It was completely 100% useless. :-(
It was foiled because of dynamic copy relocations that caused compile-time
space to be reserved in .bss and at run time a blob of data was copied to
that space and everything used the .bss version..  The problem is that
the space is reserved at compile time, not runtime... So we *still* could
not change the size of FILE.  Sigh.  :-(

Replace it with something that does actually work and really does let us
make 'FILE' extendable.  It also happens to be the same as Linux does in
glibc, but has the slight cost of a pointer.  Note that this is the
same cost that 'fp = fopen(), fprintf(fp, ...); fclose(fp);' has.
Fortunately, actual references to stdin/out/err are not all that common
since we have implicit stdin/out/err-using versions of functions
(printf() vs. fprintf()).

22 years agoAdd sx_try_upgrade() and sx_downgrade().
jasone [Mon, 13 Aug 2001 21:25:30 +0000 (21:25 +0000)]
Add sx_try_upgrade() and sx_downgrade().

Submitted by: Alexander Kabaev <ak03@gte.com>

22 years agoRevert part of the 1.11->1.11.1p1 change. Put the blank line back in
peter [Mon, 13 Aug 2001 21:21:13 +0000 (21:21 +0000)]
Revert part of the 1.11->1.11.1p1 change.  Put the blank line back in
the beginning of constructed log messages being passed to $EDITOR.  This
is where folks start typing.

22 years agoFix uninitialized "force" variable.
ache [Mon, 13 Aug 2001 19:43:14 +0000 (19:43 +0000)]
Fix uninitialized "force" variable.

PR: 23203
Submitted by: fenner
Approved by: markm

22 years agoTurn cvs back on. It seems that there's nothing outright broken, but there
peter [Mon, 13 Aug 2001 19:04:26 +0000 (19:04 +0000)]
Turn cvs back on.  It seems that there's nothing outright broken, but there
are some odd things I've run into.. eg: log message formatting, etc.

22 years agoFix an bug in FreeBSD attach routine - attaching MII interfaces before doing
semenu [Mon, 13 Aug 2001 18:37:31 +0000 (18:37 +0000)]
Fix an bug in FreeBSD attach routine - attaching MII interfaces before doing
common_attach is wrong as common attach initialize some fileds used by
mediainit routine. This was hard to notify because loading driver as kld
lead to mediainit routine being called after common_attach, though probe_phy
is called before.

MFC after: 1 week

22 years agoAdd support for 802.1Q VLAN and oversized ethernet frames.
semenu [Mon, 13 Aug 2001 18:32:39 +0000 (18:32 +0000)]
Add support for 802.1Q VLAN and oversized ethernet frames.

PR: kern/29235
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
Reviewed by: Yar Tikhiy <yar@FreeBSD.org>
MFC after: 1 week

22 years agomdoc(7) police: s;BSD/OS;.Bsx; where appropriate.
ru [Mon, 13 Aug 2001 17:07:40 +0000 (17:07 +0000)]
mdoc(7) police: s;BSD/OS;.Bsx; where appropriate.

22 years agomdoc(7) police: s/NetBSD/.Nx/ where appropriate.
ru [Mon, 13 Aug 2001 17:00:36 +0000 (17:00 +0000)]
mdoc(7) police: s/NetBSD/.Nx/ where appropriate.

22 years agomdoc(7) police: s/OpenBSD/.Ox/ where appropriate.
ru [Mon, 13 Aug 2001 16:43:02 +0000 (16:43 +0000)]
mdoc(7) police: s/OpenBSD/.Ox/ where appropriate.

22 years agoSpell "FreeBSD" with "F" and "BSD" in uppercase.
ru [Mon, 13 Aug 2001 16:33:00 +0000 (16:33 +0000)]
Spell "FreeBSD" with "F" and "BSD" in uppercase.

22 years agoRemoved duplicate VCS ID tags, as per style(9).
ru [Mon, 13 Aug 2001 14:06:34 +0000 (14:06 +0000)]
Removed duplicate VCS ID tags, as per style(9).

22 years agoRemove comment, which didn't even help anyway.
asmodai [Mon, 13 Aug 2001 13:29:29 +0000 (13:29 +0000)]
Remove comment, which didn't even help anyway.

Submitted by: bde, long ago

22 years agoUse interrupt gates instead of trap gates for breakpoint and trace
bde [Mon, 13 Aug 2001 13:22:50 +0000 (13:22 +0000)]
Use interrupt gates instead of trap gates for breakpoint and trace
traps, so that ddb can keep control (almost) no matter how it is
entered.  This breaks time-critical interrupts while the system is
stopped in ddb, but I haven't noticed any significant problems except
that applications become confused about the time.  Lost time will be
adjusted for later.  Anyway, the half-baked disabling of interrupts in
Debugger() gives the same problems for the usual way of entering ddb.

22 years agoRemoved he BPTTRAP() macro and its use. It was intended for restoring
bde [Mon, 13 Aug 2001 12:42:13 +0000 (12:42 +0000)]
Removed he BPTTRAP() macro and its use.  It was intended for restoring
bug for bug compatibility to ddb trap handlers after fixing the debugger
trap gates to be interrupt gates, but the fix was never committed.  Now
I want the fix to apply to ddb.

22 years agoFixed minor numbers when there is more than one cy card.
bde [Mon, 13 Aug 2001 10:52:15 +0000 (10:52 +0000)]
Fixed minor numbers when there is more than one cy card.

PR: 19256
Submitted by: initial version by yokota
MFC after: 1 week

22 years agoHonour `TMPDIR' environment variable.
sobomax [Mon, 13 Aug 2001 09:20:15 +0000 (09:20 +0000)]
Honour `TMPDIR' environment variable.

Reviewed by: ru
Approved by: ru
MFC after: 2 weeks

22 years agoUse ttymalloc() instead of a static array of `struct tty'. This will
bde [Mon, 13 Aug 2001 07:00:21 +0000 (07:00 +0000)]
Use ttymalloc() instead of a static array of `struct tty'.  This will
be a regression until `pstat -t' actually understands the results of
ttymalloc().

Submitted by: mostly by yokota

22 years agoFix some bogus strncpy(3) to strlcpy(3) changes I made in the previous
mike [Mon, 13 Aug 2001 05:56:27 +0000 (05:56 +0000)]
Fix some bogus strncpy(3) to strlcpy(3) changes I made in the previous
revision.  <utmp.h> structures don't leave room for a NUL character.
Also fix "UNKNOWN" which should have just been UNKNOWN.

Pointed out by: bde

22 years agoReduce private "lesser known" function redirection to improve clarity.
obrien [Mon, 13 Aug 2001 04:18:30 +0000 (04:18 +0000)]
Reduce private "lesser known" function redirection to improve clarity.

Approved by: jkh

22 years agoUse normal menus instead of radio lists, which seems to be more logical
eric [Sun, 12 Aug 2001 23:40:04 +0000 (23:40 +0000)]
Use normal menus instead of radio lists, which seems to be more logical
after the libdialog changes.

22 years agoCross-reference io(4).
iedowse [Sun, 12 Aug 2001 21:16:41 +0000 (21:16 +0000)]
Cross-reference io(4).

22 years agoUpdate io(4) to match reality following revision 1.42 of
iedowse [Sun, 12 Aug 2001 21:08:34 +0000 (21:08 +0000)]
Update io(4) to match reality following revision 1.42 of
sys/i386/i386/mem.c: only the super-user may open /dev/io
regardless of the device permissions (just 4 years late!).

Also, add cross-reference to i386_{get,set}_ioperm(2).

PR: kern/13359

22 years ago"New" release note: Removal of wd compatability devices from ata(4).
bmah [Sun, 12 Aug 2001 20:58:30 +0000 (20:58 +0000)]
"New" release note:  Removal of wd compatability devices from ata(4).

(The release note entry is new, but the fact it documents is not.)

Submitted by: silby

22 years agoNote MFC of ARIN -> APNIC/RIPE whois(1) queries. While I'm here, add
bmah [Sun, 12 Aug 2001 20:36:44 +0000 (20:36 +0000)]
Note MFC of ARIN -> APNIC/RIPE whois(1) queries.  While I'm here, add
a missing word.

Submitted by: mike

22 years agoRemove whitespace after %. The whitespace was causing strfile to not see
mharo [Sun, 12 Aug 2001 20:32:37 +0000 (20:32 +0000)]
Remove whitespace after %.  The whitespace was causing strfile to not see
the % string section break and thus fortune was producing a rather large
multi-fortune fortune message.

22 years agoRemove the WANT_INSECURE_OPIE option - it is now a default. This is not
markm [Sun, 12 Aug 2001 18:47:56 +0000 (18:47 +0000)]
Remove the WANT_INSECURE_OPIE option - it is now a default. This is not
nearly as ominous as it sounds, and it allows OPIE to be used over SSH
and on xterms.

Requested by: ache
Discussed on: -security

22 years agoo Replace occurrences of strncpy(3) with strlcpy(3); most of
mike [Sun, 12 Aug 2001 17:54:49 +0000 (17:54 +0000)]
o Replace occurrences of strncpy(3) with strlcpy(3); most of
  the uses of it were wrong anyway.
o Always check for NULL returns on strdup(3).
o Fix a possible buffer overflow in strcpy(3).
o Fix a format string vulnerability.
o t->ty_type in stypeof() could be NULL and eventually cause
  a segmentation fault in setenv(3), so check for that.

Eyeballed by: kris
Reviewed by: murray
MFC after: 3 days

22 years agoChagne MASTER_SITE_FREEBSD to MASTER_SITE_FREEBSD_ORG, because
knu [Sun, 12 Aug 2001 17:22:41 +0000 (17:22 +0000)]
Chagne MASTER_SITE_FREEBSD to MASTER_SITE_FREEBSD_ORG, because
MASTER_SITE_FREEBSD is already used in bsd.port.mk for some different
purpose.

22 years agoFix MASTER_SITE_RUBY. The listed master site is obsolete.
knu [Sun, 12 Aug 2001 17:09:19 +0000 (17:09 +0000)]
Fix MASTER_SITE_RUBY.  The listed master site is obsolete.

22 years agoAdd MASTER_SITE_FREEBSD.
knu [Sun, 12 Aug 2001 16:32:05 +0000 (16:32 +0000)]
Add MASTER_SITE_FREEBSD.

22 years agoFix some trivial bugs.
iwasaki [Sun, 12 Aug 2001 08:37:39 +0000 (08:37 +0000)]
Fix some trivial bugs.
 - fix segment limit mis-calculation for GCODE_SEL, GDATA_SEL, GPRIV_SEL,
   LUCODE_SEL and LUDATA_SEL.
 - move `loader(8) metadata' related printf() after cninit().
 - use atop macro (address to pages) for segment limit calculation
   instead of i386_btop macro (bytes to pages).
 - fix style bugs for the declarations of ints.

Reviewed by:    bde, msmith (and arch & audit ML)

22 years agoChange the compute_stats() call to the new devstat_compute_statistics()
ken [Sat, 11 Aug 2001 19:41:56 +0000 (19:41 +0000)]
Change the compute_stats() call to the new devstat_compute_statistics()
interface.

Cast the return of the rest of the printfs in here to void.

Submitted by: "Sergey A. Osokin" <osa@freebsd.org.ru>

22 years agoPreprocess ppp.8.m4 into ppp.8, taking into account any compile time
brian [Sat, 11 Aug 2001 18:27:14 +0000 (18:27 +0000)]
Preprocess ppp.8.m4 into ppp.8, taking into account any compile time
options used to build ppp.

Currently, this is a no-op and only handles LOCALNAT and LOCALRAD cases.

This will be used for the upcoming ipv6 changes, and allows a shared
man page between OpenBSD and FreeBSD.

22 years agoNote MFC of all the I4B stuff.
dd [Sat, 11 Aug 2001 17:55:07 +0000 (17:55 +0000)]
Note MFC of all the I4B stuff.

22 years agoI4B is actually version 1.0.1.
dd [Sat, 11 Aug 2001 17:50:58 +0000 (17:50 +0000)]
I4B is actually version 1.0.1.

22 years agoFill _res.sort_list with harmless entry. sortlist for IPv6/IPv4
ume [Sat, 11 Aug 2001 15:01:12 +0000 (15:01 +0000)]
Fill _res.sort_list with harmless entry.  sortlist for IPv6/IPv4
is stored in _res_ext.sort_list, and sortlist for IPv4 is stored in
_res.sort_list for backward compatibility.  However, both sort_list's
are maintaind by just one index _res.nsort.  So, when IPv6 address is
specified to sortlist, empty entry was created in _res.sort_list.  It
broke sortlist facility of gethostbyname().
Discussed on users@jp.ipv6.org.

22 years agoSet the RUSER for PAM so that (eg) kerberos can set up tickets properly.
markm [Sat, 11 Aug 2001 14:24:13 +0000 (14:24 +0000)]
Set the RUSER for PAM so that (eg) kerberos can set up tickets properly.

22 years agoWARNS=2 type cleanup.
markm [Sat, 11 Aug 2001 14:22:32 +0000 (14:22 +0000)]
WARNS=2 type cleanup.

WARNS=2 cannot be enable because of an unresolvable conflict in arg 2
of execv(). Document this in the Makefile.

Reviewed by: bde (su.c only)

22 years agoFix:
markm [Sat, 11 Aug 2001 12:37:55 +0000 (12:37 +0000)]
Fix:

/usr/src/lib/libpam/modules/pam_ssh/pam_ssh.c has couple of bugs which cause:

1) xdm dumps core
2) ssh1 private key is not passed to ssh-agent
3) ssh2 RSA key seems not handled properly (just a guess from source)
4) ssh_get_authentication_connectionen() fails to get connection because of
   SSH_AUTH_SOCK not defined.

PR: 29609
Submitted by: Takanori Saneto <sanewo@ba2.so-net.ne.jp>

22 years agoAdd sgi_fam 391002, file alteration monitor.
schweikh [Sat, 11 Aug 2001 09:43:04 +0000 (09:43 +0000)]
Add sgi_fam 391002, file alteration monitor.

PR: 25925
Submitted by: Jeremy Norris <ishmael27@home.com>
MFC after: 5 weeks

22 years agoDon't hard-code BINOWN and BINGRP (BINGRP was hard-coded to 'bin', which
kris [Sat, 11 Aug 2001 07:11:14 +0000 (07:11 +0000)]
Don't hard-code BINOWN and BINGRP (BINGRP was hard-coded to 'bin', which
is the wrong value on FreeBSD).

MFC after: 1 week

22 years agoMake the name parameter const char *.
imp [Sat, 11 Aug 2001 05:16:00 +0000 (05:16 +0000)]
Make the name parameter const char *.

22 years agoSomewhere along the way, configSecurityModerate() lost it's "int"
rwatson [Sat, 11 Aug 2001 03:26:52 +0000 (03:26 +0000)]
Somewhere along the way, configSecurityModerate() lost it's "int"
return value.

Spotted by: gratuitous use of diff during MFC process

22 years agoMFCs noted: fsck_msdos(8), kldconfig(8), moused(8) -a.
bmah [Sat, 11 Aug 2001 03:12:38 +0000 (03:12 +0000)]
MFCs noted:  fsck_msdos(8), kldconfig(8), moused(8) -a.

22 years agoNew release note (only about six months late): nmdm(4).
bmah [Sat, 11 Aug 2001 02:49:57 +0000 (02:49 +0000)]
New release note (only about six months late):  nmdm(4).

22 years agoNote: mergemaster stopped being optional a long time ago. Caution against
imp [Sat, 11 Aug 2001 02:03:51 +0000 (02:03 +0000)]
Note: mergemaster stopped being optional a long time ago.  Caution against
doing it by hand (but provide pointers to those wanting to do it by hand).

22 years agoFor consistency with other man pages, fix first appearance.
mp [Sat, 11 Aug 2001 00:59:40 +0000 (00:59 +0000)]
For consistency with other man pages, fix first appearance.

22 years agoDon't call errx() with a variable format string
kris [Sat, 11 Aug 2001 00:49:11 +0000 (00:49 +0000)]
Don't call errx() with a variable format string

MFC after: 1 week

22 years agoRemove unused nmdmpoll function.
mp [Sat, 11 Aug 2001 00:18:15 +0000 (00:18 +0000)]
Remove unused nmdmpoll function.

Approved by: julian

22 years agoo Reduce the number of offered security profiles, as we now have a more
rwatson [Fri, 10 Aug 2001 23:57:43 +0000 (23:57 +0000)]
o Reduce the number of offered security profiles, as we now have a more
  conservative default, and actually prompt specifically for inetd rather
  than handling it as a side effect of the security profile.  Update the
  help file to reflect this change.
o Rename "Fascist" to "Extreme" in the source code, to match the names
  presented to the user.
o Remove portmap and inetd from profile management.  Portmap is now
  disabled by default, but automatically turned on if a feature requires
  it (such as NFS, etc).

This is an MFC candidate for 4.4-RELEASE.

Reviewed by: freebsd-arch@FreeBSD.org
Approved by: re@FreeBSD.org
MFC after: 2 days

22 years agoIf we've panic'd already, then just bail in lockmgr rather than blocking or
jhb [Fri, 10 Aug 2001 23:29:15 +0000 (23:29 +0000)]
If we've panic'd already, then just bail in lockmgr rather than blocking or
possibly panic'ing again.

22 years agoMake the protoswitch definitiosn checkable in the same way that
julian [Fri, 10 Aug 2001 23:17:22 +0000 (23:17 +0000)]
Make the protoswitch definitiosn checkable in the same way that
cdevsw entries have been for a long time.
Discover that we now have two version sof the same structure.
I will shoot one of them shortly when I figure out why someone thinks
they need it. (And I can prove they don't)
(netinet/ipprotosw.h should GO AWAY)

22 years agoFix some of the GDB linkage setup. The l_name member of the gdb linkage
wpaul [Fri, 10 Aug 2001 23:15:13 +0000 (23:15 +0000)]
Fix some of the GDB linkage setup. The l_name member of the gdb linkage
structure is always free()ed yet only sometimes malloc()ed. In particular,
it was simply set to point to l_filename from the a linker_file_t in
link_elf_link_preload_finish(). The l_filename had been malloc()ed inside
the kern_linker.c module and was being free()ed twice: once by
link_elf_unload_file() and again by linker_file_unload(), leading to
a panic.

How to duplicate the problem:

- Pre-load a kernel module from the loader, i.e. if_sis.ko
- Boot system
- Attempt to unload module with kldunload if_sis
- Bewm

The problem here is that the case where the module was loaded with kldload
after system boot would work correctly, so this bug went unnoticed until
I stubbed my toe on it just now. (Also, you can only trip this bug if
you compile a kernel with options DDB, but that's the default now.)

Fix: remember to malloc() a separate copy of the module name for the
l_name member of the gdb linkage structure in three places where the
linkage structure can be initialized.

22 years agoMark some functions as __printflike()
kris [Fri, 10 Aug 2001 23:12:10 +0000 (23:12 +0000)]
Mark some functions as __printflike()

MFC After: 1 week

22 years agoAdd an optimization where we check hte PS_ASTPENDING and PS_NEEDRESCHED
jhb [Fri, 10 Aug 2001 23:00:07 +0000 (23:00 +0000)]
Add an optimization where we check hte PS_ASTPENDING and PS_NEEDRESCHED
flags with interrupts disabled to see if we should call ast() during
doreti.  This was mostly submitted by Bruce, but his original patch did
the looping in ast() in assembly rather than in the ast() function itself.
Once we've actually called into the ast() function, it's cheaper to just
loop inside the function rather than returning from the function,
performing the check, and then calling the function again.  However, we
can optimize the first check to avoid calling the function at all.
Other architectures may choose to implement this optimization if they
wish but it is not required for correct operation.

Submitted by: bde

22 years ago- Close races with signals and other AST's being triggered while we are in
jhb [Fri, 10 Aug 2001 22:53:32 +0000 (22:53 +0000)]
- Close races with signals and other AST's being triggered while we are in
  the process of exiting the kernel.  The ast() function now loops as long
  as the PS_ASTPENDING or PS_NEEDRESCHED flags are set.  It returns with
  preemption disabled so that any further AST's that arrive via an
  interrupt will be delayed until the low-level MD code returns to user
  mode.
- Use u_int's to store the tick counts for profiling purposes so that we
  do not need sched_lock just to read p_sticks.  This also closes a
  problem where the call to addupc_task() could screw up the arithmetic
  due to non-atomic reads of p_sticks.
- Axe need_proftick(), aston(), astoff(), astpending(), need_resched(),
  clear_resched(), and resched_wanted() in favor of direct bit operations
  on p_sflag.
- Fix up locking with sched_lock some.  In addupc_intr(), use sched_lock
  to ensure pr_addr and pr_ticks are updated atomically with setting
  PS_OWEUPC.  In ast() we clear pr_ticks atomically with clearing
  PS_OWEUPC.  We also do not grab the lock just to test a flag.
- Simplify the handling of Giant in ast() slightly.

Reviewed by: bde (mostly)

22 years agoMake witness compile w/o DDB.
jhb [Fri, 10 Aug 2001 22:33:59 +0000 (22:33 +0000)]
Make witness compile w/o DDB.

Reported by: wpaul

22 years agoStyle cleanup.
obrien [Fri, 10 Aug 2001 22:31:05 +0000 (22:31 +0000)]
Style cleanup.

22 years agoArbitrarily limit to 64k the number of bytes that can be read at
iedowse [Fri, 10 Aug 2001 22:14:18 +0000 (22:14 +0000)]
Arbitrarily limit to 64k the number of bytes that can be read at
a time using the ogetdirentries() compatibility syscall. This is a
hack to ensure that rediculous values don't get passed to MALLOC().

Reviewed by: kris

22 years agoTypo
imp [Fri, 10 Aug 2001 21:32:53 +0000 (21:32 +0000)]
Typo

22 years agoClose a </sect1> and add a line of whitespace, discovered during
bmah [Fri, 10 Aug 2001 21:18:35 +0000 (21:18 +0000)]
Close a </sect1> and add a line of whitespace, discovered during
MFC of 1.3->1.4 delta.

22 years agoWork around a race between msleep() and endtsleep() where it was possible
jhb [Fri, 10 Aug 2001 21:08:56 +0000 (21:08 +0000)]
Work around a race between msleep() and endtsleep() where it was possible
for endtsleep() to be executing when msleep() resumed, for endtsleep()
to spin on sched_lock long enough for the other process to loop on
msleep() and sleep again resulting in endtsleep() waking up the "wrong"
msleep.

Obtained from: BSD/OS

22 years agoChange callout_stop() to return an integer. If callout_stop() succeeds in
jhb [Fri, 10 Aug 2001 21:06:59 +0000 (21:06 +0000)]
Change callout_stop() to return an integer.  If callout_stop() succeeds in
removing the callout entry, return 1.  If callout_stop() fails to remove
the callout entry because it is currently executing or has already been
executed, then the function returns 0.  The idea was obtained from BSD/OS,
however, BSD/OS changed untimeout(), and I've just changed callout_stop()
to be more conservative.

Obtained from: BSD/OS

22 years agoStyle nit: covert a couple of if (p_wchan) tests to if (p_wchan != NULL).
jhb [Fri, 10 Aug 2001 20:56:25 +0000 (20:56 +0000)]
Style nit: covert a couple of if (p_wchan) tests to if (p_wchan != NULL).

22 years agoUse .Fn, .Fa, and .Dv where appropriate.
dd [Fri, 10 Aug 2001 20:49:38 +0000 (20:49 +0000)]
Use .Fn, .Fa, and .Dv where appropriate.

22 years agoClean up this module very extensively. Fix the logging, the coding
markm [Fri, 10 Aug 2001 19:24:34 +0000 (19:24 +0000)]
Clean up this module very extensively. Fix the logging, the coding
standards and the option handling. This module is now much more easy
to maintain as a part of the FreeBSD tree.

22 years agoCode clean up; make logging same as other modules and fix warnings.
markm [Fri, 10 Aug 2001 19:21:45 +0000 (19:21 +0000)]
Code clean up; make logging same as other modules and fix warnings.

22 years agoGeneral code clean-up. Sort out warnings, and make the warning and
markm [Fri, 10 Aug 2001 19:18:52 +0000 (19:18 +0000)]
General code clean-up. Sort out warnings, and make the warning and
logging work the same as other modules.

22 years agoSimplify code. Also verbose logging, verbose overridable error reporting.
markm [Fri, 10 Aug 2001 19:15:48 +0000 (19:15 +0000)]
Simplify code. Also verbose logging, verbose overridable error reporting.

22 years agoVerbose logging, overridable verbose error reporting.
markm [Fri, 10 Aug 2001 19:12:59 +0000 (19:12 +0000)]
Verbose logging, overridable verbose error reporting.