svn commit: r232143 - head/sys/i386/linux
Konstantin Belousov
kib at FreeBSD.org
Sat Feb 25 01:33:39 UTC 2012
Author: kib
Date: Sat Feb 25 01:33:39 2012
New Revision: 232143
URL: http://svn.freebsd.org/changeset/base/232143
Log:
Do not write to the user address directly, use suword().
Reported by: Bengt Ahlgren <bengta sics se>
MFC after: 1 week
Modified:
head/sys/i386/linux/linux_sysvec.c
Modified: head/sys/i386/linux/linux_sysvec.c
==============================================================================
--- head/sys/i386/linux/linux_sysvec.c Sat Feb 25 01:20:53 2012 (r232142)
+++ head/sys/i386/linux/linux_sysvec.c Sat Feb 25 01:33:39 2012 (r232143)
@@ -227,11 +227,11 @@ linux_fixup(register_t **stack_base, str
argv = *stack_base;
envp = *stack_base + (imgp->args->argc + 1);
(*stack_base)--;
- **stack_base = (intptr_t)(void *)envp;
+ suword(*stack_base, (intptr_t)(void *)envp);
(*stack_base)--;
- **stack_base = (intptr_t)(void *)argv;
+ suword(*stack_base, (intptr_t)(void *)argv);
(*stack_base)--;
- **stack_base = imgp->args->argc;
+ suword(*stack_base, imgp->args->argc);
return (0);
}
@@ -286,7 +286,7 @@ elf_linux_fixup(register_t **stack_base,
imgp->auxargs = NULL;
(*stack_base)--;
- **stack_base = (register_t)imgp->args->argc;
+ suword(*stack_base, (register_t)imgp->args->argc);
return (0);
}
More information about the svn-src-all
mailing list