]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoConvert telnetd(8) to use posix_openpt(2).
Ed Schouten [Thu, 13 Nov 2008 19:05:27 +0000 (19:05 +0000)]
Convert telnetd(8) to use posix_openpt(2).

Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even
though it turned out to be a different problem within the TTY code, I
spotted a small issue with telnetd(8). Instead of allocating PTY's using
openpty(3) or posix_openpt(2), it used its own PTY allocation routine.
This means that telnetd(8) still uses /dev/ptyXX-style devices.

I've also increased the size of line[]. Even though 16 should be enough,
we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives
us a little more freedom.

Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname
to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 ->
0, instead of pts/0).

Reviewed by: rink

15 years agoFor now on every 10 cyclinder groups flush the buffer cache to free
Doug Ambrisko [Thu, 13 Nov 2008 17:40:21 +0000 (17:40 +0000)]
For now on every 10 cyclinder groups flush the buffer cache to free
up space.  If the buffer cache fills up then the disk systems can
grind to a halt.  Better tuning can be figured out later.

Tested by: Tim, others and work
Reviewed by: Kostik Belousov
PR: 128832

15 years agoOne more piece to add to make sense data work for a user app. from LSI.
Doug Ambrisko [Thu, 13 Nov 2008 17:13:16 +0000 (17:13 +0000)]
One more piece to add to make sense data work for a user app. from LSI.

Submitted by: LSI
MFC after: 3 days

15 years agoTweak -mdoc usage.
Joseph Koshy [Thu, 13 Nov 2008 16:32:20 +0000 (16:32 +0000)]
Tweak -mdoc usage.

15 years agoFix whitespace.
Ed Maste [Thu, 13 Nov 2008 15:06:34 +0000 (15:06 +0000)]
Fix whitespace.

15 years agoUse the remote address for access control, not the local address. This fixes
Doug Rabson [Thu, 13 Nov 2008 14:36:52 +0000 (14:36 +0000)]
Use the remote address for access control, not the local address. This fixes
the nfsd problems that some people have with the new code.

Add support for the vfs.nfsrv.nfs_privport sysctl which denies access unless
the client is using a port number less than 1024. Not really sure if this is
particularly useful since it doesn't add any real security.

15 years agoTemporarily switch NFS back to the old RPC code while I try to diagnose and
Doug Rabson [Thu, 13 Nov 2008 11:35:18 +0000 (11:35 +0000)]
Temporarily switch NFS back to the old RPC code while I try to diagnose and
fix the problems a few people have noticed with the new code. People who want
to continue testing the new code or who need RPCSEC_GSS support should use
the new option NFS_NEWRPC to select it.

15 years agoDocument UMASK values, fix errors.
Joseph Koshy [Thu, 13 Nov 2008 10:40:13 +0000 (10:40 +0000)]
Document UMASK values, fix errors.

15 years agoFix typos, document UMASK values.
Joseph Koshy [Thu, 13 Nov 2008 10:21:56 +0000 (10:21 +0000)]
Fix typos, document UMASK values.

15 years agoRemove duplicates, fix errors and document UMASK values.
Joseph Koshy [Thu, 13 Nov 2008 09:53:53 +0000 (09:53 +0000)]
Remove duplicates, fix errors and document UMASK values.

15 years agoAdd myself to the src committers list, with Diomidis as the mentor.
Konrad Jankowski [Thu, 13 Nov 2008 07:26:30 +0000 (07:26 +0000)]
Add myself to the src committers list, with Diomidis as the mentor.

Approved by: dds (mentor)

15 years agoFix Rx/Tx checksum offload ioctl handling. Now checksum offload
Pyun YongHyeon [Thu, 13 Nov 2008 04:11:01 +0000 (04:11 +0000)]
Fix Rx/Tx checksum offload ioctl handling. Now checksum offload
can be controlled by ifconfig(8). Note, VLAN hardware tagging
controls still lacks required handler but it requires more driver
cleanups so I didn't touch that part.

PR: kern/128766

15 years agoThis is being committed from a sparc64 (US-III, thanks Marius!) that
Ken Smith [Thu, 13 Nov 2008 01:47:08 +0000 (01:47 +0000)]
This is being committed from a sparc64 (US-III, thanks Marius!) that
was installed from a DVD so apparently it works... :-)

Enable building DVDs for sparc64.

15 years agoThe audit queue limit variables are size_t, so use size_t for the audit
Robert Watson [Thu, 13 Nov 2008 00:21:01 +0000 (00:21 +0000)]
The audit queue limit variables are size_t, so use size_t for the audit
queue length variables as well, avoiding storing the limit in a larger
type than the length.

Submitted by: sson
Sponsored by: Apple Inc.
MFC after: 1 week

15 years ago- Fix from jhb for failing I/O request when bus_dmamap_load fails.
Doug Ambrisko [Wed, 12 Nov 2008 22:44:50 +0000 (22:44 +0000)]
- Fix from jhb for failing I/O request when bus_dmamap_load fails.
- Fix to ioctl path in which the length could be 0 which means
  no data in/out from LSI.
- Fix to ioctl path in which the data in the sense data space
  of the ioctl packet is a really a pointer to some location in
  user-space.  From LSI re-worked a bit by me.
- Add HW support for next gen cards from LSI.

Thanks to LSI for their support!

Submitted by: jhb, LSI
MFC after: 3 days

15 years agoVarious style and whitespace fixes. Previously parts of this file used
John Baldwin [Wed, 12 Nov 2008 22:14:05 +0000 (22:14 +0000)]
Various style and whitespace fixes.  Previously parts of this file used
8 space indent, parts used 4 space indent, and other parts used a weird
mixture (8 spaces for first indent, 4 spaces for the rest).

15 years agoAdd opt_inet.h which has been needed since r184718, which had
Bjoern A. Zeeb [Wed, 12 Nov 2008 21:33:45 +0000 (21:33 +0000)]
Add opt_inet.h which has been needed since r184718, which had
introduced checks for #ifdef INET.

MFC after: 54 days

15 years agoAdd opt_inet.h which has been needed since r184717 introducing
Bjoern A. Zeeb [Wed, 12 Nov 2008 21:32:49 +0000 (21:32 +0000)]
Add opt_inet.h which has been needed since r184717 introducing
checks for #ifdef INET.

MFC after: 54 days

15 years agoAdd opt_inet.h which has been needed since r184714, r184715 introducing
Bjoern A. Zeeb [Wed, 12 Nov 2008 21:30:39 +0000 (21:30 +0000)]
Add opt_inet.h which has been needed since r184714, r184715 introducing
checks for #ifdef INET.

Submitted by: kmacy (r184876, I splitted lines)
MFC after: 54 days

15 years agoDocument the alternate event names supported for "architectural" PMC events.
Joseph Koshy [Wed, 12 Nov 2008 17:43:37 +0000 (17:43 +0000)]
Document the alternate event names supported for "architectural" PMC events.

15 years agoUse spellings that are close to vendor documentation.
Joseph Koshy [Wed, 12 Nov 2008 17:38:23 +0000 (17:38 +0000)]
Use spellings that are close to vendor documentation.

15 years agoProbe ADB miscellaneous devices (ID 7) instead of stopping at ID 6. This
Nathan Whitehorn [Wed, 12 Nov 2008 17:33:36 +0000 (17:33 +0000)]
Probe ADB miscellaneous devices (ID 7) instead of stopping at ID 6. This
allows us to probe the brightness and volume control buttons on PPC Apple
laptops, though there is not yet a driver to do anything useful with them.

15 years agoCall svc_freereq() before returning from the service proc.
Doug Rabson [Wed, 12 Nov 2008 15:31:05 +0000 (15:31 +0000)]
Call svc_freereq() before returning from the service proc.

15 years agoDon't call svc_freereq() before svc_freeargs().
Doug Rabson [Wed, 12 Nov 2008 15:30:30 +0000 (15:30 +0000)]
Don't call svc_freereq() before svc_freeargs().

15 years ago-Improvement: Add '\n' on debug output in sctp_lower_sosend().
Randall Stewart [Wed, 12 Nov 2008 14:16:39 +0000 (14:16 +0000)]
-Improvement: Add '\n' on debug output in sctp_lower_sosend().
-Improvement: panic() on INVARIANTS kernels if memory allocation
 fails for a tagblock in sctp_add_vtag_to_timewait().
-Bugfix: Protect code in sctp_is_in_timewait() by
 SCTP_INP_INFO_WLOCK/SCTP_INP_INFO_WUNLOCK.
-Cleanup: Get rid of unused variable now in sctp_init_asoc().
-Bugfix: Reuse the correct vtag in sctp_add_vtag_to_timewait().
-Cleanup: Get rid of unused constant SCTP_TIME_WAIT_SHORT
 in sctp_constants.h.
-Improvement: Use all hash buckets of the vtag hash table.
-Cleanup: Get rid of then unused constant SCTP_STACK_VTAG_HASH_SIZE_A.
-Bugfix: Handle SHUTDOWN;SACK packet correctly.
-Bugfix: Last TSN in a gap ack block was not being "ack'd"
         in the internal scoreboard.
Obtained from: (with help from Michael Tuexen)

15 years agoAdd a quirk for Belkin USB Bluetooth adapters (F8T012xx1 series)
Giorgos Keramidas [Wed, 12 Nov 2008 13:58:59 +0000 (13:58 +0000)]
Add a quirk for Belkin USB Bluetooth adapters (F8T012xx1 series)

The same (vendor, product) tuple is used for aue(4) adapters,
but I am not sure if the quirk is correct.  I'm using the USB
device 'release' info to skip aue(4) detection right now, but
if there's a better way to differentiate between USB-LAN and
USB Bluetooth we should update the quirk.

Reviewed by: imp, rink
MFC after: 2 weeks

15 years agoAdd support for the Microsoft Comfort Optical Mouse 3000 (model 1043).
Colin Percival [Wed, 12 Nov 2008 13:32:19 +0000 (13:32 +0000)]
Add support for the Microsoft Comfort Optical Mouse 3000 (model 1043).

PR: usb/128760
Submitted by: Arjan de Vet

15 years agoAdd a missing call to mtx_destroy().
Doug Rabson [Wed, 12 Nov 2008 12:21:18 +0000 (12:21 +0000)]
Add a missing call to mtx_destroy().

15 years agoCorrect .Dd
Pyun YongHyeon [Wed, 12 Nov 2008 10:31:06 +0000 (10:31 +0000)]
Correct .Dd

Pointed out by: maxim

15 years agoAdd ale(4) man page and hook up ale(4) to the build.
Pyun YongHyeon [Wed, 12 Nov 2008 10:20:29 +0000 (10:20 +0000)]
Add ale(4) man page and hook up ale(4) to the build.
Also add Xr to appropriate man pages.

15 years agoAdd ale(4) to the list of supported network interface.
Pyun YongHyeon [Wed, 12 Nov 2008 10:01:16 +0000 (10:01 +0000)]
Add ale(4) to the list of supported network interface.

15 years agoAdd ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
Pyun YongHyeon [Wed, 12 Nov 2008 09:52:06 +0000 (09:52 +0000)]
Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet
controller. The controller is also known as L1E(AR8121) and
L2E(AR8113/AR8114). Unlike its predecessor Attansic L1,
AR8121/AR8113/AR8114 uses completely different Rx logic such that
it requires separate driver. Datasheet for AR81xx is not available
to open source driver writers but it shares large part of Tx and
PHY logic of L1. I still don't understand some part of register
meaning and some MAC statistics counters but the driver seems to
have no critical issues for performance and stability.

The AR81xx requires copy operation to pass received frames to upper
stack such that ale(4) consumes a lot of CPU cycles than that of
other controller. A couple of silicon bugs also adds more CPU
cycles to address the known hardware bug. However, if you have fast
CPU you can still saturate the link.
Currently ale(4) supports the following hardware features.
  - MSI.
  - TCP Segmentation offload.
  - Hardware VLAN tag insertion/stripping with checksum offload.
  - Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload.
  - Tx/Rx interrupt moderation.
  - Hardware statistics counters.
  - Jumbo frame.
  - WOL.

AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or
P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick
who sent the hardware to me. Without his donation writing a driver
for AR81xx would never have been possible. Big thanks to all people
who reported feedback or tested patches.

HW donated by: koitsu
Tested by: bsam, Joao Barros <joao.barros <> gmail DOT com >
Jan Henrik Sylvester <me <> janh DOT de >
Ivan Brawley < ivan <> brawley DOT id DOT au >,
CURRENT ML

15 years agoTurn (NFSERR_AUTHERR|code) status values into svcerr_auth(rqst, code) replies
Doug Rabson [Wed, 12 Nov 2008 09:38:18 +0000 (09:38 +0000)]
Turn (NFSERR_AUTHERR|code) status values into svcerr_auth(rqst, code) replies
instead of returning a success with a bogus NFS error code.

15 years agoAllow v3 GETATTR requests even when weakly authenticated. Change the error
Doug Rabson [Wed, 12 Nov 2008 09:36:35 +0000 (09:36 +0000)]
Allow v3 GETATTR requests even when weakly authenticated. Change the error
return for for weakly authenticated requests from REJECTEDCRED to WEAKAUTH
for consistency with Solaris.

15 years agoDon't forget to relock the TTY after uiomove() returns an error.
Ed Schouten [Wed, 12 Nov 2008 09:04:44 +0000 (09:04 +0000)]
Don't forget to relock the TTY after uiomove() returns an error.

Peter Holm just discovered this funny bug inside the TTY code: if
uiomove() in ttydisc_write() returns an error, we forget to relock the
TTY before jumping out of ttydisc_write(). Fix it by placing
tty_unlock() and tty_lock() around uiomove().

Submitted by: pho

15 years agoUpdate firmware version check
Kip Macy [Wed, 12 Nov 2008 04:45:09 +0000 (04:45 +0000)]
Update firmware version check
make ddp a tunable

Obtained from: Chelsio Inc.
MFC after: 3 days

15 years agoAdd the kerberos5 libs to the install32 target.
David E. O'Brien [Wed, 12 Nov 2008 04:43:55 +0000 (04:43 +0000)]
Add the kerberos5 libs to the install32 target.
(we've been building the all along, but never installing them)

15 years agoMove audit-internal function definitions for getting and setting audit
Robert Watson [Tue, 11 Nov 2008 23:08:20 +0000 (23:08 +0000)]
Move audit-internal function definitions for getting and setting audit
kinfo state to audit_private.h.

15 years agoMinor style tweaks and change lock name string to use _'s and not spaces
Robert Watson [Tue, 11 Nov 2008 22:59:40 +0000 (22:59 +0000)]
Minor style tweaks and change lock name string to use _'s and not spaces
to improve parseability.

15 years agoAdd support for extended header BSM tokens. Currently we use the
Christian S.J. Peron [Tue, 11 Nov 2008 21:57:03 +0000 (21:57 +0000)]
Add support for extended header BSM tokens.  Currently we use the
regular header tokens.  The extended header tokens contain an IP
or IPv6 address which makes it possible to identify which host an
audit record came from when audit records are centralized.

If the host information has not been specified, the system will
default to the old style headers.  Otherwise, audit records that
are created as a result of system calls will contain host information.

This implemented has been designed to be consistent with the Solaris
implementation.  Host information is set/retrieved using the A_GETKAUDIT
and A_SETKAUDIT auditon(2) commands.  These commands require that a
pointer to a auditinfo_addr_t object is passed.  Currently only IP and
IPv6 address families are supported.

The users pace bits associated with this change will follow in an
openbsm import.

Reviewed by: rwatson, (sson, wsalamon (older version))
MFC after: 1 month

15 years agoFix the code to conform to the "or more" part of the following POSIX
Diomidis Spinellis [Tue, 11 Nov 2008 17:15:57 +0000 (17:15 +0000)]
Fix the code to conform to the "or more" part of the following POSIX
specification and regression test regress:25.

  "A function can be preceded by one or more '!' characters, in which
  case the function shall be applied if the addresses do not select
  the pattern space."

MFC after: 2 weeks

15 years agoAdd a test for the "or more" part of the following POSIX specification.
Diomidis Spinellis [Tue, 11 Nov 2008 17:10:24 +0000 (17:10 +0000)]
Add a test for the "or more" part of the following POSIX specification.

  "A function can be preceded by one or more '!' characters, in which
  case the function shall be applied if the addresses do not select
  the pattern space."

15 years agoSeveral cleanups related to pipe(2).
Ed Schouten [Tue, 11 Nov 2008 14:55:59 +0000 (14:55 +0000)]
Several cleanups related to pipe(2).

- Use `fildes[2]' instead of `*fildes' to make more clear that pipe(2)
  fills an array with two descriptors.

- Remove EFAULT from the manual page. Because of the current calling
  convention, pipe(2) raises a segmentation fault when an invalid
  address is passed.

- Introduce kern_pipe() to make it easier for binary emulations to
  implement pipe(2).

- Make Linux binary emulation use kern_pipe(), which means we don't have
  to recover td_retval after calling the FreeBSD system call.

Approved by: rdivacky
Discussed on: arch

15 years agoAvoid scheduling firmware taskqs when cold.
Andrew Gallatin [Tue, 11 Nov 2008 12:25:08 +0000 (12:25 +0000)]
Avoid scheduling firmware taskqs when cold.

This prevents a panic which occurs when a driver attempts to load
firmware at boot via firmware_get() when the firmware module has not
been preloaded.  firmware_get() will  enqueue a task using a struct
taskqueue allocated on the stack, and the machine will crash much
later in the firmware taskq thread when taskqs are started and the
struct taskqueue is garbage.

Not objected to by: sam

15 years ago- Use RTFREE_LOCKED macro
Kip Macy [Tue, 11 Nov 2008 09:40:27 +0000 (09:40 +0000)]
- Use RTFREE_LOCKED macro
- Don't clone route on lookup (was causing arpresolve to fail)
- u_int_32 -> uint32_t

Reviewed by: qingli
MFC after: 3 days

15 years agoFake the assoc id so that ndis can work on the latest net80211.
Andrew Thompson [Tue, 11 Nov 2008 03:36:15 +0000 (03:36 +0000)]
Fake the assoc id so that ndis can work on the latest net80211.

PR: kern/128750
Submitted by: Paul B. Mahol

15 years agoNo need to run rm ${COMPFILE} after mm_install() - mm_install()
Maxim Sobolev [Tue, 11 Nov 2008 02:13:21 +0000 (02:13 +0000)]
No need to run rm ${COMPFILE} after mm_install() - mm_install()
does it for us.

15 years agostyle(9) fixes.
Sean Farley [Tue, 11 Nov 2008 00:32:55 +0000 (00:32 +0000)]
style(9) fixes.

MFC after: 1 week

15 years agoMake ispfw(4) play nice with individual firmware modules.
Jung-uk Kim [Tue, 11 Nov 2008 00:14:10 +0000 (00:14 +0000)]
Make ispfw(4) play nice with individual firmware modules.

- Do not let individual KLD module unregister firmware image loaded by ispfw
or vice versa.
- Make 'kldunload ispfw' actually unregister all firmware images loaded by
ispfw, not just 'isp_1040'.
- Print which KLD module actually loaded the firmware image.
- Remove unused return value from do_load_fw() and do_unload_fw() and remove
duplicate sys/param.h while I am here.

15 years agoSigh. Fix a pointer/int compile error.
Peter Wemm [Mon, 10 Nov 2008 23:36:20 +0000 (23:36 +0000)]
Sigh.  Fix a pointer/int compile error.

15 years agoFix a signal emulation bug introduced in r163018 (and present in 7.x).
Peter Wemm [Mon, 10 Nov 2008 23:26:52 +0000 (23:26 +0000)]
Fix a signal emulation bug introduced in r163018 (and present in 7.x).
This prevents 32 bit signal handlers from finding out what the faulting
address is.  Both the secret 4th argument and siginfo->si_addr are zero.

15 years agoAdd missing USB_BUS_LOCK* change from r184824.
Andrew Thompson [Mon, 10 Nov 2008 23:18:10 +0000 (23:18 +0000)]
Add missing USB_BUS_LOCK* change from r184824.

15 years agoWrap sx locking of the audit worker sleep lock in macros, update comments.
Robert Watson [Mon, 10 Nov 2008 22:06:24 +0000 (22:06 +0000)]
Wrap sx locking of the audit worker sleep lock in macros, update comments.

MFC after: 2 months
Sponsored by: Apple, Inc.

15 years agoConvert the two main locking areas into macros to make it clear on what we are
Andrew Thompson [Mon, 10 Nov 2008 20:54:31 +0000 (20:54 +0000)]
Convert the two main locking areas into macros to make it clear on what we are
grabbing and why. These are now:

 USB_BUS_LOCK/USB_BUS_UNLOCK
 USB_XFER_LOCK/USB_XFER_UNLOCK

Reviewed by: alfred

15 years agoMake usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean
Matteo Riondato [Mon, 10 Nov 2008 06:35:30 +0000 (06:35 +0000)]
Make usr.sbin/cron/crontab and usr.sbin/cron/lib WARNS=3 clean

Tested with: make universe

MFC after: 3 days

15 years agoInclude more detailed explanation of this case, since it's pretty
Tim Kientzle [Mon, 10 Nov 2008 05:24:13 +0000 (05:24 +0000)]
Include more detailed explanation of this case, since it's pretty
subtle why it comes out the way it does.  Once you realize that it
depends on the archiving order, it's also important to realize that
filesystem differences aren't going to break this case.  (Some of the
other tests have had to be extensively rewritten to make them
independent of the order in which a particular filesystem returns file
entries.)

(This commit also serves to note the PR number that I accidentally
omitted from the previous commit.)

PR: bin/128562
MFC after: 30 days

15 years agoTest --strip-components and fix it to actually work. Jaakko did a
Tim Kientzle [Mon, 10 Nov 2008 05:04:55 +0000 (05:04 +0000)]
Test --strip-components and fix it to actually work.  Jaakko did a
good job writing this test; it exercises a lot of subtle cases.  The
trickiest one is that a hardlink to something that didn't get
extracted should not itself be extracted.  In some sense, this is not
the desired behavior (we'd rather restore the file), but it's the best
you can do in a single-pass restore of a tar archive.

The test here should be extended to exercise cpio and newc formats as
well, since their hardlink models are different, which will lead to
different handling of some of these edge cases.

Submitted by: Jaakko Heinonen
MFC after: 30 days

15 years agoImprove on 184781 - instead of ignoring the file when the only difference
Maxim Sobolev [Sun, 9 Nov 2008 23:44:32 +0000 (23:44 +0000)]
Improve on 184781 - instead of ignoring the file when the only difference
is CVS Id, replace the old one with the new one automatically. While I
don't see much difference, some people think it's somehow better that way.

15 years ago- Separate PMC class dependent code from other kinds of machine
Joseph Koshy [Sun, 9 Nov 2008 17:37:54 +0000 (17:37 +0000)]
- Separate PMC class dependent code from other kinds of machine
  dependencies.  A 'struct pmc_classdep' structure describes operations
  on PMCs; 'struct pmc_mdep' contains one or more 'struct pmc_classdep'
  structures depending on the CPU in question.

  Inside PMC class dependent code, row indices are relative to the
  PMCs supported by the PMC class; MI code in "hwpmc_mod.c" translates
  global row indices before invoking class dependent operations.

- Augment the OP_GETCPUINFO request with the number of PMCs present
  in a PMC class.

- Move code common to Intel CPUs to file "hwpmc_intel.c".

- Move TSC handling to file "hwpmc_tsc.c".

15 years agoStyle tweak.
Joseph Koshy [Sun, 9 Nov 2008 17:07:52 +0000 (17:07 +0000)]
Style tweak.

15 years agoFor consistency work on the local object passed into the function for the
Bjoern A. Zeeb [Sun, 9 Nov 2008 14:06:44 +0000 (14:06 +0000)]
For consistency work on the local object passed into the function for the
lock operation instead using the global name.

Submitted by: ganbold
MFC after: 2 months

15 years agoRegenerate system call tables for r184789.
Ed Schouten [Sun, 9 Nov 2008 10:48:06 +0000 (10:48 +0000)]
Regenerate system call tables for r184789.

15 years agoMark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.
Ed Schouten [Sun, 9 Nov 2008 10:45:13 +0000 (10:45 +0000)]
Mark uname(), getdomainname() and setdomainname() with COMPAT_FREEBSD4.

Looking at our source code history, it seems the uname(),
getdomainname() and setdomainname() system calls got deprecated
somewhere after FreeBSD 1.1, but they have never been phased out
properly. Because we don't have a COMPAT_FREEBSD1, just use
COMPAT_FREEBSD4.

Also fix the Linuxolator to build without the setdomainname() routine by
just making it call userland_sysctl on kern.domainname. Also replace the
setdomainname()'s implementation to use this approach, because we're
duplicating code with sysctl_domainname().

I wasn't able to keep these three routines working in our
COMPAT_FREEBSD32, because that would require yet another keyword for
syscalls.master (COMPAT4+NOPROTO). Because this routine is probably
unused already, this won't be a problem in practice. If it turns out to
be a problem, we'll just restore this functionality.

Reviewed by: rdivacky, kib

15 years agoRevert to previous revision.
Matteo Riondato [Sun, 9 Nov 2008 09:01:09 +0000 (09:01 +0000)]
Revert to previous revision.
I should not commit anything at 3.50 AM.
In addition to danfe's comments, I got others.
I'll work on a better version of the patch.

15 years ago- Document the changed meaning of a '*' argument to option "-c".
Joseph Koshy [Sun, 9 Nov 2008 08:39:52 +0000 (08:39 +0000)]
- Document the changed meaning of a '*' argument to option "-c".
- Tweak grammar.

15 years agoChange the meaning of a "*" argument to option -c to mean 'all
Joseph Koshy [Sun, 9 Nov 2008 08:36:35 +0000 (08:36 +0000)]
Change the meaning of a "*" argument to option -c to mean 'all
unhalted CPUs', instead of 'all CPUs'.  This change brings
pmccontrol(8) in line with pmcstat(8).

15 years agoIgnore files that only differ in CVS Id tag.
Maxim Sobolev [Sun, 9 Nov 2008 07:58:23 +0000 (07:58 +0000)]
Ignore files that only differ in CVS Id tag.

MFC after: 2 weeks

15 years agoDon't leave files in /var/cront/tabs when interrupted
Matteo Riondato [Sun, 9 Nov 2008 07:34:11 +0000 (07:34 +0000)]
Don't leave files in /var/cront/tabs when interrupted

PR: 17363
MFC after: 3 days

15 years agoBe paranoid and use snprintf
Matteo Riondato [Sun, 9 Nov 2008 06:44:53 +0000 (06:44 +0000)]
Be paranoid and use snprintf

PR: bin/122137
Submitted by: Steven Kreuzer <skreuzer@exit2shell.com>
MFC after: 3 days

15 years agomake kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
Kip Macy [Sun, 9 Nov 2008 01:53:06 +0000 (01:53 +0000)]
make kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
initialize pkthdr in field order

15 years agoAdd workaround for a back reference when no corresponding
Hiroki Sato [Sun, 9 Nov 2008 01:10:21 +0000 (01:10 +0000)]
Add workaround for a back reference when no corresponding
parenthesized subexpression is defined.  For example, the
following command line caused unexpected behavior like
segmentation fault:

 % echo test | sed -e 's/test/\1/'

PR: bin/126682
MFC after: 1 week

15 years agoReduce the default baud rate of PTY's to 9600.
Ed Schouten [Sat, 8 Nov 2008 20:40:39 +0000 (20:40 +0000)]
Reduce the default baud rate of PTY's to 9600.

On RELENG_6 (and probably RELENG_7) we see our syscons windows and
pseudo-terminals have the following buffer sizes:

| LINE RAW CAN OUT IHIWT ILOWT OHWT LWT     COL STATE  SESS      PGID DISC
| ttyv0  0   0   0  7680  6720 2052 256       7 OCcl       1146  1146 term
| ttyp0  0   0   0  7680  6720 1296 256       0 OCc       82033 82033 term

These buffer sizes make no sense, because we often have much more output
than input, but I guess having higher input buffer sizes improves
guarantees of the system.

On MPSAFE TTY I just sent both the input and output buffer sizes to 7
KB, which is pretty big on a standard FreeBSD install with 8 syscons
windows and some PTY's. Reduce the baud rate to 9600 baud, which means
we now have the following buffer sizes:

|  LINE   INQ  CAN  LIN  LOW  OUTQ  USE  LOW   COL  SESS  PGID STATE
| ttyv0  1920    0    0  192  1984    0  199     7  2401  2401 Oil
| pts/0  1920    0    0  192  1984    0  199  5631  1305  2526 Oi

This is a lot smaller, but for pseudo-devices this should be good
enough. You need to do a lot of punching to fill up a 7.5 KB input
buffer. If it turns out things don't work out this way, we'll just
switch to 19200 baud.

15 years agoRequire write access on a directory being moved from one parent
Edward Tomasz Napierala [Sat, 8 Nov 2008 19:56:32 +0000 (19:56 +0000)]
Require write access on a directory being moved from one parent
directory to another in ZFS.

Approved by: rwatson (mentor), pjd

15 years agoSpell 'different' correctly.
Giorgos Keramidas [Sat, 8 Nov 2008 17:45:47 +0000 (17:45 +0000)]
Spell 'different' correctly.

15 years agoDon't use curthread to resolve file descriptor. Request may be queued, so
Alexander Motin [Sat, 8 Nov 2008 06:25:57 +0000 (06:25 +0000)]
Don't use curthread to resolve file descriptor. Request may be queued, so
thread will be different. Instead require sender to send process ID
together with file descriptor.

15 years agoNew command-line parser for bsdtar.
Tim Kientzle [Sat, 8 Nov 2008 04:43:24 +0000 (04:43 +0000)]
New command-line parser for bsdtar.

This replaces the getopt()/getopt_long() wrapper, the old-style
argument rewriter and the associated configuration glue with a more
straightforward custom command parser.  In particular, this ensures
that bsdtar will have consistent option parsing on every platform,
regardless of whether the platform supports getopt_long().

MFC after: 30 days

15 years agoAssign new cookie to the node to reflect API change.
Alexander Motin [Sat, 8 Nov 2008 02:05:41 +0000 (02:05 +0000)]
Assign new cookie to the node to reflect API change.
All applications will have to be adapted and rebuilt.

15 years agoUpdate ports number and size of Ports Collection.
Marc Fonvieille [Fri, 7 Nov 2008 22:01:31 +0000 (22:01 +0000)]
Update ports number and size of Ports Collection.

15 years agoDon't assign completely meaningless name to the node on creation.
Alexander Motin [Fri, 7 Nov 2008 19:51:07 +0000 (19:51 +0000)]
Don't assign completely meaningless name to the node on creation.
As soon as node is created from the netgraph side now, it can be found
without using this. Allow application to assign whatever name it want later.

15 years agoTwo minor fixes.
Alexander Motin [Fri, 7 Nov 2008 17:55:09 +0000 (17:55 +0000)]
Two minor fixes.

15 years agoAdd one more EACCES clause to rename.2.
Edward Tomasz Napierala [Fri, 7 Nov 2008 15:01:40 +0000 (15:01 +0000)]
Add one more EACCES clause to rename.2.

Approved by: rwatson (mentor)

15 years agoMake test for write access to the directory being moved a little more
Edward Tomasz Napierala [Fri, 7 Nov 2008 14:46:46 +0000 (14:46 +0000)]
Make test for write access to the directory being moved a little more
specific.

Approved by: rwatson (mentor)

15 years agoImprove output when a test fails.
Edward Tomasz Napierala [Fri, 7 Nov 2008 14:45:42 +0000 (14:45 +0000)]
Improve output when a test fails.

Approved by: rwatson (mentor)

15 years agoRange-check NFSv2 procedure numbers before converting to NFSv3.
Doug Rabson [Fri, 7 Nov 2008 10:43:01 +0000 (10:43 +0000)]
Range-check NFSv2 procedure numbers before converting to NFSv3.

Submitted by: csjp

15 years agoRemove informational messages left. These messages were intended to
Pyun YongHyeon [Fri, 7 Nov 2008 07:02:28 +0000 (07:02 +0000)]
Remove informational messages left. These messages were intended to
show up in verbose boot mode.

Reported by: pluknet ( pluknet<> gmail DOT com )

15 years agoRestore (intmax_t) casts I lost during the last change & unbreak the build.
Max Laier [Thu, 6 Nov 2008 23:55:28 +0000 (23:55 +0000)]
Restore (intmax_t) casts I lost during the last change & unbreak the build.

15 years agoBackoff the last patch. It was overly restrictive - we want to check
Edward Tomasz Napierala [Thu, 6 Nov 2008 22:28:04 +0000 (22:28 +0000)]
Backoff the last patch.  It was overly restrictive - we want to check
for write permission on target only when moving the target between two
directories.

Approved by: rwatson (mentor)

15 years agoA lot of spelling fixes.
Alexander Motin [Thu, 6 Nov 2008 21:47:02 +0000 (21:47 +0000)]
A lot of spelling fixes.

Submitted by: keramida

15 years agoChange ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
Edward Tomasz Napierala [Thu, 6 Nov 2008 19:17:58 +0000 (19:17 +0000)]
Change ZFS behaviour to match UFS: when moving (rename(2)) a subdirectory
from one parent directory to another, in addition to the usual access checks
one also needs write access to the subdirectory being moved.

Approved by:    rwatson (mentor), pjd

15 years agoBring in http://perforce.freebsd.org/chv.cgi?CH=152584 from hps.
Warner Losh [Thu, 6 Nov 2008 17:26:12 +0000 (17:26 +0000)]
Bring in http://perforce.freebsd.org/chv.cgi?CH=152584 from hps.

Submitted by: hps

15 years agoFix copyright notice.
Marcel Moolenaar [Thu, 6 Nov 2008 17:00:19 +0000 (17:00 +0000)]
Fix copyright notice.

15 years agoFix a panic caused by a corrupted table when the header is
Marcel Moolenaar [Thu, 6 Nov 2008 16:51:33 +0000 (16:51 +0000)]
Fix a panic caused by a corrupted table when the header is
still valid. We were checking the state of the header and
not the table.

PR: 119868
Based on a patch from: Jaakko Heinonen <jh@saunalahti.fi>
MFC after: 1 week

15 years agoAdd two new options to du(1):
Max Laier [Thu, 6 Nov 2008 16:30:38 +0000 (16:30 +0000)]
Add two new options to du(1):
     -A      Display the apparent size instead of the disk usage.  This can be
             helpful when operating on compressed volumes or sparse files.

     -B blocksize
             Calculate block counts in blocksize byte blocks.  This is differ-
             ent from the -k, -m options or setting BLOCKSIZE and gives an
             estimate of how much space the examined file hierachy would
             require on a filesystem with the given blocksize.  Unless in -A
             mode, blocksize is rounded up to the next multiple of 512.

The former is similar to GNU's du(1) --apparent-size.  The latter is
different from what GNU's du(1) -B does, which is equivalent to setting
BLOCKSIZE in our implementation and is rather pointless as it doesn't add
any real value (i.e. you can achieve the same with a simple awk-script).

No change in the normal output or processing.

Reviewed by: keramida@, Peter French
Otherwise silience from: freebsd-hackers@

15 years agoEliminate dead declarations in libstand.
Rafal Jaworowski [Thu, 6 Nov 2008 16:30:32 +0000 (16:30 +0000)]
Eliminate dead declarations in libstand.

15 years agoFix typo and while here another one.
Bjoern A. Zeeb [Thu, 6 Nov 2008 16:30:20 +0000 (16:30 +0000)]
Fix typo and while here another one.

Reviewed by: keramida
Reported by: keramida
MFC after: 2 months (with r184720)

15 years agoARM pmap style(9) and cosmetics.
Rafal Jaworowski [Thu, 6 Nov 2008 16:28:28 +0000 (16:28 +0000)]
ARM pmap style(9) and cosmetics.

15 years agoAuto-size kernel page tables allocation on Marvell systems.
Rafal Jaworowski [Thu, 6 Nov 2008 16:25:12 +0000 (16:25 +0000)]
Auto-size kernel page tables allocation on Marvell systems.

This allows mini dumps to fully work for these platforms.

Obtained from: Juniper Networks, Semihalf

15 years agoSupport kernel crash mini dumps on ARM architecture.
Rafal Jaworowski [Thu, 6 Nov 2008 16:20:27 +0000 (16:20 +0000)]
Support kernel crash mini dumps on ARM architecture.

Obtained from: Juniper Networks, Semihalf

15 years agoInclude if_arp.h for IFP2AC so that the netgraph parts in if.c
Bjoern A. Zeeb [Thu, 6 Nov 2008 15:26:09 +0000 (15:26 +0000)]
Include if_arp.h for IFP2AC so that the netgraph parts in if.c
are happy even if compiled without INET or INET6.

MFC after: 2 months

15 years agoFix a bug introduced with r182851 splitting tcp_mss() into
Bjoern A. Zeeb [Thu, 6 Nov 2008 13:25:59 +0000 (13:25 +0000)]
Fix a bug introduced with r182851 splitting tcp_mss() into
tcp_mss() and tcp_mss_update() so that tcp_mtudisc() could
re-use the same code.

Move the TSO logic back to tcp_mss() and out of tcp_mss_update().
We tried to avoid that initially but if were are called from
tcp_output() with EMSGSIZE, we cleared the TSO flag on the tcpcb
there, called into tcp_mtudisc() and tcp_mss_update() which
then would reenable TSO on the tcpcb based on TSO capabilities
of the interface as learnt in tcp_maxmtu/6().
So if TSO was enabled on the (possibly new) outgoing interface
it was turned back on, which lead to an endless loop between
tcp_output() and tcp_mtudisc() until we overflew the stack.

Reported by: kmacy
MFC after: 2 months (along with r182851)