Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Nov 2017 21:51:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 179282] [amd64] [patch] add Intel SMAP for FreeBSD-CURRENT
Message-ID:  <bug-179282-6-vgh7kk5RRO@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-179282-6@https.bugs.freebsd.org/bugzilla/>
References:  <bug-179282-6@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D179282

--- Comment #5 from op@hardenedbsd.org ---
And this is the fix for the security issue:

diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 12166b785508..ae31a9d0e896 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1680,7 +1680,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
        msr =3D ((u_int64_t)GSEL(GCODE_SEL, SEL_KPL) << 32) |
              ((u_int64_t)GSEL(GUCODE32_SEL, SEL_UPL) << 48);
        wrmsr(MSR_STAR, msr);
-       wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D);
+       wrmsr(MSR_SF_MASK, PSL_NT|PSL_T|PSL_I|PSL_C|PSL_D|PSL_AC);

        /*
         * Temporary forge some valid pointer to PCB, for exception

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-179282-6-vgh7kk5RRO>