From 20dfbd36b691a01165ad6fdce5b807b60aa5b695 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 16 Feb 2002 07:07:54 +0000 Subject: Don't leave garbage in parts of fpregs in the fxsr case. All callers (procfs and ptrace) supply kernel stack garbage, so kernel context was leaked to userland. Reviewed by: des --- sys/amd64/amd64/machdep.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c0ce595..c6bdb57 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -2018,6 +2018,8 @@ fill_fpregs_xmm(sv_xmm, sv_87) register struct envxmm *penv_xmm = &sv_xmm->sv_env; int i; + bzero(sv_87, sizeof(*sv_87)); + /* FPU control/status */ penv_87->en_cw = penv_xmm->en_cw; penv_87->en_sw = penv_xmm->en_sw; -- cgit v1.1