Commit Graph

68823 Commits

Author SHA1 Message Date
chris
37a6f9b2be Add new "SECURITY CONSIDERATIONS" sections.
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 21:16:41 +00:00
alc
938cb766b8 o Add missing synchronization (splnet()/splx()) in aio_free_entry().
o Move the definition of struct aiocblist from sys/aio.h to kern/vfs_aio.c.
 o Make aio_swake_cb() static.
2002-01-06 21:03:39 +00:00
imp
57b0798bee s/oferride/override/
submitted by: dima
2002-01-06 20:33:55 +00:00
chris
87f674949f Minor doc nit: Replace contractions with their expanded forms.
Obtained from:	NAI Labs CBOSS Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 20:28:27 +00:00
imp
fa3ec6b20e Add note about new rc.conf for networkfs. Fix typos from PR:33499 2002-01-06 20:18:13 +00:00
mike
8b933e7ce1 Make the utility name in the usage() diagnostic match the actual
utility name.

Submitted by:	3d
PR:		33496
2002-01-06 19:57:26 +00:00
mike
944cba2780 Add support for C++.
Submitted by:	bde
PR:		33590
2002-01-06 19:04:12 +00:00
imp
4e1080d4dc Update length more correctly when parsing a cis info field.
Before, we were using
	while (*p++ && --len > 0);
to do this.  However, len doesn't get decremented for the NUL byte, so when
we used len later to see if we still have CIS left for some optional fields,
we'd run off the end of an array and dump core.

Instead, replace it with
	len -= strlen(p) + 1;
	p += strlen(p) + 1;
which is more correct.  It is a little bogus to assume that p points to
a valid C string, but only a little.  The PC Card SPEC mandates that it
does, and we already depend on that with the use of strdup a few lines
earlier.  Since much of the rest of the cis parsing code isn't hyper
retentive about error checking, I'll leave that level of checking for
another time and/or another committer :-).
2002-01-06 18:03:55 +00:00
bmah
f611e6aa01 MFS: Sync to 4-STABLE...wordsmithing and markup fixes, also mention
manpages as a source for further reading.

	article.sgml	1.1.2.9->1.1.2.10, 1.1.2.11->1.1.2.12
2002-01-06 17:17:55 +00:00
nyan
6d6bb6e826 Merged from sys/dev/sio/sio.c revisions 1.354 and 1.358. 2002-01-06 09:54:50 +00:00
nyan
183d0fe2bf MFi386: revisions 1.382 and 1.386. 2002-01-06 09:47:36 +00:00
nyan
219388b653 Sorted the lists. 2002-01-06 09:46:30 +00:00
kbyanc
2c8c8c3eed Enable WARNS?=2. 2002-01-06 08:47:19 +00:00
kbyanc
362933df23 Document sbuf_trim() and sbuf_vprintf(); add MLINKs.
Clarify that the contents of a caller-supplied buffer are undefined and
should not be examined directly.

Reviewed by:	des
2002-01-06 08:40:42 +00:00
kbyanc
9af9cb3fe9 * Implement SBUF_AUTOEXTEND flag; sbufs created with this flag are
automatically extended to prevent overflow.
 * Added sbuf_vprintf(); sbuf_printf() is now just a wrapper around
   sbuf_vprintf().
 * Include <stdio.h> and <string.h> when building libsbuf to silence
   WARNS=4 warnings.

Reviewed by:	des
2002-01-06 08:38:23 +00:00
silby
719af3e61a Reorder a calculation in sbreserve so that it does not overflow
with multi-megabyte socket buffer sizes.

PR:		7420
MFC after:	3 weeks
2002-01-06 06:50:54 +00:00
kuriyama
978f7cc92e Merge the changes in the English version (1.247 --> 1.248). 2002-01-06 04:30:46 +00:00
archie
8d266cece1 Avoid reentrantly sending on the same socket, which causes a kernel panic. 2002-01-06 01:08:30 +00:00
rwatson
51a1c19396 - Teach SIGIO code to use cr_cansignal() instead of a custom CANSIGIO()
macro.  As a result, mandatory signal delivery policies will be
  applied consistently across the kernel.

- Note that this subtly changes the protection semantics, and we should
  watch out for any resulting breakage.  Previously, delivery of SIGIO
  in this circumstance was limited to situations where the subject was
  privileged, or where one of the subject's (ruid, euid) matched one
  of the object's (ruid, euid).  In the new scenario, subject (ruid, euid)
  are matched against the object's (ruid, svuid), and the object uid's
  must be a subset of the subject uid's.  Likewise, jail now affects
  delivery, and special handling for P_SUGID of the object is present.
  This change can always be reversed or tweaked if it proves to disrupt
  application behavior substantially.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 00:54:46 +00:00
rwatson
6b7ac7804d - Push much of the logic for p_cansignal() behind cr_cansignal, which
authorized based on a subject credential rather than a subject process.
  This will permit the same logic to be reused in situations where only
  the credential generating the signal is available, such as in the
  delivery of SIGIO.
- Because of two clauses, the automatic success against curproc,
  and the session semantics for SIGCONT, not all logic can be pushed
  into cr_cansignal(), but those cases should not apply for most other
  consumers of cr_cansignal().
- This brings the base system inter-process authorization code more
  into line with the MAC implementation.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-06 00:20:12 +00:00
dwmalone
f974b4f783 Release text vnode in exit() rather than wait(). Occasionally
fifesystem problems could prevent the release from completing and
this could result in init being blocked indefinitely.

This was looked over by Matt ages ago.

Approved by:	dillon
2002-01-05 21:47:58 +00:00
chris
49c162fb20 Add a new `SECURITY CONSIDERATIONS' section. Sample code similar to
the first revision of strcpy(3)'s section is included, but should be
removed as the Security Architecture document is committed and
completed.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:44:34 +00:00
chris
fe1ce55be7 Include a section cross-reference to EXAMPLES' in SECURITY
CONSIDERATIONS' as a source for relevant sample code.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:36:47 +00:00
chris
b2713a0da3 Remove the example from SECURITY CONSIDERATIONS. This is mostly
duplicated code from EXAMPLES.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-01-05 20:24:38 +00:00
chris
bcf7f83588 As discussed with Bruce Evans and Kirk McKusick:
o Combine ufs.7 and ffs.7 into a single ffs.7 man page.
o Remove all references to `ufs' as a file system.
o Proper (lack of) capitalization for `ffs'.

Obtained from:	TrustedBSD Project
Sposnored by:	DARPA, NAI Labs
2002-01-05 20:18:35 +00:00
dwmalone
ff2a69a53b Put -Wno-uninitialized at the end of the warns flags as it may be enabeled
by several flags (in this case -W and -Wall).

Reviewed by:	bde
2002-01-05 20:17:50 +00:00
dwmalone
7bc655e785 Be more careful about freeing memory after parsing commands.
Hiroyuki YAMAMORI gave a patch for the EPRT command in the
PR below. Problems with the rest of the patch are my fault.

PR:		33268
Reviewed by:	iedowse, sheldonh
2002-01-05 20:13:01 +00:00
bmah
497b03717c New (but very overdue) release note: ata(4) 48-bit addressing.
MFC noted:  locale renaming.
2002-01-05 18:46:03 +00:00
fenner
1a8ac98fc3 Pre-calculate the checksum for multicast packets sourced on a
multicast router.  This is overkill; it should be possible to
delay to hardware interfaces and only pre-calculate when forwarding
to a tunnel.
2002-01-05 18:23:53 +00:00
dwmalone
48fb74e4c1 Update Judaic for year 2002. Name Josef as maintainer.
PR:		33389
Submitted by:	Josef Grosch <jgrosch@mooseriver.com>
2002-01-05 18:10:19 +00:00
jhb
b8765de1bf Fix a bug where the mutex name wasn't always displayed for processes in
SMTX in utils such as ps and top.  The KI_CTTY flag was assigned to
kinfo_proc->ki_kiflag rather than or'd into the flag, thus clobbering
any flags set earlier, including KI_MTXBLOCK.

Prodding by:	peter
2002-01-05 17:18:59 +00:00
sobomax
49cfbeab2d In the word selection mode don't append newline if the word ends at the
screen boundary.
2002-01-05 16:52:44 +00:00
sos
7d08d56b17 Write the "msinfo" result to stdout instead of stderr 2002-01-05 15:21:05 +00:00
peter
8b9a0acd48 Put the "mtxname" keyword in alphabetical order (t comes after s) so
that the keyword is recognized.
2002-01-05 12:19:51 +00:00
peter
b19d3ea0e2 Convert a bunch of 1 << PCPU_GET(cpuid) to PCPU_GET(cpumask). 2002-01-05 09:41:37 +00:00
peter
5e902a48f6 Fix forward_roundrobin(). It was mistakenly using the cpu number as
though it was a mask.  As a result, we sent AST IPI's to the wrong
cpu and/or left out some.

Spotted by: jake
2002-01-05 09:38:47 +00:00
peter
d0a39cc230 Add a per-cpu variable, cpumask, the preshifted equivalent of 1 << cpuid.
We use this around the place a lot.
2002-01-05 09:35:50 +00:00
jhb
1ce407b675 Change the preemption code for software interrupt thread schedules and
mutex releases to not require flags for the cases when preemption is
not allowed:

The purpose of the MTX_NOSWITCH and SWI_NOSWITCH flags is to prevent
switching to a higher priority thread on mutex releease and swi schedule,
respectively when that switch is not safe.  Now that the critical section
API maintains a per-thread nesting count, the kernel can easily check
whether or not it should switch without relying on flags from the
programmer.  This fixes a few bugs in that all current callers of
swi_sched() used SWI_NOSWITCH, when in fact, only the ones called from
fast interrupt handlers and the swi_sched of softclock needed this flag.
Note that to ensure that swi_sched()'s in clock and fast interrupt
handlers do not switch, these handlers have to be explicitly wrapped
in critical_enter/exit pairs.  Presently, just wrapping the handlers is
sufficient, but in the future with the fully preemptive kernel, the
interrupt must be EOI'd before critical_exit() is called.  (critical_exit()
can switch due to a deferred preemption in a fully preemptive kernel.)

I've tested the changes to the interrupt code on i386 and alpha.  I have
not tested ia64, but the interrupt code is almost identical to the alpha
code, so I expect it will work fine.  PowerPC and ARM do not yet have
interrupt code in the tree so they shouldn't be broken.  Sparc64 is
broken, but that's been ok'd by jake and tmm who will be fixing the
interrupt code for sparc64 shortly.

Reviewed by:	peter
Tested on:	i386, alpha
2002-01-05 08:47:13 +00:00
jhb
2f03379495 Remove brain damaged code in witness_lock(). We could have easily
just used PCPU_GET(spinlocks) w/o needing the w_mtx held.  It is more
correct to just check td_critnest now though.
2002-01-05 08:29:54 +00:00
kuriyama
b95bce7f3b Merge the changes in the English version (1.244 --> 1.247). 2002-01-05 08:01:41 +00:00
archie
cd1ab61208 Add a new flag '-c' to disable repeated line compression when the output
is a pipe to another program, or, if specified twice, in all cases.

PR:	bin/32420
2002-01-05 07:34:52 +00:00
peter
9c8997afd2 GC unfinished function selected_proc_ipi(). It is a duplicate of
apic_ipi_singledest() anyway.
2002-01-05 06:44:27 +00:00
imp
ba7a614d5a Move initialization of the MKMODULESENV envorinoment to kern.pre.mk
from kern.post.mk so port makefiles can augment it.

Submitted by: nyan
2002-01-05 06:21:06 +00:00
bmah
b0bee8fb18 New release notes: SA-02:01, SA-02:02. 2002-01-05 06:07:17 +00:00
jhb
f565bf39a4 Fully catch up to the recent critical section API change. Update the
content of the manpage and document cpu_critical_enter/exit.
2002-01-04 23:56:17 +00:00
bmah
3e1c28c2da We were right the first time...the HPT372 is an ATA133 controller.
Pointed out by:	Kent Stewart <kstewart@owt.com>
2002-01-04 21:55:32 +00:00
yar
53c5b2a4bc Oops, missed one point where $pwd_mkdb had been used.
Now it should be @pwd_mkdb since we moved to Perl's
safe system() not using /bin/sh.
2002-01-04 21:28:32 +00:00
yar
81b5911741 Minor grammar and punctuation fixes
in the SO_ACCEPTFILTER description.
2002-01-04 18:17:07 +00:00
yar
ea2e48c1df State clearly that one should call listen(2) on a socket
at first and try to set an accept_filter(9) on it only after that.
Also document errno value that will be set if installing the
filter on a non-listening socket.
2002-01-04 18:12:38 +00:00
rwatson
46f317e07b o Spelling fix in comment: tcp_ouput -> tcp_output 2002-01-04 17:21:27 +00:00