rwatson [Wed, 8 Oct 2008 06:26:51 +0000 (06:26 +0000)]
Remove stale comment (and XXX saying so) about why we zero the file
descriptor pointer in unp_freerights: we can no longer recurse into
unp_gc due to unp_gc being invoked in a deferred way, but it's still
a good idea.
rwatson [Tue, 7 Oct 2008 21:01:23 +0000 (21:01 +0000)]
Update udpzerobyte to understand that passing 0 as a length to recv(2)
will cause it to return 0, not EAGAIN.
Add UNIX domain socket support to udpzerobyte, which suggests this
regression test should be moved to the general sockets test area rather
than netinet.
rwatson [Tue, 7 Oct 2008 20:57:55 +0000 (20:57 +0000)]
In soreceive_dgram, when a 0-length buffer is passed into recv(2) and
no data is ready, return 0 rather than blocking or returning EAGAIN.
This is consistent with the behavior of soreceive_generic (soreceive)
in earlier versions of FreeBSD, and restores this behavior for UDP.
imp [Tue, 7 Oct 2008 17:44:04 +0000 (17:44 +0000)]
More diff reductions against ixp425/boot2/boot2.c. This time, we
bring in FIXUP_BOOT_DRV functionality as an #ifdef. This is not
enabled at this time, and the md5 remains constant with this change.
Apart from the 'accept any partitioning scheme on the device' changes,
this was the biggest delta...
# and yes, we'll merge these into one source file if we can do that in a
# way that makes sense.
jhb [Tue, 7 Oct 2008 14:05:42 +0000 (14:05 +0000)]
Use CPUID to see if the current CPU supports long mode when attemping to
boot an amd64 kernel. If not, then fail the boot request with an error
message. Otherwise, the boot attempt will fail with a BTX fault when
trying to read the EFER MSR.
lulf [Tue, 7 Oct 2008 10:25:27 +0000 (10:25 +0000)]
- Allow gstat to print values to different kind of outputs.
- Introduce batch mode, where gstat will collect the numbers, print them, and
exit.
- Document batch mode in the gstat man page.
rwatson [Tue, 7 Oct 2008 09:57:03 +0000 (09:57 +0000)]
Remove temporary debugging KASSERT's introduced to detect protocols
improperly invoking sosend(), soreceive(), and sopoll() instead of
attach either specialized or _generic() versions of those functions
to their pru_sosend, pru_soreceive, and pru_sopoll protosw methods.
rwatson [Tue, 7 Oct 2008 09:41:07 +0000 (09:41 +0000)]
Don't pass curthread to sbreserve_locked() in tcp_do_segment(), as the
netisr or ithread's socket buffer size limit is not the right limit to
use. Instead, pass NULL as the other two calls to sbreserve_locked()
in the TCP input path (tcp_mss()) do.
In practice, this is a no-op, as ithreads and the netisr run without a
process limit on socket buffer use, and a NULL thread pointer leads to
not using the process's limit, if any. However, if tcp_input() is
called in other contexts that do have limits, this may prevent the
incorrect limit from being used.
rwatson [Tue, 7 Oct 2008 07:10:28 +0000 (07:10 +0000)]
Lock receive socket buffer in soo_stat() rather than commenting that we
should lock it, which may marginally improve the consistency of the
results. Remove comment.
delphij [Mon, 6 Oct 2008 22:34:17 +0000 (22:34 +0000)]
Limit DMA memory to lower addressable 4GB, without this patch, we
can reliably provoke data corruption on systems equipped with a
plenty of memory during high load.
Reported by: gnn via iXsystems
MFC candidate: RELENG_7_1, RELENG_7
rwatson [Mon, 6 Oct 2008 19:42:03 +0000 (19:42 +0000)]
Add very simple regression test for fstat(2) on sockets: make sure it
returns success for various socket types. It's easy to imagine this
being enhanced to validate the returned data, but...
simon [Mon, 6 Oct 2008 17:49:24 +0000 (17:49 +0000)]
Add a HARDWARE section. It doesn't contain any information not
already in the DESCRIPTION section, but this allows for the manual
page to be used in the automatic hardware notes generation.
imp [Sun, 5 Oct 2008 23:59:52 +0000 (23:59 +0000)]
Bring in the trivial differences between this code and John Hay's new
code. Added a copyright for the work I did to this file a couple of
years ago. Add John's copyright too, since I'm sure I'll be pulling
more into this code. This also implements a new -n option to not
allow breaking into the boot sequence which was original in the patch
John posted (not in the original i386 code I based this boot2.c on,
only the name is the same). I haven't checked to see if he did that,
or if it was one of Sam's improvements.
marius [Sun, 5 Oct 2008 14:00:44 +0000 (14:00 +0000)]
Disable ATAPI DMA as it's once again broken in that it causes data
corruption with the on-board AcerLabs M5229 controllers. While at
it, remove the pointless "nothing to autoload yet." message.
simon [Sun, 5 Oct 2008 09:45:45 +0000 (09:45 +0000)]
- Add support for Pp command - this improves output for axe(4).
- Add support for .Fx, just in case somebody starts using it.
- Only add the arch information to the first para per manual page.
This improves output for axe(4), and generally seems to make sense
(I hope).
- Remove an unneeded line for non-compat mode.
simon [Sun, 5 Oct 2008 09:35:46 +0000 (09:35 +0000)]
Move some lists which were inside a <para> to outside the <para>.
This removes some vertical whitespace in the output.
Whitespace was intentionally not fixed in the SGML for the related
lists, to make the actual change more clear. This file is in need of
a major whitespace cleanup anyway.
davidxu [Sun, 5 Oct 2008 02:03:54 +0000 (02:03 +0000)]
If the current thread has the trap bit set (i.e. a debugger had
single stepped the process to the system call), we need to clear
the trap flag from the new frame. Otherwise, the new thread will
receive a (likely unexpected) SIGTRAP when it executes the first
instruction after returning to userland.
sam [Sat, 4 Oct 2008 23:58:02 +0000 (23:58 +0000)]
dynamically allocate the task structure in firmware_mountroot: when
booting from an MFS root (e.g. from an install CD) firmware_mountroot
can be called twice with the second call happening before the task
callback occurs; this results in the task structure contents being
corrupted because it was declared static.
kib [Sat, 4 Oct 2008 19:23:30 +0000 (19:23 +0000)]
Current linux_fooaffinity() emulation fails, as the FreeBSD affinity
syscalls expect the bitmap size in the range from 32 to 128. Old glibc
always assumed size 1024, while newer glibc searches for approriate
size, starting from 1024 and going up.
For now, use FreeBSD size of cpuset_t for bitmap size parameter and
return EINVAL if length of user space bitmap less than our size of
cpuset_t.
Submitted by: dchagin
MFC after: 1 week
[This requires MFC of the actual linux affinity syscalls]
Cache so_cred as inp_cred in the inpcb.
This means that inp_cred is always there, even after the socket
has gone away. It also means that it is constant for the lifetime
of the inp.
Both facts lead to simpler code and possibly less locking.
Suggested by: rwatson
Reviewed by: rwatson
MFC after: 6 weeks
X-MFC Note: use a inp_pspare for inp_cred
simon [Sat, 4 Oct 2008 14:12:09 +0000 (14:12 +0000)]
- Document that 'show alllocks' and 'show locks' are only available
with witness.
- Remove references to non-existing witness(9) and replace with
witness(4) where appropriate.
- Bump document date.
kib [Sat, 4 Oct 2008 14:08:16 +0000 (14:08 +0000)]
Change the linprocfs <pid>/maps and procfs <pid>/map handlers to use
sbuf instead of doing uiomove. This allows for reads from non-zero
offsets to work.
Patch is forward-ported des@' one, and was adopted to current code
by dchagin@ and me.
raj [Sat, 4 Oct 2008 13:10:38 +0000 (13:10 +0000)]
U-Boot API glue improvements:
- extend ub_dev_read() and ub_dev_recv() so that the actual len and
all error codes can be passed and processed properly; unify behaviour of
these routines
- introduce syscall general error code (API_ESYSC)
antoine [Sat, 4 Oct 2008 10:39:31 +0000 (10:39 +0000)]
- Spell cam correctly (scbus), this makes it possible to compile hptiop
in GENERIC and LINT. [1]
- Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition
of hpt_dbg_level (hptmv also has hpt_dbg_level).
weongyo [Sat, 4 Oct 2008 04:15:39 +0000 (04:15 +0000)]
sc->ndis_txidx should be cycle between 0 and sc->ndis_maxpkts, not
NDIS_TXPKTS and don't allocate unused extra spaces for sc->ndis_txarray
and sc->ndis_txpool.
jhb [Fri, 3 Oct 2008 18:13:05 +0000 (18:13 +0000)]
Oops, missed updating a place with with 's/lock1/plock/' when adding
interlock support to WITNESS. Specifically, the printf listing the
first location when duplicate locks of the same type are acquired.
rnoland [Fri, 3 Oct 2008 16:59:11 +0000 (16:59 +0000)]
resync to git master
This reverts a private patch which is causing issues with many Intel chipsets.
I will review that patch and see what we need to do to fix it up later, but
for the time being, we will just get these chips working again.
This update contains a lot of code cleanup and is post gem merge
(no, we don't have gem support). It should prove much easier to read the
code now. A lot of thanks goes to vehemens for that work. I have adapted
the code to use cdevpriv for tracking per open file data. That alleviates
the old ugly hack that we used to try and accomplish the task and helped to
clean up the open / close behavior a good bit. This also replaces the hack
that was put in place a year or so ago to prevent radeons from locking up
with AIGLX enabled. I have had a couple of radeon testers report that it
still works as expected, though I no longer have radeon hardware to test with
myself. Other various fixes from the linux crew and Intel, many of
which are muddled in with the gem merge.
rwatson [Fri, 3 Oct 2008 13:01:56 +0000 (13:01 +0000)]
Further minor cleanups to UNIX domain sockets:
- Staticize and locally prototype functions uipc_ctloutput(), unp_dispose(),
unp_init(), and unp_externalize(), none of which have been required
outside of uipc_usrreq.c since uipc_proto.c was removed.
- Remove stale prototype for uipc_usrreq(), which has not existed in the
code since 1997
- Forward declare and staticize uipc_usrreqs structure in uipc_usrreq.c and
not un.h.
- Comment on why uipc_connect2() is still non-static -- it is used directly
by fifofs.
- Remove stale comments, tidy up whitespace.
Implement IPv4 source address selection for unbound sockets.
For the jail case we are already looping over the interface addresses
before falling back to the only IP address of a jail in case of no
match. This is in preparation for the upcoming multi-IPv4/v6/no-IP
jail patch this change was developed with initially.
This also changes the semantics of selecting the IP for processes within
a jail as it now uses the same logic as outside the jail (with additional
checks) but no longer is on a mutually exclusive code path.
Benchmarks had shown no difference at 95.0% confidence for neither the
plain nor the jail case (even with the additional overhead). See:
http://lists.freebsd.org/pipermail/freebsd-net/2008-September/019531.html
Inpsired by a patch from: Yahoo! (partially)
Tested by: latest multi-IP jail patch users (implictly)
Discussed with: rwatson (general things around this)
Reviewed by: mostly silence (feedback from bms)
Help with benchmarking from: kris
MFC after: 2 months
SRCDIR is seeded from `pwd` which not only means src/sys/ but
also src/include/ (and possibly src/usr.sbin/amd/include/ ?).
Trying to build world resulted in
===> include (includes)
cd /usr/src/include; make buildincludes; make installincludes
creating osreldate.h from newvers.sh
cd: can't cd to /usr/src/include/sys
*** Error code 2
as there is apparently no src/include/sys.
There are multiple possible solutions ranging from seeding SRCDIR from
the environment to adding more substitution patterns.
Reported by: sam, bz
Proper solution to be implemented and tested by: peter
- Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
consistently on implementations that make the PTY the controlling TTY
by default.
- Call unlockpt() before opening the slave device. POSIX mentions that
de slave device should only be opened after grantpt() and unlockpt()
have been called.
- Replace some redundant code by a label.
In theory we could remove a lot of code from openpty() on FreeBSD
-CURRENT, because grantpt(), unlockpt() and revoke() are not needed in
our implementation. We'd better keep them there. This makes the code
still work with older FreeBSD releases and even makes it work on other
non-BSD operating systems.
I've compiled openpty() on Linux. You only need to remove the revoke()
call, because revoke() on Linux always returns -1. Apart from that, it
seems to work like it should.
thompsa [Fri, 3 Oct 2008 05:14:54 +0000 (05:14 +0000)]
Update ng_tty for MPSAFE TTY.
This changes from a line discipline to the tty_hooks mechanism. Data will come
in directly via rint_bypass and sent to the peer node in a single mbuf.
As line disciplines are no longer used a new netgraph command called
NGM_TTY_SET_TTY is used to attach the tty. This takes a pointer to to the open
file descriptor of the tty and registers the tty hooks. When the tty disappears
the node will shutdown.
yongari [Fri, 3 Oct 2008 03:58:16 +0000 (03:58 +0000)]
Add hardware MAC statistics support. Register information was
obtained from Linux forcedeth driver.
While I'm here move creating a sysctl node for process_limit to
function nfe_sysctl_node().
Tested by: "Arno J. Klaassen" < arno <at> heho dot snv dot jussieu dot fr >