2008-08-24 Roland McGrath <roland@redhat.com>

* linux/powerpc/syscallent.h: Handle subpage_prot.
	* mem.c [LINUX && POWERPC] (sys_subpage_prot): New function.
	* linux/syscall.h [POWERPC]: Declare it.
	From Simon Murray <simon@transitive.com>.
This commit is contained in:
Roland McGrath 2008-08-25 03:09:16 +00:00
parent 6f677cff39
commit 4a6f652cb7
3 changed files with 55 additions and 1 deletions

View File

@ -339,7 +339,7 @@
{ 1, TD, sys_eventfd, "eventfd" }, /* 307 */
{ 5, 0, printargs, "SYS_308" }, /* 308 */
{ 5, 0, printargs, "SYS_309" }, /* 309 */
{ 5, 0, printargs, "SYS_310" }, /* 310 */
{ 3, 0, sys_subpage_prot, "subpage_prot" }, /* 310 */
{ 5, 0, printargs, "SYS_311" }, /* 311 */
{ 5, 0, printargs, "SYS_312" }, /* 312 */
{ 5, 0, printargs, "SYS_313" }, /* 313 */

View File

@ -320,3 +320,7 @@ int sys_cacheflush();
#endif
int sys_pread64(), sys_pwrite64();
#ifdef POWERPC
int sys_subpage_prot();
#endif

50
mem.c
View File

@ -886,3 +886,53 @@ struct tcb *tcp;
return 0;
}
#endif
#if defined(LINUX) && defined(POWERPC)
int
sys_subpage_prot(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
unsigned long cur, end, abbrev_end, entries;
unsigned int entry;
tprintf("%#lx, %#lx, ", tcp->u_arg[0], tcp->u_arg[1]);
entries = tcp->u_arg[1] >> 16;
if (!entries || !tcp->u_arg[2]) {
tprintf("{}");
return 0;
}
cur = tcp->u_arg[2];
end = cur + (sizeof(int) * entries);
if (!verbose(tcp) || end < tcp->u_arg[2]) {
tprintf("%#lx", tcp->u_arg[2]);
return 0;
}
if (abbrev(tcp)) {
abbrev_end = cur + (sizeof(int) * max_strlen);
if (abbrev_end > end)
abbrev_end = end;
}
else
abbrev_end = end;
tprintf("{");
for (; cur < end; cur += sizeof(int)) {
if (cur > tcp->u_arg[2])
tprintf(", ");
if (cur >= abbrev_end) {
tprintf("...");
break;
}
if (umove(tcp, cur, &entry) < 0) {
tprintf("??? [%#lx]", cur);
break;
}
else
tprintf("%#08x", entry);
}
tprintf("}");
}
return 0;
}
#endif