Scott Long [Tue, 24 Oct 2006 08:24:31 +0000 (08:24 +0000)]
Refine the checksum hack a little. It appears that the chip can handle UDP
and TCP checksum offloading fine, it only has a problem with IP checksums on
IP fragments.. Barring a fix or workaround available from the hardware, the
real solution would be to have finer grained control in the stack over what
can and cannot be assisted in hardware.
Maxim Sobolev [Tue, 24 Oct 2006 08:18:10 +0000 (08:18 +0000)]
Ignore SIGSYS when BSM is compiled in. Otherwise, attempt to invoke su on
system that don't have audit framefork compiled into kernel or ia32 binary
on amd64 system will result in SIGSYS. There is one place in su.c itself
where it tries to check for errno != ENOSYS, but it has been a nop since su
does not catch SIGSYS anyway. There are few other places in libbsm,
where attempt to invoke audit syscal would result in SIGSYS if no audit
support is present in the kernel, so that the only reliable method for
now is to disable SIGSYS completely in the case when BSM is compiled in.
In the long run, both direct invocation of audit-related syscalls and
libbsm should be made more intellegent to handle the case when BSM is not
compiled into the kernel gracefully.
Warner Losh [Tue, 24 Oct 2006 00:44:40 +0000 (00:44 +0000)]
Document multiple hints lines.
Tweak machine description to more accurately reflect second argument being
the cpu architecture. Note correspondence with MACHINE and MACHINE_ARCH.
Warner Losh [Tue, 24 Oct 2006 00:31:59 +0000 (00:31 +0000)]
End my resistance to jmg's multiple hints files and bring in support
for having multiple hints files generate a correct hints.c (eg, with
all the specified ones catenated together).
Erwin Lansing [Mon, 23 Oct 2006 20:49:49 +0000 (20:49 +0000)]
If the user did not chose a distribution from the menu, a sensible
default distribution (user) will be installed, however, no kernel
will be installed. Fix this by installing a sensible default kernel,
SMP/GENERIC, depending on WITH_SMP and number of CPUS found.
(Previously the option was inherited from MI NOTES.) So my tool in
rev. 1.26 reduced this to removing all "ATKBD_DFLT_KEYMAP" lines,
leaving the option effectively disabled as it was before, but since
it's actually supported on sparc64, turn it on now.
Revert the rev. 1.4, it causes breakage on most arches except i386.
Remove the const qualifier from ap argument for __v2printf, that induced
that breakage, and seems to be the real reason for bad code. ap is modified
inside the __v2printf body by va_arg macro.
Marcel Moolenaar [Mon, 23 Oct 2006 00:38:58 +0000 (00:38 +0000)]
o Eliminate nexus_print_resources(). Use resource_list_print_type()
instead.
o Eliminate nexus_print_all_resources(). Inline the function body
in nexus_print_child().
Max Laier [Mon, 23 Oct 2006 00:34:07 +0000 (00:34 +0000)]
net80211 seems to give us more rates than specified via ic_sup_rates under
yet to be investigated circumstances. If that happens truncate to the number
of rates that the firmware supports.
Found by: Jeremie Le Hen
Obtained from: OpenBSD (w/ changes)
MFC after: 3 days
Ed Maste [Sun, 22 Oct 2006 21:33:57 +0000 (21:33 +0000)]
Clarify that the input hook requires binary packet data. Instead of
referencing an omitted example, include a short (Perl) example that
queues an ICMP Echo message.
Add two new functions to convert FAT filesystem format timestamps
to and from struct timespec, to replace the crummy conversion
function which have been copy&pasted into three different
filesystems already.
Apart from general crummyness as indicated by code like:
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
They also contain specialized crummyness which tries to compensate
for the general crummyness by caching recent conversion results,
with no regard for locking or consistency.
These replacement functions are smaller, O(1) and handle the Y2.1K
leap-year correctly.
Ideally, these functions should live in a module of their own,
which the three offending filesystems would depend on, but the
size is 877 bytes of code (on i386), so that would be false
economy.
Robert Watson [Sun, 22 Oct 2006 11:52:19 +0000 (11:52 +0000)]
Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.h
begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now
contains the userspace and user<->kernel API and definitions, with all
in-kernel interfaces moved to mac_framework.h, which is now included
across most of the kernel instead.
This change is the first step in a larger cleanup and sweep of MAC
Framework interfaces in the kernel, and will not be MFC'd.
Alan Cox [Sun, 22 Oct 2006 04:28:14 +0000 (04:28 +0000)]
Replace PG_BUSY with VPO_BUSY. In other words, changes to the page's
busy flag, i.e., VPO_BUSY, are now synchronized by the per-vm object
lock instead of the global page queues lock.
David Xu [Sat, 21 Oct 2006 23:59:15 +0000 (23:59 +0000)]
Since revision 1.333 of kern_sig.c no longer uses P_WEXIT, the change
opened a race window which can cause memory leak in signal queue.
Here we free memory for signal queue when process state is set to
PRS_ZOMBIE.
Minor markup fix: A comma should be seperated by space from macro
argument. This resulted in "pwritev,()" instead of the intended
"pwritev()," in the output.
Marcel Moolenaar [Sat, 21 Oct 2006 18:05:06 +0000 (18:05 +0000)]
Better handle the -F case:
o When stat(2) fails (i.e. the file has been moved) there's no new
file with the same name yet, so keep showing the file that's open.
This yields the same behaviour as -f, for which we don't stat(2).
o When a new file with the same name has been created (i.e stat(2)
succeeds but the inode or device numbers differ from the opened
file), show any new lines in the opened file (i.e. the old or
rotated file) before reopening the new file.
These changes fix the observed behaviour that tail(1) doesn't show
the very last lines of the rotated (log) files.
Workaround for (what seems to be) compiler error for gcc 3.4.6. On
i386 with default optimization level (-O2), va_list pointer ap in the
__v2printf function is advanced before the use. That cause argument
shift and garbage instead last argument in printf-family when xprintf is
activated.
The nsswitch is easy victim of the bug.
Reviewed by: kan
Approved by: kan (mentor)
MFC after: 1 week
Gleb Smirnoff [Sat, 21 Oct 2006 09:44:02 +0000 (09:44 +0000)]
Fix error in rev. 1.68. The intention was to break out the switch(){},
but actually exited from the for(){} loop. This fixes the PPPIOCSCOMPRESS
ioctl.
PR: kern/101333
Submitted by: Igor Popov <igorpopov newmail.ru>
Scott Long [Sat, 21 Oct 2006 07:54:39 +0000 (07:54 +0000)]
Be more like the BGE driver. Ensure that at least 16 TX descriptors are
kept unused in the ring. This check should probably be moved up to
bce_start_locked at some point, as it'll make the loop up there slightly
more efficient, and will eliminate a costly set of busdma operations when
the ring is full. But this works for now.
This makes all of my UDP torture tests work. I'll cautiously say that
it might even work for other users now. Feedback is appreciated.
Olivier Houchard [Sat, 21 Oct 2006 00:46:56 +0000 (00:46 +0000)]
Ok I am an idiot. On 32 bits big-endian systems, it is needed to handle the
syscalls using __syscall but only actually returning 32bits, such as mmap(),
specially : they set the return value in td->td_retval[0], but the userland
functions will expect this in r1, and not in r0 as it is normally done, as it
is the LSB. So add a special case for all these syscalls (all except lseek,
which truly returns 64bits).
Many thanks to Peter Grehan for his patience while explaining me the issue.
John-Mark Gurney [Fri, 20 Oct 2006 21:28:11 +0000 (21:28 +0000)]
fix tab indentation for CP and RV...
If the length is zero, catch this early, instead of making dflen go negative
and letting bad things happen... We also check to see if RV (checksum) is
0, and handle that has a checksum failure...
Properly handle checksum failures by not processing read-write VPD data,
and removing all the found read-only data...
John Baldwin [Fri, 20 Oct 2006 16:19:21 +0000 (16:19 +0000)]
Remove the check that prevented signals from being delivered to exiting
processes. It was originally added back when support for Linux threads
(and thus shared sigacts objects) was added, but no one knows why. My
guess is that at some point during the Linux threads patches, the sigacts
object was torn down during exit1(), so this check was added to prevent
a panic for that race. However, the stuff that was actually committed to
the tree doesn't teardown sigacts until wait() making the above race moot.
Re-allowing signals here lets one interrupt a NFS request during process
teardown (such as closing descriptors) on an interruptible mount.
Requested by: kib (long time ago)
MFC after: 1 week
Bruce Evans [Fri, 20 Oct 2006 09:44:21 +0000 (09:44 +0000)]
Don't show debug registers in "show registers". Special registers should
be displayed specially, and debug registers are among of the least
interesting special registers (far behind %cr3). The debug registers
are still accessible as variables and displayed in another bogus place
("show watches").