Commit Graph

249699 Commits

Author SHA1 Message Date
maxv 4b31096413 Remove PG_k completely. 2017-03-23 18:08:06 +00:00
maxv 057da45228 Remove this call gate on amd64, it is useless and vulnerable.
Call gates do not modify %rflags, so interrupts are not disabled when
entering the gate. There is a small window where we are in kernel mode and
with a userland %gs, and if an interrupt happens here we will rejump into
the kernel but not switch to the kernel TLS.

Userland can simply perform a gate call in a loop, and hope that at some
point an interrupt will be received in this window - which necessarily will
be the case. With a specially-crafted %gs it is certainly enough to
escalate privileges.
2017-03-23 17:25:51 +00:00
nat dab5456581 Calculate GETISPACE/GETOSPACE properly.
Bump version.

Addresses PR kern/51999.
2017-03-23 15:50:48 +00:00
bouyer 72413a9e8c xlwp->mtx will never be used in interrupt context; set to IPL_NONE.
avoids a KASSERT when sleeping for the reply.
2017-03-23 14:52:36 +00:00
wiz 54c511cc9d Remove trailing whitespace. 2017-03-23 12:31:57 +00:00
kre 7c80fcca6b PR bin/14578
Add a reference to editline(7) so we document the "-o vi" and "-o emacs"
bindings (defaults, and what can be set.)
2017-03-23 12:10:53 +00:00
martin 675489c780 Comment out PAX_MPROTECT options completely, instead of just turning them
off globaly. This will make the automatic tests not even try to enable
mprotect, which can't work for our current PLT format and shared binaries.
2017-03-23 11:00:03 +00:00
martin 44424683d9 Avoid using an uninitialized mutex. 2017-03-23 08:31:00 +00:00
martin 05ad4681cb Do not assume anything about the pseudo-disklabel of a completely zeroed
disk image. Use the raw partition and newfs -I instead.
2017-03-23 08:18:17 +00:00
msaitoh 14412c9646 regen. 2017-03-23 03:15:15 +00:00
htodd 8291af55d0 Fix build. 2017-03-23 03:14:57 +00:00
msaitoh 4a8068643d Add Huawei Hi1710 BMC 2017-03-23 03:14:03 +00:00
roy 5128a2ed79 POSIX says that use_env(3) must precede setupterm(3).
The former lives in curses.h, but the latter lives in term.h.

This is solved by moving the function to libterminfo.
Because the environment can affect the terminal capabilities for
lines and columns, it follows that the tty size should affect it to.
So move that code to libterminfo and adjust in libcurses.
2017-03-23 00:55:39 +00:00
roy d5c74a0225 Allow terminfo users to update flag and numeric capabilities as they do
strings.
2017-03-23 00:39:06 +00:00
roy c8a6d4546d Revert botched commit. 2017-03-23 00:36:37 +00:00
roy 8bf4334f27 term.h 2017-03-23 00:23:29 +00:00
roy a3b8817f64 Revert prior .... some ncurses application expect to be able to update
the terminal capabilities.
2017-03-23 00:17:57 +00:00
chs ea6bb78f2d in vfp_state_load(), fix backwards logic for fpinst vs. fpinst2. 2017-03-22 23:36:02 +00:00
chs 7e30e94394 provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
2017-03-22 23:11:07 +00:00
sevan c2aad55695 KDTRACE_HOOKS is enabled by default in GENERIC.common, remove references in
individual config files.
2017-03-22 22:53:06 +00:00
sevan 45bd6f0779 The the MII/PHY section. It's not technically possible for this hardware to run on this system. 2017-03-22 22:37:41 +00:00
bouyer 46a067898d On second through, it may be possible to have a NULL kfs_v in read and write
(if we're not the LWP which did the open).
Add the appropriate locks and checks.
2017-03-22 22:33:32 +00:00
skrll f2b6c11aeb Reduce #ifdefs 2017-03-22 22:11:47 +00:00
jdolecek 1e4f0c4e55 add tests for the mount update from rw to rw+log, which used to case the panic
reported in PR kern/52056
2017-03-22 21:33:06 +00:00
jdolecek 69a701dc2c move the ffs_sync() after wapbl_log_position() call, since that can still
create delayed writes with MNT_ASYNC when log is created
2017-03-22 21:30:59 +00:00
bouyer e78e077985 Fix /kern/xen/xenbus handling. It's badly broken and will do bad things
if more than one thread tries to use it at the same time (hang, memory leak,
panic).
In a kernfs node, the fileops (open, close, read, write) gets a vnode,
but no way to know the file descriptor from which the request comes from.
As /kern/xen/xenbus interface is statefull (write sends a command and read
gets the response), a way to track "clients" is needed.
This commit implement states using the lwp pointer from the caller as a key.
It will fail (with an error) if a kernfs file descriptor is reused by a child
after a fork(), or if a file descriptor is shared by two threads of the same
process but fortunably the xen tools using this interface don't do this.

This should fixes occasional hangs of the Xen tools (one in "xbrd" state,
others in tstile) reported on port-xen by Alaric Snell-Pym.
2017-03-22 21:21:39 +00:00
jdolecek 8e90ad672f expand a little the explanation about discard
describe behaviour of combination of log+async (i.e. same as just log)
2017-03-22 21:14:11 +00:00
martin 945b6d1754 Add missing endianes swap to make the "recover" command work on big endian
machines.
2017-03-22 19:59:16 +00:00
kre 4b48a30a7a Unbreak build, init variable (not a false alarm for this one.) 2017-03-22 19:36:04 +00:00
martin defea524bf Skip the "migrate" test on architectures not natively using MBR, it
can not work there.
2017-03-22 19:13:40 +00:00
kre de1e0dfd01 parsedate.y: meaningless KNF of a comment (no code changes)
parsedate.3:  add an item in BUGS noting the weirdness of "next"

The real purpose of this commit is to supply the following message
which should be used for the immediately previous commit, replacing
its commit message (the two are similar, but definitely not the
same).   With thanks to gdt@ for pointing out one of the (many) errors
in the previous message (and noting others I had already seen).

    ----

Make parsedate handle "12 noon" and "12 midnight" (including when the
time given is "12:00" or "12:00:00") - but only for exactly 12 o'clock.
"12:00:01" is am or pm, not noon or midnight.

"12 am" remains as an alias for "12 midnight", and "12 pm" for noon,
though both are strictly (pedanticly) invalid (and meaningless.)

Note that "12 midnight" (or "12 am") means 00:00:00 (ie: midnight at
the start of the day, not at the end.)
2017-03-22 18:17:42 +00:00
roy 1b119018c7 openlog(3): add LOG_PTRIM and LOG_NLOG log options.
syslog(3) is the one stop method of logging system events and diagnostics.
When debugging a daemon in the foreground on a terminal, each line is
prefixed with tag[pid]: which is very repetative and can take up valuable
screen estate.
LOG_PTRIM solves this by removing this prefix from stderr output.

There is also the case where the debugging could involve a dry-run and
syslog(3) calls would pollute the system log with incorrect data.
LOG_NLOG solves this by not writing the the system log, but allowing
LOG_PERROR to operate as before.

Initially discussed here:
https://mail-index.netbsd.org/tech-userlevel/2016/10/06/msg010330.html
2017-03-22 17:52:36 +00:00
skrll 696f11dba3 Drop INSECURE - expect /etc/modules.conf for dtrace 2017-03-22 16:07:12 +00:00
wiz 9147669cb9 Fix some typos. 2017-03-22 09:38:10 +00:00
knakahara ac9c43ed03 add comments about transmit context descriptor 2017-03-22 08:44:41 +00:00
ozaki-r 2b5b2086c8 Tweak and KNF some functions 2017-03-22 07:14:18 +00:00
ozaki-r e6b76a5e72 Add some tests to change flags of routes 2017-03-22 06:30:00 +00:00
kre 992d3e66d8 Fix typo in a comment. 2017-03-22 05:35:33 +00:00
knakahara f604adfd29 make kernel config flag WM_EVENT_COUNTERS.
suggested by msaitoh@n.o.
2017-03-22 03:32:09 +00:00
knakahara 550fe07e9f missing M_CSUM_IPv4 checking. It does not cause problems, but it is wrong.
The implementations of M_CSUM_DATA_IPv4_IPHL() and M_CSUM_DATA_IPv6_HL()
is the same, so that does not cause problems.
2017-03-22 02:56:12 +00:00
kre 08844cd91f Add tests for "12 noon", "12 midnight". 2017-03-22 01:50:22 +00:00
kre e9cfba3947 Make parsedate handle "12 noon" and "12 midnight" (including when
the time is "12:00" or "12:00:00) - but only for exactly 12 o'clock.
"12:00:01" is am or pm, not noon or midnight.

"12 am" remains as an alias for "12 midnight", and "12 pm" for midnight,
though both are strictly invalid (and meaningless.)

Note that "12 pm" means 00:00:00 (ie: midnight at the start of the
day, not at the end.)
2017-03-22 01:49:36 +00:00
kre f8f91559ae Since PR lib/52101 is now fixed, the tests for its bug should no longer fail. 2017-03-22 01:00:19 +00:00
kre b717517d3c Fix PR lib/52101 -- 12:30 am is 00:30:00 and 12:30 pm is 12:30:00 2017-03-22 00:59:06 +00:00
christos bda2cfe499 Clear rc variables that contain state that is gone after the boot process
is complete, so that scripts invoked from powerd don't think that they
are still invoked by the rc system and fail.
Reported by rudolf @ tech-userlevel
2017-03-21 22:52:10 +00:00
kre 10db8f184b Fix a typo - it doesn't matter now, as the test fails anyway, but
it will matter when parsedate is fixed and the test is supposed to
succeed.
2017-03-21 21:42:18 +00:00
kre 0c8a4b80f9 PR lib/52101
Add 6 extra tests for the 12am/12pm bug - all currently expected to fail.
(That is, 6 subtests of the "times" test will fail, all new ones)>

While here, when parsedate() fails (returns -1) avoid converting that
failure value (-1) to a struct tm (1969-12-31T23:59:59 UTC) and then
comparing the values with those expected by the test, and complaining
about all of those (where ANY was not permitted) that don't match...
2017-03-21 20:06:27 +00:00
kre 4f3a1f302d tzdata updated to 2017b. 2017-03-21 19:26:40 +00:00
kre b854a7da78 Merge tzdata2017b 2017-03-21 19:24:22 +00:00
kre 20bcdc972c Import tzdata2017b from ftp://ftp.iana.org/tz/releases/tzdata2017b.tar.gz
Summary of changes in tzdata2017b (2017-03-17 07:30:38 -0700):
    Haiti resumed observance of DST in 2017 (on Mar 12)

    Liberia changed from -004430 to +00 on 1972-01-07, not 1972-05-01.
    Use "MMT" to abbreviate Liberia's time zone before 1972,
    as "-004430" (tzdata2016a) is one byte over the POSIX limit.
2017-03-21 19:22:44 +00:00