Commit Graph

126979 Commits

Author SHA1 Message Date
Andrey A. Chernov
d3ff3b5f2f Keep compatible parts in sync with OpenBSD v1.21, add some comments.
No functional changes.
2006-09-23 14:48:31 +00:00
Martin Blapp
153c21c8c1 If /dev/tty gets opened after your controlling terminal has been revoked
you can't call tty_clone afterwords. OpenBSD and NetBSD both fail the
open call in that case, so we should do so as well. This can
be done in ctty_clone by returning with *dev==NULL. Admittedly this
causes open to return ENOENT, instead of ENXIO as on the other BSDs,
but this way requires the least touching of code.

Submitted by:  Nate Eldredge <nge@cs.hmc.edu>
PR:            83375

MFC:           1 week
2006-09-23 14:44:14 +00:00
David Xu
07a8ebcc75 Stop reloading %fs and %gs, since it causes the base address from
GDT to be loaded into FS.base and GS.base, these values of course
are not the values set by sysarch() with I386_SET_FSBASE and
I386_SET_GSBASE, the change fixed a crash for 32bit libthr after
signal handler returned and normal code is accessing thread pointer,
for example: movl %gs:8, %eax.
2006-09-23 13:42:09 +00:00
Robert Watson
5bae3124ab Add a -a argument to id(1), which causes id(1) to print out process
audit properties, including the audit user id.  This can be quite
helpful in debugging audit problems.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2006-09-23 12:30:31 +00:00
David Xu
4af4fcb71a Regenerate. 2006-09-23 00:27:53 +00:00
David Xu
5c26f4cea8 Enable sigwait. 2006-09-23 00:27:11 +00:00
John Baldwin
157f14ae25 Map pmap_{un,}mapbios() to pmap_{un,}mapdev() on 6.x and earlier. 2006-09-22 22:16:20 +00:00
John Baldwin
d72a078647 Update the ipmi(4) driver:
- Split out the communication protocols into their own files and use
  a couple of function pointers in the softc that the commuication
  protocols setup in their own attach routine.
- Add support for the SSIF interface (talking to IPMI over SMBus).
- Add an ACPI attachment.
- Add a PCI attachment that attaches to devices with the IPMI interface
  subclass.
- Split the ISA attachment out into its own file: ipmi_isa.c.
- Change the code to probe the SMBIOS table for an IPMI entry to just use
  pmap_mapbios() to map the table in rather than trying to setup a fake
  resource on an isa device and then activating the resource to map in the
  table.
- Make bus attachments leaner by adding attach functions for each
  communication interface (ipmi_kcs_attach(), ipmi_smic_attach(), etc.)
  that setup per-interface data.
- Formalize the model used by the driver to handle requests by adding an
  explicit struct ipmi_request object that holds the state of a given
  request and reply for the entire lifetime of the request.  By bundling
  the request into an object, it is easier to add retry logic to the various
  communication backends (as well as eventually support BT mode which uses
  a slightly different message format than KCS, SMIC, and SSIF).
- Add a per-softc lock and remove D_NEEDGIANT as the driver is now MPSAFE.
- Add 32-bit compatibility ioctl shims so you can use a 32-bit ipmitool
  on FreeBSD/amd64.
- Add ipmi(4) to i386 and amd64 NOTES.

Submitted by:	ambrisko (large portions of 2 and 3)
Sponsored by:	IronPort Systems, Yahoo!
MFC after:	6 days
2006-09-22 22:11:29 +00:00
Andrew Thompson
0a6f8a5050 Revert r1.80 as the ethernet header was inadvertently stripped from ARP
packets. Reimplement this correctly and use a sysctl that defaults to off so
the user doesnt get any suprises if ipfw blocks the ARP packet.

MFC after:	3 days
2006-09-22 21:57:52 +00:00
Ruslan Ermilov
43e5f4b8cd Update a comment about M_VLANTAG. 2006-09-22 19:50:04 +00:00
Andrey A. Chernov
6843acf8ac Remove code #ifndef'ed in prev. commit to stay in sync with OpenBSD
v1.21 which just do that.
2006-09-22 18:59:03 +00:00
Andrey A. Chernov
f27c7b4713 Be more GNU compatible:
don't be greedy on the GNU "::" extension when arg separated by whitespace
and POSIX_CORRECTLY is set. From POSIX point of view this is unclear
situation, so minimal assumption looks right.
2006-09-22 17:01:38 +00:00
Bruce M Simpson
4a75dc2585 Fix a case where socket I/O atomicity is violated due to not dropping
the entire record when a non-data mbuf is removed in the soreceive() path.
This only triggers a panic directly when compiled with INVARIANTS.

PR:		38495
Submitted by:	James Juran
MFC after:	1 week
2006-09-22 15:34:16 +00:00
Alexander Kabaev
2972ed120b Reduce diffs with file generated by FSF configure. 2006-09-22 15:08:07 +00:00
David Xu
ac3674aa52 Regenerate. 2006-09-22 15:05:34 +00:00
David Xu
cda9a0d1c2 Add compatible code to let 32bit libthr work on 64bit kernel. 2006-09-22 15:04:28 +00:00
David Xu
e58b17ea53 Fix umtx command order error for freebsd 32bit. 2006-09-22 14:59:10 +00:00
Olivier Houchard
b098674792 Use usbd_clear_endpoint_stall_async() when clearing endpoint stalls in
an interrupt context.

Obtained from:	NetBSD
MFC after:	1 week
2006-09-22 12:45:42 +00:00
Alan Cox
6b5e9c85b0 The fix in revision 1.152 converted in the wrong direction.
Fix a typo in a comment.

Submitted by: Michael Plass
2006-09-22 07:16:36 +00:00
Alan Cox
b8a4b36974 The sparc64/sparc64/pmap.c implementations of pmap_remove(),
pmap_protect(), and pmap_copy() have optimizations for regions
larger than PMAP_TSB_THRESH (which works out to 16MB).  This
caused a panic in tsb_foreach for kernel mappings, since
pm->pm_tsb is NULL in that case.  This fix teaches tsb_foreach
to use the kernel's tsb in that case.

Submitted by: Michael Plass
MFC after: 3 days
2006-09-22 07:02:15 +00:00
Alexander Kabaev
714b79b953 Do not declare __evOptMonoTime static in one place and extern
in another. GCC4 does not like that.
2006-09-22 01:52:26 +00:00
SUZUKI Shinsuke
831c32014e fixed a bug that IPv6 packets arriving to stf are not accepted.
(a degrade introduced in in6.c Rev 1.61)

PR: kern/103415
Submitted by: JINMEI Tatuya
MFC after: 1 week
2006-09-22 01:42:22 +00:00
SUZUKI Shinsuke
8343821b87 fixed a bug that local IPv6 traffic (to an address configured on an
interface other than lo0) does not show up properly on any bpf.

Reported by: mlaier
Reviewed by: gnn, csjp
MFC after: 1 week
2006-09-22 01:31:22 +00:00
David Xu
27bbb2e71f Regenerate. 2006-09-22 00:53:43 +00:00
David Xu
1eec02f538 Add umtx support for 32bit process on AMD64 machine. 2006-09-22 00:52:54 +00:00
Julian Elischer
8d2b600b3e Slight tunups to the config files. 2006-09-21 22:17:04 +00:00
Matt Jacob
4542a3798e Connect up a QUEUE FULL event with CAM and adjust openings.
Unfortunately, the QUEUE FULL event only tells you Bus && Target.
It doesn't tell you lun. In order for the XPT_REL_SIMQ action to
work, we have to have a real lun. But which one? For now, just
iterate over MPT_MAX_LUNS.

Practically speaking, this is only going to be happening for lower
quality SAS or SATA drives behind the SAS controller, which means
only lun 0, so it's not so bad.

Helpful Reminder Nagging from: John Baldwin, Fred Whiteside

MFC after:	5 days
2006-09-21 20:35:12 +00:00
Andre Oppermann
ba04adb0f9 Move the initialization of the hardware capabilities in em_init_locked()
before em_setup_transmit_structures() as it needs this information to
properly set up TSO parameters.

Reviewed by:	jfv
2006-09-21 19:14:51 +00:00
John Baldwin
e7a975adbe Fix a sign bug in acpi_release_resource(). acpi_sysres_find() returns !=
NULL if the specified resource is a sub-alloc of a system resource.
2006-09-21 18:56:03 +00:00
Alexander Kabaev
24c2567f03 Do not bypass WARNS machinery by hadcoding -Werror into CFLAGS. 2006-09-21 18:16:22 +00:00
Maksim Yevmenkin
6e9bee6438 Pacify new GCC4 warnings.
Submitted by:	kan
MFC after:	1 week
2006-09-21 17:16:37 +00:00
Robert Watson
827f0e85a6 Regenerate. 2006-09-21 16:20:38 +00:00
Robert Watson
e6f188152c Use AUE_CREAT instead of AUE_O_CREAT for linux_creat().
Obtained from:	TrustedBSD Project
2006-09-21 16:18:33 +00:00
Robert Watson
753a5e888c Regenerate. 2006-09-21 16:13:16 +00:00
Robert Watson
b5ca51459a Use AUE_GETDIRENTRIES instead of AUE_O_GETDENTS and AUE_NULL for a number
of directory reading system calls.

Respell a mis-spelled event name.

Clean up white space/line wraps in a couple of places.

Assign event numbers to some new system call entries that have turned
up in the list since audit support was added.

Obtained from:	TrustedBSD Project
2006-09-21 16:12:58 +00:00
Alexander Kabaev
500b77c7ed Use correct type in va_arg argument. 2006-09-21 14:40:20 +00:00
Brooks Davis
cf81114dc4 network_ipv6 also does some interface configuration so require it to run
before starting devd so they don't trip over each other.

PR:		conf/103428
2006-09-21 14:29:32 +00:00
Martin Blapp
1c1d411bee Back out rev. 1.258. The real race cause has been fixed
in rev. 1.241 of kern_proc.c.

Requested by:	jhb
2006-09-21 14:09:26 +00:00
Randall Stewart
adf5d1c6d0 atomic_fetchadd_int is used by mb_free_ext(), but it
returns the previous value that the "add" effected (In
this case we are adding -1), afterwhich we compare it
to '0'... to see if we free the mbuf... we should
be comparing it to '1'... Note that this only effects
when there is contention since there is a first part
to the comparison that checks to see if its '1'. So
this bug would only crop up if two CPU's are trying
to free the same mbuf refcount at the same time. This
will happen in SCTP but I doubt can happen in TCP or
UDP.
PR:		N/A
Submitted by:	rrs
Reviewed by:	gnn,sam
Approved by:	gnn,sam
2006-09-21 09:55:43 +00:00
Ruslan Ermilov
f981f1923b Removed these from HEAD as well. 2006-09-21 07:55:28 +00:00
Ruslan Ermilov
5bb8cebbb4 This commit was generated by cvs2svn to compensate for changes in r162512,
which included commits to RCS files with non-trunk default branches.
2006-09-21 07:54:02 +00:00
Ruslan Ermilov
f6b0ef28b7 Prepare to pick up manpages from their new location. 2006-09-21 07:52:41 +00:00
Ruslan Ermilov
83cc3b492f This commit was generated by cvs2svn to compensate for changes in r162509,
which included commits to RCS files with non-trunk default branches.
2006-09-21 07:45:37 +00:00
Ruslan Ermilov
932b1e2fe8 Updated manpages for 3.4.6 release.
OK'ed by:	kan
Obtained from:	gcc-3.4.6.tar.bz2
2006-09-21 07:45:37 +00:00
Robert Watson
2ecf07cb25 Merge OpenBSM 1.0 alpha 11 changes into src/sys/bsm and src/sys/security;
primarily, add new event identifiers and update trigger names.

Obtained from:	TrustedBSD Project
2006-09-21 07:27:02 +00:00
Robert Watson
5bf75b12ba Update config.h for OpenBSM 1.0 alpha 11 import: strlcat is now detected
by configure.
2006-09-21 07:14:41 +00:00
Robert Watson
2a62e5451b Resolve conflicts from OpenBSM 1.0 alpha 11 vendor import: we have locally
added $FreeBSD$ to /etc configuration files to assist mergemaster.
2006-09-21 07:12:33 +00:00
Robert Watson
55b15aaa25 This commit was generated by cvs2svn to compensate for changes in r162503,
which included commits to RCS files with non-trunk default branches.
2006-09-21 07:07:33 +00:00
Robert Watson
bb97b41819 Vendor import of OpenBSM 1.0 alpha 11, with the following change history
notes since the last import:

OpenBSM 1.0 alpha 11

- Reclassify certain read/write operations as having no class rather than the
  fr/fw class; our default classes audit intent (open) not operations (read,
  write).
- Introduce AUE_SYSCTL_WRITE event so that BSD/Darwin systems can audit reads
  and writes of sysctls as separate events.  Add additional kernel
  environment and jail events for FreeBSD.
- Break AUDIT_TRIGGER_OPEN_NEW into two events, AUDIT_TRIGGER_ROTATE_USER
  (issued by the user audit(8) tool) and AUDIT_TRIGGER_ROTATE_KERNEL (issued
  by the kernel audit implementation) so that they can be distinguished.
- Disable rate limiting of rotate requests; as the kernel doesn't retransmit
  a dropped request, the log file will otherwise grow indefinitely if the
  trigger is dropped.
- Improve auditd debugging output.
- Fix a number of threading related bugs in audit_control file reading
  routines.
- Add APIs au_poltostr() and au_strtopol() to convert between text
  representations of audit_control policy flags and the flags passed to
  auditon(A_SETPOLICY) and retrieved from auditon(A_GETPOLICY).
- Add API getacpol() to return the 'policy:' entry from audit_control, an
  extension to the Solaris file format to allow specification of policy
  persistent flags.
- Update audump to print the audit_control policy field.
- Update auditd to read the audit_control policy field and set the kernel
  policy to match it when configuring/reconfiguring.  Remove the -s and -h
  arguments as these policies are now set via the configuration file.  If a
  policy line is not found in the configuration file, continue with the
  current default of setting AUDIT_CNT.
- Fix bugs in the parsing of large execve(2) arguments and environmental
  variable tokens; increase maximum parsed argument and variable count.
- configure now detects strlcat(), used by policy-related functions.
- Reference token and record sample files added to test tree.

Obtained from:	TrustedBSD Project
2006-09-21 07:07:33 +00:00
David Xu
ecc313475b Regenerate. 2006-09-21 04:50:38 +00:00