| Both sides previous revision Previous revision Next revision | Previous revision |
| summerofcode2014:intelsmapandkernelpatching [2014/07/26 21:20] – OliverPinter | summerofcode2014:intelsmapandkernelpatching [2017/09/18 13:59] (current) – Use local wiki LinkNames (remove absolute wiki urls) KubilayKocak |
|---|
| ====== Implement Intel SMAP and kernel patching framework ====== | ====== Implement Intel SMAP and kernel patching framework ====== |
| * Student: [[/OliverPinter|OliverPinter]] (op@) | * Student: [[/OliverPinter|OliverPinter]] |
| * Mentor: [[/GavinAtkinson|GavinAtkinson]] (gavin@) | * Mentor: [[/GavinAtkinson|GavinAtkinson]] |
| |
| ===== Project description ===== | ===== Project description ===== |
| | 2.1 | June 23 - June 29 | identify the required places to modify in booting process and kernel module loading process | DONE | | | 2.1 | June 23 - June 29 | identify the required places to modify in booting process and kernel module loading process | DONE | |
| | 2.2 | June 30 - July 6 | design the kernel patching framework | DONE | | | 2.2 | June 30 - July 6 | design the kernel patching framework | DONE | |
| | 2.3 | July 7 - July 20 | implement the kernel patching framework | WIP - mostly DONE | | | 2.3 | July 7 - July 20 | implement the kernel patching framework | DONE | |
| | 2.4 | July 21 - July 27 | adapt XSAVE and SMAP instructions to new framework | DONE | | | 2.4 | July 21 - July 27 | adapt XSAVE and SMAP instructions to new framework | DONE | |
| | 2.5 | July 27 - August 3 | optimize implementation | TODO | | | 2.5 | July 27 - August 3 | optimize implementation | DONE | |
| | 2.6 | August 3 - %%EoC%% August 14 | test, test, fix, test | TODO | | | 2.6 | August 3 - %%EoC%% August 14 | test, test, fix, test | DONE | |
| |
| ===== Test Plan ===== | ===== Test Plan ===== |
| | create a VM image | | DONE | | | create a VM image | | DONE | |
| | boot test in qemu | | DONE | | | boot test in qemu | | DONE | |
| | kernel module test in qemu | | WIP | | | kernel module test in qemu | | DONE | |
| | test in qemu with enabled SMAP | | WIP | | | test in qemu with enabled SMAP | | DONE | |
| | test on real hardware with XSAVE/XSAVEOPT | | DONE | | | test on real hardware with XSAVE/XSAVEOPT | | DONE | |
| | stress test | | TODO | | | stress test | | DONE | |
| |
| ===== The Code ===== | ===== The Code ===== |
| |
| https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch | https://github.com/opntr/opBSD/tree/op/gsoc2014/kpatch |
| | |
| | http://www.crysys.hu/~op/freebsd/vm-image/ |
| |
| ===== Useful links ===== | ===== Useful links ===== |
| | 20140718 | http://lists.freebsd.org/pipermail/soc-status/2014-July/000838.html | | | 20140718 | http://lists.freebsd.org/pipermail/soc-status/2014-July/000838.html | |
| | 20140725 | http://lists.freebsd.org/pipermail/soc-status/2014-July/000845.html | | | 20140725 | http://lists.freebsd.org/pipermail/soc-status/2014-July/000845.html | |
| | | 20140801 | http://lists.freebsd.org/pipermail/soc-status/2014-August/000863.html | |
| | | 20140808 | http://lists.freebsd.org/pipermail/soc-status/2014-August/000863.html | |
| | | 20140815 | http://lists.freebsd.org/pipermail/soc-status/2014-August/000874.html | |
| |
| ====== test results and memos ====== | ====== test results and memos ====== |
| ==== 1.3 ==== | ==== 1.3 ==== |
| |
| * fast test: | [[SummerOfCode2014/IntelSMAPandKernelPatching/Notes]] |
| |
| <code> | ====== commits ====== |
| op@pandora-d tools> ./run_smap_test_vm.csh | |
| Triple fault | |
| CPU Reset (CPU 0) | |
| RAX=00000000f000ff00 RBX=0000000000000001 RCX=0000000000000000 RDX=ffffffff80d0daa0 | |
| RSI=ffffffff800c4790 RDI=ffffffff80044100 RBP=ffffffff800440f0 RSP=ffffffff80043ef0 | |
| R8 =ffffffff80d0db80 R9 =0000000000000000 R10=0000000000000020 R11=0000000000000000 | |
| R12=ffffffff818bc8c8 R13=ffffffff8093beb0 R14=ffffffff80044100 R15=ffffffff818bcd90 | |
| RIP=ffffffff80d0d94f RFL=00000297 [--S-APC] CPL=0 II=0 A20=1 SMM=0 HLT=0 | |
| ES =0028 0000000000000000 ffffffff 00af9300 DPL=0 DS [-WA] | |
| CS =0020 0000000000000000 ffffffff 00af9b00 DPL=0 CS64 [-RA] | |
| SS =0028 0000000000000000 ffffffff 00af9300 DPL=0 DS [-WA] | |
| DS =0028 0000000000000000 ffffffff 00af9300 DPL=0 DS [-WA] | |
| FS =0028 0000000000000000 ffffffff 00af9300 DPL=0 DS [-WA] | |
| GS =0028 ffffffff818d7d80 ffffffff 00af9300 DPL=0 DS [-WA] | |
| LDT=0000 0000000000000000 0000ffff 00008200 DPL=0 LDT | |
| TR =0038 0000000000005f98 00002067 00008900 DPL=0 TSS64-avl | |
| GDT= ffffffff818d6350 00000067 | |
| IDT= ffffffff8184b4c0 00000fff | |
| CR0=80000011 CR2=0000000000005fbc CR3=0000000000044000 CR4=00000030 | |
| DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 | |
| DR6=00000000ffff0ff0 DR7=0000000000000400 | |
| CCS=0000000000000013 CCD=ffffffffffffffee CCO=SUBL | |
| EFER=0000000000000500 | |
| FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 | |
| FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 | |
| FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 | |
| FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 | |
| FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 | |
| XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000 | |
| XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 | |
| XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 | |
| XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 | |
| XMM08=00000000000000000000000000000000 XMM09=00000000000000000000000000000000 | |
| XMM10=00000000000000000000000000000000 XMM11=00000000000000000000000000000000 | |
| XMM12=00000000000000000000000000000000 XMM13=00000000000000000000000000000000 | |
| XMM14=00000000000000000000000000000000 XMM15=00000000000000000000000000000000 | |
| CPU Reset (CPU 0) | |
| EAX=00000032 EBX=00000000 ECX=00000000 EDX=00000097 | |
| ESI=0000000a EDI=00100000 EBP=00000000 ESP=00000fb8 | |
| EIP=000f13d3 EFL=00000002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 | |
| ES =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| CS =0008 00000000 ffffffff 00cf9b00 DPL=0 CS32 [-RA] | |
| SS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| DS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| FS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| GS =0010 00000000 ffffffff 00cf9300 DPL=0 DS [-WA] | |
| LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT | |
| TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy | |
| GDT= 000f6688 00000037 | |
| IDT= 000f66c6 00000000 | |
| CR0=60000011 CR2=00000000 CR3=00000000 CR4=00000000 | |
| DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 | |
| DR6=00000000ffff0ff0 DR7=0000000000000400 | |
| CCS=00000000 CCD=00000001 CCO=LOGICL | |
| EFER=0000000000000000 | |
| FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80 | |
| FPR0=0000000000000000 0000 FPR1=0000000000000000 0000 | |
| FPR2=0000000000000000 0000 FPR3=0000000000000000 0000 | |
| FPR4=0000000000000000 0000 FPR5=0000000000000000 0000 | |
| FPR6=0000000000000000 0000 FPR7=0000000000000000 0000 | |
| XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000 | |
| XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000 | |
| XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000 | |
| XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000 | |
| </code> | |
| | |
| <code> | |
| op@pandora-d opBSD.git> addr2line --exe=/tmp/kernelbuild/boot/kernel/kernel ffffffff80d0d94f | |
| /usr/data/source/git/opBSD/opBSD.git/sys/amd64/amd64/trap.c:219 | |
| </code> | |
| | |
| * http://en.wikibooks.org/wiki/QEMU/Monitor#logfile | |
| * there is the error | |
| | |
| <code> | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f922df "kern.msgbufsize", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f922ef "kern.maxtsiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f922fc "kern.dfldsiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f92309 "kern.maxdsiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f92316 "kern.dflssiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f92323 "kern.maxssiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f92330 "kern.sgrowsiz", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f9233e "kern.ngroups", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f9234b "kern.pid_max", data=0xffffffff814c8cb0 "", | |
| size=258) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| Breakpoint 2, getenv_string (name=0xffffffff80f92358 "vfs.unmapped_buf_allowed", | |
| data=0xffffffff814c8cd0 "", size=258) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_environment.c:455 | |
| 455 if (dynamic_kenv) { | |
| (gdb) c | |
| Continuing. | |
| | |
| triple fault itt: | |
| | |
| hammer_time (modulep=<value optimized out>, physfree=29208576) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/amd64/amd64/machdep.c:1898 | |
| 1898 PCPU_SET(prvspace, pc); | |
| (gdb) | |
| 1899 PCPU_SET(curthread, &thread0); | |
| (gdb) | |
| 1900 PCPU_SET(tssp, &common_tss[0]); | |
| (gdb) | |
| 1901 PCPU_SET(commontssp, &common_tss[0]); | |
| (gdb) | |
| 1902 PCPU_SET(tss, (struct system_segment_descriptor *)&gdt[GPROC0_SEL]); | |
| (gdb) | |
| 1903 PCPU_SET(ldt, (struct system_segment_descriptor *)&gdt[GUSERLDT_SEL]); | |
| (gdb) | |
| 1904 PCPU_SET(fs32p, &gdt[GUFS32_SEL]); | |
| (gdb) | |
| 1905 PCPU_SET(gs32p, &gdt[GUGS32_SEL]); | |
| (gdb) | |
| 1915 mutex_init(); | |
| (gdb) | |
| mutex_init () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_mutex.c:952 | |
| 952 init_turnstiles(); | |
| (gdb) | |
| init_turnstiles () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/subr_turnstile.c:364 | |
| 364 LIST_INIT(&turnstile_chains[i].tc_turnstiles); | |
| (gdb) | |
| 365 mtx_init(&turnstile_chains[i].tc_lock, "turnstile chain", | |
| (gdb) | |
| _mtx_init (c=0xffffffff8155d160, name=0xffffffff80f94b80 "turnstile chain", type=0x0, opts=1) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_mutex.c:871 | |
| 871 m = mtxlock2mtx(c); | |
| (gdb) | |
| 875 ASSERT_ATOMIC_LOAD_PTR(m->mtx_lock, | |
| (gdb) | |
| 885 if (opts & MTX_SPIN) | |
| (gdb) | |
| 892 if (opts & MTX_RECURSE) | |
| (gdb) | |
| 894 if ((opts & MTX_NOWITNESS) == 0) | |
| (gdb) | |
| 896 if (opts & MTX_DUPOK) | |
| (gdb) | |
| 898 if (opts & MTX_NOPROFILE) | |
| (gdb) | |
| 902 lock_init(&m->lock_object, class, name, type, flags); | |
| (gdb) | |
| lock_init (lock=0xffffffff8155d148, class=0xffffffff81463730, | |
| name=0xffffffff80f94b80 "turnstile chain", type=0x0, flags=131072) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/subr_lock.c:78 | |
| 78 KASSERT(!lock_initialized(lock), ("lock \"%s\" %p already initialized", | |
| (gdb) | |
| 83 if (lock_classes[i] == class) { | |
| (gdb) | |
| 84 lock->lo_flags = i << LO_CLASSSHIFT; | |
| (gdb) | |
| 90 lock->lo_name = name; | |
| (gdb) | |
| 91 lock->lo_flags |= flags | LO_INITIALIZED; | |
| (gdb) | |
| 93 WITNESS_INIT(lock, (type != NULL) ? type : name); | |
| (gdb) | |
| witness_init (lock=0xffffffff8155d148, type=0xffffffff80f94b80 "turnstile chain") | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/subr_witness.c:809 | |
| 809 class = LOCK_CLASS(lock); | |
| | |
| ITT A HIBA: | |
| | |
| 0xffffffff809500f0 <witness_init+0>: push %rbp | |
| 0xffffffff809500f1 <witness_init+1>: mov %rsp,%rbp | |
| 0xffffffff809500f4 <witness_init+4>: push %r15 | |
| 0xffffffff809500f6 <witness_init+6>: push %r14 | |
| 0xffffffff809500f8 <witness_init+8>: push %rbx | |
| 0xffffffff809500f9 <witness_init+9>: push %rax | |
| 0xffffffff809500fa <witness_init+10>: mov %rsi,%r14 | |
| 0xffffffff809500fd <witness_init+13>: mov %rdi,%rbx | |
| 0xffffffff80950100 <witness_init+16>: mov 0x8(%rbx),%eax | |
| 0xffffffff80950103 <witness_init+19>: mov $0x418,%ecx | |
| >>> 0xffffffff80950108 <witness_init+24>: (bad) | |
| 0xffffffff80950109 <witness_init+25>: loop 0xffffffff8095017b <witness_init+139> | |
| >>> 0xffffffff8095010b <witness_init+27>: (bad) | |
| 0xffffffff8095010c <witness_init+28>: enterq $0x8b4c,$0x3c | |
| 0xffffffff80950110 <witness_init+32>: int $0xd0 | |
| 0xffffffff80950112 <witness_init+34>: stos %al,%es:(%rdi) | |
| 0xffffffff80950113 <witness_init+35>: rex.RX subl $0xf6412574,0x80000(%rcx) | |
| 0xffffffff8095011e <witness_init+46>: rex.RXB or %r9b,(%r8) | |
| 0xffffffff80950121 <witness_init+49>: jne 0xffffffff80950141 <witness_init+81> | |
| 0xffffffff80950123 <witness_init+51>: mov (%r15),%rdx | |
| 0xffffffff80950126 <witness_init+54>: mov (%rbx),%rcx | |
| 0xffffffff80950129 <witness_init+57>: mov $0xffffffff80f95af0,%rdi | |
| 0xffffffff80950130 <witness_init+64>: mov $0xffffffff80f95b17,%rsi | |
| | |
| ffffffff809500f0 <witness_init>: | |
| ffffffff809500f0: 55 push %rbp | |
| ffffffff809500f1: 48 89 e5 mov %rsp,%rbp | |
| ffffffff809500f4: 41 57 push %r15 | |
| ffffffff809500f6: 41 56 push %r14 | |
| ffffffff809500f8: 53 push %rbx | |
| ffffffff809500f9: 50 push %rax | |
| ffffffff809500fa: 49 89 f6 mov %rsi,%r14 | |
| ffffffff809500fd: 48 89 fb mov %rdi,%rbx | |
| ffffffff80950100: 8b 43 08 mov 0x8(%rbx),%eax | |
| ffffffff80950103: b9 18 04 00 00 mov $0x418,%ecx | |
| ffffffff80950108: c4 (bad) | |
| ffffffff80950109: e2 70 loop ffffffff8095017b <witness_init+0x8b> | |
| ffffffff8095010b: f7 (bad) | |
| ffffffff8095010c: c8 4c 8b 3c enterq $0x8b4c,$0x3c | |
| ffffffff80950110: cd d0 int $0xd0 | |
| </code> | |
| | |
| <code> | |
| (kgdb) info break | |
| Num Type Disp Enb Address What | |
| 5 breakpoint keep y 0xffffffff80e187c6 in atpic_reset at cpufunc.h:260 | |
| 6 breakpoint keep y 0xffffffff808b1d00 in cninit_finish | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:162 | |
| 7 breakpoint keep y 0xffffffff808b18c0 in cninit | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:109 | |
| breakpoint already hit 2 times | |
| 8 breakpoint keep y 0xffffffff808b1c74 in cnselect | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:236 | |
| (kgdb) b cnremove | |
| Breakpoint 9 at 0xffffffff808b1a40: file /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c, line 200. | |
| (kgdb) c | |
| Continuing. | |
| | |
| Breakpoint 7, cninit () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:109 | |
| 109 { | |
| (kgdb) c | |
| Continuing. | |
| | |
| Breakpoint 9, cnremove (cn=0xffffffff814048d8) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:200 | |
| 200 { | |
| (kgdb) bt | |
| #0 cnremove (cn=0xffffffff814048d8) at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:200 | |
| #1 0xffffffff808b191b in cninit () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:129 | |
| #2 0xffffffff80cf0196 in hammer_time (modulep=<value optimized out>, physfree=<value optimized out>) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/amd64/amd64/machdep.c:1961 | |
| #3 0xffffffff802da024 in btext () at /usr/data/source/git/opBSD/opBSD.git/sys/amd64/amd64/locore.S:79 | |
| #4 0x0000000000000000 in ?? () | |
| (kgdb) c | |
| Continuing. | |
| | |
| Breakpoint 7, cninit () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:109 | |
| 109 { | |
| (kgdb) c | |
| Continuing. | |
| | |
| Breakpoint 9, cnremove (cn=0xffffffff814048d8) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:200 | |
| 200 { | |
| (kgdb) s | |
| 204 STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { | |
| (kgdb) | |
| 229 } | |
| (kgdb) | |
| cninit () at /usr/data/source/git/opBSD/opBSD.git/sys/kern/kern_cons.c:131 | |
| 131 if (cn->cn_ops == NULL) | |
| (kgdb) | |
| 133 cn->cn_ops->cn_probe(cn); | |
| (kgdb) | |
| sc_cnprobe (cp=0xffffffff814048d8) | |
| at /usr/data/source/git/opBSD/opBSD.git/sys/dev/syscons/syscons.c:1592 | |
| 1592 if (getenv("hw.syscons.disable")) { | |
| (kgdb) ni | |
| 0xffffffff80734925 1592 if (getenv("hw.syscons.disable")) { | |
| (kgdb) | |
| 0xffffffff8073492a 1592 if (getenv("hw.syscons.disable")) { | |
| (kgdb) | |
| 0xffffffff8073492d 1592 if (getenv("hw.syscons.disable")) { | |
| (kgdb) | |
| 0xffffffff80734937 1593 cp->cn_pri = CN_DEAD; | |
| (kgdb) | |
| 0xffffffff8073493b 1593 cp->cn_pri = CN_DEAD; | |
| (kgdb) | |
| 1597 cp->cn_pri = sc_get_cons_priority(&unit, &flags); | |
| (kgdb) | |
| </code> | |
| |
| triple fault on 1597 cp->cn_pri = sc_get_cons_priority(&unit, &flags); line | | https://github.com/opntr/opBSD/commit/27512683485c9e7f8abce01321d57e643692c7b8 | SMAP AMD64 | added stac() and clac() to cpufunc.h | |
| **this error caused by compiler error, and occurred when in /etc/make.conf set CPUTYPE to core-avx2** | | https://github.com/opntr/opBSD/commit/544b84ff8c3e2eba516f342cdf06a7380ecb48a1 | SMAP AMD64 | added CR4_SMAP to sys/x86/include/specialreg.h | |
| | | https://github.com/opntr/opBSD/commit/76cd0b0a49986d2a701e37fdbe4a4bca2bc2302a | SMAP AMD64 | updated PSL_AC's comment in sys/x86/include/psl.h | |
| | | https://github.com/opntr/opBSD/commit/d55f53e21819a4da9ad9fe9f30841953c938505d | SMAP AMD64 | disable SMAP when running in hypervisor (like SMEP) | |
| | | https://github.com/opntr/opBSD/commit/eb67cf29473e970f779ebac0156e4e4198bf6603 | SMAP AMD64 | postpone enabling of SMAP, same like in SMEP case | |
| | | https://github.com/opntr/opBSD/commit/6382c129a4e9e5911601bb28bc8bcc3618534ad4 | SMAP AMD64 | added related trap handler | |
| | | https://github.com/opntr/opBSD/commit/3a06a3742094a918ffc6497f9bbcb7f08241a450 | SMAP AMD64 | enable SMAP at boot time | |
| | | https://github.com/opntr/opBSD/commit/21675c19df9ed8b650c2ca97376d7ba6bf34496a | SMAP AMD64 | clear SMAP state in PUSH_FRAME asmacro | |
| | | https://github.com/opntr/opBSD/commit/4d401ca69e248501f49cb093c1d24461bbbd1780 | SMAP AMD64 | clear SMAP state on exceptions | |
| | | https://github.com/opntr/opBSD/commit/bec88d94ecf7cd8a6e28fdad887482030cd94dae | AMD64 SMAP | clear SMAP state on exceptions in ia32 case | |
| | | https://github.com/opntr/opBSD/commit/15bf832e4b3709410a3edb0ba1e6b36279f7be29 | SMAP AMD64 | trim whitespaces in amd64/support.S | |
| | | https://github.com/opntr/opBSD/commit/23e4a57a8a34092e49fff4df8bf2c03de97c3eb9 | SMAP AMD64 | added stac and clac to funtions which live in support.S and interacted with user-space | |
| | | https://github.com/opntr/opBSD/commit/eb5736dfcfdae1918d022c039bb6235dafc92916 | SMAP AMD64 | clear SMAP state in NMI handler, as soon as possible | |
| | | https://github.com/opntr/opBSD/commit/5f46ad1484feea2c41da2be47064ab82a1859e95 | SMAP i386 | added stac and clac to i386/i386/db_disasm.c | |
| | | https://github.com/opntr/opBSD/commit/0b1a6777bfaa8ecd9ef89e4bc5451c7994e3938e | SMAP i386 | added related trap handler | |
| | | https://github.com/opntr/opBSD/commit/b9aa413e7b96c3d7fb385752ca9931018935e6ed | SMAP i386 | updated trap handler | |
| | | https://github.com/opntr/opBSD/commit/e20b27feec7d46a82a2cdde17fb641b0fccc21a8 | SMAP AMD64 | updated trap handler | |
| | | https://github.com/opntr/opBSD/commit/7a9b369faa86763cb629d45bb6e6feb9d69ee8c4 | SMAP i386 | clear SMAP state on exception | |
| | | https://github.com/opntr/opBSD/commit/05dcc22c06f18b09d1b56b625d7ebc3e9c69596c | SMAP i386 | identify SMAP on boot | |
| | | https://github.com/opntr/opBSD/commit/346e9fdf36bd58fa6473b436005cbab9b7c9c202 | SMAP AMD64 | typo fix in amd64/amd64/trap.c | |
| | | https://github.com/opntr/opBSD/commit/734168ba4a8a720f8659e304fd9151d67fd01e34 | SMAP i386 | trim whitespaces from support.s | |
| | | https://github.com/opntr/opBSD/commit/5cd64c2229ec86f8eadb2e2e636620f059ef133e | SMAP i386 | added stac and clac to funtions which live in support.s and interacted with user-space | |
| | | https://github.com/opntr/opBSD/commit/292645c2fcb68bb3f919b8def4f59f61466955ee | SMAP i386 | stac instruction should fail when used with lock prefix | |
| | | https://github.com/opntr/opBSD/commit/da3af8d42d6b1f65efc34457eaba77b6c0e81cfa | SMAP i386 | clear SMAP status on PUSH_FRAME | |
| | | https://github.com/opntr/opBSD/commit/566c9004bc12eb74754214b52b4e64386d7f31ee | SMAP i386 | added stac and clac functions to cpufunc.h | |
| | | https://github.com/opntr/opBSD/commit/500493e25319c5d7baa575c2cc0610f15248a59c | SMAP i386 | enable SMAP at boot time | |
| | | https://github.com/opntr/opBSD/commit/36d88ed54f9336a73e9549be11fa01046980f6e0 | SMAP i386 | enable SMAP in !BSP case in initcpu | |
| | | https://github.com/opntr/opBSD/commit/14cd0c4d0345dce11548a67bfe09a966940fa16b | SMAP i386 | added IS_BSP() macro to i386/include/pcpu.h | |
| | | https://github.com/opntr/opBSD/commit/66742f9eec750d6f7bcac2868256ffb3a7912d16 | SMAP i386 | fix build, added forgotted variables | |
| | | https://github.com/opntr/opBSD/commit/0cbb66d1900cacac57575e5a27918a1f516dee75 | SMAP i386 | fix typo in trap.c - rflags -> eflags | |
| | | https://github.com/opntr/opBSD/commit/72c906bf6e824672b51e961babb69a2f680ea267 | SMAP i386 | smap_access_violation() declaration | |
| | | https://github.com/opntr/opBSD/commit/b7a37535251e00dad64857b5b8b7a888bf3d7bd2 | SMAP i386 | fix comment in support.s | |
| | | https://github.com/opntr/opBSD/commit/e4031c3f50c749da1b63424e1ffc5108b6cb7f74 | KSP | added elf sections to ldscript.amd64 | |
| | | https://github.com/opntr/opBSD/commit/09fa416fec4428eb0a06a0aad3610fa683f6f63f | KSP | added basic structures and files | |
| | | https://github.com/opntr/opBSD/commit/a8728bc48f8f5f35db68656f3e31181a96dda15c | KSP | create abstraction for MD parts | |
| | | https://github.com/opntr/opBSD/commit/9dede2764de767426b0eb266c1c2556ab84a6e46 | KSP | fixed build | |
| | | https://github.com/opntr/opBSD/commit/e8dfbf0f24773e073326961dcf1e97df141bb2e9 | KSP | added stubs | |
| | | https://github.com/opntr/opBSD/commit/50bb19d3bd057277712962858ef974643c24b39f | KSP | added stubs 2 | |
| | | https://github.com/opntr/opBSD/commit/3d328d257561ded7bf0fb76aac8d6703e939ef58 | KSP | implement lf_selfpatch_patch_needed(struct lf_selfpatch *p) | |
| | | https://github.com/opntr/opBSD/commit/3b682d9b319e397494edf286626407566bf00207 | other | added .gitignore | |
| | | https://github.com/opntr/opBSD/commit/2f28c0b34c1103c3767e940cdcf467b6814c0cf6 | KSP | implemented basic kernel patching | |
| | | https://github.com/opntr/opBSD/commit/df6b887be3799f12d6c710ab3c30c0fa46ee9a2b | KSP | hook in kernel patching at hammer_time | |
| | | https://github.com/opntr/opBSD/commit/5aca5071efaf0cecd1603719ae84f9fbdf247f27 | KSP | in early initialization the linker_kernel_file yet not initialized, workaround this sitation | |
| | | https://github.com/opntr/opBSD/commit/9446f20a67bbffa4b4ae338bd8ac12d5d5110283 | KSP | added debug code | |
| | | https://github.com/opntr/opBSD/commit/8eff15ca5e29708c25c4ac9f0c0769d61ad1191d | KSP | print the patchable kernel object name | |
| | | https://github.com/opntr/opBSD/commit/feec6808338b6986b4337dc2d6a8edd107b2922b | KSP | hook in lf_selfpatch in kldload and preload case | |
| | | https://github.com/opntr/opBSD/commit/ece962fa1f72b8c583b7d395a4236cd575d2f700 | KSP | rename ELF sets | |
| | | https://github.com/opntr/opBSD/commit/9b47f93561001985e87958397c2ae6a65216502f | KSP | change pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode) visibility | |
| | | https://github.com/opntr/opBSD/commit/5781c199b46eff60d7509dd5efe51ec1fcdb9499 | KSP | change destination memory region from RX to RWX, and after patching back to RX | |
| | | https://github.com/opntr/opBSD/commit/78ee00407870204d07cf20b7a90558198b6ec03a | KSP | added selftest | |
| | | https://github.com/opntr/opBSD/commit/3d7b95def57d276412afd0c5c0f2d6fd5345960f | KSP | fixed a typo ... | |
| | | https://github.com/opntr/opBSD/commit/2b57e7b2544afa9fda6323c44487470a3c96f290 | KSP | malloc does not exists in early stage of initialization, not use them | |
| | | https://github.com/opntr/opBSD/commit/72462f329ae9d55e88e38679f906a07ff05b0d32 | KSP | remove redundant debug message, and fix one | |
| | | https://github.com/opntr/opBSD/commit/23cdd436905a667d6869d9ab57256c5c5a48e667 | KSP | disallow inlining of lf_selfpatch_selftest, and change test bytes | |
| | | https://github.com/opntr/opBSD/commit/a4f35b13f2e95b63dc176d3731d0d97fad4d09c5 | KSP | refactor, renamed */_selfpatch.h to selfpatch-machdep.h | |
| | | https://github.com/opntr/opBSD/commit/af96be6ebadaf34e363e4add4e41b22f6abfc433 | KSP | added SMAP and XSAVE related patch definitions | |
| | | https://github.com/opntr/opBSD/commit/2efb915ea797a1e85f496cb07f52a1f0bfdc08d9 | KSP | renamed feature selectors | |
| | | https://github.com/opntr/opBSD/commit/e631e9d44fdbae9a9b968b6c8307a3683ee53c2d | KSP | updated selfpatches | |
| | | https://github.com/opntr/opBSD/commit/a321ab1e1270ed67384c53627a57833c0fdc02ea | KSP | convert xsave <-> xsaveopt hack to selfpatches | |
| | | https://github.com/opntr/opBSD/commit/66a82b57a02dcc34456440197ecd1765a002b5d4 | KSP | lower nesting level of round brackets | |
| | | https://github.com/opntr/opBSD/commit/7143d2dbd21074126b1248cdf2110cb9f6c3fd71 | KSP | fix xsaveopt | |
| | | https://github.com/opntr/opBSD/commit/5ea9ada53ab84d4acb62a84a4bd0c628cd067ba5 | KSP | move cpu_extstate to common place | |
| | | https://github.com/opntr/opBSD/commit/1975693199f6412d9727f96140b58c86cabec418 | KSP | as Intel SDM Vol3B 13.2 say, we must check against XSAVE instead of OSXSAVE | |
| | | https://github.com/opntr/opBSD/commit/41f35eb635871d99c4d14dc65ba40d986ac0fac2 | KSP | removed unneeded extern variable | |
| | | https://github.com/opntr/opBSD/commit/465152a433e23d856f6cf4856f7f6e948e70f9e2 | KSP SMAP | use selfpatch for stac, clac in sys/amd64/amd64/exception.S | |
| | | https://github.com/opntr/opBSD/commit/249f8403152677488afce5e78e13f6623fc63f43 | KSP SMAP | use selfpatch for stac, clac in amd64/support.S | |
| | | https://github.com/opntr/opBSD/commit/efd10da1a9a801407b59f5b281ca294f4d5ded4b | KSP SMAP | use selfpatch for stac, clac in ia32/ia32_exception.S | |
| | | https://github.com/opntr/opBSD/commit/2ce125f8bd0f5faacfeb0d4235efd40f4d34d3a8 | KSP SMAP | use selfpatch for stac, clac in include/asmacros.h | |
| | | https://github.com/opntr/opBSD/commit/c5ea91eb55e8baf80deedcb26874294e53a0a142 | KSP SMAP | use selfpatch for stac, clac in amd64/include/cpufunc.h | |
| | | https://github.com/opntr/opBSD/commit/545cfdd72914e5246f173e2aa0a12c44c5da048c | KSP | added stringified version of NOPs, required by C inline assembly | |
| | | https://github.com/opntr/opBSD/commit/026ab1e5221cced259dec0e804bf68ba2d2d5628 | KSP SMAP | removed safety check, after the KSP merge | |
| | | https://github.com/opntr/opBSD/commit/ae08f33b15cd1290fd2697a3d61b27779d4e55c8 | SMAP | change enable to enabled in warning message | |
| | | https://github.com/opntr/opBSD/commit/078a753aed57bd2de2cd9af6729c70258e4c7ca6 | KSP | added debug output | |
| | | https://github.com/opntr/opBSD/commit/653253e3f44d3ce91e75187214fcf7617ad9f8a3 | KSP | convert KASSERT to panic | |
| | | https://github.com/opntr/opBSD/commit/24152996822ba8a5401d4709358df5d98f3b25a2 | KSP | fix module patching in preloaded case | |
| | | https://github.com/opntr/opBSD/commit/d4e3de5adc59dfb3854e62b90a5f8ffeb197d425 | KSP SMAP | fix alert message in trap, and removed unused code | |
| | | https://github.com/opntr/opBSD/commit/97aa941de940fcecea7267c6756a03bb264a0265 | KSP | try to fix panic on kldunload when the module loaded at run-time | |
| | | https://github.com/opntr/opBSD/commit/72a6a1dd12054055da679120e6f89168456f0f3b | KSP | check securelevel before do anything | |
| | | https://github.com/opntr/opBSD/commit/f725aa7751718a75abc5b7bc26b6fa2c6d1e184d | KSP | separate out MI and MD part of KSP code | |
| | | https://github.com/opntr/opBSD/commit/28d7f3224a3f7e13f7a4b9726e584208d0a73c9a | KSP | disable selftest + style | |
| | | https://github.com/opntr/opBSD/commit/fd3c3a203229e6cf21a9d9505404c9b40cc39a41 | KSP | print out the real start and stop | |
| | | https://github.com/opntr/opBSD/commit/f95314cb826de10718221cc9f8d03d3fa3ce9f43 | KSP | temporary disable RWX setting | |
| | | https://github.com/opntr/opBSD/commit/d3f803968d2ced13156b5b201fed7c1366919d23 | KSP | fixed panic on module unload case, and added stubs for protection changes | |
| | | https://github.com/opntr/opBSD/commit/36ba94f267232d467e56c648f040314636087393 | KSP | added KSP_WxorX_KERNEL guard, and added more code to KSP_WxorX_KERNEL case | |
| | | https://github.com/opntr/opBSD/commit/5c2b35c2e332e95403a9136f836242b279485674 | KSP | constify ksp_selector_table | |
| | | https://github.com/opntr/opBSD/commit/4a7f9f375378ed51b11d072284b67132c8b6b6e0 | KSP | new lines at end of DBG messages | |
| | | https://github.com/opntr/opBSD/commit/5be2b1d530d6c1d485658e92244cb4a32fb52b05 | KSP | added critical_{enter,exit} to lf_selfpatch | |
| | | https://github.com/opntr/opBSD/commit/b29c2636b7a45bfc123b70afa01d7c95fbc9692d | KSP | added variable sized patch support | |
| | | https://github.com/opntr/opBSD/commit/5ae181d2f6a58f87460cb9d465b20c210bd64a26 | KSP | enable variable sized patches | |
| | | https://github.com/opntr/opBSD/commit/057196b121a297b4ba8c2e45d499bf1a504fcbc4 | KSP | added more debug output | |
| | | https://github.com/opntr/opBSD/commit/6a7086d6b9abc6512e0b12a71b99dd87d25c0a06 | KSP | disable debug log by default | |
| | | https://github.com/opntr/opBSD/commit/06f4e2796718d0b385f247d897b977cb58f52c4e | KSP SMAP | added KSP_FRAMEWORK and INTEL_SMAP_SUPPORT knobs | |
| | | https://github.com/opntr/opBSD/commit/5522267a7c879507d067f17c40c25b1a2281c708 | KSP | added KSP_FRAMEWORK to GENERIC, required by amd64's fpu code | |
| | | https://github.com/opntr/opBSD/commit/acfbd2db231bf040ab8521268f170a4b3a416bd4 | SMAP | added INTEL_SMAP_SUPPORT to GENERIC | |
| |