Commit Graph

241938 Commits

Author SHA1 Message Date
skrll
5dd2b376c9 Update for 'show kernhist' change. (go wiz!) 2016-04-12 11:34:24 +00:00
christos
20d5bea366 FIONREAD takes int as an argument (Ingo Schwarze) 2016-04-12 11:15:46 +00:00
bouyer
ab971176ac Alternate UART3 pins a PG6-7, not PG8-9 2016-04-12 10:54:29 +00:00
dholland
2c056b2ccb Fix (finally) the rest of PR 47040.
Revert the supporting logic in -r1.190 of vfs_lookup.c, and fix the
important change to set searchdir = NULL instead of searchdir =
foundobj. Then supply the necessary new supporting logic to cope with
some new cases where searchdir can be null.

This is at the point when lookup_once crosses a mountpoint going down;
the idea was to avoid coupling locks across filesystems as that has a
number of potentially negative consequences. At this stage of namei,
though, it's important to set searchdir to null as this is what is
used later on to handle other cases arising from crossing mount
points. If you set it to be the same as foundobj, that instead creates
the impression that you looked up "/." on the new volume, and that
causes odd things to happen in corner cases such as the one appearing
in PR 47040.

This fix ought to be pulled up to -6 and -7, and it probably could be
safely, but given the delicacy of this code and the fact that it's
taken me more than three years to find the combination of time and
intestinal fortitude to do it, as well as the minor nature of the
resulting wrong behavior observed so far, I think we'll let that part
go.

This change also exposes an annoying corner case: if you cross a mount
point and the root directory vnode of the new volume is not a
directory but a symlink, we now have no searchdir to follow the
symlink relative to. In principle one could hang onto the searchdir
from before calling lookup_once and use that, or complexify the
interface of lookup_once to hang onto it as desired for this case.
Alternatively one could add the necessary null checks to namei_follow
and allow only absolute symlinks in this case, as for an absolute
symlink one doesn't need the old searchdir. However, given that only
broken filesystems have symlinks as their root vnodes, I'm not going
to bother. Instead if this happens we'll just fail with ENOTDIR.
2016-04-12 04:02:55 +00:00
christos
0af9955411 Provide reason to be printed in panic string. 2016-04-12 00:36:29 +00:00
christos
985c823c19 From Ingo Schwarze:
* Delete the stubs of the XK_EXE mechanism that was never implemented.
   From a security, stability, and simplicity perspective, i would
   consider implementing it a truly terrible idea, so let's better
   get rid of it.

 * Do not use the local variable "num" in el_wgets() alternately for
   two completely different purposes.  Only use it for the number
   of characters read, as stated in the comment (or -1 as long as
   that number is still unknown), not for the (more or less boolean)
   return value of read_getcmd().  Actually, there is no need at
   all to save the latter return value after testing it once.

 * The function read_getcmd() has very unusual return values:
   It returns -1 for success and 0 for EOF/error.  Switch that around
   to 0 for success and -1 for EOF/error to be less confusing, and
   get rid of the OKCMD preprocessor macro.

 * Get rid of one #ifdef section in el_wgets() by using
   el->el_chared.c_macro directly at the only place
   where it is used.

 * Delete the unused MIN() macro.
2016-04-12 00:16:06 +00:00
christos
39bf38271f misc cleanups, no functional change 2016-04-11 23:41:15 +00:00
christos
39e1d6f1ed Fix indentation, Ingo Schwarze 2016-04-11 22:30:14 +00:00
christos
469d44f8e7 Get rid of private/public; keep protected (Ingo Schwarze) 2016-04-11 18:56:31 +00:00
martin
6182b56b9d Fix libutil version bump 2016-04-11 17:00:36 +00:00
christos
a75ea7b9c4 chartype cleanups from Ingo Schwarze:
- The file tokenizer.c no longer uses chartype.h,
   so don't include the header.

 - The dummy definitions of ct_{de,en}code_string() for the
   NARROWCHAR case are only used in history.c, so move them there.

 - Now the whole content of chartype.h is for the wide character
   case only.  So remove the NARROWCHAR ifdef and include the
   header only in the wide character case.

 - In chartype.h, move ct_encode_char() below the comment explaining it.

 - No more need for underscores before ct_{de,en}code_string().

 - Make the conversion buffer resize functions private.
   They are only called from the decoding and encoding functions
   inside chartype.c, and no need can possibly arise to call them
   from anywhere else.
2016-04-11 16:06:52 +00:00
christos
47c9654d15 make this work with pie binaries (subtract dli_fbase from addresses). 2016-04-11 15:30:18 +00:00
bouyer
2f53f613b4 x86_lfence() calls mcount(), so inline lfence instructions in mcount
helper functions
2016-04-11 14:15:30 +00:00
bouyer
ca03f01a92 __cpu_simple_unlock() is called from _mcount(), so don't call mcount() from
__cpu_simple_unlock().
Kernel profiling should work again
2016-04-11 14:14:27 +00:00
riastradh
135e13ec80 Back out previous -- <sys/intr.h> does provide splraiseipl.
Man page says <sys/param.h>, but that's wrong.

The real problem was that rump didn't have splraiseipl at all, and
that already got fixed before I woke up this morning and panicked
because I had obviously broken all the builds!
2016-04-11 13:52:23 +00:00
riastradh
3b45fb62ee Clarify wording about when to use PSLIST_ENTRY_DESTROY. 2016-04-11 13:45:20 +00:00
riastradh
4501fcf7e7 Need <sys/param.h> for splraiseipl.
How did this pass the releng autobuilds before?  We went through
several full builds of HEAD after I committed subr_psref.c.
2016-04-11 13:18:13 +00:00
martin
0568072811 Add missing .if so MKPIE is only defaulting to yes on amd64 for now 2016-04-11 11:46:17 +00:00
martin
8dca0c72be Add a dummy splraiseipl() 2016-04-11 10:53:06 +00:00
roy
f42c031c26 Note import of openresolv-3.8.0 2016-04-11 10:44:30 +00:00
roy
cc53734e89 Fix build for operesolv-3.8.0 2016-04-11 10:43:24 +00:00
roy
3ddffba0b1 Sync 2016-04-11 10:41:51 +00:00
roy
9d6c04751d Import openresolv-3.8.0 with the following changes:
*  init system detection moved from configure into resolvconf.
  *  Fixed multiple domains not bein separated correctly.
2016-04-11 10:40:21 +00:00
ozaki-r
6a7ab186c9 Don't use radix tree API directly 2016-04-11 09:21:18 +00:00
roy
bb6883340e Only FreeBSD treats rssi this way, so #ifdef it and just treat rssi
as a number for other OS.
2016-04-11 08:57:19 +00:00
ozaki-r
322b6a238d Sweep unncessary radix.h inclusions 2016-04-11 08:56:16 +00:00
wiz
16a8980036 Add serial commas. Fix minus. Sort SEE ALSO. Fix xref. 2016-04-11 08:49:57 +00:00
roy
aae35f25ba Bump libutil for new pidfile functions. 2016-04-11 08:44:40 +00:00
ozaki-r
1fcfead163 Remove out-dated comments and unnecessary splsoftnet for pool_{get,put} 2016-04-11 08:26:33 +00:00
ozaki-r
6a82a3a147 Add psref to rump kernel 2016-04-11 06:49:11 +00:00
ozaki-r
ba236d2e0a Fix usage of pslist(9)
Pointed out by riastradh@.
2016-04-11 05:40:47 +00:00
ozaki-r
9129220b60 Move #include <sys/pslist.h> inside #ifdef _KERNEL for building brconfig 2016-04-11 03:46:47 +00:00
riastradh
7275484f28 Cause readers to fail noisily after PSLIST_ENTRY_DESTROY.
Using NULL only causes readers to stop iteration, because it looks
like the end of the list; using a bogus non-null pointer causes them
to crash.
2016-04-11 03:46:37 +00:00
riastradh
6977a61914 Remove incorrect comment about non-effect of PSLIST_ENTRY_DESTROY.
This does have an effect -- it nullifies the next pointer.  (The text
was copied from PSLIST_DESTROY, which really has no effect without
options DIAGNOSTIC.)
2016-04-11 03:27:14 +00:00
ozaki-r
814cd05c8b Use pslist(9) in bridge(4)
This adds missing memory barriers to list operations for pserialize.
2016-04-11 02:04:14 +00:00
ozaki-r
dd3c4fc3e5 Don't call pfxlist_onlink_check with holding llentry lock
From FreeBSD (as of 2016-04-11).

Should fix PR kern/51060.
2016-04-11 01:16:20 +00:00
christos
0594af8028 Char -> wchar_t from Ingo Schwarze. 2016-04-11 00:50:13 +00:00
christos
6b3f51ca99 there is no pflags, just flags. 2016-04-11 00:47:19 +00:00
christos
0aefc7f9ad more macro WIDECHAR undoing from Ingo Schwarze. 2016-04-11 00:22:48 +00:00
christos
cb19fc18b8 Apply revision 274569 from FreeBSD:
Only compare visitation counters if they've both been set for the current
type graph walk.
2016-04-10 23:37:10 +00:00
kamil
6457bad4b1 Mark ./usr/libdata/debug/usr/bin/pcpp.debug as obsolete
pcpp.debug is already in ./usr/libdata/debug/usr/libexec/

This fixes build with MKPCC=yes and all debug flags turned on.
2016-04-10 21:45:33 +00:00
kamil
9b07f7a97e Remove duplicate entry of /usr/libdata/debug/usr/bin/p++.debug
I don't have p++.debug locally so assume that it's properly set for the
first time as obsoleted.
2016-04-10 21:40:05 +00:00
roy
dffb5661e0 Note import of dhcpcd-6.10.2 2016-04-10 21:09:41 +00:00
roy
4844e7c234 Note addition of new pidfile functions. 2016-04-10 21:08:48 +00:00
roy
f6d6501d55 dhcpcd now uses libutil. 2016-04-10 21:06:54 +00:00
roy
9c9a1de605 Sync 2016-04-10 21:00:53 +00:00
roy
6b9006e83c Implement pidfile_lock, pidfile_read and pidfile_clean.
Discussed on tech-net@, ok core@.
2016-04-10 19:05:50 +00:00
wiz
3133e4c397 Fix xref section. 2016-04-10 18:27:56 +00:00
christos
3f61dfb7a9 GC PAX_ASLR_EXEC 2016-04-10 15:41:05 +00:00
christos
d9da07b963 We don't need TRAP_SIGDEBUG 2016-04-10 15:39:27 +00:00