Commit Graph

256686 Commits

Author SHA1 Message Date
uwe 6be0d6d9a0 Fix .endif comment for TOOLS_BUILDRUMP 2018-02-18 01:06:24 +00:00
sjg 13b51c6c09 Var_Set: avoid SIGSEGV if val is NULL
A NULL val is handled gracefully (by VarAdd) when
var is not previously set, so we ought not crash
the second time.

PR: 53034
2018-02-18 00:52:42 +00:00
joerg 9d01073d28 Restrict -fno-delete-null-pointer-checks to GCC. 2018-02-17 22:47:14 +00:00
kamil f4a8ff8348 Try to correct generation of the sun2 distribution
Mark the headers for GCC sanitizers as gcccmds.
2018-02-17 21:46:41 +00:00
mrg 9e8cffe5e6 switch i386, sparc and sparc64 to GCC 6. 2018-02-17 21:46:15 +00:00
mrg 35b187cd10 add missing gcc-6/xtestintrin.h 2018-02-17 21:32:22 +00:00
maxv 71e53827d1 Declare check_swapgs in an ASM macro. No real functional change. 2018-02-17 21:05:58 +00:00
maxv 8f95f7b82b Use ASM macros for the rest of the entry points. No real functional
change. Now the format of the entry points is:

	.macro	TRAP_ENTRY_POINT_xx	arg1,arg2,arg3
		...the asm code...
	.endm

		TEXT_USER_BEGIN
	TRAP_ENTRY_POINT_xx	arg1,arg2,arg3
		TEXT_USER_END
2018-02-17 20:59:14 +00:00
maxv badec0a023 Declare and use TRAP_ENTRY_POINT_DNA. This time we don't give an is_ztrap
argument, because the macro is tied to the entry point, and it would be
wrong to suggest the paramater is controllable. No real functional change.
2018-02-17 20:47:04 +00:00
maxv f07054b64f Now that [Z]TRAP and [Z]TRAP_NJ are identical, put back the
INTRENTRY
	jmp	.Lalltraps_noentry

instructions for Xen, and remove [Z]TRAP_NJ.
2018-02-17 20:41:57 +00:00
maxv b63a0128d3 Declare and use TRAP_ENTRY_POINT_SPUR. No real functional change. 2018-02-17 20:33:28 +00:00
maxv 3e0d98723e Declare and use TRAP_ENTRY_POINT_FPU. No real functional change. 2018-02-17 20:28:18 +00:00
maxv 50e0444294 Start using ASM macros to define the trap entry points. No real functional
change.
2018-02-17 20:22:05 +00:00
christos 9d424dfb9f fix LOCAL_PEEREID to not return the same info for both sides...
XXX: pullup-{7,8}
2018-02-17 20:19:36 +00:00
christos 0f242fe63e make it compile again for those who don't have LOCAL_PEERCRED 2018-02-17 20:16:18 +00:00
maxv 458f24f8d8 Define legacy_stubs in a macro. 2018-02-17 19:26:20 +00:00
rjs 6f874b8157 Add NETATALKDEBUG to the option header and include that in the main source
files.
2018-02-17 19:10:18 +00:00
maxv 6e7355e588 Rename i8259_stubs -> legacy_stubs. We will want the entries to have the
same name, eg:

	legacy_stubs
		-> Xintr_legacy0, Xrecurse_legacy0, Xresume_legacy0
		-> Xintr_legacy1, Xrecurse_legacy1, Xresume_legacy1
		...
2018-02-17 18:51:53 +00:00
maxv 9779fa67f8 Add svs_init. This is where we will detect the CPU and decide whether
to turn SVS on or not.

Add svs_pgg_update to dynamically add/remove PG_G from all the kernel
pages. Use it now.
2018-02-17 17:44:09 +00:00
christos 1d89963535 Add a test demonstrating thst LOCAL_PEEREID is busted. 2018-02-17 16:34:18 +00:00
kamil 19baa3e0e8 Improve _UC_MACHINE_FP() for SPARC/SPARC64
Introduce a static inline function _uc_machine_fp() that contains improved
caluclation of a frame pointer.

Algorithm:

  uptr *stk_ptr;
#  if defined (__arch64__)
  stk_ptr = (uptr *) (*sp + 2047);
#  else
  stk_ptr = (uptr *) *sp;
#  endif
  *bp = stk_ptr[15];

Noted by <mrg>
2018-02-17 15:22:22 +00:00
joerg f71f5c795a Drop explicit loop prefix. GAS doesn't care and LLVM doesn't support it.
Drop the need for assembling with GAS. While LLVM is using a suboptimal
encoding of for hard-coded memory writes, it shouldn't affect
functionality. It just wastes three bytes with extra prefixes.
2018-02-17 13:54:52 +00:00
kamil 655627c899 Stop installing dbregs.h
This is now kernel-only header. The behavior is well specified by the CPU
documents and we don't introduce changes to it.

Noted by <wiz>
2018-02-17 13:01:23 +00:00
wiz bdd9c5c945 t_timeleft.debug is still installed, remove 'obsolete' marker. 2018-02-17 08:07:06 +00:00
uwe 097b3add5a Actually install dhcpd6 rc script. Organize CONFIGFILES
alphabetically again while where.

PR 53018
2018-02-17 03:02:04 +00:00
sevan 14e1124894 Remove mention of DDB_ONPANIC=2, ddb.dumpstack which is enabled by default now handles back traces on panic. 2018-02-17 02:11:00 +00:00
sevan f32d105ac2 With the introduction of ddb.dumpstack which is enabled by default, we no longer
need to explicitly set DDB_COMMANDONENTER to run a trace.
2018-02-17 01:31:01 +00:00
sevan fdcb4b3a84 document dumpstack variable.
Sort built-in variables alphabetically.
2018-02-17 01:13:07 +00:00
sevan 3e741a7d60 Note ddb.dumpstack sysctl 2018-02-17 00:53:53 +00:00
sevan b883485515 regen 2018-02-17 00:46:17 +00:00
sevan d1f12753b5 grammar 2018-02-17 00:45:14 +00:00
sevan ef01774665 Opt to print a backtrace on panic by default with the intention of improving bug reports.
Instead of relying on ddb.onpanic=2, introduce a new sysctl called dumpstack to handle this.
via <jmcneill> channeled through <mrg> on tech-kern[1]

[1] https://mail-index.netbsd.org/tech-kern/2018/02/15/msg023103.html
2018-02-17 00:41:09 +00:00
christos bf0b06cfe9 remove clause 3, 4. 2018-02-17 00:28:47 +00:00
christos 98cc4b91d3 Use the same variable name for the accepted socket as with the AF_LOCAL test.
Call getpeereid on the accepted socket.
2018-02-16 22:20:18 +00:00
christos c587e5a36a make sure we call getpeername on the accepted socket! 2018-02-16 22:17:17 +00:00
christos 596e712e68 ensure that getpeereid does not succeed on tcp sockets. 2018-02-16 19:24:16 +00:00
christos 5a7f327f24 Enforce that getpeereid only returns success on AF_LOCAL sockets, instead
of returning garbage for other socket types.
2018-02-16 19:21:49 +00:00
macallan b6d6eba0f8 use _PREFETCHABLE 2018-02-16 18:13:47 +00:00
macallan e57d26eeb4 remove accidential garbage 2018-02-16 18:12:45 +00:00
macallan 4fc9a5b669 add $NetBSD: 2018-02-16 18:10:32 +00:00
macallan 3c05247278 OF_getprop() retuns -1 on failure, not 0... 2018-02-16 18:07:05 +00:00
macallan 3920c5d535 add a few pp970-specific bits 2018-02-16 18:04:06 +00:00
macallan 404ba8a804 use mtspr64() in bridge mode 2018-02-16 18:02:10 +00:00
christos e34e5e3adb explain what's going on before we fix it. 2018-02-16 16:30:20 +00:00
christos 474def7698 add getpeereid tests for non-unix sockets, returns garbage... 2018-02-16 16:23:15 +00:00
christos c88e952be5 add a getpeeeid test. 2018-02-16 16:08:22 +00:00
maxv 22e66c740d Style, remove unused and misleading macros and comments, localify, and
reduce the diff between similar functions. No functional change.
2018-02-16 15:18:41 +00:00
maxv 2603d1d6e8 Fix inverted logic, otherwise the kernel crashes when receiving a 1-byte
AH packet. Triggerable before authentication when IPsec and forwarding
are both enabled.
2018-02-16 11:25:16 +00:00
maxv 9a3c5d51fb Style a bit, no functional change. 2018-02-16 11:07:44 +00:00
knakahara 42c1bbb910 Currently, it is not necessary to install rss_config.h. Pointed out by msaitoh@n.o. 2018-02-16 10:19:03 +00:00