Mercurial > illumos > illumos-gate
diff usr/src/uts/intel/ia32/os/archdep.c @ 2712:f74a135872bc
PSARC/2005/471 BrandZ: Support for non-native zones
6374606 ::nm -D without an object may not work on processes in zones
6409350 BrandZ project integration into Solaris
6455289 pthread_setschedparam() should return EPERM rather than panic libc
6455591 setpriority(3C) gets errno wrong for deficient privileges failure
6458178 fifofs doesn't support lofs mounts of fifos
6460380 Attempted open() of a symlink with the O_NOFOLLOW flag set returns EINVAL, not ELOOP
6463857 renice(1) errors erroneously
author | nn35248 |
---|---|
date | Mon, 11 Sep 2006 22:51:59 -0700 |
parents | f95ffdc997b7 |
children | 5903aece022d |
line wrap: on
line diff
--- a/usr/src/uts/intel/ia32/os/archdep.c Mon Sep 11 21:56:06 2006 -0700 +++ b/usr/src/uts/intel/ia32/os/archdep.c Mon Sep 11 22:51:59 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -65,6 +64,8 @@ #include <sys/auxv.h> #include <sys/auxv_386.h> #include <sys/dtrace.h> +#include <sys/brand.h> +#include <sys/machbrand.h> extern const struct fnsave_state x87_initial; extern const struct fxsave_state sse_initial; @@ -604,6 +605,8 @@ static greg_t fix_segreg(greg_t sr, model_t datamodel) { + kthread_t *t = curthread; + switch (sr &= 0xffff) { #if defined(__amd64) /* @@ -633,6 +636,13 @@ } /* + * Allow this process's brand to do any necessary segment register + * manipulation. + */ + if (PROC_IS_BRANDED(t->t_procp) && BRMOP(t->t_procp)->b_fixsegreg) + return (BRMOP(t->t_procp)->b_fixsegreg(sr, datamodel)); + + /* * Force it into the LDT in ring 3 for 32-bit processes, which by * default do not have an LDT, so that any attempt to use an invalid * selector will reference the (non-existant) LDT, and cause a #gp fault