242665 Commits

Author SHA1 Message Date
dholland
4142c9b7ca usage nit 2016-05-27 05:50:07 +00:00
macallan
f9df4180d4 treat IPIs like regular interrupts at IPL_HIGH
should fix port-powerpc/44387
tested by chuq
2016-05-26 17:38:05 +00:00
christos
ec5b2a9e09 new bind 2016-05-26 16:55:08 +00:00
christos
1563e28766 merge conflicts 2016-05-26 16:49:55 +00:00
christos
4f2aea9f2c Import bind 9.10.4-P1 2016-05-26 15:45:39 +00:00
hannken
40d12c0185 Use vnode state to replace VI_MARKER, VI_CHANGING, VI_XLOCK and VI_CLEAN.
Presented on tech-kern@
2016-05-26 11:09:55 +00:00
hannken
1e17b1e3c2 Add vnode state and supporting operations and diagnostics.
Presented on tech-kern@
2016-05-26 11:08:44 +00:00
hannken
c9685569a3 Merge the vnode and its corresponding vcache_node into one
vcache_node structure.

Print the vcache_node part in vprint() and vfs_vnode_print().

Presented on tech-kern@
2016-05-26 11:07:33 +00:00
nakayama
4645840d5b Add more CardBus devices. 2016-05-26 10:38:07 +00:00
prlw1
854e85e5bd Handle truncated DHCP messages, provided only the BOOTP vendor area
is truncated.  [3fd740f3ed]
OK from roy@
2016-05-26 09:09:47 +00:00
bouyer
727b83213d Remove a KASSERT() which is A20-specific, as well as the local variable
used here.
Fix "error: unused variable 'grp'" for non-DIAGNOSTIC kernels,
reported by Rin Okuyama.
2016-05-26 07:45:51 +00:00
maxv
a56d0ceb2a There is an issue in the way the fillkpt macro sets up pages on both
amd64 and i386.

The fillkpt loop is equivalent to the following:

	do {
		/* fill in the slot */
		/* increment %ebx to the next slot */
		/* increment %eax to the next pa */
	} while (%ecx > 0)

The issue here is that if %ecx = 0 (i.e., the chunk we are trying to
map is zero-sized), there is still one entry created in the page table.
The kernel expects the va<->pa translation to be linear in low memory.
If there is a zero-sized chunk, the dead entry creates a +4096 offset in
the virtual space, with two consecutive entries that point to the same
physical address. In other words, the mappings are not linear anymore,
which causes the kernel to die.

Before my recent changes, there were only two big chunks that were
mapped, and neither of these could be zero-sized. Now, with multiple,
fine-grained chunks, it is possible that the [SYMS]+[PRELOADED_MODULES]
chunk could be zero-sized.

[PRELOADED_MODULES] is almost never here, and [SYMS] is always here on
default kernels. Except for floppies, where the bootloader does not load
[SYMS].

Should fix PR 51148.
2016-05-26 07:24:55 +00:00
ozaki-r
6bbd2477a9 Introduce M_CLEARCTX and use it instead of open-coding rcvif
No functional change.
2016-05-26 05:04:46 +00:00
ozaki-r
ea0349e714 Use M_GETCTX
No functional change.
2016-05-26 05:01:11 +00:00
nakayama
cb7479712f sort 2016-05-26 04:26:05 +00:00
kamil
13f6226486 Fix building GCC-5.3 with GCC-6.1
Cherry-pick upstream patch:

From 1e5f1089dec3af328fd03125d6778f666d0bd4e4 Mon Sep 17 00:00:00 2001
From: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu, 25 Feb 2016 15:33:50 +0000
Subject: [PATCH] 2016-02-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Backported from mainline
        2016-02-19  Jakub Jelinek  <jakub@redhat.com>
                    Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * Make-lang.in: Invoke gperf with -L C++.
        * cfns.gperf: Remove prototypes for hash and libc_name_p
        inlines.
        * cfns.h: Regenerated.
        * except.c (nothrow_libfn_p): Adjust.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@233720 138bc75d-0d04-0410-961f-82ee72b054a4


Verified to work with GCC 5.3 and 6.1.
2016-05-25 20:57:34 +00:00
wiz
692b4b1e95 Consistent indent. 2016-05-25 20:49:00 +00:00
wiz
9376295307 Punctuation nit. 2016-05-25 20:47:57 +00:00
christos
5763e378f2 Give 0,1,2 for security.pax.mprotect.ptrace and make it default to 1
as documented in sysctl(7):
0 - ptrace does not affect mprotect
1 - (default) mprotect is disabled for processes that start executing from
    the debugger (being traced)
2 - mprotect restrictions are relaxed for traced processes
2016-05-25 20:07:54 +00:00
nakayama
f1700a0c7a tabify, fix indent and remove trailing whitespace. 2016-05-25 20:00:50 +00:00
christos
3b5bb479be Document security.pax.mprotect.ptrace 2016-05-25 19:52:32 +00:00
christos
1c46e02997 Apply patch https://github.com/acpica/acpica/commit/\
c450c13615f7af0673230041da4216b3de5bc4d3.patch

This patch fixes 2 issues in AccessWidth/BitOffset support and adds
comments to justify the BitOffset/BitWidth style macro usages. Lv Zheng.

This patch introduces ACPI_IS_ALIGNED() macro. Lv Zheng.

The old register descriptors are translated in AcpiTbInitGenericAddress()
with AccessWidth being filled with 0. This breaks code in
AcpiHwGetAccessBitWidth() when the registers are 16-bit IO ports and their
BitWidth fields are filled with 16. The rapid fix is meant to make code
written for AcpiHwGetAccessBitWidth() regression safer before the issue is
correctly fixed from AcpiTbInitGenericAddress(). Reported by
John Baldwin <jhb@freebsd.org>, Fixed by Lv Zheng <lv.zheng@intel.com>,
Tested by Jung-uk Kim <jkim@freebsd.org>.
2016-05-25 18:35:13 +00:00
christos
19ea743456 Introduce security.pax.mprotect.ptrace sysctl which can be used to bypass
mprotect settings so that debuggers can write to the text segment of traced
processes so that they can insert breakpoints. Turned off by default.
Ok: chuq (for now)
2016-05-25 17:43:58 +00:00
christos
cd1c56e89e randomize the location of the rtld. 2016-05-25 17:25:32 +00:00
christos
d8509bf6e2 abstract read code to a single function (Ingo Schwarze) 2016-05-25 13:01:11 +00:00
jmcneill
25e1e83ddb Fix get_specifier_by_index to work with indexes greater than 0. 2016-05-25 12:43:08 +00:00
ozaki-r
620cf57dee Use M_GETCTX and M_SETCTX
No functional change.
2016-05-25 10:15:01 +00:00
christos
2cbb3786cb Give up and use TOOL_SED again. 2016-05-25 00:14:47 +00:00
christos
ec537ebd0d Fix SED issue differently. 2016-05-25 00:07:20 +00:00
christos
981599c48c Export the variables so that they propagate via sets.subr -> make -> mkvars.mk 2016-05-24 22:28:56 +00:00
skrll
60330fb799 Sync and allow arm to natively build 2016-05-24 21:25:25 +00:00
agc
205633288c As proposed in:
http://mail-index.netbsd.org/tech-userlevel/2016/05/18/msg009999.html

and

	https://www.netbsd.org/~agc/bozo-20160517.diff

add a patch to httpd to return the version string of httpd itself, and use the
-G option on the command line to enable this. This gives httpd the ability to
show, from the command line, what version is running.

	% /usr/build/obj/x86_64/usr/src/libexec/httpd/bozohttpd -G
	bozohttpd version bozohttpd/20160415
	%
2016-05-24 21:18:29 +00:00
christos
564475388a Put the name of the dynamic linker in allocated memory, so that it becomes
part of the core file link-map, so that gdb can find it.
2016-05-24 20:32:33 +00:00
martin
8ae1d7229f PR kern/50985: use the runtime limits of the vmspace in range_test()
instead of the compile time defaults for it.
2016-05-24 20:20:57 +00:00
christos
3be6f3a78a This should be SED not TOOL_SED since this is what is set from the ${SETSENV}
command in the Makefile!
2016-05-24 19:36:41 +00:00
christos
fa7ab2f97a el_map.alt can't be NULL here (Ingo Schwarze) 2016-05-24 19:31:27 +00:00
abhinav
40d75a907b Bring man pages in sync with reality.
Remove man pages run_query_html.3 and run_query_pager.3 as the corresponding
functions have been removed from apropos-utils.c
Ok by wiz@
2016-05-24 18:06:42 +00:00
christos
6eacc2dbd2 remove debug read (Ingo Schwarze) 2016-05-24 17:42:54 +00:00
martin
f3944df18c Effectively disable aslr for non-topdown-VA binaries (unless they are
compat32, which we deal with properly). It would be possible to get
those working too, but it is not worth the code complexity.

This makes binaries compiled with -mcmodel=medlow (and ancient binaries)
work again on sparc64, smoothing the upgrade path.

ok: christos
2016-05-24 17:30:01 +00:00
salazar
7eb37e612b Lua 5.3.2: update doc/3RDPARTY and add entry to doc/CHANGES 2016-05-24 17:11:14 +00:00
christos
63ea08216d Fix armv3 segv compiling mDNS.c, from:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62254
    https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01095.html
2016-05-24 15:42:17 +00:00
christos
0a374fd7e5 From Ingo Schwarze:
Reduce obfuscation of errno handling. There is only one purpose
non-local errno handling is needed for:  Inside el_wgets(), several
functions call down indirectly to el_wgetc(), many of them via the
dispatch table.  When el_wgetc() fails, it does properly report
failure, but then various cleanup is done which may clobber errno.
But when returning due to failure, el_wgets() wants to have errno
set to the reason of the original read failure, not to the reason
of some subsequent failure of some cleanup operation.  So el_wgetc()
needs to save errno, and if it's non-zero, el_wgets() needs to
restore it on failure.

This core logic is currently obscured by the fact that el_errno
is set and inspected at some additional places where it isn't needed.
Besides, since el_wgetc() and and el_wgets() are both in read.c,
el_errno does not need to be in struct editline, it can and should
be local to read.c in struct el_read_t.

Let's look at what can be simplified.

 1. keymacro_get() abuses el_errno instead of having a proper
    error return code.  Adding that error return code is easy
    because node_trav() already detects the condition and an
    adequate code is already defined.  Returning it, testing
    for it in read_getcmd(), and returning with error from there
    removes the need to inspect el_errno from el_wgets() after
    calling read_getcmd().
    Note that resetting lastchar and cursor and clearing buffer[0]
    is irrelevant.  The code returns from el_wgets() right afterwards.
    Outside el_wgets(), these variables are no longer relevant.
    When el_wgets() is called the next time, it will call ch_reset()
    anyway, resetting the two pointers.  And as long as lastchar
    points to the beginning of the buffer, the contents of the
    buffer won't be used for anything.

 2. read_getcmd() doesn't need to set el_errno again after el_wgetc()
    failure since el_wgetc() already did so.  While here, remove
    the silly "if EOF or error" comments from the el_wgetc()
    return value tests.  It's a public interface documented in a
    manual, so people working on the implementation can obviously
    be expected to know how it works.  It's a case of

      count++;  /* Increment count. */

 3. In the two code paths of el_wgets() that lead up to "goto noedit",
    there is no need to save the errno because nothing that might
    change it happens before returning.

For clarity, since el_wgets() is the function restoring the errno,
also move initializing it to the same function.

Finally, note that restoring errno when the saved value is zero is
wrong.  No library code is ever allowed to clear a previously set
value of errno.  Only application programs are allowed to do that,
and even they usually don't need to do so, except when using certain
ill-designed interfaces like strtol(3).

I tested that the behaviour remains sane in the following cases,
all during execution of el_wgets(3) and with a signal handler
for USR1 installed without SA_RESTART.

 * Enter some text and maybe move around a bit.
   Then send a USR1 signal.
   The signal gets processed, then read_char() resumes reading.
   Send another USR1 signal.
   Now el_wgets() sets errno=EINTR and returns -1.

 * Press Ctrl-V to activate ed-quoted-insert.
   Then send a USR1 signal.
   The signal gets processed, then read_char() resumes reading.
   Send another USR1 signal.
   ed_quoted_insert() returns ed_end_of_file(), i.e. CC_EOF,
   and el_wgets() returns 0.

 * Press a key starting a keyboard macro.
   Then send a USR1 signal.
   The signal gets processed, then read_char() resumes reading.
   Send another USR1 signal.
   Now el_wgets() sets errno=EINTR and returns -1.

 * Press : to enter builtin command mode.
   Start typing a command.
   Then send a USR1 signal.
   The signal gets processed, then read_char() resumes reading.
   Send another USR1 signal.
   Now c_gets() returns -1, ed_command() beeps and returns CC_REFRESH,
   and el_wgets() resumes operation as it should.

I also tested with "el_set(el, EL_EDITMODE, 0)", and it returns
the right value and sets errno correctly.
2016-05-24 15:00:45 +00:00
martin
87669b78b9 Update comment explaining why PAX_MPROTECT is disabled here 2016-05-24 13:57:26 +00:00
skrll
fa15d5d3a4 More mknative re-runs 2016-05-24 13:00:00 +00:00
skrll
1afd582e81 More mknative re-run. 2016-05-24 10:46:13 +00:00
hannken
6fc7edbd65 Disable PAX mprotect to make just-in-time-compile tests work again.
Ok: Christos Zoulas
2016-05-24 10:16:34 +00:00
reinoud
42866dd28d Cleanup VAT writout. To prevent issues with the sequential writing strategy
trying to write on blocks that are lost due to the synchronisation, don't just
bluntly do synchronize device caches, but split out on strategies.
2016-05-24 09:55:57 +00:00
skrll
6e3cf83f8e Re-tun mknative for earm gdb 2016-05-24 09:16:56 +00:00
abhinav
743e3b4551 md5 is a hashing algorithm, don't say it is used for encryption.
Ok by wiz@
2016-05-24 06:15:43 +00:00
wiz
70ceaf5cff Fix typo. From Michael Scherer in PR 51162. 2016-05-24 05:46:57 +00:00