]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoLoad the bytes into the EMAC's MAC address register in the proper
imp [Thu, 25 Oct 2007 07:05:38 +0000 (07:05 +0000)]
Load the bytes into the EMAC's MAC address register in the proper
order.  The kernel used to shuffle them around to get things right,
but that was recently fixed.  This makes our boot loader match the
behavior of most other boot loaders for the atmel parts.  This bug was
inherited from the Kwikbyte loader that we started from.

This bug was discovered by Bj\e.A\eNvrn K\eNvnig back in June, but fell on the
floor.  He provided patches to the kernel, include backwards
compatibility options that were similar to Olivier's if_ate.c commit.

16 years agoKERNBASE should really be KERNVIRTADDR there too.
cognet [Wed, 24 Oct 2007 23:41:46 +0000 (23:41 +0000)]
KERNBASE should really be KERNVIRTADDR there too.

MFC after: 1 week

16 years agoIn ate_get_mac(), try to get the mac address in the right order, at least
cognet [Wed, 24 Oct 2007 23:12:19 +0000 (23:12 +0000)]
In ate_get_mac(), try to get the mac address in the right order, at least
in the same order as it's set in ate_set_mac.
I remember a discussion about this on -arm, but apparently nothing was done.
Warner, is this wrong ?

X-MFC After: proper review

16 years agoHandle the case where PHYSADDR != KERNPHYSADDR (ie we do not load the kernel
cognet [Wed, 24 Oct 2007 22:26:54 +0000 (22:26 +0000)]
Handle the case where PHYSADDR != KERNPHYSADDR (ie we do not load the kernel
at the beginning of the RAM).

MFC After: 1 week

16 years agoCorrect a comment, this was not true anymore.
cognet [Wed, 24 Oct 2007 22:24:32 +0000 (22:24 +0000)]
Correct a comment, this was not true anymore.

16 years agoFirst cut at support for booting a GPT labeled disk via the BIOS bootstrap
jhb [Wed, 24 Oct 2007 21:33:00 +0000 (21:33 +0000)]
First cut at support for booting a GPT labeled disk via the BIOS bootstrap
on i386 and amd64 machines.  The overall process is that /boot/pmbr lives
in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for
locating and loading /boot/gptboot.  /boot/gptboot is similar to /boot/boot
except that it groks GPT rather than MBR + bsdlabel.  Unlike /boot/boot,
/boot/gptboot lives in its own dedicated GPT partition with a new
"FreeBSD boot" type.  This partition does not have a fixed size in that
/boot/pmbr will load the entire partition into the lower 640k.  However,
it is limited in that it can only be 545k.  That's still a lot better than
the current 7.5k limit for boot2 on MBR.  gptboot mostly acts just like
boot2 in that it reads /boot.config and loads up /boot/loader.  Some more
details:
- Include uuid_equal() and uuid_is_nil() in libstand.
- Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using
  /boot/pmbr and /boot/gptboot.  Note that the disk must have some free
  space for the boot partition.
  - This required exposing the backend of the 'add' function as a
    gpt_add_part() function to the rest of gpt(8).  'boot' uses this to
    create a boot partition if needed.
- Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that
  it can handle a filesystem > 1.5 TB.
- /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O
  unlike boot1 since /boot/pmbr loads all of gptboot up front.  The
  C portion of gptboot (gptboot.c) has been repocopied from boot2.c.
  The primary changes are to parse the GPT to find a root filesystem
  and to use 64-bit disk addresses.  Currently gptboot assumes that the
  first UFS partition on the disk is the / filesystem, but this algorithm
  will likely be improved in the future.
- Teach the biosdisk driver in /boot/loader to understand GPT tables.
  GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is
  similar to the /dev names the kernel uses (e.g. /dev/ad0p2).
- Add a new "freebsd-boot" alias to g_part() for the new boot UUID.

MFC after: 1 month
Discussed with: marcel (some things might still change, but am committing
what I have so far)

16 years agoUpdate copyright attribution.
jhb [Wed, 24 Oct 2007 21:16:22 +0000 (21:16 +0000)]
Update copyright attribution.

MFC after: 3 days

16 years agoProperly drop the pf mutex around all copyout (consistency still protected
mlaier [Wed, 24 Oct 2007 20:57:17 +0000 (20:57 +0000)]
Properly drop the pf mutex around all copyout (consistency still protected
by the sx) and avoid a WITNESS panic.  Overlooked during last import.

Reported and tested by: Max N. Boyarov
MFC after: 3 days

16 years agoAdd ABI backwards compatibility to the FreeBSD 4/5/6 versions of
marius [Wed, 24 Oct 2007 20:51:44 +0000 (20:51 +0000)]
Add ABI backwards compatibility to the FreeBSD 4/5/6 versions of
the PCIOCGETCONF, PCIOCREAD and PCIOCWRITE IOCTLs, which was broken
with the introduction of PCI domain support.
As the size of struct pci_conf_io wasn't changed with that commit,
this unfortunately requires the ABI of PCIOCGETCONF to be broken
again in order to be able to provide backwards compatibility to
the old version of that IOCTL.

Requested by: imp
Discussed with: re (kensmith)
Reviewed by: PCI maintainers (imp, jhb)
MFC after: 5 days

16 years agosilence complaint about not loading the wlan_scan_monitor module;
sam [Wed, 24 Oct 2007 20:20:41 +0000 (20:20 +0000)]
silence complaint about not loading the wlan_scan_monitor module;
it does not exist and is not needed as monitor mode operation has
always required setting the current channel

Reviewed by: thompsa
MFC after: 1 week

16 years agoMerge first in a series of TrustedBSD MAC Framework KPI changes
rwatson [Wed, 24 Oct 2007 19:04:04 +0000 (19:04 +0000)]
Merge first in a series of TrustedBSD MAC Framework KPI changes
from Mac OS X Leopard--rationalize naming for entry points to
the following general forms:

  mac_<object>_<method/action>
  mac_<object>_check_<method/action>

The previous naming scheme was inconsistent and mostly
reversed from the new scheme.  Also, make object types more
consistent and remove spaces from object types that contain
multiple parts ("posix_sem" -> "posixsem") to make mechanical
parsing easier.  Introduce a new "netinet" object type for
certain IPv4/IPv6-related methods.  Also simplify, slightly,
some entry point names.

All MAC policy modules will need to be recompiled, and modules
not updates as part of this commit will need to be modified to
conform to the new KPI.

Sponsored by: SPARTA (original patches against Mac OS X)
Obtained from: TrustedBSD Project, Apple Computer

16 years agoRework the read/write support in the bios disk driver some to cut down
jhb [Wed, 24 Oct 2007 12:49:55 +0000 (12:49 +0000)]
Rework the read/write support in the bios disk driver some to cut down
on duplicated code and support 64-bit LBAs for GPT.
- The code to manage an EDD or C/H/S I/O request are now in their own
  routines.  The EDD routine now handles a full 64-bit LBA instead of
  truncating LBAs to the lower 32-bits.  (MBRs and BSD labels only
  have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit).
- All of the bounce buffer and retry logic duplicated in bd_read() and
  bd_write() are merged into a single bd_io() routine that takes an
  extra direction argument.  bd_read() and bd_write() are now simple
  wrappers around bd_io().
- If a disk supports EDD then always use it rather than only using it if
  the cylinder is > 1023.  Other parts of the boot code already do
  something similar to this.  Also, GPT just uses LBAs, so for a GPT disk
  it's probably best to ignore C/H/S completely.  Always using EDD when
  it is supported by a disk is an easy way to accomplish this.

MFC after: 1 week

16 years agoMFi386: revision 1.50
nyan [Wed, 24 Oct 2007 12:03:48 +0000 (12:03 +0000)]
MFi386: revision 1.50

  Reindent the read/write code of bd_realstrategy() so it is more readable.

16 years agoMFi386: revision 1.41
nyan [Wed, 24 Oct 2007 11:54:04 +0000 (11:54 +0000)]
MFi386: revision 1.41

  Slightly cleanup the 'bootdev' concept on x86 by changing the various
  macros to treat the 'slice' field as a real part of the bootdev instead
  of as hack that spans two other fields (adaptor (sic) and controller)
  that are not used in any modern FreeBSD boot code.

16 years agoReindent the read/write code of bd_realstrategy() so it is more readable.
jhb [Wed, 24 Oct 2007 04:13:35 +0000 (04:13 +0000)]
Reindent the read/write code of bd_realstrategy() so it is more readable.

MFC after: 1 week

16 years agoSlightly cleanup the 'bootdev' concept on x86 by changing the various
jhb [Wed, 24 Oct 2007 04:03:25 +0000 (04:03 +0000)]
Slightly cleanup the 'bootdev' concept on x86 by changing the various
macros to treat the 'slice' field as a real part of the bootdev instead
of as hack that spans two other fields (adaptor (sic) and controller)
that are not used in any modern FreeBSD boot code.

MFC after: 1 week

16 years agoFix reading of files that use pax 'size' attribute to store size.
kientzle [Wed, 24 Oct 2007 04:01:31 +0000 (04:01 +0000)]
Fix reading of files that use pax 'size' attribute to store size.
In particular, bsdtar uses the pax 'size' attribute for any file
over 8G.

MFC after: 3 days

16 years agoStop disabling USB in the PAE kernel config. The USB code has been
jhb [Wed, 24 Oct 2007 03:53:10 +0000 (03:53 +0000)]
Stop disabling USB in the PAE kernel config.  The USB code has been
using bus_dma(9) for quite a while now and has been used on 64-bit archs
as well.

MFC after: 1 month

16 years agoWhen processing multi-path ip6 routers, place each router entry on its
csjp [Wed, 24 Oct 2007 00:50:13 +0000 (00:50 +0000)]
When processing multi-path ip6 routers, place each router entry on its
own line.  We made this change in traceroute(8) some time ago.  This
is particularly useful when you are not resolving hostnames since ip6
addresses can be quite long, and lines wrap fairly easily in the
multi-path router case.

Discussed with: bz
MFC after: 1 month

16 years agoMove where we audit the PID argument such that we unconditionally
csjp [Wed, 24 Oct 2007 00:14:19 +0000 (00:14 +0000)]
Move where we audit the PID argument such that we unconditionally
audit it at the beginning of the syscall.  This fixes a problem
where the user supplies an invalid process ID which is > 0 which
results in the PID argument not being audited.

Obtained from: TrustedBSD Project
MFC after: 1 week

16 years agoUse extended process token. The in kernel process audit
csjp [Wed, 24 Oct 2007 00:05:52 +0000 (00:05 +0000)]
Use extended process token.  The in kernel process audit
state is stored in an extended subject token now.  Make sure
that we are using the extended data.  This fixes the termID
for process tokens.

Obtained from: TrustedBSD Project
Discussed with: rwatson
MFC after: 1 week

16 years agoTake out the single-threading code in fork.
julian [Tue, 23 Oct 2007 17:54:15 +0000 (17:54 +0000)]
Take out the single-threading code in fork.
After discussions with jeff, alc, (various Ironport people), david Xu,
and mostly Alfred (who found the problem) it has been demonstrated that this
is not needed for our implementations of threads and represents a real
(as in we've seen it happen a lot) deadlock danger.

Several points:
 Since forking multiple threads is not allowed, and posix states that
 any mutexes owned by othre threads wilol be owned in the child by
 phantom threads, and therads shouldn't ba accessing shared structures without
 protection, It can be proved that if this leads to the child process accessing
 inconsistent data, it's a programming error.

 The mode of thread_single() being used in fork() is the wrong one.
 It is using SINGLE_NO_EXIT when it should be using SINGLE_BOUNDARY.

 Even if this we used, System processes have no need to do it as they have
 no userland to get inconsistent.

  This commmit first fixes the above bugs to get tehm correct in CVS.
  then removes them with #ifdef.
  This is so that history contains the corrected version should it
  be needed in the future.
  This code may be needed if we implement the forkall() syscall from
  Solaris. It may be needed for other non-posix thread libraries
  at some time in the future, so let the code sit for a short while
  while I do some work on it anyhow.

This removes a reproducible lockup in NFS.
It may be argued that maybe doing a fork while holding a vnode lock may
not be the best idea in th efirst place but it shouldn't cause a deadlock.
The removal has been running under soak test for several days now.

This removal should be seriously considered for 7.0 and RELENG_6.

Note. There is code in the core-dumping code that may have a similar problem
with coredumping threaded processes

MFC After: 4 days

16 years agoBack out 2nd part of wrong iswascii() change in prev. commit.
ache [Tue, 23 Oct 2007 17:39:28 +0000 (17:39 +0000)]
Back out 2nd part of wrong iswascii() change in prev. commit.

16 years agoBump MAC_VERSION to 4 and add an 8.x line in the version table. Version 4
rwatson [Tue, 23 Oct 2007 14:12:16 +0000 (14:12 +0000)]
Bump MAC_VERSION to 4 and add an 8.x line in the version table.  Version 4
will include significant synchronization to the Mac OS X Leopard version
of the MAC Framework.

Obtained from: TrustedBSD Project

16 years agoForced commit to note that rev.1.179 has the following fixes in addition to
bde [Tue, 23 Oct 2007 10:39:03 +0000 (10:39 +0000)]
Forced commit to note that rev.1.179 has the following fixes in addition to
the ones mentioned in its log message:

For mount-update from rw to ro:
- don't misuse the MNT_FORCE flag to break error handling for mark volume
  to clean.
- mark volume back to dirty if g_access() failed (not just if mark volume
  to clean failed).
- clear pm_fmod on success.  pm_fmod is bogus, since it is only used to
  cause a panic in unreachable code when we forgot to clear it here, but
  something like it will be needed.

For mount-update from rw to ro and from ro to rw:
- don't forget to lock mp when changing mp->mnt_flag.  Giant locking
  may make this unnecessary, but it is simpler to copy what ffs does.
  Most of the style changes are near here, to copy ffs's cleaner code.

For unmount:
- don't misuse the MNT_FORCE flag to break error handling for mark volume
  to clean.   Failure of markvoldirty() is similar to failure of
  ffs_subupdate() in ffs, and ffs has never used MNT_FORCE to ignore
  the corresponding error.  MNT_FORCE for unmount _should_ force the
  unmount to succeed, but forcing away of write errors has never been
  supported.
- explicitly return 0 instead of `error' in msdosfs_unmount() after
  committing to success.  This is now just a style fix.  With errors from
  markvoldirty() ignored in the MNT_FORCE case, any error in markvoldirty()
  caused a nonzero `error' to be returned despite committing to success.
  Upper layers soon paniced trying to back out of the committed unmount.

  This bug used to be present in another form in most file systems.
  VOP_CLOSE() was called after committing to success, so it was necessary
  to force the VOP_CLOSE() to succeed.  This was not done; instead,
  VOP_CLOSE()'s error code was returned to upper layers so upper layers
  soon paniced if VOP_CLOSE() failed.  I saw this panic only with a buggy
  device driver with a missing close method, but VOP_CLOSE() can easily
  fail in theory, with errors like EDQUOT and EIO for unwriteable output.

  Now the bug has moved.  g_vfs_close() is called instead of VOP_CLOSE(),
  and it returns void so unmount vops cannot even detect errors in it.
  Hopefully, errors in it only occur when there are other bugs.  E.g.,
  with the MNT_FORCE bug in msdosfs_close(), when markvoldirty() in
  umount failed due to the bugs in mount-update, and when this was the
  only write error, g_vfs_close() was reached despite the write error
  being detected earlier; it found one unwriteable buffer which it can
  only report via printf; then after fixing the panic, umount(2)
  "succeeded" but the unwriteable buffer was left in the buffer cache
  and/or VMIO object to spam the console with printfs about failed
  write attempts, until the next rw mount when the write succeeds,
  possibly clobbering different media.

16 years agoAvoid leaking file descriptors
matteo [Tue, 23 Oct 2007 07:35:17 +0000 (07:35 +0000)]
Avoid leaking file descriptors

16 years ago- Use pci_enable_busmaster() to turn on busmaster.
kevlo [Tue, 23 Oct 2007 04:25:43 +0000 (04:25 +0000)]
- Use pci_enable_busmaster() to turn on busmaster.
- Don't test memory/port status and emit an error message; the PCI bus
  will do this.

Reviewed by: sam

16 years agoCut over to ULE on PowerPC
grehan [Tue, 23 Oct 2007 00:52:25 +0000 (00:52 +0000)]
Cut over to ULE on PowerPC

kern/sched_ule.c - Add __powerpc__ to the list of supported architectures

powerpc/conf/GENERIC - Swap SCHED_4BSD with SCHED_ULE

powerpc/powerpc/genassym.c - Export TD_LOCK field of thread struct

powerpc/powerpc/swtch.S - Handle new 3rd parameter to cpu_switch() by
 updating the old thread's lock. Note: uniprocessor-only, will require
 modification for MP support.

powerpc/powerpc/vm_machdep.c - Set 3rd param of cpu_switch to mutex of
old thread's lock, making the call a no-op.

Reviewed by: marcel, jeffr (slightly older version)

16 years agoAdd a BUGS section to note that mount/chroot changes since
jb [Mon, 22 Oct 2007 21:49:39 +0000 (21:49 +0000)]
Add a BUGS section to note that mount/chroot changes since
a module was loaded might make the pathname inaccurate.

I wonder if an inode reference should be stored with the pathname
to allow a validity check?

Suggested by: rwatson@

16 years agoClose a race when trying to lookup a gateway route in rt_check().
jhb [Mon, 22 Oct 2007 19:01:26 +0000 (19:01 +0000)]
Close a race when trying to lookup a gateway route in rt_check().
Specifically, if two threads were doing concurrent lookups and the existing
gateway was marked down, the the first thread would drop a reference on the
gateway route and then unlock the "root" route while it tried to allocate
a new route.  The second thread could then also drop a reference on the
same gateway route resulting in a reference underflow.  Fix this by
clearing the gateway route pointer after dropping the reference count but
before dropping the lock.  Secondly, in this same case, the second thread
would overwrite the gateway route pointer w/o free'ing a reference to the
route installed by the first thread.  In practice this would probably just
fix a lost reference that would result in a route never being freed.

This fixes panics observed in rt_check() and rtexpunge().

MFC after: 1 week
PR: kern/112490
Insight from: mehuljv at yahoo.com
Reviewed by: ru (found the "not-setting it to NULL" part)
Tested by: several

16 years agoForced commit to clarify that previous change was:
delphij [Mon, 22 Oct 2007 17:46:57 +0000 (17:46 +0000)]
Forced commit to clarify that previous change was:

Submitted by: bde

16 years agoFixes to msdosfs dirtyflag related stuff:
delphij [Mon, 22 Oct 2007 17:43:43 +0000 (17:43 +0000)]
Fixes to msdosfs dirtyflag related stuff:

 - markvoldirty() needs to write to underlying GEOM provider.  We
   have to do that *before* g_access() which sets the GEOM provider
   to read-only.
 - Remove dirty flag before free'ing iconv related resources.  The
   dirty flag removal could fail, and it is hard to revert the
   iconv-free after the fail.
 - Mark volume as dirty if we have failed to mark it clean for safe.
 - Other style fixes to the touched functions.

16 years agoRemove the libmytinfow library that's available only in RELENG_6.
ru [Mon, 22 Oct 2007 12:31:23 +0000 (12:31 +0000)]
Remove the libmytinfow library that's available only in RELENG_6.

16 years ago- Stop calling libthr alternative as it's now the default
ru [Mon, 22 Oct 2007 10:13:38 +0000 (10:13 +0000)]
- Stop calling libthr alternative as it's now the default
  threading library.

- Now that libpthread is a symlink, it's no longer possible
  to link applications with libpthread and have libmap.conf(5)
  select the desired threading library; applications will be
  linked to the default threading library, libkse or libthr.
  Remove an obsolete paragraph.

- Mention that improvements can be seen compared to libkse.

Reviewed by: deischen, davidxu

16 years agoHide the implementation details about multiple threading libraries
ru [Mon, 22 Oct 2007 10:08:01 +0000 (10:08 +0000)]
Hide the implementation details about multiple threading libraries
from the synopses of pthread*(3) manpages.

Reviewed by: deischen, davidxu

16 years agoRemove an obsolete paragraph that pthread_single_np(3) is
ru [Mon, 22 Oct 2007 10:04:42 +0000 (10:04 +0000)]
Remove an obsolete paragraph that pthread_single_np(3) is
not implemented in libthr.

Reviewed by: deischen, davidxu

16 years agoAdded ".Lb libkse" support to mdoc(7).
ru [Mon, 22 Oct 2007 10:01:58 +0000 (10:01 +0000)]
Added ".Lb libkse" support to mdoc(7).

Reviewed by: deischen, davidxu

16 years ago1. Determine the location of the rndc* binaries relative to $command
dougb [Mon, 22 Oct 2007 09:38:44 +0000 (09:38 +0000)]
1. Determine the location of the rndc* binaries relative to $command
so that when using named from the ports (or elsewhere) the proper rndc*
commands will be run.

2. Rework the stop routine using ideas from brooks and delphij.
Specifically I am duplicating a lot of code from rc.subr's stop routine
so that this one will behave more like the one in rc.subr, but use rndc
to kill the daemon (or regular kill if that fails). This also avoids
the problems related to using killall if rndc fails, which is bad if
you're running more than one named on the same box.

3. Take a concept from gshapiro and allow the rndc.key file to be
owned by root OR the named_uid user.

Although I used different solutions, this commit handles issues raised in:
PR: conf/73929
PR: conf/103976
PR: conf/109409

16 years agoAdd one of HTC Smartphone/PocketPC device IDs.
mav [Mon, 22 Oct 2007 08:28:24 +0000 (08:28 +0000)]
Add one of HTC Smartphone/PocketPC device IDs.
Tested with Qtek S200 (HTC Prophet).

16 years agoCorrect an error of omission in the reimplementation of the page
alc [Mon, 22 Oct 2007 06:23:46 +0000 (06:23 +0000)]
Correct an error of omission in the reimplementation of the page
cache: vnode_pager_setsize() must handle the case where a file is
truncated to a non-page-size-aligned boundary and there is a cached
page underlying the new end of file.

Reported by: kris, tegge
Tested by: kris
MFC after: 3 days

16 years agoCorrect an error in vm_map_sync(), nee vm_map_clean(), that has existed
alc [Mon, 22 Oct 2007 05:21:05 +0000 (05:21 +0000)]
Correct an error in vm_map_sync(), nee vm_map_clean(), that has existed
since revision 1.1.  Specifically, neither traversal of the vm map checks
whether the end of the vm map has been reached.  Consequently, the first
traversal can wrap around and bogusly return an error.

This error has gone unnoticed for so long because no one had ever before
tried msync(2)ing a region above the stack.

Reported by: peter
MFC after: 1 week

16 years agoAdd the full module path name to the kld_file_stat structure
jb [Mon, 22 Oct 2007 04:12:57 +0000 (04:12 +0000)]
Add the full module path name to the kld_file_stat structure
for kldstat(2).

This allows libdtrace to determine the exact file from which
a kernel module was loaded without having to guess.

The kldstat(2) API is versioned with the size of the
kld_file_stat structure, so this change creates version 2.

Add the pathname to the verbose output of kldstat(8) too.

MFC: 3 days

16 years agoConsistently use the word 'flag' to refer to ELF_F_* constants.
jkoshy [Mon, 22 Oct 2007 03:38:43 +0000 (03:38 +0000)]
Consistently use the word 'flag' to refer to ELF_F_* constants.

MFC after: 1 day

16 years agoAdd PRIV_VFS_STAT privilege, which will allow overriding policy limits on
rwatson [Sun, 21 Oct 2007 22:50:11 +0000 (22:50 +0000)]
Add PRIV_VFS_STAT privilege, which will allow overriding policy limits on
the right to stat() a file, such as in mac_bsdextended.

Obtained from: TrustedBSD Project
MFC after: 3 months

16 years agoAdd the freebsd-zfs alias. Both APM and GPT have ZFS partition
marcel [Sun, 21 Oct 2007 20:02:57 +0000 (20:02 +0000)]
Add the freebsd-zfs alias. Both APM and GPT have ZFS partition
types.

16 years agoFix a last-minute, but more importantly, an untested change that
marcel [Sun, 21 Oct 2007 19:38:21 +0000 (19:38 +0000)]
Fix a last-minute, but more importantly, an untested change that
made the previous commit non-functional: the usage string was put
in the wrong field...

16 years agoAdd a partition type for ZFS.
marcel [Sun, 21 Oct 2007 17:29:06 +0000 (17:29 +0000)]
Add a partition type for ZFS.

16 years ago- Given that we tell the compiler that struct ip is packed and 32-bit
marius [Sun, 21 Oct 2007 17:03:18 +0000 (17:03 +0000)]
- Given that we tell the compiler that struct ip is packed and 32-bit
  aligned, GCC 4.2.1 also generates code for sendudp() that assumes
  this alignment. GCC 4.2.1 however doesn't 32-bit align wbuf, causing
  the loader to crash due to an unaligned access of wbuf in sendudp()
  when netbooting sparc64. Solve this by specifying wbuf as packed and
  32-bit aligned, too. As for lastdata and readudp() this currently is
  no issue when compiled with GCC 4.2.1, though give lastdata the same
  treatment as wbuf for consistency and possibility of being affected
  in the future. [1]
- Sprinkle const on a lookup table.

Reported by: marcel [1]
Submitted by: yongari [1]
Reviewed by: marcel [1]
MFC after: 5 days

16 years agoAdd a UUID for ZFS file systems.
marcel [Sun, 21 Oct 2007 16:38:49 +0000 (16:38 +0000)]
Add a UUID for ZFS file systems.

UUID reused from: Craig Boston

16 years agoAdditions from libpcap 0.9.8 unbreak the build.
mlaier [Sun, 21 Oct 2007 13:23:32 +0000 (13:23 +0000)]
Additions from libpcap 0.9.8 unbreak the build.

Pointy hat to: mlaier
X-MFC after: RELENG_7 buildworld

16 years agoCanonicalize naming of local variables for struct ksem and associated
rwatson [Sun, 21 Oct 2007 11:11:07 +0000 (11:11 +0000)]
Canonicalize naming of local variables for struct ksem and associated
labels to 'ks' and 'kslabel' to reflect the convention in posix_sem.c.

MFC after: 3 days
Obtained from: TrustedBSD Project

16 years agoFix a couple of small typos, and remove a duplicate
dougb [Sun, 21 Oct 2007 05:16:52 +0000 (05:16 +0000)]
Fix a couple of small typos, and remove a duplicate

16 years agoRemove references to the 'e_phnum' field of the ELF header. Instead,
jkoshy [Sun, 21 Oct 2007 05:15:07 +0000 (05:15 +0000)]
Remove references to the 'e_phnum' field of the ELF header.  Instead,
point the reader to the elf_getphnum() function.

MFC after: 1 day

16 years agoChange to the original version of the poem titled "The Guy in the Glass,"
dougb [Sun, 21 Oct 2007 05:15:02 +0000 (05:15 +0000)]
Change to the original version of the poem titled "The Guy in the Glass,"
and add the proper attribution. Also add an explanation for the Middle
English word used in the first line.

16 years agoRefer the reader to the elf_update(3) manual page for more information
jkoshy [Sun, 21 Oct 2007 05:08:40 +0000 (05:08 +0000)]
Refer the reader to the elf_update(3) manual page for more information
on application control of ELF object layout.

MFC after: 1 day

16 years agoThis time to the right branch
julian [Sun, 21 Oct 2007 04:27:07 +0000 (04:27 +0000)]
This time to the right branch
note the renaming of the kthread_xxx calls

16 years agofix up some code for older systems changed by accident in the last commit
julian [Sun, 21 Oct 2007 04:11:13 +0000 (04:11 +0000)]
fix up some code for older systems changed by accident in the last commit
this whole support for systems earlier than 5.0 should probably be removed
but I'll at least FIX it before removing it, so that CVS has it right.

16 years agoMark the point where kthread_xxx disappeared and kproc_xxx appeared
julian [Sun, 21 Oct 2007 04:04:09 +0000 (04:04 +0000)]
Mark the point where kthread_xxx disappeared and kproc_xxx appeared

16 years agoRemove out of date comments
julian [Sun, 21 Oct 2007 03:31:40 +0000 (03:31 +0000)]
Remove out of date comments

16 years agoNote the temporary removal of these functions.
julian [Sun, 21 Oct 2007 02:45:57 +0000 (02:45 +0000)]
Note the temporary removal of these functions.

16 years agoThis was kthread.9
julian [Sun, 21 Oct 2007 02:40:28 +0000 (02:40 +0000)]
This was kthread.9
it has  been duplicated to kproc.9

kthread.9 will continue on to describe the coming kthread_xxx
functions which will actually make threads.

16 years agoAdd the show command to print the partition information ala gpt(8).
marcel [Sun, 21 Oct 2007 00:04:23 +0000 (00:04 +0000)]
Add the show command to print the partition information ala gpt(8).
Update the manpage accordingly. While here, mention the MBR scheme
and add a bugs section. With this commit gpt(8) can be obsoleted.

16 years agoRename the kthread_xxx (e.g. kthread_create()) calls
julian [Sat, 20 Oct 2007 23:23:23 +0000 (23:23 +0000)]
Rename the kthread_xxx (e.g. kthread_create()) calls
to kproc_xxx as they actually make whole processes.
Thos makes way for us to add REAL kthread_create() and friends
that actually make theads. it turns out that most of these
calls actually end up being moved back to the thread version
when it's added. but we need to make this cosmetic change first.

I'd LOVE to do this rename in 7.0  so that we can eventually MFC the
new kthread_xxx() calls.

16 years agoFold multiple asm statements into one so that the compiler at a certain
bz [Sat, 20 Oct 2007 22:18:42 +0000 (22:18 +0000)]
Fold multiple asm statements into one so that the compiler at a certain
optimization level (-march=pentium-mmx for example) does not insert
intermediate ops which would trash the carry.

Change both sys/i386/i386/in_cksum.c[1] and sys/i386/include/in_cksum.h.

To my best understanding the same problem was addressed in rev. 1.16
of src/sys/i386/include/in_cksum.h for just a single function 3y ago.

Reviewed by:  jhb
Submitted by: Zhouyi ZHOU <zhouzhouyi FreeBSD.org> (intial version of [1])
MFC after:    5 days
PR:           115678, 69257

16 years agoRevert back to including the whole net/bpf.h again.
mlaier [Sat, 20 Oct 2007 20:23:39 +0000 (20:23 +0000)]
Revert back to including the whole net/bpf.h again.

Requested by: sam, nork
X-MFC after: now

16 years ago- Convert NO_INSTALLLIB option to a new syntax: makefiles should
ru [Sat, 20 Oct 2007 19:01:50 +0000 (19:01 +0000)]
- Convert NO_INSTALLLIB option to a new syntax: makefiles should
  test MK_INSTALLLIB, users can set WITHOUT_INSTALLLIB.  The old
  NO_INSTALLLIB is still supported as several makefiles set it.

- While here, fix an install when instructed not to install libs
  (usr.bin/lex/lib/Makefile).

PR: bin/114200
Submitted by: Henrik Brix Andersen

16 years agoAlign the warning message with the one in bsd.own.mk.
ru [Sat, 20 Oct 2007 18:46:15 +0000 (18:46 +0000)]
Align the warning message with the one in bsd.own.mk.

16 years agoAdd the -h <bindip> option to mountd, similar to the one in nfsd(8)
matteo [Sat, 20 Oct 2007 11:25:34 +0000 (11:25 +0000)]
Add the -h <bindip> option to mountd, similar to the one in nfsd(8)

-h bindip
Specify specific IP addresses to bind to for TCP and UDP requests.
This option may be specified multiple times.  If no -h option is
specified, mountd will bind to INADDR_ANY.  Note that when specifying
IP addresses with -h, mountd will automatically add 127.0.0.1 and if
IPv6 is enabled, ::1 to the list.

PR: bin/114097
Reviewed by: pjd (an eariler version of the patch)
MFC after: 1 week

16 years agoRemove redundant prototypes.
pjd [Sat, 20 Oct 2007 09:41:55 +0000 (09:41 +0000)]
Remove redundant prototypes.

16 years agoUse ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when stacked
thompsa [Sat, 20 Oct 2007 02:43:23 +0000 (02:43 +0000)]
Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when stacked
under a vlan.

MFC after: 3 days

16 years agoUse ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when bridging a
thompsa [Sat, 20 Oct 2007 02:10:10 +0000 (02:10 +0000)]
Use ETHER_BPF_MTAP so that the vlan tags are visible to bpf(4) when bridging a
vlan trunk.

Discussed with: csjp
MFC after: 3 days

16 years agoAllow adding a user(s) to additional groups in batch mode as well.
mtm [Sat, 20 Oct 2007 00:45:31 +0000 (00:45 +0000)]
Allow adding a user(s) to additional groups in batch mode as well.

Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru> (modulo minor changes)
MFC after: 2 weeks

16 years agoThe amd_map_program knob can potentially contain a command whose output
mtm [Fri, 19 Oct 2007 22:55:42 +0000 (22:55 +0000)]
The amd_map_program knob can potentially contain a command whose output
is then used as an argument to the amd program. This outpu may contain
newlines, but the script did not take care to strip those newlines before
apending it to rc_flags. Revision 1.72 of rc.subr(8) introduced changes that
exposed this problem (specifically putting the final eval'ed command in
quotes).[1]

Also, for correctness' sake, shell directives appended to the command-line
by the script should go into command_args, and not appended directly
to rc_flags.

Reported by: John E Hein <jhein@timing.com> [1]
Tested by: John E Hein <jhein@timing.com>
MFC after: 1 week

16 years agoIPFilter has been updated from 4.1.23 to 4.1.28.
delphij [Fri, 19 Oct 2007 20:15:57 +0000 (20:15 +0000)]
IPFilter has been updated from 4.1.23 to 4.1.28.

16 years agoFix build with NETGRAPH_DEBUG.
ru [Fri, 19 Oct 2007 20:09:58 +0000 (20:09 +0000)]
Fix build with NETGRAPH_DEBUG.

16 years agoPut comments about syscalls by the correct ones, and use the correct syscall
emaste [Fri, 19 Oct 2007 19:17:53 +0000 (19:17 +0000)]
Put comments about syscalls by the correct ones, and use the correct syscall
number in the comment.

16 years agoChange IPTOS_CE to IPTOS_ECN_CE.
rpaulo [Fri, 19 Oct 2007 18:24:19 +0000 (18:24 +0000)]
Change IPTOS_CE to IPTOS_ECN_CE.

Approved by: njl (mentor)

16 years agofix an incorrect setting of `retry times' in case of zd1211b, we
sam [Fri, 19 Oct 2007 16:33:31 +0000 (16:33 +0000)]
fix an incorrect setting of `retry times' in case of zd1211b, we
should set the ZYD_MACB_MAX_RETRY register instead of ZYD_MAC_RETRY

Submitted by: Weongyo Jeong
MFC after: 1 week

16 years agoTrim release notes for 8-CURRENT.
bmah [Fri, 19 Oct 2007 16:02:17 +0000 (16:02 +0000)]
Trim release notes for 8-CURRENT.

16 years ago- Gigabyte G33-S2H fixup, due to the present of multiple competing
ariff [Fri, 19 Oct 2007 15:49:39 +0000 (15:49 +0000)]
- Gigabyte G33-S2H fixup, due to the present of multiple competing
  codecs. Codec at address 0 seems purely digital, or perhaps an HDMI
  interface. Let the driver skip it and continue scanning the codecs
  starting with address 2 (Realtek ALC885).
  * Due to possibilities of future similar cases, put enough logic
    in hdac_scan_codecs() to force codec scanning starting from
    XX address via tunable "hint.pcm.%d.codec_index".

  Reported / Tested by: Toomas Pelberg <toomasp@gmx.net>

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  AMILO Si 1848 laptop.

  Reported / Tested by: Ed <ed@bsd.it>

- Trivial headphone / speaker automute fixup for Fujitsu-Siemens
  Lifebook S7020D laptop.

  Reported / Tested by: Jaromir Dvoracek <jarek@ataxo.com>

- Some smart vendor trying to create interplanetary wormhole by
  screwing pci config space during their BIOS update. The side effects
  of their failure attempt includes mutilated hardware id, broken
  speaker automuting and loosing the entire analog CD connectivity,
  thus causing enough collateral damages to collapse the entire
  universe.  Move along with it.

  Please exercise extra cautious when applying BIOS updates.

  Reported / Tested by: Pietro Cerutti <gahr@gahr.ch>
                        - assembled laptop, based on the MSI-1034
                          (662) which is now becoming MSI-034A.

- Fix no sound issues (on headphones) for Lenovo ThinkCentre A55 due
  to global automute table entry which is not applicable for
  non-laptops.

  Reported / Tested by: Piotr Smyrak <piotr.smyrak@heron.pl>

- Speaker mute control for HP DC7700 since the front headphone jack
  does not generate any interesting unsolicited signal/response.

  Reported / Tested by: tyop @ irc.freenode.net

Approved by: re (kensmith)
MFC after: 3 days

16 years agoImplement new apply callback mechanism to handle item forwarding.
mav [Fri, 19 Oct 2007 15:04:17 +0000 (15:04 +0000)]
Implement new apply callback mechanism to handle item forwarding.
When item forwarded refence counter is incremented, when item
processed, counter decremented. When counter reaches zero,
apply handler is getting called.
Now it allows to report right connect() call status from user-level
at the right time.

16 years agoRegen (nscd -> cached, WITHOUT_LIBPTHREAD disabling BIND).
ru [Fri, 19 Oct 2007 14:03:05 +0000 (14:03 +0000)]
Regen (nscd -> cached, WITHOUT_LIBPTHREAD disabling BIND).

16 years agocached -> nscd
ru [Fri, 19 Oct 2007 14:01:25 +0000 (14:01 +0000)]
cached -> nscd

16 years agoComply with the removal of IPTOS_CE and IPTOS_ECT.
rpaulo [Fri, 19 Oct 2007 12:48:02 +0000 (12:48 +0000)]
Comply with the removal of IPTOS_CE and IPTOS_ECT.
Discussed on freebsd-net with no objections.

Approved by: njl (mentor), rwatson

16 years agoRemove IPTOS_CE and IPTOS_ECT constants. They were defined in RFC 2481
rpaulo [Fri, 19 Oct 2007 12:46:15 +0000 (12:46 +0000)]
Remove IPTOS_CE and IPTOS_ECT constants. They were defined in RFC 2481
but later obsoleted by RFC 3168.
Discussed on freebsd-net with no objections.

Approved by: njl (mentor), rwatson

16 years agoSwitch over to ULE as the default scheduler for amd64 and i386
kensmith [Fri, 19 Oct 2007 12:30:33 +0000 (12:30 +0000)]
Switch over to ULE as the default scheduler for amd64 and i386
architectures.

16 years agoImplement the async (really, delayed-write) mount option for msdosfs.
bde [Fri, 19 Oct 2007 12:23:25 +0000 (12:23 +0000)]
Implement the async (really, delayed-write) mount option for msdosfs.

This is much simpler than for ffs since there are many fewer places
where we need to choose between a delayed write and a sync write --
just 5 in msdosfs and more than 30 in ffs.

This is more complete and correct than in ffs.  Several places in ffs
are are still missing the choice.  ffs_update() has a layering violation
that breaks callers which want to force a sync update (mainly fsync(2)
and O_SYNC write(2)).

However, fsync(2) and O_SYNC write(2) are still more broken than in
ffs, since they are broken for default (non-sync non-async) mounts
too.  Both fail to sync the FAT in all cases, and both fail to sync
the directory entry in some cases after losing a race.  Async everything
is probably safer than the half-baked sync of metadata given by default
mounts.

16 years agoInstall getaudit_addr(2) and setaudit_addr(2) links to getaudit(2) and
rwatson [Fri, 19 Oct 2007 10:37:34 +0000 (10:37 +0000)]
Install getaudit_addr(2) and setaudit_addr(2) links to getaudit(2) and
setaudit(2).

MFC after: 3 days
Submitted by: csjp
Obtained from: TrustedBSD Project

16 years agoPartial backout of rev. 1.6, but instead of putting kerberos5_server_flags
mtm [Fri, 19 Oct 2007 08:59:59 +0000 (08:59 +0000)]
Partial backout of rev. 1.6, but instead of putting kerberos5_server_flags
back in command_args, put it where rc.subr(8) expects it: kerberos5_flags.

16 years agoPick the smallest possible TCP window scaling factor that will still allow
silby [Fri, 19 Oct 2007 08:53:14 +0000 (08:53 +0000)]
Pick the smallest possible TCP window scaling factor that will still allow
us to scale up to sb_max, aka kern.ipc.maxsockbuf.

We do this because there are broken firewalls that will corrupt the window
scale option, leading to the other endpoint believing that our advertised
window is unscaled.  At scale factors larger than 5 the unscaled window will
drop below 1500 bytes, leading to serious problems when traversing these
broken firewalls.

With the default maxsockbuf of 256K, a scale factor of 3 will be chosen by
this algorithm.  Those who choose a larger maxsockbuf should watch out
for the compatiblity problems mentioned above.

Reviewed by: andre

16 years agoThe POP daemon's temporary mail file has a leading dot ('.'). This was
mtm [Fri, 19 Oct 2007 07:18:56 +0000 (07:18 +0000)]
The POP daemon's temporary mail file has a leading dot ('.'). This was
lost in the shell script rewrite of the rmuser command.

Submitted by: Ian Smith <smithi@nimnet.asn.au>

16 years agoRemove out of date notes, the atoi code is thread-safe and async-cancel
davidxu [Fri, 19 Oct 2007 06:23:39 +0000 (06:23 +0000)]
Remove out of date notes, the atoi code is thread-safe and async-cancel
safe.

Discussed with: desichen

16 years agoRemove stale reference to mount_std.
rodrigc [Fri, 19 Oct 2007 05:29:18 +0000 (05:29 +0000)]
Remove stale reference to mount_std.

16 years agoSmall fix in man pages after cached -> nscd renaming.
bushman [Fri, 19 Oct 2007 00:16:29 +0000 (00:16 +0000)]
Small fix in man pages after cached -> nscd renaming.

Approved by: brooks (mentor)

16 years agoThe previous revision, updating vm_object_page_remove() for the new page
alc [Thu, 18 Oct 2007 23:02:18 +0000 (23:02 +0000)]
The previous revision, updating vm_object_page_remove() for the new page
cache, did not account for the case where the vm object has nothing but
cached pages.

Reported by: kris, tegge
Reviewed by: tegge
MFC after: 3 days

16 years agoFix cosmetic bug in stale copy of msync_args. 'len' is size_t, not int.
peter [Thu, 18 Oct 2007 22:47:39 +0000 (22:47 +0000)]
Fix cosmetic bug in stale copy of msync_args.  'len' is size_t, not int.

16 years agoUse a uint16_t type for the vlan tag rather an int.
thompsa [Thu, 18 Oct 2007 21:52:31 +0000 (21:52 +0000)]
Use a uint16_t type for the vlan tag rather an int.

16 years agoPullup IPFilter 4.1.28 from the vendor branch into HEAD.
darrenr [Thu, 18 Oct 2007 21:52:14 +0000 (21:52 +0000)]
Pullup IPFilter 4.1.28 from the vendor branch into HEAD.

MFC after: 7 days

16 years agoUnbreak arm build by removing duplicate symbols.
cognet [Thu, 18 Oct 2007 21:44:21 +0000 (21:44 +0000)]
Unbreak arm build by removing duplicate symbols.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r172771,
darrenr [Thu, 18 Oct 2007 21:42:51 +0000 (21:42 +0000)]
This commit was generated by cvs2svn to compensate for changes in r172771,
which included commits to RCS files with non-trunk default branches.