Commit Graph

139649 Commits

Author SHA1 Message Date
Robert Watson
3319d71265 If S_IFIFO is passed to mknod(2), invoke kern_mkfifoat(9) to create a
FIFO, as required by SUSv3.  No specific privilege check is performed
in this case, as FIFOs may be created by unprivileged processes
(subject to the normal file system name space restrictions that may be
in place).

Unlike the Apple implementation, we reject requests to create a FIFO
using mknod(2) if there is a non-zero dev argument to the system call,
which is permitted by the Open Group specification ("... undefined
...").  We might want to revise this if we find it causes
compatibility problems for applications in practice.

PR:		kern/74242, kern/68459
Obtained from:	Apple, Inc.
MFC after:	3 weeks
2008-06-22 21:51:32 +00:00
Alexander Motin
b6365f959c Use strdup() instead of static buffer allocation to avoid 128 bytes limit
on -redirect_XXX arguments length.

PR:		bin/86647
Submitted by:	Stephen Hurd <shurd@sasktel.net>
2008-06-22 21:22:25 +00:00
Robert Watson
1a0046f73b Teach fifo_create regression test to also try to use mknod(2) to create
fifos, as this is required by the Single UNIX Specification, although
not currently implemented on FreeBSD.

While here, fix a bug in the directory timestamp checking test by
sleeping after querying the starting timestamp, rather than before.
2008-06-22 21:03:26 +00:00
Oleksandr Tymoshenko
f219c59601 Add support for VT8237 ISA bridge.
PR:     kern/120714
Event:  Bugathon#5
2008-06-22 20:53:29 +00:00
David E. O'Brien
dc70a966e3 Add an abbreviation for adaptive mode, and document all the abreviations. 2008-06-22 17:52:57 +00:00
Mike Makonnen
f27ca6ea2f Output information only if /etc/rc.local exists. 2008-06-22 16:23:39 +00:00
Mike Makonnen
3c81343da6 Do not print anything unless at least one of the abi emulators is
enabled.
2008-06-22 16:19:50 +00:00
Mike Makonnen
3dce702718 Simplify this script with the added bonus that the bit about i386
initialization doesn't get printed unless ibcs2_enable is set.
2008-06-22 15:57:50 +00:00
Mike Makonnen
69ad4d6960 Don't say we're going to mount filesystems of a certain type unless
there actually are filesystems of that type to mount.
2008-06-22 15:40:19 +00:00
Mike Makonnen
3773d8c3cf Don't say we're going to [start|stop] local packages unless there actually
are local (pre rc.d) scripts to run.
2008-06-22 15:34:40 +00:00
Oleksandr Tymoshenko
2da528a74f Get pointer to devfs_ruleset struct after garbage collection has been
performed. Otherwise if ruleset is used by given mountpoint and is empty
it's freed by devfs_ruleset_reap and pointer becomes bogus.

Submitted by:   Mateusz Guzik <mjguzik@gmail.com>
PR:             kern/124853
2008-06-22 14:34:38 +00:00
Marius Strobl
ccb1212a56 o The FreeBSD bus_dmamap_sync(9) supports ored together flags for quite
some time now so collapse calls accordingly.
o Given that gem_load_txmbuf() is allowed to fail resulting in a packet
  drop also for quite some time now implement the functionality of
  gem_txcksum() by means of m_pullup(9), which de-obfuscates the code
  and allows to always retrieve the correct length of the IP header.
o Add missing BUS_DMASYNC_PREREAD when syncing the control DMA maps in
  gem_rint() and gem_start_locked().
o Correct some bus_barrier(9) calls to do a read/write barrier as we
  do a read after a write. Add some missing ones in gem_mii_readreg()
  and gem_mii_writereg().
o According to the Apple GMAC driver, the GEM ASIC specification and
  the OpenSolaris eri(7D) the TX FIFO threshold has to be set to 0x4ff
  for the Gigabit variants and 0x100 for the ERI in order do avoid TX
  underruns.
o In gem_init_locked():
  - be conservative and enable the RX and TX MACs,
  - don't clear GEM_LINK otherwise we don't ever mark the link as up
    again if gem_init_locked() is called from gem_watchdog(),
  - remove superfluous setting of sc_ifflags.
o Don't bother to check whether the interface is running or whether its
  queue is empty before calling gem_start_locked() in gem_tint(), the
  former will check these anyway.
o Call gem_start_locked() in gem_watchdog() in order to try to get
  some more packets going.
o In gem_mii_writereg() after reseting the PCS restore its configuration.

GMAC testing:	grehan, marcel
MFC after:	2 weeks
2008-06-22 13:54:51 +00:00
Alexander Motin
48ca67bea6 Partially revert previous commit. DeleteLink() does not deletes permanent
links so we should be aware of it and try to delete every link only once
or we will loop forever.
2008-06-22 11:39:42 +00:00
Alan Cox
5cfa90e902 Make preparations for increasing the size of the kernel virtual address space
on the amd64 architecture.  The amd64 architecture requires kernel code and
global variables to reside in the highest 2GB of the 64-bit virtual address
space.  Thus, the memory allocated during bootstrap, before the call to
kmem_init(), starts at KERNBASE, which is not necessarily the same as
VM_MIN_KERNEL_ADDRESS on amd64.
2008-06-22 04:54:27 +00:00
Alan Cox
c1f02198d1 KERNBASE is not necessarily an address within the kernel map, e.g.,
PowerPC/AIM.  Consequently, it should not be used to determine the maximum
number of kernel map entries.  Intead, use VM_MIN_KERNEL_ADDRESS, which marks
the start of the kernel map on all architectures.

Tested by:	marcel@ (PowerPC/AIM)
2008-06-21 21:02:13 +00:00
Alexander Motin
ea29dd9241 Implement UDP transparent proxy support.
PR:		bin/54274
Submitted by:	Nicolai Petri <nicolai@petri.cc>
2008-06-21 20:18:57 +00:00
David Schultz
c0ff67d57f Regression test for a recently fixed strtod bug. 2008-06-21 19:28:26 +00:00
David Schultz
c713eaa603 Bring in the vendor's fix for a bug in strtod() whereby
strtod("0xyz", &endp) resulted in endp pointing to "0xyz"
instead of "xyz".

Reported by:	Tony Finch <dot@dotat.at>
MFC after:	1 week
2008-06-21 19:27:54 +00:00
Alan Cox
0ee1368a96 Prepare for a larger kernel virtual address space. Specifically, once
KERNBASE and VM_MIN_KERNEL_ADDRESS are no longer the same, the physical
memory allocated during bootstrap will be offset from the low-end of the
kernel's page table.
2008-06-21 19:19:09 +00:00
Tim Kientzle
80a6a0328a Refactor one of the ISO extraction tests: Move the reference
file into a separate file (instead of embedding it in the C code)
and use later timestamps (timestamps too close to the Epoch fail
predictably on systems that lack timegm(), whose mktime() doesn't
support dates before the Epoch and which are running in timezones
with negative offsets from GMT).  The goal here is to test the ISO
extraction, not the local platform's time support.
2008-06-21 19:11:51 +00:00
Tim Kientzle
8a4ce0fb38 MfP4: Joerg Sonnenberg's extensions to the mtree support for more
complete quoting.  In particular, this handles escaped newlines
and common C-style escapes.
2008-06-21 19:06:37 +00:00
Tim Kientzle
be5eb9821c A security-check failure here should be ARCHIVE_FAILED (cannot continue this
operation) and not ARCHIVE_WARN, since we don't actually open the file.
Both bsdtar and bsdcpio will try to copy file contents after an ARCHIVE_WARN,
which will fail loudly.
2008-06-21 19:05:29 +00:00
Tim Kientzle
1aaade6e93 If we're using -l and can't hardlink the file because of a cross-device
link, just ignore the -l option and copy the file instead.
In particular, this should fix the COPYTREE_* macros used in the
ports infrastructure which use -l to preserve space but often get
used for cross-device copies.
2008-06-21 17:47:56 +00:00
Alexander Motin
b46d3e21bb Add support for PORT/EPRT FTP commands in lowercase.
Use strncasecmp() instead of huge local implementation to reduce code size.
Check space presence after command/code.

PR:		kern/73034
2008-06-21 16:22:56 +00:00
Ruslan Ermilov
cd83aa9707 Removed the no-op -p; documented -P.
MFC after:	3 days
2008-06-21 15:48:16 +00:00
Dmitry Morozovsky
c94b8307db Add -v (verbose) option to -l command, to show size and backing store
of all md devices at one time.

Approved by:	phk
MFC after:	2 weeks
2008-06-21 15:04:42 +00:00
Simon L. B. Nielsen
44c8009459 To catch up with rev 179872: rename enable_quotas to quota_enable. 2008-06-21 13:53:35 +00:00
Oleksandr Tymoshenko
22035f4727 Use minimum of max_aio_procs and target_aio_procs when spawning new
aiod since there should be no more then max_aio_procs processes.
2008-06-21 11:34:34 +00:00
Tim Kientzle
9b48cdcc39 Rework line-processing framework to add support for --null and
to eliminate a callback.
2008-06-21 02:20:20 +00:00
Tim Kientzle
00e3ab6e67 Various long options for GNU cpio compat. 2008-06-21 02:18:52 +00:00
Tim Kientzle
152e214a9a MfP4: test improvements, mostly for portability. 2008-06-21 02:17:18 +00:00
Daniel Gerzo
1d9fef7106 - link powerd(8) man page
PR:		docs/123111
MFC after:	3 days
2008-06-20 23:04:34 +00:00
Oleksandr Tymoshenko
d614e99f2e Fix PCI id for 945GME Express Integrated Graphics Controller:
set to 8086:27AE

PR:     kern/124782
Event:  Bugathon#5
2008-06-20 22:23:41 +00:00
Oleksandr Tymoshenko
032de3f930 Fix spelling
PR:	kern/124723
Event:	Bugathon#5
2008-06-20 21:41:44 +00:00
Alan Cox
948c5cc27e Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture.  The amd64 architecture
requires kernel code and global variables to reside in the highest 2GB
of the 64-bit virtual address space.  Thus, KERNBASE cannot change.
However, KERNBASE is sometimes used as the start of the kernel virtual
address space.  Henceforth, VM_MIN_KERNEL_ADDRESS should be used
instead.  Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same
address, there should be no visible effect from this change (yet).
That said, kris@ has tested crash dumps under the full patch that
increases the kernel virtual address space on amd64 to 6GB.

Tested by: kris@
2008-06-20 20:59:31 +00:00
Ulf Lilleengen
7e7a4e1d18 - Fix spelling errors.
Approved by:    kib (mentor)
PR:             kern/124788
Submitted by:   Hywel Mallett <Hywel -at- hmallett.co.uk>
2008-06-20 19:48:18 +00:00
Xin LI
cca7141d76 Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit
Ethernet device driver, written by sephe@

Obtained from:	DragonFly
Sponsored by:	iXsystems
MFC after:	2 weeks
2008-06-20 19:30:44 +00:00
Xin LI
4d52a57549 Add et(4), a port of DragonFly's Agere ET1310 10/100/Gigabit
Ethernet device driver, written by sephe@

Obtained from:	DragonFly
Sponsored by:	iXsystems
MFC after:	2 weeks
2008-06-20 19:28:33 +00:00
Andrew Thompson
131c55bc5b Add support for the optional key in the GRE header.
PR:		kern/114714
Submitted by:	Cristian KLEIN
2008-06-20 17:26:34 +00:00
Warner Losh
c14909b6e2 Split out the probing magic of device_probe_and_attach into
device_probe() so that it can be used by busses that may wish to do
additional processing between probe and attach.

Reviewed by:	dfr@
2008-06-20 16:58:15 +00:00
Poul-Henning Kamp
20067a6892 Add Xr to getsockname(2) 2008-06-20 14:47:06 +00:00
Joerg Wunsch
2b7b4962ab Make the search for sources in PATH_PORTS more accurate. I only
noticed that a "whereis -qs qemu" matched the distfiles subdir of qemu
rather than /usr/ports/emulators/qemu.

It now ignores all dot entries in /usr/ports, plus all entries
starting with a capital letter (maintenance stuff like Templates, but
also includes subdir CVS), plus /usr/ports/distfiles which is simply a
magic name in that respect.
2008-06-20 08:39:42 +00:00
Alan Cox
ac68d1c960 Enforce the mapping of kernel loadable modules in the uppermost 2GB of the
kernel virtual address space on amd64.
2008-06-20 06:24:34 +00:00
Alan Cox
293ab7c941 Make preparations for increasing the size of the kernel virtual
address space on the amd64 architecture.  The amd64 architecture
requires kernel code and global variables to reside in the highest 2GB
of the 64-bit virtual address space.  Thus, KERNBASE cannot change.
However, KERNBASE is sometimes used as the start of the kernel virtual
address space.  Henceforth, VM_MIN_KERNEL_ADDRESS should be used
instead.  Since KERNBASE and VM_MIN_KERNEL_ADDRESS are still the same
address, there should be no visible effect from this change (yet).
2008-06-20 05:22:09 +00:00
David Schultz
f2dc0faad0 Implement fmodl.
Document fmodl and fix some errors in the fmod manpage.
2008-06-19 22:39:53 +00:00
Xin LI
2110d913c0 Revert rev. 178124 as requested by kris@. Having jail id not being
reused too frequently is useful for script controlled environment.
2008-06-19 21:41:57 +00:00
Remko Lodder
6a4c41d1bb Document the _arg versions of the uma_zalloc and uma_zfree functions.
PR:		docs/120357
Submitted by:	gahr
MFC after:	3 days
2008-06-19 18:33:38 +00:00
Oleksandr Tymoshenko
23c8064e66 Renew semaphore's pointer after wakeup since during msleep
sem_base may have been modified by destroying one of semaphores
and semptr would not be valid in this case.

PR: kern/123731
2008-06-19 18:08:42 +00:00
Alexander Motin
145d2d3ac4 Add myself. Better late then never. 2008-06-19 17:10:05 +00:00
Dmitry Marakasov
8caf8ff11d Add myself.
Approved by:	miwi (mentor)
2008-06-19 16:30:06 +00:00