Jung-uk Kim [Mon, 7 Feb 2011 21:26:46 +0000 (21:26 +0000)]
Introduce a non-portable function pthread_getthreadid_np(3) to retrieve
calling thread's unique integral ID, which is similar to AIX function of
the same name. Bump __FreeBSD_version to note its introduction.
Jaakko Heinonen [Mon, 7 Feb 2011 18:10:18 +0000 (18:10 +0000)]
- Use LINE_MAX from limits.h as the maximum line length instead of
BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
behavior was to silently split long lines and produce corrupted
output.
Michael Tuexen [Mon, 7 Feb 2011 15:04:23 +0000 (15:04 +0000)]
Fix bugs related to M_FLOWID:
* Store the flowid when receiving an SCTP/IPv6 packet.
* Store the flowid when receiving an SCTP packet with wrong CRC.
* Initilize flowid correctly.
* Put test code under INVARIANTS.
MFC after: 3 months.
Clear the padding when returning context to the usermode, for
MI ucontext_t and x86 MD parts.
Kernel allocates the structures on the stack, and not clearing
reserved fields and paddings causes leakage.
Remove use_high from the softc and simply check the number of GPIO
pins to determine whether there's a high register set or not. This
allows platform_gpio_init() to work without duplicating the work
done in the attach method.
Doug Barton [Sun, 6 Feb 2011 22:46:07 +0000 (22:46 +0000)]
Update to BIND 9.6.3, the latest from ISC on the 9.6 branch.
All 9.6 users with DNSSEC validation enabled should upgrade to this
version, or the latest version in the 9.7 branch, prior to 2011-03-31
in order to avoid validation failures for names in .COM as described
here:
In addition the fixes for this and other bugs, there are also the
following:
* Various fixes to kerberos support, including GSS-TSIG
* Various fixes to avoid leaking memory, and to problems that could
prevent a clean shutdown of named
Juli Mallett [Sun, 6 Feb 2011 22:21:18 +0000 (22:21 +0000)]
o) Cavium Octeon doesn't need nop barriers.
o) Have mips_wblush just do syncw, not sync on Cavium Octeon.
o) Add support for reading and writing some Octeon-specific registers.
NB: Some of these are not entirely Octeon-specific.
Adrian Chadd [Sun, 6 Feb 2011 20:11:24 +0000 (20:11 +0000)]
Just tag all RX packets as needing reorder processing for now.
This fixes two problems -
* All packets need to be processed here, not just aggregate ones - as any
received frames (AMPDU or otherwise) in the given TID (traffic class id)
will update the sequence number and, implied with that, update the window;
* It seems there's situations where packets aren't matching a current node but
somehow need to be tracked. Thus just tag them all for now; I'll figure out
the why later.
Whilst I'm here, bump the stats counters whilst I'm at it.
This fixes AMPDU RX in my tests; the main problems now stem from what look
like PHY level error/retransmits which are impeding general throughput, incl.
AMPDU.
Randall Stewart [Sun, 6 Feb 2011 13:17:40 +0000 (13:17 +0000)]
1) Use same scheme Michael and I discussed for a selected for a flowid
2) If flowid is not set, arrange so it is stored.
3) If flowid is set by lower layer, use it.
Luigi Rizzo [Sat, 5 Feb 2011 23:32:17 +0000 (23:32 +0000)]
correct the 'output_time' of packets generated by dummynet.
In the dec.2009 rewrite I introduced a bug, using for the
computation the arrival time instead of the time the packet
has exited from the queue.
The bandwidth computation was still correct because it is
computed elsewhere, but traffic was sent out in bursts.
The bug is also present in RELENG_8 after dec.2009
Thanks to Daikichi Osuga for investingating, finding and fixing the
bug with detailed graphs of the behaviour before and after the fix.
Luigi Rizzo [Sat, 5 Feb 2011 23:03:40 +0000 (23:03 +0000)]
following the recent (218130) changes to Makefile and Makefile.inc1,
we need to set TARGET and TARGET_ARCH to get a correct WMAKEENV.
I am setting both to i386 since this is what picobsd is used for,
though there might be a better fix.
Add initial support for parallel make. This is disabled right now,
because there are incorrect dependencies somewhere which require
to run picobsd 2-3 times to complete a build.
Adrian Chadd [Sat, 5 Feb 2011 22:54:37 +0000 (22:54 +0000)]
Add a temporary workaround so the 11n rate scenario setup code sets a useful
TX chainmask.
since the upper layers don't (yet) know about the active TX/RX chainmasks,
it can't tell the rate scenario functions what to use. I'll eventually sort
this out; this restores functionality in the meantime.
Alan Cox [Sat, 5 Feb 2011 21:21:27 +0000 (21:21 +0000)]
Unless "cnt" exceeds MAX_COMMIT_COUNT, nfsrv_commit() and nfsvno_fsync() are
incorrectly calling vm_object_page_clean(). They are passing the length of
the range rather than the ending offset of the range.
Perform the OFF_TO_IDX() conversion in vm_object_page_clean() rather than the
callers.
Clear the padding when returning context to the usermode, for
MI ucontext_t and x86 MD parts.
Kernel allocates the structures on the stack, and not clearing
reserved fields and paddings causes leakage.
Jilles Tjoelker [Sat, 5 Feb 2011 15:02:19 +0000 (15:02 +0000)]
sh: Fix two things about {(...)} <redir:
* In {(...) <redir1;} <redir2, do not drop redir1.
* Maintain the difference between (...) <redir and {(...)} <redir:
In (...) <redir, the redirection is performed in the child, while in
{(...)} <redir it should be performed in the parent (like {(...); :;}
<redir)
Jilles Tjoelker [Sat, 5 Feb 2011 12:54:59 +0000 (12:54 +0000)]
sh: Do not try to execute binary files as scripts.
If execve() returns an [ENOEXEC] error, check if the file is binary before
trying to execute it using sh. A file is considered binary if at least one
of the first 256 bytes is '\0'.
In particular, trying to execute ELF binaries for the wrong architecture now
fails with an "Exec format error" message instead of syntax errors and
potentially strange results.
Jilles Tjoelker [Fri, 4 Feb 2011 22:47:55 +0000 (22:47 +0000)]
sh: Remove special code for shell scripts without magic number.
These are called "shell procedures" in the source.
If execve() failed with [ENOEXEC], the shell would reinitialize itself
and execute the program as a script. This requires a fair amount of code
which is not frequently used (most scripts have a #! magic number).
Therefore just execute a new instance of sh (_PATH_BSHELL) to run the
script.
Alan Cox [Fri, 4 Feb 2011 21:49:24 +0000 (21:49 +0000)]
Since the last parameter to vm_object_shadow() is a vm_size_t and not a
vm_pindex_t, it makes no sense for its callers to perform atop(). Let
vm_object_shadow() do that instead.
Jung-uk Kim [Fri, 4 Feb 2011 19:49:02 +0000 (19:49 +0000)]
Do not let pw.conf(5) or -M option affect creation of basehome, e.g., /home.
When the basehome does not exist, it creates all intermediate directories as
required, which is logically equivalent to mkdir(1) with -m and -p options.
However, it modifies all intermediate directories, not just the final home
directory unlike mkdir. This problem was introduced in two revisions, i.e.,
r1.59 (SVN r167919) and r1.60 (SVN r168044).
Pyun YongHyeon [Fri, 4 Feb 2011 17:49:55 +0000 (17:49 +0000)]
Disable TX IP checksum offloading for RTL8168C controllers. The
controller in question generates frames with bad IP checksum value
if packets contain IP options. For instance, packets generated by
ping(8) with record route option have wrong IP checksum value. The
controller correctly computes checksum for normal TCP/UDP packets
though.
There are two known RTL8168/8111C variants in market and the issue
I observed happened on RL_HWREV_8168C_SPIN2. I'm not sure
RL_HWREV_8168C also has the same issue but it would be better to
assume it has the same issue since they shall share same core.
RTL8102E which is supposed to be released at the time of
RTL8168/8111C announcement does not have the issue.
Tested by: Konstantin V. Krotov ( kkv <> insysnet dot ru )
Jilles Tjoelker [Fri, 4 Feb 2011 16:40:50 +0000 (16:40 +0000)]
Make sys_signame upper case.
This matches the constants from <signal.h> with 'SIG' removed, which POSIX
requires kill and trap to accept and 'kill -l' to write.
'kill -l', 'trap', 'trap -l' output is now upper case.
In Turkish locales, signal names with an upper case 'I' are now accepted,
while signal names with a lower case 'i' are no longer accepted, and the
output of 'killall -l' now contains proper capital 'I' without dot instead
of a dotted capital 'I'.
Ed Maste [Fri, 4 Feb 2011 15:45:48 +0000 (15:45 +0000)]
We can pass a format string and args to panic(), so instead of using
printf() to output some information before a panic, just include that
information in the panic.
John Baldwin [Fri, 4 Feb 2011 14:06:57 +0000 (14:06 +0000)]
Use M_WAITOK rather than M_NOWAIT when creating taskqueues via the
TASKQUEUE_DEFINE macros. All the places that use these macros to create
taskqueues assume that the operation succeeds.
Adrian Chadd [Thu, 3 Feb 2011 20:26:26 +0000 (20:26 +0000)]
Disable the code I previously added from Rui's 802.11n branch.
A-MPDU RX interferes with packet retransmission/reordering.
In local testing, I was seeing A-MPDU being negotiated and then
not used by the AP sending frames to the STA; the STA would then
treat non A-MPDU frames that are retransmits as out of the window
and get plain confused.
The hardware RX status descriptor has a "I'm part of an aggregate"
bit; so this should eventually be tested and then punted to the
A-MPDU reorder handling only if it has this bit set.
Randall Stewart [Thu, 3 Feb 2011 19:22:21 +0000 (19:22 +0000)]
1) Move per John Baldwin to mp_maxid
2) Some signed/unsigned errors found by Mac OS compiler (from Michael)
3) a couple of copyright updates on the effected files.
The FDT describes the host controller directly. There's no need to
get properties from the parent. The parent is in fact the FDT bus
itself and will therefore not have the properties we're looking
for.
Alan Cox [Thu, 3 Feb 2011 14:42:46 +0000 (14:42 +0000)]
Eliminate unnecessary page hold_count checks. These checks predate
r90944, which introduced a general mechanism for handling the freeing
of held pages.
Randall Stewart [Thu, 3 Feb 2011 11:52:22 +0000 (11:52 +0000)]
Fix the per CPU stats so that:
1) They don't use the giant "MAX_CPU" define and instead
are allocated dynamically based on mp_ncpus
2) Will zero with the netstat -z -s -p sctp
3) Will be properly handled by both the sctp_init and finish
(the multi-net stuff was incorrectly bzero'ing in sctp_init
the wrong size.. the bzero is now moved to the right places).
And of course the free is put in at the very end.
Setup another socketpair between parent and child, so that primary sandboxed
worker can ask the main privileged process to connect in worker's behalf
and then we can migrate descriptor using this socketpair to worker.
This is not really needed now, but will be needed once we start to use
capsicum for sandboxing.
Randall Stewart [Thu, 3 Feb 2011 10:05:30 +0000 (10:05 +0000)]
Adds an experimental option to create a pool of
threads. These serve as input threads and are queued
packets based on the V-tag number. This is similar to
what a modern card can do with queue's for TCP... but
alas modern cards know nothing about SCTP.
Ed Maste [Thu, 3 Feb 2011 02:14:53 +0000 (02:14 +0000)]
Revert part of r173264. Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb
make use of the aac_ioctl_event callback, if aac_alloc_command fails. This
can end up in an infinite loop in the while loop in aac_release_command.
Further investigation into the issue mentioned by Scott Long [1] will be
necessary.