A few low-level GDT/LDT K64 questions
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=cPyNNrTd37TfG0/yfHWv2OQHkmyiaUPRLDlpaCabsBE=; b=xtNsSMyp2Y2q1eQqKEyd/CcCzZV2KYbrEWEJWVxg4yO0W8h+Tky2zssJEdYflw9a8c BlywKefsAhnrB08LW2lwbK4MIzHDSiFH2dIHEUT3QjK7R61WhQEdOVKk3lkrnLEd29pn hJGi0YD1zo7Pzze+wvQ7iZA1Kh0luoysHxs7A= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=hJHk8RT1nf1FebYWDSZpm762cJLSydaQui4KACwA/AVjb6ySGzV7X/hCOFizUw2xHB RowExLeGwtvveKPVovn9DFx1P06XKwlpPIoc/xV0JDmowwHtxpB8+2a+bq/LpU2n8ypX vTzBuFGRahgpj/IjEdWdI8BFY8r0h/3g3Z4/g= Hi folks, Now that K64 is out there, we ran into a few interesting low-level questions about how the K64 (and K32) kernels handle the GDT and the LDT. These questions are in the context of a thread that's entered a K64 kernel extension via an ioctl. We ran into a few differences in the way the %fs and %gs registers are treated in K64, so we wanted to make sure we understood the expectations the kernel has with regards to the GDT and the LDT and these registers. 1. Is there an expectation within the kernel that the in-memory descriptor tables will be synchronized with the descriptor cache? That is, if the GDT or LDT is modified, can the descriptor cache hold stale values (beyond the local scope of the GDT/LDT modification)? 2. Is there an expectation within the kernel that the selector indices for all segment registers will always be within the bounds of the referenced descriptor table? That is, if the GDT or LDT shrinks in size, can a segment register hold a stale value that is now out of bounds for the referenced descriptor table (beyond the local scope of the GDT/LDT modification)? 3. In general, can the following sequence expected to be idempotent with respect to the %fs descriptor cache: mov $IA32_FS_BASE, %ecx rdmsr mov %fs, %bx mov %bx, %fs wrmsr Thanks so much, Ben _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Ben Gertzfield