Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160351862
D13971.id38179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13971.id38179.diff
View Options
Index: sys/amd64/amd64/machdep.c
===================================================================
--- sys/amd64/amd64/machdep.c
+++ sys/amd64/amd64/machdep.c
@@ -1618,6 +1618,7 @@
mtx_init(&dt_lock, "descriptor tables", NULL, MTX_DEF);
/* exceptions */
+ pti = pti_get_default();
TUNABLE_INT_FETCH("vm.pmap.pti", &pti);
for (x = 0; x < NIDT; x++)
Index: sys/x86/include/x86_var.h
===================================================================
--- sys/x86/include/x86_var.h
+++ sys/x86/include/x86_var.h
@@ -136,6 +136,7 @@
void nmi_handle_intr(u_int type, struct trapframe *frame);
void pagecopy(void *from, void *to);
void printcpuinfo(void);
+int pti_get_default(void);
int user_dbreg_trap(void);
int minidumpsys(struct dumperinfo *);
struct pcb *get_pcb_td(struct thread *td);
Index: sys/x86/x86/identcpu.c
===================================================================
--- sys/x86/x86/identcpu.c
+++ sys/x86/x86/identcpu.c
@@ -1662,6 +1662,16 @@
#endif
}
+int
+pti_get_default(void)
+{
+
+ if (strcmp(cpu_vendor, AMD_VENDOR_ID) == 0)
+ return (0);
+
+ return (1);
+}
+
static u_int
find_cpu_vendor_id(void)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jun 24, 2:25 PM (13 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34285945
Default Alt Text
D13971.id38179.diff (1 KB)
Attached To
Mode
D13971: Enable PTI by default for Intel
Attached
Detach File
Event Timeline
Log In to Comment