From owner-svn-src-stable-8@FreeBSD.ORG Sat Apr 16 22:19:19 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D47EC1065680; Sat, 16 Apr 2011 22:19:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 200598FC18; Sat, 16 Apr 2011 22:19:18 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p3GMJFxr075887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 17 Apr 2011 01:19:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p3GMJFtQ021386; Sun, 17 Apr 2011 01:19:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p3GMJFj5021385; Sun, 17 Apr 2011 01:19:15 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 17 Apr 2011 01:19:15 +0300 From: Kostik Belousov To: Oliver Pinter Message-ID: <20110416221915.GR48734@deviant.kiev.zoral.com.ua> References: <201102190739.p1J7dFjO087910@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EqVOK5mkaJAMmtSx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r218836 - in stable/8/sys: amd64/amd64 amd64/ia32 i386/i386 kern X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 22:19:19 -0000 --EqVOK5mkaJAMmtSx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 16, 2011 at 11:04:38PM +0200, Oliver Pinter wrote: > MFC this for 7-STABLE? I do not reject the proposal, but I am quite curious why ? I do not have any machine running 7, so please test the patch below. It compiled for me on amd64. Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys:r218327 Index: kern/kern_context.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- kern/kern_context.c (revision 220730) +++ kern/kern_context.c (working copy) @@ -71,6 +71,7 @@ PROC_LOCK(td->td_proc); uc.uc_sigmask =3D td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(uc.__spare__, sizeof(uc.__spare__)); ret =3D copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -109,6 +110,7 @@ ret =3D EINVAL; else { get_mcontext(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); + bzero(uc.__spare__, sizeof(uc.__spare__)); PROC_LOCK(td->td_proc); uc.uc_sigmask =3D td->td_sigmask; PROC_UNLOCK(td->td_proc); Index: i386/i386/machdep.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- i386/i386/machdep.c (revision 220730) +++ i386/i386/machdep.c (working copy) @@ -342,12 +342,14 @@ /* Build the argument list for the signal handler. */ sf.sf_signum =3D sig; sf.sf_scp =3D (register_t)&fp->sf_siginfo.si_sc; + bzero(&sf.sf_siginfo, sizeof(sf.sf_siginfo)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_arg2 =3D (register_t)&fp->sf_siginfo; sf.sf_siginfo.si_signo =3D sig; sf.sf_siginfo.si_code =3D ksi->ksi_code; sf.sf_ahu.sf_action =3D (__osiginfohandler_t *)catcher; + sf.sf_addr =3D 0; } else { /* Old FreeBSD-style arguments. */ sf.sf_arg2 =3D ksi->ksi_code; @@ -461,6 +463,11 @@ sf.sf_uc.uc_mcontext.mc_onstack =3D (oonstack) ? 1 : 0; sf.sf_uc.uc_mcontext.mc_gs =3D rgs(); bcopy(regs, &sf.sf_uc.uc_mcontext.mc_fs, sizeof(*regs)); + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); =20 /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) !=3D 0 && !oonstack && @@ -480,6 +487,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum =3D sig; sf.sf_ucontext =3D (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo =3D (register_t)&sfp->sf_si; @@ -596,6 +604,11 @@ sf.sf_uc.uc_mcontext.mc_len =3D sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare1, + sizeof(sf.sf_uc.uc_mcontext.mc_spare1)); + bzero(sf.sf_uc.uc_mcontext.mc_spare2, + sizeof(sf.sf_uc.uc_mcontext.mc_spare2)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); =20 /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) !=3D 0 && !oonstack && @@ -617,6 +630,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum =3D sig; sf.sf_ucontext =3D (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo =3D (register_t)&sfp->sf_si; @@ -2716,6 +2730,8 @@ mcp->mc_ss =3D tp->tf_ss; mcp->mc_len =3D sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } =20 @@ -2763,6 +2779,7 @@ #ifndef DEV_NPX mcp->mc_fpformat =3D _MC_FPFMT_NODEV; mcp->mc_ownedfp =3D _MC_FPOWNED_NONE; + bzero(mcp->mc_fpstate, sizeof(mcp->mc_fpstate)); #else union savefpu *addr; =20 Property changes on: contrib/pf ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/contrib/pf:r218327 Property changes on: contrib/dev/acpica ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/contrib/dev/acpica:r218327 Property changes on: cddl/contrib/opensolaris ___________________________________________________________________ Modified: svn:mergeinfo Merged /head/sys/cddl/contrib/opensolaris:r218327 Index: amd64/amd64/machdep.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- amd64/amd64/machdep.c (revision 220730) +++ amd64/amd64/machdep.c (working copy) @@ -306,6 +306,9 @@ sf.sf_uc.uc_mcontext.mc_len =3D sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.uc_mcontext.mc_spare, + sizeof(sf.sf_uc.uc_mcontext.mc_spare)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); =20 /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) !=3D 0 && !oonstack && @@ -327,6 +330,7 @@ /* Build the argument list for the signal handler. */ regs->tf_rdi =3D sig; /* arg 1 in %rdi */ regs->tf_rdx =3D (register_t)&sfp->sf_uc; /* arg 3 in %rdx */ + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ regs->tf_rsi =3D (register_t)&sfp->sf_si; /* arg 2 in %rsi */ @@ -1653,6 +1657,7 @@ mcp->mc_ss =3D tp->tf_ss; mcp->mc_len =3D sizeof(*mcp); get_fpcontext(td, mcp); + bzero(mcp->mc_spare, sizeof(mcp->mc_spare)); return (0); } =20 Index: amd64/ia32/ia32_signal.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- amd64/ia32/ia32_signal.c (revision 220730) +++ amd64/ia32/ia32_signal.c (working copy) @@ -158,6 +158,8 @@ mcp->mc_ss =3D tp->tf_ss; mcp->mc_len =3D sizeof(*mcp); ia32_get_fpcontext(td, mcp); + bzero(mcp->mc_spare1, sizeof(mcp->mc_spare1)); + bzero(mcp->mc_spare2, sizeof(mcp->mc_spare2)); return (0); } =20 @@ -226,6 +228,7 @@ PROC_LOCK(td->td_proc); uc.uc_sigmask =3D td->td_sigmask; PROC_UNLOCK(td->td_proc); + bzero(&uc.__spare__, sizeof(uc.__spare__)); ret =3D copyout(&uc, uap->ucp, UC_COPY_SIZE); } return (ret); @@ -345,6 +348,11 @@ sf.sf_uc.uc_mcontext.mc_eflags =3D regs->tf_rflags; sf.sf_uc.uc_mcontext.mc_esp =3D regs->tf_rsp; sf.sf_uc.uc_mcontext.mc_ss =3D regs->tf_ss; + bzero(sf.sf_uc.uc_mcontext.mc_fpregs, + sizeof(sf.sf_uc.uc_mcontext.mc_fpregs)); + bzero(sf.sf_uc.uc_mcontext.__spare__, + sizeof(sf.sf_uc.uc_mcontext.__spare__)); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); =20 /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) !=3D 0 && !oonstack && @@ -362,6 +370,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum =3D sig; sf.sf_ucontext =3D (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo =3D (u_int32_t)(uintptr_t)&sfp->sf_si; @@ -463,6 +472,7 @@ sf.sf_uc.uc_mcontext.mc_len =3D sizeof(sf.sf_uc.uc_mcontext); /* magic */ ia32_get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + bzero(sf.sf_uc.__spare__, sizeof(sf.sf_uc.__spare__)); =20 /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) !=3D 0 && !oonstack && @@ -482,6 +492,7 @@ /* Build the argument list for the signal handler. */ sf.sf_signum =3D sig; sf.sf_ucontext =3D (register_t)&sfp->sf_uc; + bzero(&sf.sf_si, sizeof(sf.sf_si)); if (SIGISMEMBER(psp->ps_siginfo, sig)) { /* Signal handler installed with SA_SIGINFO. */ sf.sf_siginfo =3D (u_int32_t)(uintptr_t)&sfp->sf_si; --EqVOK5mkaJAMmtSx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2qFeIACgkQC3+MBN1Mb4hY7wCfbGQLZTOA0/mn4vEdbP2Yxyq4 TrwAoKw2g0eiHNk27FBA4C8WdkR8+Eq4 =Ro4W -----END PGP SIGNATURE----- --EqVOK5mkaJAMmtSx--