Commit Graph

242615 Commits

Author SHA1 Message Date
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
christos 28b1bdeb54 switch evbarm to gdb-7.10.1 2016-05-21 19:56:52 +00:00
christos ab6e20171f Switch evbarm to gcc-5.3 and turn on PIE. 2016-05-21 18:34:52 +00:00
christos bfab48c6b3 Add various security options; enables PaX ASLR/MPROTECT 2016-05-21 18:31:13 +00:00
abhinav aa0cdec039 Remove unused include and unused constant. Ok from christos@. 2016-05-21 17:21:40 +00:00
christos e9c2e28b8a Fix the prototype used by EL_GETCFN, mention the associated typedef
name, document the return values, expand the list of affected
functions, warn against using EL_GETCFN, and clarify some wording
and notation. (Ingo Schwarze)
2016-05-21 17:06:44 +00:00
christos 06c5bf7f1c PIE in the face! 2016-05-21 16:23:10 +00:00
riastradh b93e5db80e Use rnd_getmore as intended. No more essay needed here.
Workaround for buffering got pushed into rnd_getmore, closer to the
actual cause of the problem.
2016-05-21 15:33:40 +00:00
riastradh 77ebf39786 Ask on-demand entropy sources to produce enough data to fill buffer.
Remainder of fix for PR kern/51135: if there is an entropy source
that can produce arbitrarily much data, as in rump, then nothing
should ever block indefinitely waiting for data.
2016-05-21 15:27:15 +00:00
riastradh 2b38f13330 Actually get as many bytes as requested from rumpuser_random.
rumpuser_random is limited to 32 bytes at a time -- which would be
reasonable, except that there are too many buffers in the way between
entropy sources and users of the entropy pool.

Partial fix for PR kern/51135.
2016-05-21 14:59:45 +00:00
salazar 7093afb253 fix double require bug 2016-05-21 12:39:32 +00:00
pgoyette b823c93930 Add entry for recent merge of nick-nhusb branch. Basically just a copy
of the commit log message, but this is easier for releng to find when
they start collecting info for 8.0

If anyone else wants to edit this entry, please feel free.
2016-05-21 07:22:28 +00:00
maxv c4cd7f0720 There is an issue in the way the direct map is set up on amd64.
When allocating memory, the kernel allocates physical pages and virtual
addresses for these pages. In order to optimize allocations smaller
than PAGE_SIZE, uvm_km_kmem_alloc can allocate a single physical page
and take its virtual address in the direct map in high virtual memory.
This direct map is set up at boot time, its PTEs do not change, and
therefore they don't need to be kentered. These high virtual PTEs being
constant, the permissions of the areas they point to are fixed at boot
time and cannot change.

The problem is that at boot time, they are created with RWX permissions.
Therefore, allocations smaller than PAGE_SIZE in the kernel heap are all
executable: mbufs, pnbufs, small kmem allocations, etc.

Fix this by setting the NOX bit in the direct map pages at boot time. We
also set the NOX bit in the temporary tmpva, since it does not need to
be executable either.

This also makes the U-area non executable on amd64.
2016-05-21 07:15:56 +00:00
maxv d1afa69a65 Explain where this value comes from. 2016-05-21 07:00:18 +00:00
maxv 54d6f71a61 USPACE and USPACE_ALIGN are constants. Use a #if instead. Probably saves
some instructions.
2016-05-21 06:37:28 +00:00
christos 9930e8e348 gcc can't compute the large initializer in rpi_release_mem,
so disable stack protector.
2016-05-20 16:40:40 +00:00
chs be6c83e099 simplify and fix futex requeuing:
don't wake up all the threads being requeued to have them move themselves
from one list to another (thus defeating the purpose), just change the lists
directly in futex_wake().
2016-05-20 13:54:34 +00:00
knakahara c41c6671b1 Update TODO
- "TX Multiqueue" -> "TX Multiqueue improvement"
    - add "Advanced Recieve Descriptor" (RX NEWQUEUE)
2016-05-20 08:17:14 +00:00
ozaki-r 7fa1e6be86 Adjust the tests for temp option that works now
See PR kern/50127
2016-05-20 06:48:52 +00:00
jnemeth 605ea3fe8e make CPU microcode loading dependent on both DOM0OPS AND CPU_UCODE 2016-05-20 03:41:20 +00:00
christos 5fbd96fa60 Turn on PaX ASLR/MPROTECT 2016-05-20 01:37:47 +00:00
christos 4f7caacd6a i386 is PIE now since I am turning PaX ASLR/MPROTECT on. 2016-05-20 01:36:16 +00:00
christos 142afa09a8 fix for ILP32. 2016-05-19 21:39:15 +00:00
christos da360e79eb Fix infinite recursion when building i386 -fPIE in
src/external/mit/xorg/lib/libxcb/xkb.

https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=231599

PR debug/67355
* var-tracking.c (reverse_op): Don't add dummy zero to reverse
  ops that simplify back to the original value.
* alias.c (refs_newer_value_p): Cut off recursion for
  expressions containing the original value.
2016-05-19 20:27:36 +00:00
riastradh 950b6c0b3d Replace deprecated disabled code by comment
describing what it intends to do, and why it won't work yet

From coypu.
2016-05-19 18:32:29 +00:00