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.
Obtained from: TrustedBSD Project
Sponsored by: SPARTA
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.
PR: bin/101979
Tested by: Jos Backus <jos@catnook.com>
MFC after: 2 months
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
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.
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.
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...
Tested by: oleg (dflen going negative)
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