bde [Wed, 25 Oct 2006 07:29:22 +0000 (07:29 +0000)]
Fixed -mprofiler-epilogue. The garbage collector apparently doesn't
understand that non-local variables can never be collected, and when
it collected the static variable for mexitcount_libfunc, gcc aborted
on the next use of this variable.
This quick fix is to reinitialize the variable on every use and depend
on garbage collection recovering the small amount of memory wasted by
this, and not worry by the small amount of time wasted by this. It
would be better to initialize the variable together with most of the
other libfuncs in optabs.c and depend on whatever magic is there to
prevent its collection, but we initialize it here to avoid taking at
least 2 more files off the vendor branch.
markus [Tue, 24 Oct 2006 23:52:22 +0000 (23:52 +0000)]
- Update USB HID usage tables according to the following specs:
* USB HID Usage Tables, V1.12
* USB Monitor Control Class Specification, V1.0
* USB Usage Tables for HID Power Devices, V1.0
* USB Device Class Definition for Physical Devices, V1.0
* USB HID Point of Sale Usage Tables, V1.02
- Fix spelling of 'Microsoft'
- Bring the so called Microsoft page, in line with the style of the rest of
the file.
- Remove NetBSD version string as it doesn't reflect reality any longer
ru [Tue, 24 Oct 2006 22:02:29 +0000 (22:02 +0000)]
Revert rev. 1.86 by jmallett@ as it breaks "ro" mounts specified
in /etc/fstab.
This has been happening due to the priority inversion; options
specified on the command line should take precedence over options
from fstab over default "noro" option, but since both the default
"noro" and options specified on the command line (-w, -r, -o ...)
were put into the same "options" variable, "noro" took precedence
over fstab "ro" (this is easily visible with "mount -d").
scottl [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.
sobomax [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.
imp [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.
imp [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 [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.
kib [Mon, 23 Oct 2006 07:25:25 +0000 (07:25 +0000)]
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 [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().
mlaier [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
emaste [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.
phk [Sun, 22 Oct 2006 18:19:08 +0000 (18:19 +0000)]
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.
rwatson [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.
alc [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.
davidxu [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.
simon [Sat, 21 Oct 2006 20:36:50 +0000 (20:36 +0000)]
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 [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.
kib [Sat, 21 Oct 2006 11:49:07 +0000 (11:49 +0000)]
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
glebius [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>