process.cc (13995:5d459168a680) process.cc (14024:abe47b13653d)
1/*
2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by the University of Cambridge Computer
6 * Laboratory as part of the CTSRD Project, with support from the UK Higher
7 * Education Innovation Fund (HEIF).
8 *

--- 95 unchanged lines hidden (view full) ---

104 Addr newp = process->getSyscallArg(tc, index);
105 size_t newlen = process->getSyscallArg(tc, index);
106
107 BufferArg buf(namep, sizeof(size_t));
108 BufferArg buf2(oldp, sizeof(size_t));
109 BufferArg buf3(oldlenp, sizeof(size_t));
110 BufferArg buf4(newp, sizeof(size_t));
111
1/*
2 * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
3 * All rights reserved.
4 *
5 * This software was developed by the University of Cambridge Computer
6 * Laboratory as part of the CTSRD Project, with support from the UK Higher
7 * Education Innovation Fund (HEIF).
8 *

--- 95 unchanged lines hidden (view full) ---

104 Addr newp = process->getSyscallArg(tc, index);
105 size_t newlen = process->getSyscallArg(tc, index);
106
107 BufferArg buf(namep, sizeof(size_t));
108 BufferArg buf2(oldp, sizeof(size_t));
109 BufferArg buf3(oldlenp, sizeof(size_t));
110 BufferArg buf4(newp, sizeof(size_t));
111
112 buf.copyIn(tc->getMemProxy());
113 buf2.copyIn(tc->getMemProxy());
114 buf3.copyIn(tc->getMemProxy());
112 buf.copyIn(tc->getVirtProxy());
113 buf2.copyIn(tc->getVirtProxy());
114 buf3.copyIn(tc->getVirtProxy());
115
116 void *hnewp = NULL;
117 if (newp) {
115
116 void *hnewp = NULL;
117 if (newp) {
118 buf4.copyIn(tc->getMemProxy());
118 buf4.copyIn(tc->getVirtProxy());
119 hnewp = (void *)buf4.bufferPtr();
120 }
121
122 uint32_t *hnamep = (uint32_t *)buf.bufferPtr();
123 void *holdp = (void *)buf2.bufferPtr();
124 size_t *holdlenp = (size_t *)buf3.bufferPtr();
125
126 ret = sysctl((int *)hnamep, namelen, holdp, holdlenp, hnewp, newlen);
127
119 hnewp = (void *)buf4.bufferPtr();
120 }
121
122 uint32_t *hnamep = (uint32_t *)buf.bufferPtr();
123 void *holdp = (void *)buf2.bufferPtr();
124 size_t *holdlenp = (size_t *)buf3.bufferPtr();
125
126 ret = sysctl((int *)hnamep, namelen, holdp, holdlenp, hnewp, newlen);
127
128 buf.copyOut(tc->getMemProxy());
129 buf2.copyOut(tc->getMemProxy());
130 buf3.copyOut(tc->getMemProxy());
128 buf.copyOut(tc->getVirtProxy());
129 buf2.copyOut(tc->getVirtProxy());
130 buf3.copyOut(tc->getVirtProxy());
131 if (newp)
131 if (newp)
132 buf4.copyOut(tc->getMemProxy());
132 buf4.copyOut(tc->getVirtProxy());
133
134 return (ret);
135}
136
137static SyscallDesc syscallDescs32[] = {
138 /* 0 */ SyscallDesc("unused#000", unimplementedFunc),
139 /* 1 */ SyscallDesc("unused#001", unimplementedFunc),
140 /* 2 */ SyscallDesc("unused#002", unimplementedFunc),

--- 1171 unchanged lines hidden ---
133
134 return (ret);
135}
136
137static SyscallDesc syscallDescs32[] = {
138 /* 0 */ SyscallDesc("unused#000", unimplementedFunc),
139 /* 1 */ SyscallDesc("unused#001", unimplementedFunc),
140 /* 2 */ SyscallDesc("unused#002", unimplementedFunc),

--- 1171 unchanged lines hidden ---