]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoRecord that base/vendor/file/dist@186675 was merged.
David E. O'Brien [Fri, 2 Jan 2009 03:10:55 +0000 (03:10 +0000)]
Record that base/vendor/file/dist@186675 was merged.
Merge base/vendor/file/dist@186675@186690, bringing FILE 4.26 to 8-CURRENT.

15 years agoVirgin import of Christos Zoulas's FILE 4.26.
David E. O'Brien [Fri, 2 Jan 2009 02:57:16 +0000 (02:57 +0000)]
Virgin import of Christos Zoulas's FILE 4.26.

15 years agoOnly check for 'nodev' in fstab if that file exists
Doug Barton [Fri, 2 Jan 2009 00:37:59 +0000 (00:37 +0000)]
Only check for 'nodev' in fstab if that file exists

Submitted by: sam

15 years agoFor IGNORE_FILES delete the version in the TEMPROOT, not the base.
Doug Barton [Fri, 2 Jan 2009 00:02:14 +0000 (00:02 +0000)]
For IGNORE_FILES delete the version in the TEMPROOT, not the base.

Submitted by: clemens fischer <ino-news@spotteswoode.dnsalias.org>

15 years agoRemove an unneeded assertion in libteken.
Ed Schouten [Thu, 1 Jan 2009 23:22:01 +0000 (23:22 +0000)]
Remove an unneeded assertion in libteken.

The cursor is only inside the scrolling region when we are in origin
mode. In that case, it should use originreg instead of scrollreg. It is
completely valid to place the cursor outside the scrolling region.

15 years agoWhite space and comment tweaks.
Robert Watson [Thu, 1 Jan 2009 20:03:22 +0000 (20:03 +0000)]
White space and comment tweaks.

MFC after: 3 weeks

15 years agoTemporary workaround for the limitations of the mbuf flowid field: zero
Robert Watson [Thu, 1 Jan 2009 20:03:01 +0000 (20:03 +0000)]
Temporary workaround for the limitations of the mbuf flowid field: zero
the field in the mbuf constructors, since otherwise we have no way to
tell if they are valid.  In the future, Kip has plans to add a flag
specifically to indicate validity, which is the preferred model.

15 years ago- Currently the PMAP code is laid out to let the kernel TSB cover the
Marius Strobl [Thu, 1 Jan 2009 14:01:21 +0000 (14:01 +0000)]
- Currently the PMAP code is laid out to let the kernel TSB cover the
  whole KVA space using one locked 4MB dTLB entry per GB of physical
  memory. On Cheetah-class machines only the dt16 can hold locked
  entries though, which would be completely consumed for the kernel
  TSB on machines with >= 16GB. Therefore limit the KVA space to use
  no more than half of the lockable dTLB slots, given that we need
  them also for other things.
- Add sanity checks which ensure that we don't exhaust the (lockable)
  TLB slots.

15 years agoReplace syscons terminal renderer by a new renderer that uses libteken.
Ed Schouten [Thu, 1 Jan 2009 13:26:53 +0000 (13:26 +0000)]
Replace syscons terminal renderer by a new renderer that uses libteken.

Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
  do experiments with placing `xterm-color' in /etc/ttys. Because we
  only implement a subset of features of xterm, this may cause
  artifacts. We should consider extending libteken, because in my
  opinion xterm is the way to go. Some missing features:

  - Keypad application mode (DECKPAM)
  - Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
  we cannot go into the debugger anymore if we fail them. I've done
  development of this library almost entirely in userspace. In
  sys/dev/syscons/teken there are two applications that can be helpful
  when debugging the code:

  - teken_demo: a terminal emulator that can be started from a regular
    xterm that emulates a terminal using libteken. This application can
    be very useful to debug any rendering issues.

  - teken_stress: a stress testing application that emulates random
    terminal output. libteken has literally survived multiple terabytes
    of random input.

- libteken also includes support for UTF-8, but unfortunately our input
  layer and font renderer don't support this. If users want to
  experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
  teken.h. If you recompile your kernel or the teken_demo application,
  you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
  syscons renderer, which supports some form of localised input. Maybe
  we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
  years. It hasn't survived the `struct proc' -> `struct thread'
  conversion.

- To prevent confusion among people that want to hack on libteken:
  unlike syscons, the state machines that parse the escape sequences are
  machine generated. This means that if you want to add new escape
  sequences, you have to add an entry to the `sequences' file. This will
  cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
  accident. They should be reported to me, so I can fix them.

Discussed on: current@, hackers@
Discussed with: philip (at 25C3)

15 years agoBack out a non-style(9) change from r186668 to unbreak the kernels.
Bjoern A. Zeeb [Thu, 1 Jan 2009 12:14:39 +0000 (12:14 +0000)]
Back out a non-style(9) change from r186668 to unbreak the kernels.

15 years agoGeneral Improvements
Doug Barton [Thu, 1 Jan 2009 12:09:57 +0000 (12:09 +0000)]
General Improvements
====================
1. List the command line options in a more standard way
2. Improve the explanations of some of the arguments (-A, -D)
3. Add ARCHSTRING and MTREEDB to the example rc file
4. Re-sort some of the examples according to the existing distinction
of "has a command line version" vs. "does not have a command line version"

Document changes for r186678
===========================
1. /usr/src/etc -> /usr/src where needed [1]
2. Add IGNORE_FILES to the example rc [2] (and remove IGNORE_MOTD)
3. Update the EXIT STATUS section for [3] and [4]

Update Copyright and .Dd accordingly

PR: bin/96528 [1]
Submitted by: ru [1]
PR: bin/106642 [2]
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk>
PR: bin/122282 [3]
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> [3]
PR: bin/108183 [4]
Submitted by: Riccardo Torrini <riccardo@torrini.org> [4]

15 years agoMaintenance and updates
Doug Barton [Thu, 1 Jan 2009 11:41:13 +0000 (11:41 +0000)]
Maintenance and updates
=======================
1. Various improvements to the mtree (-U) feature:
a. Seperate the notion of directory and file (user can override db path)
b. Only check for the existence of the mtree file if -U is set
c. Use mktemp to create the new version of the file
d. More safely install the new file
e. Standardize error messages a bit
2. Remove the last of the MAKEDEV stuff (RIP)

New Features
============
1. Switch to using the top level (e.g., /usr/src) Makefile, and specify
that we should use the *.mk files from the source directory instead of
the installed versions. [1][2] This allows easier cross builds and
simplifies (or in some cases permits) upgrading.
2. Check for the deprecated 'nodev' option in /etc/fstab [3]
3. Add support for the IGNORE_FILES variable [4] and deprecate IGNORE_MOTD
accordingly.
4. Before installing a file check to make sure that the target does not
already exist as a directory [5]
5. Check to be sure that the file installed and error out if not

PR: bin/96528 [1]
Submitted by: ru [1]
PR: bin/129639 [2]
Submitted by: sam [2]
PR: bin/122282 [3]
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> [3]
PR: bin/106642 [4]
Submitted by: Henrik Brix Andersen <henrik@brixandersen.dk> [4]
PR: bin/108183 [5]
Submitted by: Riccardo Torrini <riccardo@torrini.org> [5]

15 years agoRevert 184781, 184804, and 184832 (automatic installation of files
Doug Barton [Thu, 1 Jan 2009 10:55:26 +0000 (10:55 +0000)]
Revert 184781, 184804, and 184832 (automatic installation of files
that differ only by VCS Id) for the following reasons:
1. It was added without my consent, review, or even a heads up
2. It is something that I've repeatedly said I do not want, and certainly
do not want as the default
3. It is poorly implemented (much too complex, produces false positives
e.g., /etc/mail/helpfile)

Given that this is a situation that comes up very infrequently (usually
only for a major version upgrade) and can usually be handled simply
enough on a one-off basis, I will once again point out that I think
this is a Bad Idea. I would be willing to consider a better implementation
as an option that is off by default.

15 years agoFlatten the file vendor area.
David E. O'Brien [Thu, 1 Jan 2009 05:39:43 +0000 (05:39 +0000)]
Flatten the file vendor area.
Remove the svn:keywords property from the vendor files.

15 years agoDon't try to read the next Gzip header after we reach the
Tim Kientzle [Thu, 1 Jan 2009 02:29:57 +0000 (02:29 +0000)]
Don't try to read the next Gzip header after we reach the
end of the compressed stream.  This is desirable behavior,
but the implementation here is very broken and causes strange
problems, so disable it for now.

Thanks to Simon L. Nielsen for reporting this problem.

15 years agostyle(9)
David E. O'Brien [Thu, 1 Jan 2009 02:29:17 +0000 (02:29 +0000)]
style(9)

Verfied with: svn diff -x -Bbw file.h showing empty diff

15 years agostyle(9)
David E. O'Brien [Thu, 1 Jan 2009 02:11:01 +0000 (02:11 +0000)]
style(9)
Differences from 'svn diff -x -Bbw' are trivially verifiable as only style(9).

15 years agostyle(9)
David E. O'Brien [Thu, 1 Jan 2009 02:08:56 +0000 (02:08 +0000)]
style(9)

Verified with: svn diff -x -Bbw elf_generic.h elf64.h

15 years agostyle(9)
David E. O'Brien [Thu, 1 Jan 2009 02:07:32 +0000 (02:07 +0000)]
style(9)

Verified with: svn diff -x -Bbw elf_common.h

15 years agoResurrect shared map locks allowing greater concurrency during some map
Alan Cox [Thu, 1 Jan 2009 00:31:46 +0000 (00:31 +0000)]
Resurrect shared map locks allowing greater concurrency during some map
operations, such as page faults.

An earlier version of this change was ...

Reviewed by: kib
Tested by: pho
MFC after: 6 weeks

15 years agoDon't clobber sysctl_root()'s error number.
Ed Schouten [Thu, 1 Jan 2009 00:19:51 +0000 (00:19 +0000)]
Don't clobber sysctl_root()'s error number.

When sysctl() is being called with a buffer that is too small, it will
return ENOMEM. Unfortunately the changes I made the other day sets the
error number to 0, because it just returns the error number of the
copyout(). Revert this part of the change.

15 years agoFix white space botch: use carriage returns rather than tabs.
Robert Watson [Wed, 31 Dec 2008 23:22:45 +0000 (23:22 +0000)]
Fix white space botch: use carriage returns rather than tabs.

15 years agomark discovered neighbors QoS capable if they advertise wme
Sam Leffler [Wed, 31 Dec 2008 21:29:09 +0000 (21:29 +0000)]
mark discovered neighbors QoS capable if they advertise wme

15 years agofollow prevailing style
Sam Leffler [Wed, 31 Dec 2008 21:21:46 +0000 (21:21 +0000)]
follow prevailing style

15 years agoExplicitly tell the users what a "down side" to using the boot manager
Ken Smith [Wed, 31 Dec 2008 20:47:48 +0000 (20:47 +0000)]
Explicitly tell the users what a "down side" to using the boot manager
is, consistently call it the boot manager, and switch the order the
options are presented so no boot manager is first in the list (and
hence more or less the default).

This area will probably be rototilled more before 8.0 comes out.

15 years agoadd some USB scanner IDs for recent Epson multifunction devices.
Luigi Rizzo [Wed, 31 Dec 2008 14:25:14 +0000 (14:25 +0000)]
add some USB scanner IDs for recent Epson multifunction devices.
Add support to uscanner.c for known-working devices
(the same should be done for uscanner2.c).

Waiting for 7.1 to be released before the merge.

MFC after: 3 weeks

15 years agoCommit two files missed in previous commit: hook up audit_bsm_errno.c
Robert Watson [Wed, 31 Dec 2008 13:56:31 +0000 (13:56 +0000)]
Commit two files missed in previous commit: hook up audit_bsm_errno.c
and adapt for kernel build environment.

Obtained from: TrustedBSD Project
Sponsored by: Apple, Inc.

15 years agoCall au_errno_to_bsm() on the errno value passed into au_to_return32()
Robert Watson [Wed, 31 Dec 2008 11:56:35 +0000 (11:56 +0000)]
Call au_errno_to_bsm() on the errno value passed into au_to_return32()
to convert local FreeBSD error numbers into BSM error numbers.

Obtained from: TrustedBSD Project

15 years agoUpdate config.h for OpenBSM 1.1 alpha 4.
Robert Watson [Wed, 31 Dec 2008 11:19:46 +0000 (11:19 +0000)]
Update config.h for OpenBSM 1.1 alpha 4.

15 years agoMerge OpenBSM alpha 4 from OpenBSM vendor branch to head, both
Robert Watson [Wed, 31 Dec 2008 11:12:24 +0000 (11:12 +0000)]
Merge OpenBSM alpha 4 from OpenBSM vendor branch to head, both
contrib/openbsm (svn merge) and src/sys/{bsm,security/audit} (manual
merge).  Add libauditd build parts and add to auditd's linkage;
force libbsm to build before libauditd.

OpenBSM history for imported revisions below for reference.

MFC after:      1 month
Sponsored by:   Apple Inc.
Obtained from:  TrustedBSD Project

OpenBSM 1.1 alpha 4

- With the addition of BSM error number mapping, we also need to map the
  local error number passed to audit_submit(3) to a BSM error number,
  rather than have the caller perform that conversion.
- Reallocate user audit events to avoid collisions with Solaris; adopt a
  more formal allocation scheme, and add some events allocated in Solaris
  that will be of immediate use on other platforms.
- Add an event for Calife.
- Add au_strerror(3), which allows generating strings for BSM errors
  directly, rather than requiring applications to map to the local error
  space, which might not be able to entirely represent the BSM error
  number space.
- Major auditd rewrite for launchd(8) support.  Add libauditd library
  that is shared between launchd and auditd.
- Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for
  (re)starting auditing under launchd(8) on Mac OS X.
- Add 'current' symlink to active audit trail.
- Add crash recovery of previous audit trail file when detected on audit
  startup that it has not been properly terminated.
- Add the event AUE_audit_recovery to indicated when an audit trail file
  has been recovered from not being properly terminated.  This event is
  stored in the new audit trail file and includes the path of recovered
  audit trail file.
- Mac OS X and FreeBSD dependent code in auditd.c is separated into
  auditd_darwin.c and auditd_fbsd.c files.
- Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system
  calls.
- For Mac OS X, we use ASL(3) instead of syslog(3) for logging.
- Add support for NOTICE level logging.

OpenBSM 1.1 alpha 3

- Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map
  between BSM error numbers (largely the Solaris definitions) and local
  errno(2) values for 32-bit and 64-bit return tokens.  This is required
  as operating systems don't agree on some of the values of more recent
  error numbers.
- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the
  total size for the token.  This buge.
- Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed.

15 years agoo With -L flag show unix sockets listen queues stats. It is useful
Maxim Konovalov [Wed, 31 Dec 2008 08:56:49 +0000 (08:56 +0000)]
o With -L flag show unix sockets listen queues stats.  It is useful
to know number of not accepted connections for monitoring purposes.

PR: bin/128871
Submitted by: Anton Yuzhaninov
MFC after: 1 month

15 years agoWhen no driver attaches to a card, don't power down the card. We can
Warner Losh [Wed, 31 Dec 2008 07:41:42 +0000 (07:41 +0000)]
When no driver attaches to a card, don't power down the card.  We can
now read config registers of cardbus cards that are inserted, but
aren't attached to a driver.
Also, add a power related comment...

15 years agoThere's no need to redundantly redefine atomicity.h.
Warner Losh [Wed, 31 Dec 2008 07:39:23 +0000 (07:39 +0000)]
There's no need to redundantly redefine atomicity.h.

15 years agoFirst pass at 64-bit elf support
Warner Losh [Wed, 31 Dec 2008 07:38:04 +0000 (07:38 +0000)]
First pass at 64-bit elf support

15 years agoUpdate or eliminate some stale comments.
Alan Cox [Wed, 31 Dec 2008 05:44:05 +0000 (05:44 +0000)]
Update or eliminate some stale comments.

15 years agoDocument the relationship between enum VM_GUEST and the vm_guest_sysctl_names
Ivan Voras [Tue, 30 Dec 2008 23:49:54 +0000 (23:49 +0000)]
Document the relationship between enum VM_GUEST and the vm_guest_sysctl_names
array.

Approved by: gnn (original version)

15 years agoAvoid an unnecessary memory dereference in vm_map_entry_splay().
Alan Cox [Tue, 30 Dec 2008 21:52:18 +0000 (21:52 +0000)]
Avoid an unnecessary memory dereference in vm_map_entry_splay().

15 years agoAdd a VOP_VPTOCNP implementation for pseudofs which covers file systems
Joe Marcus Clarke [Tue, 30 Dec 2008 21:49:39 +0000 (21:49 +0000)]
Add a VOP_VPTOCNP implementation for pseudofs which covers file systems
such as procfs and linprocfs.

This implementation's locking was enhanced by kib.

Reviewed by: kib
des
Approved by: des
kib
Tested by: pho

15 years agoStyle change to vm_map_lookup(): Eliminate a macro of dubious value.
Alan Cox [Tue, 30 Dec 2008 20:51:07 +0000 (20:51 +0000)]
Style change to vm_map_lookup(): Eliminate a macro of dubious value.

15 years agoAdded missing second part of cleaning j->ip[46] as requested by bz
Peter Holm [Tue, 30 Dec 2008 20:39:47 +0000 (20:39 +0000)]
Added missing second part of cleaning j->ip[46] as requested by bz

Approved by: kib (mentor)
Pointy hat: pho

15 years agoAdd missing comma.
Christian Brueffer [Tue, 30 Dec 2008 20:31:37 +0000 (20:31 +0000)]
Add missing comma.

15 years agoMdoc and wording improvements, also point to cpucontrol(8).
Christian Brueffer [Tue, 30 Dec 2008 20:26:16 +0000 (20:26 +0000)]
Mdoc and wording improvements, also point to cpucontrol(8).

15 years agoDisable USB bluetooth (needs netgraph built in) and USB audio (doesn't
Rui Paulo [Tue, 30 Dec 2008 20:25:49 +0000 (20:25 +0000)]
Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't
compile).

15 years agoMdoc and wording improvements.
Christian Brueffer [Tue, 30 Dec 2008 20:16:33 +0000 (20:16 +0000)]
Mdoc and wording improvements.

15 years agoDisable USB bluetooth (needs netgraph built in) and USB audio (doesn't
Rui Paulo [Tue, 30 Dec 2008 20:13:20 +0000 (20:13 +0000)]
Disable USB bluetooth (needs netgraph built in) and USB audio (doesn't
compile).

15 years agoMove the implementation of the vm map's fast path on address lookup from
Alan Cox [Tue, 30 Dec 2008 19:48:03 +0000 (19:48 +0000)]
Move the implementation of the vm map's fast path on address lookup from
vm_map_lookup{,_locked}() to vm_map_lookup_entry().  Having the fast path
in vm_map_lookup{,_locked}() limits its benefits to page faults.  Moving
it to vm_map_lookup_entry() extends its benefits to other operations on
the vm map.

15 years agoAdd a kernel config file so that users have less difficulty testing
Rui Paulo [Tue, 30 Dec 2008 19:46:06 +0000 (19:46 +0000)]
Add a kernel config file so that users have less difficulty testing
USBng.

If it makes sense, it could be done for arm/mips too.

15 years agoOops, missed removing an 's' in previous rev.
Ken Smith [Tue, 30 Dec 2008 18:21:54 +0000 (18:21 +0000)]
Oops, missed removing an 's' in previous rev.

Submitted by: Jens Schweikhardt (schweikh <at> schweikhardt <dot> net)

15 years agoMake sure that unused j->ip[46] are cleared
Peter Holm [Tue, 30 Dec 2008 17:54:25 +0000 (17:54 +0000)]
Make sure that unused j->ip[46] are cleared

Reviewed by: bz
Approved by: kib (mentor)

15 years agoClean up this message a little bit.
Ken Smith [Tue, 30 Dec 2008 17:36:32 +0000 (17:36 +0000)]
Clean up this message a little bit.

15 years agoClean up this message a little bit.
Ken Smith [Tue, 30 Dec 2008 17:16:52 +0000 (17:16 +0000)]
Clean up this message a little bit.

15 years agoRename mbcnt to mbcnt_delta in uipc_send() -- unlike other local
Robert Watson [Tue, 30 Dec 2008 16:09:57 +0000 (16:09 +0000)]
Rename mbcnt to mbcnt_delta in uipc_send() -- unlike other local
variables named mbcnt in uipc_usrreq.c, this instance is a delta
rather than a cache of sb_mbcnt.

MFC after: 3 weeks

15 years agoRemove the /usr/X11R6 paths. It has been long enough since the X stuff
Ken Smith [Tue, 30 Dec 2008 16:00:36 +0000 (16:00 +0000)]
Remove the /usr/X11R6 paths.  It has been long enough since the X stuff
moved to /usr/local.

Checked with: des (last person to have fiddled with this)
MFC after: 1 month

15 years agoClear the pointers to the file in the struct filedesc before file is closed
Konstantin Belousov [Tue, 30 Dec 2008 12:51:56 +0000 (12:51 +0000)]
Clear the pointers to the file in the struct filedesc before file is closed
in fdfree. Otherwise, sysctl_kern_proc_filedesc may dereference stale
struct file * values.

Reported and tested by: pho
MFC after: 1 month

15 years agoIn r185557, the check for existing negative entry for the given name
Konstantin Belousov [Tue, 30 Dec 2008 12:51:14 +0000 (12:51 +0000)]
In r185557, the check for existing negative entry for the given name
did not compared nc_dvp with supplied parent directory vnode pointer.
Add the check and note that now branches for vp != NULL and vp == NULL
are the same, thus can be merged.

Reported and reviewed by: kan
Tested by: pho
MFC after: 2 weeks

15 years agoA number of small changes to make the 'save choice to disk' safer,
Luigi Rizzo [Tue, 30 Dec 2008 09:40:50 +0000 (09:40 +0000)]
A number of small changes to make the 'save choice to disk' safer,
and re-enable it as default.

In particular:

+ re-enable the 'update' flag in the Makefile (of course!);

+ commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)"
  to avoid writing to disk in case of a timeout/default choice;

+ fix an off-by-one count in the partition scan code that would
  print the wrong name for unknown partitions;

+ unconditionally change the boot prompt to 'Boot:' instead of 'Default:'
  to make room for the extra code/checks/messages. Some of the changes
  listed below are also made to save space;

+ rearrange and fix comments for known partition types. Right now we
  explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys),
  NTFS (type 7), FAT32 (type 11).
  Depending on other options we also recognise Extended (type 5),
  FAT12 (type 1) and FAT16 < 32MB (type 4).

+ Add an entry "F6 PXE" when the code is built with -DPXE (which is
  a default now). Technically, F6 boots through INT18, so the prompt 'PXE'
  is a bit misleading. Unfortunately the name INT18
  is too long and does not fit in - we could use ROM perhaps.
  The reason I picked 'PXE' is that on many (I believe) new systems
  INT18 calls PXE.

Apart from the choice of the name for PXE/ROM/INT18, this should close
pending issues on the 1-sector boot0 code and we should be able to
move the code to RELENG_7 when it reopens.

No boot0cfg changes are necessary.

MFC after: 3 weeks

15 years agoBump the odometer of the years, this time a bit early for 7.1R.
Warner Losh [Tue, 30 Dec 2008 04:48:59 +0000 (04:48 +0000)]
Bump the odometer of the years, this time a bit early for 7.1R.

15 years agoBump the odometer of the years. A little early this year for 7.1R.
Warner Losh [Tue, 30 Dec 2008 04:46:25 +0000 (04:46 +0000)]
Bump the odometer of the years.  A little early this year for 7.1R.

15 years agoAdd gssd.h to the list of SRCS so one can build without 'make depend' first.
David E. O'Brien [Tue, 30 Dec 2008 01:33:15 +0000 (01:33 +0000)]
Add gssd.h to the list of SRCS so one can build without 'make depend' first.

15 years agoSound less scary about errorousous disk geometry due to wanting to limit
David E. O'Brien [Tue, 30 Dec 2008 00:57:39 +0000 (00:57 +0000)]
Sound less scary about errorousous disk geometry due to wanting to limit
to 65535 cylinders.

Submitted by: Carlos A. M. dos Santos <unixmania@gmail.com>

15 years agoFix compilation. Also move ogetkerninfo() to kern_xxx.c.
Ed Schouten [Mon, 29 Dec 2008 19:24:00 +0000 (19:24 +0000)]
Fix compilation. Also move ogetkerninfo() to kern_xxx.c.

It seems I forgot to remove `int error' from a single piece of code. I'm
also moving ogetkerninfo() to kern_xxx.c, because it belongs to the
class of compat system information system calls, not the generic sysctl
code.

15 years agoInclude param.h instead of types.h before mount.h so that the nested
Robert Watson [Mon, 29 Dec 2008 19:00:28 +0000 (19:00 +0000)]
Include param.h instead of types.h before mount.h so that the nested
include of param.h can be removed from audit.h.

MFC after: 3 weeks

15 years agoInclude param.h instead of types.h before mount.h so that the nested
Robert Watson [Mon, 29 Dec 2008 18:59:50 +0000 (18:59 +0000)]
Include param.h instead of types.h before mount.h so that the nested
include of param.h can be removed from audit.h.

MFC after: 3 days

15 years agoInclude param.h instead of types.h before user.h so that the nested
Robert Watson [Mon, 29 Dec 2008 18:58:22 +0000 (18:58 +0000)]
Include param.h instead of types.h before user.h so that the nested
include of param.h can be removed from audit.h.

MFC after: 3 weeks

15 years agoAdd missing -o to usage output.
Simon L. B. Nielsen [Mon, 29 Dec 2008 14:59:22 +0000 (14:59 +0000)]
Add missing -o to usage output.

MFC after: 3 days

15 years agoWhen the insmntque() in the pfs_vncache_alloc() fails, vop_reclaim calls
Konstantin Belousov [Mon, 29 Dec 2008 13:25:58 +0000 (13:25 +0000)]
When the insmntque() in the pfs_vncache_alloc() fails, vop_reclaim calls
pfs_vncache_free() that removes pvd from the list, while it is not yet
put on the list.

Prevent the invalid removal from the list by clearing pvd_next and
pvd_prev for the newly allocated pvd, and only move pfs_vncache list
head when the pvd was at the head.

Suggested and approved by: des
MFC after: 2 weeks

15 years agoPush down Giant inside sysctl. Also add some more assertions to the code.
Ed Schouten [Mon, 29 Dec 2008 12:58:45 +0000 (12:58 +0000)]
Push down Giant inside sysctl. Also add some more assertions to the code.

In the existing code we didn't really enforce that callers hold Giant
before calling userland_sysctl(), even though there is no guarantee it
is safe. Fix this by just placing Giant locks around the call to the oid
handler. This also means we only pick up Giant for a very short period
of time. Maybe we should add MPSAFE flags to sysctl or phase it out all
together.

I've also added SYSCTL_LOCK_ASSERT(). We have to make sure sysctl_root()
and name2oid() are called with the sysctl lock held.

Reviewed by: Jille Timmermans <jille quis cx>

15 years agovm_map_lock_read() does not increment map->timestamp, so we should
Konstantin Belousov [Mon, 29 Dec 2008 12:45:11 +0000 (12:45 +0000)]
vm_map_lock_read() does not increment map->timestamp, so we should
compare map->timestamp with saved timestamp after map read lock is
reacquired, not with saved timestamp + 1. The only consequence of the +1
was unconditional lookup of the next map entry, though.

Tested by: pho
Approved by: des
MFC after: 2 weeks

15 years agoUse curproc->p_sysent->sv_flags bit SV_ILP32 for detection of the 32 bit
Konstantin Belousov [Mon, 29 Dec 2008 12:41:32 +0000 (12:41 +0000)]
Use curproc->p_sysent->sv_flags bit SV_ILP32 for detection of the 32 bit
caller, instead of direct comparision with ia32_freebsd_sysvec.

Tested by: pho
Approved by: des
MFC after: 2 weeks

15 years agoDrop the pseudofs vnode lock around call to pfs_read handler. The handler
Konstantin Belousov [Mon, 29 Dec 2008 12:12:23 +0000 (12:12 +0000)]
Drop the pseudofs vnode lock around call to pfs_read handler. The handler
may need to lock arbitrary vnodes, causing either lock order reversal or
recursive vnode lock acquisition.

Tested by: pho
Approved by: des
MFC after: 2 weeks

15 years agoAfter the pfs_vncache_mutex is dropped, another thread may attempt to
Konstantin Belousov [Mon, 29 Dec 2008 12:07:18 +0000 (12:07 +0000)]
After the pfs_vncache_mutex is dropped, another thread may attempt to
do pfs_vncache_alloc() for the same pfs_node and pid. In this case, we
could end up with two vnodes for the pair. Recheck the cache under the
locked pfs_vncache_mutex after all sleeping operations are done [1].

This case mostly cannot happen now because pseudofs uses exclusive vnode
locking for lookup. But it does drop the vnode lock for dotdot lookups,
and Marcus' pseudofs_vptocnp implementation is vulnerable too.

Do not call free() on the struct pfs_vdata after insmntque() failure,
because vp->v_data points to the structure, and pseudofs_reclaim()
frees it by the call to pfs_vncache_free().

Tested by: pho [1]
Approved by: des
MFC after: 2 weeks

15 years ago1. Add the ability to tweak the token output before targets in job mode.
David E. O'Brien [Mon, 29 Dec 2008 10:26:02 +0000 (10:26 +0000)]
1. Add the ability to tweak the token output before targets in job mode.
   E.g.,  .MAKE.JOB.PREFIX=${.newline}---[${.MAKE.PID}]
   would produce

   ---[1234] target ---

2. Added ${.newline} as a simple means of being able to include '\n' in the
   assignment of .MAKE.JOB.PREFIX

Obtained from: NetBSD

15 years agoConsistently use Var_SetGlobal().
David E. O'Brien [Mon, 29 Dec 2008 08:05:49 +0000 (08:05 +0000)]
Consistently use Var_SetGlobal().

15 years agomerge 186535, 186537, and 186538 from releng_7_xen
Kip Macy [Mon, 29 Dec 2008 06:31:03 +0000 (06:31 +0000)]
merge 186535, 186537, and 186538 from releng_7_xen

Log:
 - merge in latest xenbus from dfr's xenhvm
 - fix race condition in xs_read_reply by converting tsleep to mtx_sleep

Log:
 unmask evtchn in bind_{virq, ipi}_to_irq

Log:
 - remove code for handling case of not being able to sleep
 - eliminate tsleep - make sleeps atomic

15 years agoVendor import of OpenBSM 1.1 alpha4, which incorporates the following
Robert Watson [Sun, 28 Dec 2008 22:40:42 +0000 (22:40 +0000)]
Vendor import of OpenBSM 1.1 alpha4, which incorporates the following
changes since the last imported OpenBSM release:

OpenBSM 1.1 alpha 4

- With the addition of BSM error number mapping, we also need to map the
  local error number passed to audit_submit(3) to a BSM error number,
  rather than have the caller perform that conversion.
- Reallocate user audit events to avoid collisions with Solaris; adopt a
  more formal allocation scheme, and add some events allocated in Solaris
  that will be of immediate use on other platforms.
- Add an event for Calife.
- Add au_strerror(3), which allows generating strings for BSM errors
  directly, rather than requiring applications to map to the local error
  space, which might not be able to entirely represent the BSM error
  number space.
- Major auditd rewrite for launchd(8) support.  Add libauditd library
  that is shared between launchd and auditd.
- Add AUDIT_TRIGGER_INITIALIZE trigger (sent via 'audit -i') for
  (re)starting auditing under launchd(8) on Mac OS X.
- Add 'current' symlink to active audit trail.
- Add crash recovery of previous audit trail file when detected on audit
  startup that it has not been properly terminated.
- Add the event AUE_audit_recovery to indicated when an audit trail file
  has been recovered from not being properly terminated.  This event is
  stored in the new audit trail file and includes the path of recovered
  audit trail file.
- Mac OS X and FreeBSD dependent code in auditd.c is separated into
  auditd_darwin.c and auditd_fbsd.c files.
- Add an event for the posix_spawn(2) and fsgetpath(2) Mac OS X system
  calls.
- For Mac OS X, we use ASL(3) instead of syslog(3) for logging.
- Add support for NOTICE level logging.

OpenBSM 1.1 alpha 3

- Add two new functions, au_bsm_to_errno() and au_errno_to_bsm(), to map
  between BSM error numbers (largely the Solaris definitions) and local
  errno(2) values for 32-bit and 64-bit return tokens.  This is required
  as operating systems don't agree on some of the values of more recent
  error numbers.
- Fix a bug how au_to_exec_args(3) and au_to_exec_env(3) calculates the
  total size for the token.  This bug resulted in "unknown" tokens being
  printed after the exec args/env tokens.
- Support for AUT_SOCKET_EX extended socket tokens, which describe a
  socket using a pair of IPv4/IPv6 and port tuples.
- OpenBSM BSM file header version bumped for 1.1 release.
- Deprecated Darwin constants, such as TRAILER_PAD_MAGIC, removed.

Obtained from: TrustedBSD Project
Sponsored by: Apple Inc.

15 years agoFor consistency use LLE_IS_VALID() in this 4th place that is actually
Bjoern A. Zeeb [Sun, 28 Dec 2008 21:18:01 +0000 (21:18 +0000)]
For consistency use LLE_IS_VALID() in this 4th place that is actually
interested in the (void *)-1 return value hack.
This way we can easily identify those special parts of the code.

15 years agodrop rnh lock before destroying it
Kip Macy [Sun, 28 Dec 2008 14:32:27 +0000 (14:32 +0000)]
drop rnh lock before destroying it

15 years agoRemove unused variable.
Ganbold Tsagaankhuu [Sun, 28 Dec 2008 13:50:58 +0000 (13:50 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID: 542

Approved by: weongyo

15 years agoInclude std.ixp425 for "cpu" and comment out duplicate memory map
Bjoern A. Zeeb [Sun, 28 Dec 2008 11:04:24 +0000 (11:04 +0000)]
Include std.ixp425 for "cpu" and comment out duplicate memory map
options. Using the already included std.avila is not considered
to be entirely right (and the options slightly differ) but the best
match we currently have. Upcoming work should fit better.

Reorder another variable to match the layout of other configs.

Reviewed by: sam, warner (earlier version with options removed)

15 years agoLike in the rest of the file and the network stack use inp as
Bjoern A. Zeeb [Sat, 27 Dec 2008 23:24:59 +0000 (23:24 +0000)]
Like in the rest of the file and the network stack use inp as
variable name for the inpcb.
For consistency with the other *_hdrsiz functions use 'size'
instead of 'siz' as variable name.

No functional change.

MFC after: 4 weeks

15 years agoNon-functional (style) changes:
Bjoern A. Zeeb [Sat, 27 Dec 2008 22:58:16 +0000 (22:58 +0000)]
Non-functional (style) changes:
- Always use round brackets with return ().
- Add empty line to beginning of functions without local variables.
- Comments start with a capital letter and end in a '.'.
  While there adapt a few comments.

Reviewed by: rwatson
MFC after: 4 weeks

15 years agoConvert function definitions to constantly use ANSI-style
Bjoern A. Zeeb [Sat, 27 Dec 2008 21:20:34 +0000 (21:20 +0000)]
Convert function definitions to constantly use ANSI-style
parameter declarations.

Reviewed by: rwatson
MFC after: 4 weeks

15 years ago- Fix incorrect array declaration that was causing the stack overflow
Stanislav Sedov [Sat, 27 Dec 2008 20:48:11 +0000 (20:48 +0000)]
- Fix incorrect array declaration that was causing the stack overflow
  on some (most?) Asus laptops.

Discussed with: rpaulo
Approved by: kib (mentor)
MFC after: 2 weeks

15 years agoRewrite ipsec6_setspidx_inpcb() to match the logic in the
Bjoern A. Zeeb [Sat, 27 Dec 2008 20:37:53 +0000 (20:37 +0000)]
Rewrite ipsec6_setspidx_inpcb() to match the logic in the
(now) equivalent IPv4 counterpart.

MFC after: 4 weeks

15 years agoFor consistency with ipsec4_setspidx_inpcb() rename file local function
Bjoern A. Zeeb [Sat, 27 Dec 2008 19:42:59 +0000 (19:42 +0000)]
For consistency with ipsec4_setspidx_inpcb() rename file local function
ipsec6_setspidx_in6pcb() to ipsec6_setspidx_inpcb().

MFC after: 4 weeks

15 years agoChange the in6p variable names to inp to be able to diff
Bjoern A. Zeeb [Sat, 27 Dec 2008 19:37:46 +0000 (19:37 +0000)]
Change the in6p variable names to inp to be able to diff
the v4 to the v6 implementations.

MFC after: 4 weeks

15 years agoIn additions to the configs from r185478, which also enabled the
Bjoern A. Zeeb [Sat, 27 Dec 2008 19:03:57 +0000 (19:03 +0000)]
In additions to the configs from r185478, which also enabled the
use of modules for arm, disable them by adding MODULES_OVERRIDE=""
here as well.

Reviewed by: sam
MFC after: 3 weeks

15 years agoarm is in DEFAULTS; remove dup
Sam Leffler [Sat, 27 Dec 2008 19:02:01 +0000 (19:02 +0000)]
arm is in DEFAULTS; remove dup

Submitted by: bz

15 years agoRemoved duplicate
Bjoern A. Zeeb [Sat, 27 Dec 2008 17:22:17 +0000 (17:22 +0000)]
Removed duplicate
  makeoptions    MODULES_OVERRIDE=""

15 years agoHide detect_virtual() along with the accompanying string
Bjoern A. Zeeb [Sat, 27 Dec 2008 17:19:16 +0000 (17:19 +0000)]
Hide detect_virtual() along with the accompanying string
arrays under #ifndef XEN to make XEN config compile again.
In case of Xen vm_guest is hard coded.

Move the list for the vm_guest sysctl out of the restictive
bounds as the sysctl is there in either case.

15 years agoMinor style(9) compliance change.
Alexander Kabaev [Sat, 27 Dec 2008 16:03:34 +0000 (16:03 +0000)]
Minor style(9) compliance change.

15 years agoAdd support for the Oxford OX16PCI958-based card.
Roman Kurakin [Sat, 27 Dec 2008 15:22:22 +0000 (15:22 +0000)]
Add support for the Oxford OX16PCI958-based card.

Note, that the patch provided with this card for the Linux states that
the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'.  So probably
we should also use the subdevice/subvendord here. For now just ignore
that fact.

PR: kern/129665
Submitted by: bsam
Obtained from: united efforst with bsam

15 years agoPermit digits at the beginning and end of kernel config file names for
Bjoern A. Zeeb [Sat, 27 Dec 2008 15:07:51 +0000 (15:07 +0000)]
Permit digits at the beginning and end of kernel config file names for
`make universe'. This catches a few more arm and, once enabled, mips
configs and permits having local configs named like NOINET6.

Reviewed by: phk
MFC after: 4 weeks

15 years agoFix memory leaks introduced in last commit.
Florent Thoumie [Sat, 27 Dec 2008 14:34:33 +0000 (14:34 +0000)]
Fix memory leaks introduced in last commit.
Bump version to 20081227.

Reported by: gcooper
Submitted by: Andrea Barberio <insomniac@slackware.it>
MFC after: 1 month

15 years ago- Fix an issue with access permissions to underlying disks used by a gvinum
Ulf Lilleengen [Sat, 27 Dec 2008 14:32:39 +0000 (14:32 +0000)]
- Fix an issue with access permissions to underlying disks used by a gvinum
  plex. If the plex is a raid5 plex, and is being written to, parity data might
  have to be read from the underlying disks, requiring them to be opened for
  reading as well as writing.

MFC after: 1 week

15 years ago- Back out r186038. Rather than changing the intent of the caller, the problem
Ulf Lilleengen [Sat, 27 Dec 2008 14:24:24 +0000 (14:24 +0000)]
- Back out r186038. Rather than changing the intent of the caller, the problem
  should be handled internally in gvinum.

Suggested by: pjd

15 years agoIncluding mount.h requires including param.h.
Robert Watson [Sat, 27 Dec 2008 14:17:15 +0000 (14:17 +0000)]
Including mount.h requires including param.h.

MFC after: 3 weeks

15 years agounbreak the build. Decoupled the USB2's NDIS build from the default
Weongyo Jeong [Sat, 27 Dec 2008 12:23:22 +0000 (12:23 +0000)]
unbreak the build.  Decoupled the USB2's NDIS build from the default
build.

Pointy hat to:  me

15 years agoRemove an unused variable to make the SENTRY5 mips kernel compile
Bjoern A. Zeeb [Sat, 27 Dec 2008 11:38:41 +0000 (11:38 +0000)]
Remove an unused variable to make the SENTRY5 mips kernel compile
(though with some asm warning).

15 years agoInclude param.h instead of types.h when using user.h. Otherwise there is
Robert Watson [Sat, 27 Dec 2008 11:12:23 +0000 (11:12 +0000)]
Include param.h instead of types.h when using user.h.  Otherwise there is
a dependence on ucred.h including audit.h including param.h, which we
would like to eliminate.

MFC after: 3 weeks