CVS commit: src/sys/arch/amd64/amd64

2017-11-27 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Nov 27 09:18:01 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c process_machdep.c Log Message: Inline _FRAME_GREG, and mask only 16 bits of the segment registers, otherwise the upper 48 bits may contain stack

CVS commit: src/sys/arch/amd64/amd64

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 15:00:16 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Update a comment, and use testw instead. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143

CVS commit: src/sys/arch/amd64/amd64

2017-11-26 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Nov 26 14:54:43 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S locore.S mptramp.S Log Message: Hide a bunch of raw symbols. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13

CVS commit: src/sys/arch/amd64/amd64

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 10:42:44 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Remove unused variables. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/arch/amd64/amd64/machdep.c Please

CVS commit: src/sys/arch/amd64/amd64

2017-11-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 21 09:58:09 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Remove unused symbol - it is aligned to 4096 and this reduces the number of possible locations for .bss in KASLR kernels. To generate a

CVS commit: src/sys/arch/amd64/amd64

2017-11-08 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Nov 8 18:29:04 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: vector.S Log Message: Don't fall through. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/amd64/vector.S Please note that

CVS commit: src/sys/arch/amd64/amd64

2017-11-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Nov 1 09:38:43 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: linux32_sigcode.S linux_sigcode.S netbsd32_sigcode.S Log Message: More END(). In linux_sigcode.S we only provide symbols, not defined as functions.

CVS commit: src/sys/arch/amd64/amd64

2017-11-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Nov 1 09:17:28 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S cpufunc.S Log Message: Don't fall through functions, explicitly jump instead. While here don't call smap_enable twice (harmless), and add END() markers.

CVS commit: src/sys/arch/amd64/amd64

2017-10-30 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Oct 30 17:06:42 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S cpufunc.S linux32_sigcode.S linux_sigcode.S vector.S Log Message: Always use END() markers when declaring functions in assembly, so that ld

CVS commit: src/sys/arch/amd64/amd64

2017-10-29 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Oct 29 10:25:28 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Use bootspace.head.va instead of the direct map. Otherwise there's the assumption that the offsets contained in sh_offset in physical

CVS commit: src/sys/arch/amd64/amd64

2017-10-28 Thread Manuel Bouyer
Module Name:src Committed By: bouyer Date: Sat Oct 28 20:57:17 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: genassym.cf locore.S Log Message: Use FLAT_RING3_CS64 (defined in Xen public headers) instead of numeric value. To generate a diff of this commit: cvs rdiff

CVS commit: src/sys/arch/amd64/amd64

2017-10-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Oct 28 20:06:31 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: It appears that Xen remaps the userland %cs to 0xE033. So add it to the checklist. Otherwise we're going through Luexit32: %fs gets

CVS commit: src/sys/arch/amd64/amd64

2017-10-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Oct 21 08:08:26 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S trap.c Log Message: Use labels instead of disassembling *(%rip). intrfastexit is now the only place where the segregs can fault. To generate a diff

CVS commit: src/sys/arch/amd64/amd64

2017-10-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Oct 21 07:23:22 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: Handle by default. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/arch/amd64/amd64/trap.c Please note that diffs

CVS commit: src/sys/arch/amd64/amd64

2017-10-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Oct 19 20:27:12 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Use cmpw. To generate a diff of this commit: cvs rdiff -u -r1.135 -r1.136 src/sys/arch/amd64/amd64/locore.S Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2017-10-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Oct 19 09:32:01 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: process_machdep.c Log Message: Make sure we don't go farther with 32bit LWPs. There appears to be some confusion in the code - in part introduced by myself -,

CVS commit: src/sys/arch/amd64/amd64

2017-10-17 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Oct 17 07:48:10 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S machdep.c Log Message: Move %ds and %es into the GDT on 64bit LWPs. To generate a diff of this commit: cvs rdiff -u -r1.132 -r1.133

CVS commit: src/sys/arch/amd64/amd64

2017-10-17 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Oct 17 07:02:50 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: fix comment, rdx, not edx To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/amd64/amd64/copy.S Please note that

CVS commit: src/sys/arch/amd64/amd64

2017-10-15 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Oct 15 13:34:24 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Mmh, don't forget to clear the TLS gdt slots on Xen. Otherwise, when doing a lwp32->lwp64 context switch, the new lwp can use the slots

CVS commit: src/sys/arch/amd64/amd64

2017-10-11 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Oct 11 16:56:26 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Use bootspace. To generate a diff of this commit: cvs rdiff -u -r1.263 -r1.264 src/sys/arch/amd64/amd64/machdep.c Please note that

CVS commit: src/sys/arch/amd64/amd64

2017-09-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Sep 28 17:35:08 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S machdep.c Log Message: Clean up, and initialize the lwp0 fields in init_x86_64. To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130

CVS commit: src/sys/arch/amd64/amd64

2017-09-15 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Sep 15 17:22:09 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: Obviously, I was being absolutely dumb here; it's XEN, not Xen. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100

CVS commit: src/sys/arch/amd64/amd64

2017-09-10 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Sep 10 10:51:13 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: simplify To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amd64/amd64/gdt.c Please note that diffs are not

CVS commit: src/sys/arch/amd64/amd64

2017-09-03 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Sep 3 09:19:51 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: Declare onfault_restore, and be stricter with SMEP. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99

CVS commit: src/sys/arch/amd64/amd64

2017-09-03 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Sep 3 09:01:03 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: Treat page faults from iretq/etc as fatal, otherwise we could hide kernel stack bugs. Note that it would be good to call check_swapgs from

CVS commit: src/sys/arch/amd64/amd64

2017-08-31 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Aug 31 15:41:14 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: check sc_eip in the ldt branch too To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108

CVS commit: src/sys/arch/amd64/amd64

2017-08-31 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Aug 31 10:30:58 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S locore.S Log Message: Add a layer of mitigation against the intel sysret vuln: restore %gs when sysretq faults. Right now we try to make sure that

CVS commit: src/sys/arch/amd64/amd64

2017-08-31 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Aug 31 09:33:19 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S Log Message: Reorder for clarity, and style. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/amd64/amd64_trap.S

CVS commit: src/sys/arch/amd64/amd64

2017-08-31 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Aug 31 09:27:28 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Construct the trap frame with interrupts disabled, for safety, just like the rest of the interrupt entry points. To generate a diff of

CVS commit: src/sys/arch/amd64/amd64

2017-08-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Aug 25 11:35:03 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: Move incq outside of the copy section. No functional change, reduces my smap diff. To generate a diff of this commit: cvs rdiff -u -r1.23

CVS commit: src/sys/arch/amd64/amd64

2017-08-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Aug 25 11:05:46 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: Split comment, otherwise it is misleading. kcopy operates on kernel memory, and must *not* be used with userland pages. To generate a diff

CVS commit: src/sys/arch/amd64/amd64

2017-08-23 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Aug 23 08:14:18 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: style, reduces an incoming diff To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/amd64/amd64/copy.S Please note

CVS commit: src/sys/arch/amd64/amd64

2017-08-23 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Aug 23 08:04:22 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: copy.S Log Message: Fix a bug in ucas_32 and ucas_64. There is a branch where they don't initialize %rax. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/sys/arch/amd64/amd64

2017-08-13 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 13 08:07:52 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: process_machdep.c Log Message: Mmh, restore %cs and %ss on Xen. Otherwise (unpriv) userland could set a non-three ring, causing the hypervisor to send a fatal

CVS commit: src/sys/arch/amd64/amd64

2017-08-13 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 13 07:16:44 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: process_machdep.c Log Message: Remove unused include, remove dead code, KNF, and fix off-by-one. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34

CVS commit: src/sys/arch/amd64/amd64

2017-08-08 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Aug 8 17:27:34 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: process_machdep.c Log Message: Mmh, don't overwrite tf_err and tf_trapno. Looks like it can be used to exploit the intel sysret vulnerability once again. To

CVS commit: src/sys/arch/amd64/amd64

2017-08-08 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Aug 8 17:00:42 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Remove dumb debug code and outdated comment. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125

CVS commit: src/sys/arch/amd64/amd64

2017-07-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jul 25 18:03:56 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: This branch must be static, otherwise there is a condition under which the KASSERT in startlwp32 would be triggered. To

CVS commit: src/sys/arch/amd64/amd64

2017-07-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Jul 25 17:43:44 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Must not be from n32. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/sys/arch/amd64/amd64/machdep.c Please note

CVS commit: src/sys/arch/amd64/amd64

2017-07-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Jul 22 13:00:42 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Branch for USER_LDT. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106

CVS commit: src/sys/arch/amd64/amd64

2017-07-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Jul 22 09:20:01 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Must be curlwp. To generate a diff of this commit: cvs rdiff -u -r1.258 -r1.259 src/sys/arch/amd64/amd64/machdep.c Please note that

CVS commit: src/sys/arch/amd64/amd64

2017-07-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Jul 2 09:02:51 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: Hide the computation in a macro. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/amd64/amd64/gdt.c Please note

CVS commit: src/sys/arch/amd64/amd64

2017-04-24 Thread Chuck Silvers
Module Name:src Committed By: chs Date: Mon Apr 24 17:03:43 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: restore the ability to run netbsd 1.0 32-bit executables by checking for the relevant lcall instruction in the trap handler and treating it

CVS commit: src/sys/arch/amd64/amd64

2017-03-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Mar 25 15:07:21 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Don't need gdtstore here. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/sys/arch/amd64/amd64/locore.S Please note

CVS commit: src/sys/arch/amd64/amd64

2017-03-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Mar 25 15:05:16 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: Use a bitmap-based allocator, will be easier to share with i386. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38

CVS commit: src/sys/arch/amd64/amd64

2017-03-24 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Mar 24 18:03:32 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S Log Message: Unconditionnally save the segment registers - because we could have a kernel %gs and a userland %es/%ds -, and explain why T_NMI is a

CVS commit: src/sys/arch/amd64/amd64

2017-03-23 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Mar 23 17:25:51 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S machdep.c trap.c Log Message: Remove this call gate on amd64, it is useless and vulnerable. Call gates do not modify %rflags, so interrupts are not

CVS commit: src/sys/arch/amd64/amd64

2017-03-08 Thread Chuck Silvers
Module Name:src Committed By: chs Date: Thu Mar 9 00:16:07 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: improve readability of TRAP_SIGDEBUG info and add fsbase/gsbase. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93

CVS commit: src/sys/arch/amd64/amd64

2017-02-14 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Feb 14 09:03:48 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Check %eip with USER_LDT too. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103

CVS commit: src/sys/arch/amd64/amd64

2017-02-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Feb 9 19:30:56 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: If the preloaded modules cannot be mapped with the initial amount of VA, discard the associated bootinfo entry. Otherwise the machine

CVS commit: src/sys/arch/amd64/amd64

2017-02-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Feb 9 08:38:25 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: No, do not just copy code from i386 and expect it to work on amd64. There are several structural differences. At least two

CVS commit: src/sys/arch/amd64/amd64

2017-02-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu Feb 9 08:23:46 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Restore %ds before swapgs. Movs to segment registers are allowed to fault in kernel mode but simply cause a signal to be sent to userland.

CVS commit: src/sys/arch/amd64/amd64

2017-02-08 Thread Robert Elz
Module Name:src Committed By: kre Date: Wed Feb 8 18:50:52 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: All bow down before the Great Code Compiler. Specifically, it has been commanded that unused-functions is a warning, and, as all should know,

CVS commit: src/sys/arch/amd64/amd64

2017-02-06 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Feb 6 16:34:37 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: In cpu_mcontext32_validate, allow the registers to have different locations if the LDT is user-set. I am intentionally not

CVS commit: src/sys/arch/amd64/amd64

2017-02-05 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Feb 5 08:36:08 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Now that valid_user_selector only checks for LDT selectors, remove it. A user may legitimately want to have one register in the GDT, and

CVS commit: src/sys/arch/amd64/amd64

2017-02-05 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Feb 5 08:19:05 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: In cpu_mcontext_validate, treat %cs differently depending on whether a user LDT is set; just check the permission without checking the

CVS commit: src/sys/arch/amd64/amd64

2017-02-04 Thread Maya Rashish
Module Name:src Committed By: maya Date: Sun Feb 5 06:26:07 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Remove duplicate check. uvm_physseg_valid_p(upm) == false is also our for loop exit condition, and will never happen. NFC To generate a

CVS commit: src/sys/arch/amd64/amd64

2017-02-04 Thread Maya Rashish
Module Name:src Committed By: maya Date: Sun Feb 5 06:13:53 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Fix off by one. Fixes PR port-amd64/51944: sparse core dumps do not work To generate a diff of this commit: cvs rdiff -u -r1.247

CVS commit: src/sys/arch/amd64/amd64

2017-02-04 Thread Maya Rashish
Module Name:src Committed By: maya Date: Sun Feb 5 06:12:33 UTC 2017 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Match the iterator in sys/uvm/uvm_page.c:1866. NFC. No matching KASSERT - this case is covered by the above if (uvm_physseg_valid_p(upm)

CVS commit: src/sys/arch/amd64/amd64

2016-12-26 Thread Cherry G. Mathew
Module Name:src Committed By: cherry Date: Mon Dec 26 13:55:13 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: remove spurious printf() To generate a diff of this commit: cvs rdiff -u -r1.244 -r1.245 src/sys/arch/amd64/amd64/machdep.c Please

CVS commit: src/sys/arch/amd64/amd64

2016-12-26 Thread Cherry G. Mathew
Module Name:src Committed By: cherry Date: Mon Dec 26 12:54:42 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Make the msgbuf initialisation track closer to the original pre-uvm_physseg.h one. To see the exact changes with the original, line

CVS commit: src/sys/arch/amd64/amd64

2016-12-17 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Dec 17 13:49:05 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Fix the name of the labels. I think I got confused by jne, so while here replace it by jnz, which is more explicit. To generate a diff

CVS commit: src/sys/arch/amd64/amd64

2016-12-16 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 16 20:16:50 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: This can actually be enabled in Xen; my rev1.235 fixed the issue. Before that kern_end was pointing to DUMMY PAGE, which was already

CVS commit: src/sys/arch/amd64/amd64

2016-12-11 Thread Paul Goyette
Module Name:src Committed By: pgoyette Date: Mon Dec 12 02:51:24 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Make kernels w/o ACPICA compile. (Same "fix" as Martin made to i386...) cvs:

CVS commit: src/sys/arch/amd64/amd64

2016-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Dec 9 17:57:24 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S machdep.c Log Message: On amd64 we try to guarantee that VA = PA + KERNBASE in the bootstrap memory. But we have a problem with the ISA I/O MEM,

CVS commit: src/sys/arch/amd64/amd64

2016-11-26 Thread Kamil Rytarowski
Module Name:src Committed By: kamil Date: Sun Nov 27 02:32:56 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: cpufunc.S Log Message: Fix rdr6() function on amd64 According to the AMD64 SysV ABI the first returned value is passed in RAX, not in RDI. Actually RDI is

CVS commit: src/sys/arch/amd64/amd64

2016-11-15 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Tue Nov 15 15:26:59 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: I actually came across the solution to this issue in the Intel SDM for a totally unrelated reason a few weeks ago. The reason we need a

CVS commit: src/sys/arch/amd64/amd64

2016-11-11 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Nov 11 11:31:26 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Mmh, I mistakenly removed the lapic page (which is part of another diff), put it back in. To generate a diff of this commit: cvs rdiff

CVS commit: src/sys/arch/amd64/amd64

2016-11-11 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Nov 11 10:40:00 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: KNF and simplify Xen To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/amd64/amd64/locore.S Please note that

CVS commit: src/sys/arch/amd64/amd64

2016-10-26 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Wed Oct 26 22:02:14 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: print some more stuff To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amd64/amd64/trap.c Please note that

CVS commit: src/sys/arch/amd64/amd64

2016-08-27 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Aug 27 16:17:16 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Don't protect the second page, since it is not part of the IDT. To generate a diff of this commit: cvs rdiff -u -r1.229 -r1.230

CVS commit: src/sys/arch/amd64/amd64

2016-08-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 21 10:42:33 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: Simplify gdt_grow, and make sure we don't kenter more than has been virtually allocated. To generate a diff of this commit: cvs rdiff -u

CVS commit: src/sys/arch/amd64/amd64

2016-08-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 21 10:20:22 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: Use KASSERT, and panic by default instead of allowing the area to overflow. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33

CVS commit: src/sys/arch/amd64/amd64

2016-08-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 21 10:07:15 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: Explain a little what we are doing. Also, make sure gdt_init_cpu is called on the currently running CPU. Theoretically, we could put the same

CVS commit: src/sys/arch/amd64/amd64

2016-08-21 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 21 09:53:25 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Simplify. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/arch/amd64/amd64/locore.S Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2016-08-21 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Sun Aug 21 08:30:22 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: fix the build. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amd64/amd64/gdt.c Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2016-08-20 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Aug 20 18:04:04 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: The GDT needs to be grown on each CPU, and not just gdtstore (cpu0). Otherwise, if the caller gets switched to another CPU, the kernel will

CVS commit: src/sys/arch/amd64/amd64

2016-08-20 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Sat Aug 20 17:34:24 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: gdt.c Log Message: fix the build. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amd64/amd64/gdt.c Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2016-08-19 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Aug 19 19:04:57 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: vector.S Log Message: Unused. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amd64/amd64/vector.S Please note that diffs are not

CVS commit: src/sys/arch/amd64/amd64

2016-08-07 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun Aug 7 09:04:55 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: amd64_trap.S Log Message: Explain a little. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/amd64/amd64_trap.S Please note

CVS commit: src/sys/arch/amd64/amd64

2016-07-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Jul 25 15:29:06 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: mptramp.S Log Message: Unused. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/amd64/amd64/mptramp.S Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2016-07-20 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Jul 20 13:49:18 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: This comment is wrong. In fact, we are in low physical memory, but in high virtual memory, and only the latter matters. I'm not exactly

CVS commit: src/sys/arch/amd64/amd64

2016-07-11 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Mon Jul 11 14:52:54 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: KNF and simplify. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/amd64/amd64/locore.S Please note that

CVS commit: src/sys/arch/amd64/amd64

2016-07-02 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat Jul 2 07:22:10 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Explain why we should use kernel_map instead of module_map, and why we can't. We should probably add some GCC flags in the modules

CVS commit: src/sys/arch/amd64/amd64

2016-07-01 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Fri Jul 1 12:41:28 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Don't confuse between VM_PROT and UVM_PROT. This should be VM_PROT. To generate a diff of this commit: cvs rdiff -u -r1.218 -r1.219

CVS commit: src/sys/arch/amd64/amd64

2016-05-29 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 29 09:04:20 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Revert rev1.94. It apparently raises a page fault from SMEP. I need to investigate the whole kernel mappings anyway, so I'll recommit this

CVS commit: src/sys/arch/amd64/amd64

2016-05-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 28 09:03:16 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Define fillkpt_blank, which creates blank entries in a page table. Use it to map the first MB. No functional change. To generate a diff

CVS commit: src/sys/arch/amd64/amd64

2016-05-28 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 28 08:43:17 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Move proc0's stack out of the BOOTSTRAP TABLES, and map it independently with RW permissions. Reduces the impact of a stack overflow. To

CVS commit: src/sys/arch/amd64/amd64

2016-05-22 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 22 10:11:55 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: 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.

CVS commit: src/sys/arch/amd64/amd64

2016-05-12 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Thu May 12 07:51:10 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Define fillkpt_nox, which sets up a set of pages and puts the NOX bit on them by using nox_flag. Use fillkpt_nox to map the rodata segment

CVS commit: src/sys/arch/amd64/amd64

2016-05-11 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed May 11 19:35:08 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S mptramp.S Log Message: There is a bug in the way the secondary CPUs are launched on amd64. When CPU0 is launched, EFER_NXE is enabled in it, and it

CVS commit: src/sys/arch/amd64/amd64

2016-05-08 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sun May 8 08:22:58 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Use killkpt for the PML4 entries as well. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85

CVS commit: src/sys/arch/amd64/amd64

2016-05-07 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 7 13:08:30 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: mptramp.S Log Message: clarify To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/amd64/amd64/mptramp.S Please note that diffs are

CVS commit: src/sys/arch/amd64/amd64

2016-05-07 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Sat May 7 11:49:21 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: clarify To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.84 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not

CVS commit: src/sys/arch/amd64/amd64

2016-04-11 Thread Manuel Bouyer
Module Name:src Committed By: bouyer Date: Mon Apr 11 14:14:27 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: lock_stubs.S Log Message: __cpu_simple_unlock() is called from _mcount(), so don't call mcount() from __cpu_simple_unlock(). Kernel profiling should work

CVS commit: src/sys/arch/amd64/amd64

2016-03-25 Thread Mateusz Kocielski
Module Name:src Committed By: shm Date: Fri Mar 25 10:14:43 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: db_disasm.c Log Message: Add support for clac and stac instructions. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23

CVS commit: src/sys/arch/amd64/amd64

2016-02-15 Thread Taylor R Campbell
Module Name:src Committed By: riastradh Date: Mon Feb 15 20:35:59 UTC 2016 Modified Files: src/sys/arch/amd64/amd64: machdep.c Log Message: Use KASSERTs supported by CTASSERTs, not __builtin_unreachable. pcc has no __builtin_unreachable, and this is clearer anyway. To

CVS commit: src/sys/arch/amd64/amd64

2015-12-09 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Dec 9 16:55:18 UTC 2015 Modified Files: src/sys/arch/amd64/amd64: copy.S mptramp.S Log Message: KNF, and use C-style comments. Also, remove fusword/susword. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20

CVS commit: src/sys/arch/amd64/amd64

2015-11-28 Thread David A. Holland
Module Name:src Committed By: dholland Date: Sat Nov 28 15:06:55 UTC 2015 Modified Files: src/sys/arch/amd64/amd64: trap.c Log Message: If the kernel jumps to NULL, print where it came from instead of trying to dereference and faulting again. To generate a diff of this

CVS commit: src/sys/arch/amd64/amd64

2015-11-25 Thread Maxime Villard
Module Name:src Committed By: maxv Date: Wed Nov 25 16:00:10 UTC 2015 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Cosmetic changes. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/arch/amd64/amd64/locore.S Please note that

<    1   2   3   4   >