Commit Graph

242789 Commits

Author SHA1 Message Date
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
christos
2a2068fd64 Read and load the aux vector from a core file 2016-05-24 00:50:53 +00:00
christos
9d95ecedc7 Add a note for the auxv array so we can find our load location from a
core file of a PIE binary.
2016-05-24 00:49:55 +00:00
knakahara
8eb180f2ef Update TODO: evcnt 2016-05-23 23:36:02 +00:00
martin
ffb79a8f7b New Rawrite32 release 2016-05-23 18:36:05 +00:00
jmcneill
84e0ecfe04 IST_MPSAFE is not a valid flag for fdtbus_intr_establish; use
FDT_INTR_MPSAFE instead.
2016-05-23 18:21:14 +00:00
tls
1331d5da97 Fix a longstanding problem with accept filters noticed by Timo Buhrmester:
sockets sitting in the accept filter can consume the entire listen queue,
such that the application is never able to handle any connections.  Handle
this by simply passing through the oldest queued cxn when the queue is full.

This is fair because the longer a cxn lingers in the queue (stays connected
but does not meet the requirements of the filter for passage) the more likely
it is to be passed through, at which point the application can dispose of it.

Works because none of our accept filters actually allocate private state
per-cxn.  If they did, we'd have to fix the API bug that there is presently
no way to tell an accf to finish/deallocate for a single cxn (accf_destroy
kills off the entire filter instance for a given listen socket).
2016-05-23 13:54:34 +00:00
salazar
fb99257dd1 fix spelling mistakes 2016-05-23 11:41:06 +00:00
knakahara
20d828a769 fix: ethernet controllers which use wiseman_txdesc_t (earlier than 82575) hang
possibly.
2016-05-23 04:07:29 +00:00
knakahara
f47c3fc3cf GENERIC kernel (disabled NET_MPSAFE kernel) also needs txq_lock to avoid race
between tx processing and tx interrupt handler.
2016-05-23 03:30:40 +00:00
chs
72af35a796 remove unused variables. 2016-05-23 01:45:41 +00:00
christos
16467be6f9 documentation improvements (Ingo Schwarze) 2016-05-22 23:54:20 +00:00
rjs
afd529313e Use const for arguments to sctp_is_same_scope(). 2016-05-22 23:04:27 +00:00
rjs
b65559a564 Remove rtcache reference to route before freeing the containing struct. 2016-05-22 22:18:41 +00:00
christos
bb64d9f1ce Stop the read module from poking the el_chared.c_macro data structure
currently belonging to the chared module.  The read module does so
from three of its functions, while no other module uses the macro
data, not even the chared module itself.  That's quite logical
because macros are a feature of input handling, all of which is
done by the read module, and none by the chared module.  So move
the data into the read modules's own opaque data structure, struct
el_read_t.

That simplifies internal interfaces in several respects: The
semi-public chared.h has one fewer struct, one fewer #define, and
one fewer member in struct el_chared_t; all three move to one single
C file, read.c, and are now module-local.  And the internal interface
function ch_reset() needs one fewer argument, making the code of many
functions in various modules more readable.

The price is one additional internal interface function, read_end(),
10 lines long including comments, called publicly from exactly one
place: el_end() in el.c.  That's hardly an increase in complexity
since most other modules already have their *_end() function, read.c
was the odd one out not having one.

From Ingo Schwarze
2016-05-22 19:44:26 +00:00
joerg
6e49b77769 obj->phdr must be the absolute address, not the virtual offset from the
main binary. Historically, this has been the same. For PIE though,
relocbase can be pretty much anywhere. Fixes PR toolchain/51159.
2016-05-22 19:28:39 +00:00
abhinav
e92872065a Add options to whatis and apropos to accept custom man.conf.
makemandb(8), man(1) already use -C as an option to take man.conf path,
	so use the same option for whatis(1) and apropos(1) for consitency.
	apropos was using -C/-c to disable/enable context of the search
	matches, change that to -M/-m respectively.
2016-05-22 19:26:04 +00:00
christos
b039ee7763 reduce #ifdef mess caused by PaX 2016-05-22 14:26:09 +00:00
maxv
7123eade7b Save L4's physical address earlier. Also, PDE_SIZE has nothing to do
here, we are just zeroing out the upper 32bits of the 64bit pointer.
2016-05-22 10:11:55 +00:00
maxv
eeda8f022a Revert my previous change. I missed an entry on NXR. 2016-05-22 09:10:37 +00:00
skrll
4d638b24f1 More comments 2016-05-22 08:02:23 +00:00
skrll
d7866a502f Add a comment and reformat some others 2016-05-22 07:52:09 +00:00
abhinav
a9a3a72028 Remove a trailing white space after .Nm (mandoc -Tlint was complaining about it) 2016-05-22 05:03:17 +00:00
riastradh
8338092962 Test for PR kern/51135 is no longer failing. 2016-05-22 04:34:44 +00:00
christos
2b0df44082 Account for the VA hole differently (simpler) 2016-05-22 01:09:09 +00:00
christos
2bd2f7a2de Mention MPROTECT issues 2016-05-21 21:07:43 +00:00
christos
8ed051d1e1 put back _PATH_WHATIS, it is used. 2016-05-21 20:54:34 +00:00