int putreg(struct task_struct *child, int regno, unsignedlong value)
{ switch (regno) { case R8: case R9: case R10: case R11: case R12: case R13: case R14: case R15: case RIP: case RSP: case RAX: case RBX: case RCX: case RDX: case RSI: case RDI: case RBP: break;
case ORIG_RAX: /* Update the syscall number. */
UPT_SYSCALL_NR(&child->thread.regs.regs) = value; break;
case FS: case GS: case DS: case ES: case SS: case CS: if (value && (value & 3) != 3) return -EIO;
value &= 0xffff; break;
case FS_BASE: case GS_BASE: if (!((value >> 48) == 0 || (value >> 48) == 0xffff)) return -EIO; break;
case EFLAGS:
value &= FLAG_MASK;
child->thread.regs.regs.gp[HOST_EFLAGS] |= value; return 0;
default:
panic("Bad register in putreg(): %d\n", regno);
}
switch (regno) { case R8: case R9: case R10: case R11: case R12: case R13: case R14: case R15: case RIP: case RSP: case RAX: case RBX: case RCX: case RDX: case RSI: case RDI: case RBP: case ORIG_RAX: case EFLAGS: case FS_BASE: case GS_BASE: break; case FS: case GS: case DS: case ES: case SS: case CS:
mask = 0xffff; break; default:
panic("Bad register in getreg: %d\n", regno);
} return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]];
}
int peek_user(struct task_struct *child, long addr, long data)
{ /* read the word at location addr in the USER area. */ unsignedlong tmp;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.