summaryrefslogtreecommitdiff
path: root/sys/compat/linux/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/arch/i386')
-rw-r--r--sys/compat/linux/arch/i386/linux_machdep.c11
-rw-r--r--sys/compat/linux/arch/i386/linux_ptrace.c5
2 files changed, 12 insertions, 4 deletions
diff --git a/sys/compat/linux/arch/i386/linux_machdep.c b/sys/compat/linux/arch/i386/linux_machdep.c
index 0a6b4272e0b..30607bd8f11 100644
--- a/sys/compat/linux/arch/i386/linux_machdep.c
+++ b/sys/compat/linux/arch/i386/linux_machdep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_machdep.c,v 1.166 2019/05/19 08:46:15 maxv Exp $ */
+/* $NetBSD: linux_machdep.c,v 1.166.2.1 2022/08/03 11:11:31 martin Exp $ */
/*-
* Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.166 2019/05/19 08:46:15 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.166.2.1 2022/08/03 11:11:31 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_user_ldt.h"
@@ -252,6 +252,8 @@ linux_rt_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
onstack, fp, sig, tf->tf_eip,
((struct pcb *)lwp_getpcb(l))->pcb_cr2));
+ memset(&frame, 0, sizeof(frame));
+
/* Build stack frame for signal trampoline. */
frame.sf_handler = catcher;
frame.sf_sig = native_to_linux_signo[sig];
@@ -329,6 +331,8 @@ linux_old_sendsig(const ksiginfo_t *ksi, const sigset_t *mask)
onstack, fp, sig, tf->tf_eip,
((struct pcb *)lwp_getpcb(l))->pcb_cr2));
+ memset(&frame, 0, sizeof(frame));
+
/* Build stack frame for signal trampoline. */
frame.sf_handler = catcher;
frame.sf_sig = native_to_linux_signo[sig];
@@ -837,6 +841,7 @@ linux_machdepioctl(struct lwp *l, const struct linux_sys_ioctl_args *uap, regist
com = VT_OPENQRY;
break;
case LINUX_VT_GETMODE:
+ memset(&lvt, 0, sizeof(lvt));
error = fp->f_ops->fo_ioctl(fp, VT_GETMODE, &lvt);
if (error != 0)
goto out;
@@ -932,6 +937,7 @@ linux_machdepioctl(struct lwp *l, const struct linux_sys_ioctl_args *uap, regist
sectors = label.d_nsectors;
}
if (com == LINUX_HDIO_GETGEO) {
+ memset(&hdg, 0, sizeof(hdg));
hdg.start = start;
hdg.heads = heads;
hdg.cylinders = cylinders;
@@ -939,6 +945,7 @@ linux_machdepioctl(struct lwp *l, const struct linux_sys_ioctl_args *uap, regist
error = copyout(&hdg, SCARG(uap, data), sizeof hdg);
goto out;
} else {
+ memset(&hdg_big, 0, sizeof(hdg_big));
hdg_big.start = start;
hdg_big.heads = heads;
hdg_big.cylinders = cylinders;
diff --git a/sys/compat/linux/arch/i386/linux_ptrace.c b/sys/compat/linux/arch/i386/linux_ptrace.c
index 65ef6a22157..250772e23d4 100644
--- a/sys/compat/linux/arch/i386/linux_ptrace.c
+++ b/sys/compat/linux/arch/i386/linux_ptrace.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_ptrace.c,v 1.33 2018/09/03 16:29:29 riastradh Exp $ */
+/* $NetBSD: linux_ptrace.c,v 1.33.4.1 2022/08/03 11:11:31 martin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.33 2018/09/03 16:29:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_ptrace.c,v 1.33.4.1 2022/08/03 11:11:31 martin Exp $");
#include <sys/param.h>
#include <sys/mount.h>
@@ -223,6 +223,7 @@ linux_sys_ptrace_arch(struct lwp *l, const struct linux_sys_ptrace_args *uap,
if (error) {
break;
}
+ memset(linux_regs, 0, sizeof(*linux_regs));
linux_regs->ebx = regs->r_ebx;
linux_regs->ecx = regs->r_ecx;
linux_regs->edx = regs->r_edx;