diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2015-12-28 16:04:58 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@pfmooney.com> | 2015-12-28 18:39:32 +0000 |
commit | 00de07a7cd337309f38af261b8340471c6cb21aa (patch) | |
tree | 2337e3117b2f51538f20787fbedc5278f95168b6 | |
parent | 673d120c71e85f5f52136d47d1e44282d0e41632 (diff) | |
download | illumos-joyent-00de07a7cd337309f38af261b8340471c6cb21aa.tar.gz |
OS-4967 unship SNGL brand
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
24 files changed, 2 insertions, 1631 deletions
@@ -4515,7 +4515,6 @@ d usr/kernel 0755 root sys d usr/kernel/brand 0755 root sys d usr/kernel/brand/amd64 0755 root sys f usr/kernel/brand/amd64/lx_brand 0755 root sys -f usr/kernel/brand/amd64/sngl_brand 0755 root sys d usr/kernel/drv 0755 root sys d usr/kernel/drv/amd64 0755 root sys f usr/kernel/drv/amd64/bpf 0755 root sys @@ -5032,7 +5031,6 @@ f usr/lib/amd64/passwdutil.so.1 0755 root bin d usr/lib/amd64/pkgconfig 0755 root other f usr/lib/amd64/rpcsec.so.1 0755 root bin s usr/lib/amd64/rpcsec.so=rpcsec.so.1 -f usr/lib/amd64/sngl_brand.so.1 0755 root bin f usr/lib/amd64/straddr.so.2 0755 root bin s usr/lib/amd64/straddr.so=straddr.so.2 f usr/lib/amd64/udapl_tavor.so.1 0755 root bin @@ -5075,12 +5073,6 @@ d usr/lib/brand/shared 0755 root sys f usr/lib/brand/shared/common.ksh 0444 root bin f usr/lib/brand/shared/query 0755 root bin f usr/lib/brand/shared/uninstall.ksh 0444 root bin -d usr/lib/brand/sngl 0755 root bin -f usr/lib/brand/sngl/config.xml 0444 root bin -f usr/lib/brand/sngl/ld.sys.config 0444 root bin -f usr/lib/brand/sngl/ld.sys64.config 0444 root bin -f usr/lib/brand/sngl/platform.xml 0444 root bin -f usr/lib/brand/sngl/sinstall 0755 root bin f usr/lib/bridged 0555 root bin f usr/lib/calprog 0555 root bin d usr/lib/cfgadm 0755 root bin @@ -10033,7 +10025,6 @@ s usr/lib/smtp/sendmail/newaliases=sendmail f usr/lib/smtp/sendmail/sendmail 2555 root smmsp f usr/lib/sndrd 0555 root bin f usr/lib/sndrsyncd 0555 root bin -f usr/lib/sngl_brand.so.1 0755 root bin d usr/lib/snmp 0755 root bin d usr/lib/spell 0755 root bin f usr/lib/spell/compress 0555 root bin diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint index e1f5b733a0..2ecdfced7f 100644 --- a/usr/src/Makefile.lint +++ b/usr/src/Makefile.lint @@ -338,7 +338,6 @@ COMMON_SUBDIRS = \ lib/libbe \ lib/pylibbe \ lib/brand/sn1 \ - lib/brand/sngl \ lib/brand/solaris10 \ lib/crypt_modules \ lib/extendedFILE \ diff --git a/usr/src/Targetdirs b/usr/src/Targetdirs index 16efa22ef0..20530b476a 100644 --- a/usr/src/Targetdirs +++ b/usr/src/Targetdirs @@ -252,7 +252,6 @@ DIRS= \ /usr/lib/brand/labeled \ /usr/lib/brand/shared \ /usr/lib/brand/sn1 \ - /usr/lib/brand/sngl \ /usr/lib/brand/solaris10 \ /usr/lib/class \ /usr/lib/class/FSS \ @@ -454,7 +453,6 @@ DIRS64= \ /usr/lib/$(MACH64) \ /usr/lib/$(MACH64)/gss \ /usr/lib/brand/sn1/$(MACH64) \ - /usr/lib/brand/sngl/$(MACH64) \ /usr/lib/brand/solaris10/$(MACH64) \ /usr/lib/elfedit/$(MACH64) \ /usr/lib/fm/$(MACH64) \ @@ -530,7 +528,6 @@ SYM.DIRS64= \ /lib/secure/64 \ /usr/lib/64 \ /usr/lib/brand/sn1/64 \ - /usr/lib/brand/sngl/64 \ /usr/lib/brand/solaris10/64 \ /usr/lib/elfedit/64 \ /usr/lib/libp/64 \ @@ -642,7 +639,6 @@ $(BUILD64) $(ROOT)/usr/lib/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/elfedit/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/brand/lx/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/brand/sn1/64:= LINKDEST=$(MACH64) -$(BUILD64) $(ROOT)/usr/lib/brand/sngl/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/brand/solaris10/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/libp/64:= LINKDEST=$(MACH64) $(BUILD64) $(ROOT)/usr/lib/lwp/64:= LINKDEST=$(MACH64) diff --git a/usr/src/lib/brand/Makefile b/usr/src/lib/brand/Makefile index bd766f3f9d..cd19a0bf2c 100644 --- a/usr/src/lib/brand/Makefile +++ b/usr/src/lib/brand/Makefile @@ -33,7 +33,7 @@ include ../../Makefile.master i386_SUBDIRS= lx i386_MSGSUBDIRS= lx -SUBDIRS= shared .WAIT sn1 sngl solaris10 ipkg labeled $($(MACH)_SUBDIRS) +SUBDIRS= shared .WAIT sn1 solaris10 ipkg labeled $($(MACH)_SUBDIRS) MSGSUBDIRS= solaris10 shared $($(MACH)_MSGSUBDIRS) all := TARGET= all diff --git a/usr/src/lib/brand/sngl/Makefile b/usr/src/lib/brand/sngl/Makefile deleted file mode 100644 index 780acc21e1..0000000000 --- a/usr/src/lib/brand/sngl/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2012, Joyent, Inc. All rights reserved. -# - -default: all - -include Makefile.sngl - -# Build everything in parallel; use .WAIT for dependencies -.PARALLEL: - -SUBDIRS = sngl_brand zone -MSGSUBDIRS = zone - -all := TARGET= all -install := TARGET= install -clean := TARGET= clean -clobber := TARGET= clobber -lint := TARGET= lint -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber lint: $(SUBDIRS) - -_msg: $(MSGSUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/lib/brand/sngl/Makefile.sngl b/usr/src/lib/brand/sngl/Makefile.sngl deleted file mode 100644 index 0c7a280696..0000000000 --- a/usr/src/lib/brand/sngl/Makefile.sngl +++ /dev/null @@ -1,28 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2012 Joyent, Inc. All rights reserved. -# - -BRAND = sngl - -include $(SRC)/lib/brand/Makefile.brand - diff --git a/usr/src/lib/brand/sngl/sngl_brand/Makefile b/usr/src/lib/brand/sngl/sngl_brand/Makefile deleted file mode 100644 index 4b667e1fa8..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/Makefile +++ /dev/null @@ -1,47 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -include $(SRC)/lib/Makefile.lib - -default: all - -SUBDIRS = $(MACH) -$(BUILD64)SUBDIRS += $(MACH64) - -all := TARGET= all -clean := TARGET= clean -clobber := TARGET= clobber -install := TARGET= install -lint := TARGET= lint -_msg := TARGET= _msg - -.KEEP_STATE: - -all install clean clobber lint _msg: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: diff --git a/usr/src/lib/brand/sngl/sngl_brand/Makefile.com b/usr/src/lib/brand/sngl/sngl_brand/Makefile.com deleted file mode 100644 index 070a03dcb5..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/Makefile.com +++ /dev/null @@ -1,76 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012, Joyent, Inc. All rights reserved. -# - -LIBRARY = sngl_brand.a -VERS = .1 -COBJS = sngl_brand.o -ASOBJS = crt.o handler.o runexe.o brand_util.o -OBJECTS = $(COBJS) - -include ../../Makefile.sngl -include $(SRC)/lib/Makefile.lib - -SRCDIR = ../common -UTSBASE = $(SRC)/uts - -LIBS = $(DYNLIB) -CSRCS = $(COBJS:%o=../common/%c) -SHAREDOBJS = $(ASOBJS:%o=$(ISAOBJDIR)/%o) -SRCS = $(CSRCS) - -# -# Note that the architecture specific makefiles MUST update DYNFLAGS to -# explicitly specify an interpreter for the brand emulation library so that we -# use /lib/ld.so.1 or /lib/64/ld.so.1, which in a sngl zone is the system -# linker. -# -# Note that since the linker is used to setup processes before libc is loaded, -# it makes system calls directly (ie avoiding libc), and it makes these system -# calls before our library has been initialized. Since our library hasn't been -# initialized yet, there's no way for us to intercept and emulate any of those -# system calls. Luckily we don't have to. -# -# Note that we make sure to link our brand emulation library to libmapmalloc. -# This is required because in most cases there will be two copies of libc in -# the same process and we don't want them to fight over the heap. So for our -# brand library we link against libmapmalloc so that if we (our or copy of -# libc) try to allocate any memory it will be done via mmap() instead of brk(). -# -CPPFLAGS += -D_REENTRANT -U_ASM \ - -I. -I$(BRAND_SHARED)/brand/sys -I$(UTSBASE)/common/brand/sngl -CFLAGS += $(CCVERBOSE) -DYNFLAGS += $(DYNFLAGS_$(CLASS)) -DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start -LDLIBS += -lc -lmapmalloc - -$(LIBS):= PICS += $(SHAREDOBJS) - -.KEEP_STATE: - -all: $(LIBS) - -lint: lintcheck - -include $(SRC)/lib/Makefile.targ diff --git a/usr/src/lib/brand/sngl/sngl_brand/amd64/Makefile b/usr/src/lib/brand/sngl/sngl_brand/amd64/Makefile deleted file mode 100644 index d019eaf841..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/amd64/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012, Joyent, Inc. All rights reserved. -# - -ISAOBJDIR = $(BRAND_SHARED)/brand/amd64/pics/ - -include ../Makefile.com -include $(SRC)/lib/Makefile.lib.64 - -CPPFLAGS += -I$(BRAND_SHARED)/brand/amd64 - -# -# see ../Makefile.com for why we MUST explicity make ld.so.1 our interpreter -# -DYNFLAGS += -Wl,-I/lib/64/ld.so.1 -CPPFLAGS += -D_SYSCALL32 - -# Note that we also set the runtime path for the emulation library to point -# into /system. This is an attempt to ensure that our brand library get's the -# native version of libmapmallc. -# -DYNFLAGS += -R/lib/64 -R/system/usr/lib/64 - -CLEANFILES += $(DYNLIB) -CLOBBERFILES += $(ROOTLIBS64) - -install: all $(ROOTLIBS64) diff --git a/usr/src/lib/brand/sngl/sngl_brand/common/mapfile-vers b/usr/src/lib/brand/sngl/sngl_brand/common/mapfile-vers deleted file mode 100644 index 29800204f8..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/common/mapfile-vers +++ /dev/null @@ -1,48 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. -# - -# -# MAPFILE HEADER START -# -# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. -# Object versioning must comply with the rules detailed in -# -# usr/src/lib/README.mapfiles -# -# You should not be making modifications here until you've read the most current -# copy of that file. If you need help, contact a gatekeeper for guidance. -# -# MAPFILE HEADER END -# - -$mapfile_version 2 - -# -# Scope everything local -- our .init section is our only public interface. -# -SYMBOL_SCOPE { - local: - *; -}; diff --git a/usr/src/lib/brand/sngl/sngl_brand/common/sngl_brand.c b/usr/src/lib/brand/sngl/sngl_brand/common/sngl_brand.c deleted file mode 100644 index d2b8d8702d..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/common/sngl_brand.c +++ /dev/null @@ -1,429 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2012, Joyent, Inc. All rights reserved. - */ - -#include <errno.h> -#include <fcntl.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <strings.h> -#include <unistd.h> -#include <sys/brand.h> -#include <sys/syscall.h> -#include <sys/systm.h> -#include <sys/stat.h> -#include <libgen.h> -#include <sys/auxv.h> - -#include <sngl_brand.h> -#include <brand_misc.h> - -/* - * See usr/src/lib/brand/shared/brand/common/brand_util.c for general - * emulation notes. - */ - -#define CONF32_PATH "/system/usr/lib/brand/sngl/ld.sys.config" -#define CONF64_PATH "/system/usr/lib/brand/sngl/ld.sys64.config" - -brand_sysent_table_t brand_sysent_table[]; - -static boolean_t is_sys = B_FALSE; -static boolean_t is_crle = B_FALSE; - -typedef struct { - char *mnt_name; - dev_t mnt_id; -} sys_mnt_dev_t; - -/* - * The brand platform mounts several GZ file systems into the zone. We know - * which ones can actually be on seperate file systems, so we only stat those - * when checking for system commands. This reduces the number of stats needed - * when we start up. - */ -static sys_mnt_dev_t sys_mounts[] = { - {"/system/usr", 0}, - {"/lib", 0}, - {NULL, 0} -}; - -/* - * If this is a /sytem binary and ld.so is opening the default config file, - * then redirect so it opens the /system config file instead. We need to do it - * this way, instead of setting one of the LD_CONFIG env vars, since those - * are ignored for secure binaries. - * - * We don't redirect if we're crle so that it can still be used on the default - * config files. - */ -int -sngl_open(sysret_t *rval, char *path, int oflag, mode_t mode) -{ - char tstr[MAXPATHLEN]; - - if (is_sys && !is_crle) { - /* Get a copy of the path we're trying to open */ - bzero(tstr, sizeof (tstr)); - (void) brand_uucopystr(path, tstr, sizeof (tstr)); - - if (strcmp(tstr, "/var/ld/ld.config") == 0) - return (__systemcall(rval, SYS_open + 1024, - CONF32_PATH, oflag, mode)); - - if (strcmp(tstr, "/var/ld/64/ld.config") == 0) - return (__systemcall(rval, SYS_open + 1024, - CONF64_PATH, oflag, mode)); - } - - return (__systemcall(rval, SYS_open + 1024, path, oflag, mode)); -} - -/*ARGSUSED*/ -int -brand_init(int argc, char *argv[], char *envp[]) -{ - ulong_t ldentry; - int i; - uintptr_t *p; - auxv_t *ap; - struct stat64 buf; - char *bname; - - brand_pre_init(); - - /* - * Check if we're trying to run a system binary. - * - * We haven't installed our emulation table yet, so its safe to make - * system calls directly. - * - * First, get the /system devices, then stat the executable to see if - * its on one of the /system devs. - */ - for (i = 0; sys_mounts[i].mnt_name != NULL; i++) { - if (stat64(sys_mounts[i].mnt_name, &buf) != -1) - sys_mounts[i].mnt_id = buf.st_dev; - } - - /* Find the aux vector on the stack. */ - p = (uintptr_t *)envp; - while (*p != NULL) - p++; - p++; - - /* Find AT_SUN_EXECNAME */ - for (ap = (auxv_t *)p; ap->a_type != AT_NULL; ap++) { - if (ap->a_type != AT_SUN_EXECNAME) - continue; - if (stat64(ap->a_un.a_ptr, &buf) != -1) { - for (i = 0; sys_mounts[i].mnt_name != NULL; i++) { - if (sys_mounts[i].mnt_id == buf.st_dev) { - is_sys = B_TRUE; - bname = basename(ap->a_un.a_ptr); - if (strcmp("crle", bname) == 0) - is_crle = B_TRUE; - break; - } - } - } - break; - } - - ldentry = brand_post_init(SNGL_VERSION, argc, argv, envp); - - brand_runexe(argv, ldentry); - /*NOTREACHED*/ - brand_abort(0, "brand_runexe() returned"); - return (-1); -} - -/* - * This table must have at least NSYSCALL entries in it. - * - * The second parameter of each entry in the brand_sysent_table - * contains the number of parameters and flags that describe the - * syscall return value encoding. See the block comments at the - * top of this file for more information about the syscall return - * value flags and when they should be used. - */ -brand_sysent_table_t brand_sysent_table[] = { - NOSYS, /* 0 */ - NOSYS, /* 1 */ - NOSYS, /* 2 */ - NOSYS, /* 3 */ - NOSYS, /* 4 */ - EMULATE(sngl_open, 3 | RV_DEFAULT), /* 5 */ - NOSYS, /* 6 */ - NOSYS, /* 7 */ - NOSYS, /* 8 */ - NOSYS, /* 9 */ - NOSYS, /* 10 */ - NOSYS, /* 11 */ - NOSYS, /* 12 */ - NOSYS, /* 13 */ - NOSYS, /* 14 */ - NOSYS, /* 15 */ - NOSYS, /* 16 */ - NOSYS, /* 17 */ - NOSYS, /* 18 */ - NOSYS, /* 19 */ - NOSYS, /* 20 */ - NOSYS, /* 21 */ - NOSYS, /* 22 */ - NOSYS, /* 23 */ - NOSYS, /* 24 */ - NOSYS, /* 25 */ - NOSYS, /* 26 */ - NOSYS, /* 27 */ - NOSYS, /* 28 */ - NOSYS, /* 29 */ - NOSYS, /* 30 */ - NOSYS, /* 31 */ - NOSYS, /* 32 */ - NOSYS, /* 33 */ - NOSYS, /* 34 */ - NOSYS, /* 35 */ - NOSYS, /* 36 */ - NOSYS, /* 37 */ - NOSYS, /* 38 */ - NOSYS, /* 39 */ - NOSYS, /* 40 */ - NOSYS, /* 41 */ - NOSYS, /* 42 */ - NOSYS, /* 43 */ - NOSYS, /* 44 */ - NOSYS, /* 45 */ - NOSYS, /* 46 */ - NOSYS, /* 47 */ - NOSYS, /* 48 */ - NOSYS, /* 49 */ - NOSYS, /* 50 */ - NOSYS, /* 51 */ - NOSYS, /* 52 */ - NOSYS, /* 53 */ - NOSYS, /* 54 */ - NOSYS, /* 55 */ - NOSYS, /* 56 */ - NOSYS, /* 57 */ - NOSYS, /* 58 */ - NOSYS, /* 59 */ - NOSYS, /* 60 */ - NOSYS, /* 61 */ - NOSYS, /* 62 */ - NOSYS, /* 63 */ - NOSYS, /* 64 */ - NOSYS, /* 65 */ - NOSYS, /* 66 */ - NOSYS, /* 67 */ - NOSYS, /* 68 */ - NOSYS, /* 69 */ - NOSYS, /* 70 */ - NOSYS, /* 71 */ - NOSYS, /* 72 */ - NOSYS, /* 73 */ - NOSYS, /* 74 */ - NOSYS, /* 75 */ - NOSYS, /* 76 */ - NOSYS, /* 77 */ - NOSYS, /* 78 */ - NOSYS, /* 79 */ - NOSYS, /* 80 */ - NOSYS, /* 81 */ - NOSYS, /* 82 */ - NOSYS, /* 83 */ - NOSYS, /* 84 */ - NOSYS, /* 85 */ - NOSYS, /* 86 */ - NOSYS, /* 87 */ - NOSYS, /* 88 */ - NOSYS, /* 89 */ - NOSYS, /* 90 */ - NOSYS, /* 91 */ - NOSYS, /* 92 */ - NOSYS, /* 93 */ - NOSYS, /* 94 */ - NOSYS, /* 95 */ - NOSYS, /* 96 */ - NOSYS, /* 97 */ - NOSYS, /* 98 */ - NOSYS, /* 99 */ - NOSYS, /* 100 */ - NOSYS, /* 101 */ - NOSYS, /* 102 */ - NOSYS, /* 103 */ - NOSYS, /* 104 */ - NOSYS, /* 105 */ - NOSYS, /* 106 */ - NOSYS, /* 107 */ - NOSYS, /* 108 */ - NOSYS, /* 109 */ - NOSYS, /* 110 */ - NOSYS, /* 111 */ - NOSYS, /* 112 */ - NOSYS, /* 113 */ - NOSYS, /* 114 */ - NOSYS, /* 115 */ - NOSYS, /* 116 */ - NOSYS, /* 117 */ - NOSYS, /* 118 */ - NOSYS, /* 119 */ - NOSYS, /* 120 */ - NOSYS, /* 121 */ - NOSYS, /* 122 */ - NOSYS, /* 123 */ - NOSYS, /* 124 */ - NOSYS, /* 125 */ - NOSYS, /* 126 */ - NOSYS, /* 127 */ - NOSYS, /* 128 */ - NOSYS, /* 129 */ - NOSYS, /* 130 */ - NOSYS, /* 131 */ - NOSYS, /* 132 */ - NOSYS, /* 133 */ - NOSYS, /* 134 */ - NOSYS, /* 135 */ - NOSYS, /* 136 */ - NOSYS, /* 137 */ - NOSYS, /* 138 */ - NOSYS, /* 139 */ - NOSYS, /* 140 */ - NOSYS, /* 141 */ - NOSYS, /* 142 */ - NOSYS, /* 143 */ - NOSYS, /* 144 */ - NOSYS, /* 145 */ - NOSYS, /* 146 */ - NOSYS, /* 147 */ - NOSYS, /* 148 */ - NOSYS, /* 149 */ - NOSYS, /* 150 */ - NOSYS, /* 151 */ - NOSYS, /* 152 */ - NOSYS, /* 153 */ - NOSYS, /* 154 */ - NOSYS, /* 155 */ - NOSYS, /* 156 */ - NOSYS, /* 157 */ - NOSYS, /* 158 */ - NOSYS, /* 159 */ - NOSYS, /* 160 */ - NOSYS, /* 161 */ - NOSYS, /* 162 */ - NOSYS, /* 163 */ - NOSYS, /* 164 */ - NOSYS, /* 165 */ - NOSYS, /* 166 */ - NOSYS, /* 167 */ - NOSYS, /* 168 */ - NOSYS, /* 169 */ - NOSYS, /* 170 */ - NOSYS, /* 171 */ - NOSYS, /* 172 */ - NOSYS, /* 173 */ - NOSYS, /* 174 */ - NOSYS, /* 175 */ - NOSYS, /* 176 */ - NOSYS, /* 177 */ - NOSYS, /* 178 */ - NOSYS, /* 179 */ - NOSYS, /* 180 */ - NOSYS, /* 181 */ - NOSYS, /* 182 */ - NOSYS, /* 183 */ - NOSYS, /* 184 */ - NOSYS, /* 185 */ - NOSYS, /* 186 */ - NOSYS, /* 187 */ - NOSYS, /* 188 */ - NOSYS, /* 189 */ - NOSYS, /* 190 */ - NOSYS, /* 191 */ - NOSYS, /* 192 */ - NOSYS, /* 193 */ - NOSYS, /* 194 */ - NOSYS, /* 195 */ - NOSYS, /* 196 */ - NOSYS, /* 197 */ - NOSYS, /* 198 */ - NOSYS, /* 199 */ - NOSYS, /* 200 */ - NOSYS, /* 201 */ - NOSYS, /* 202 */ - NOSYS, /* 203 */ - NOSYS, /* 204 */ - NOSYS, /* 205 */ - NOSYS, /* 206 */ - NOSYS, /* 207 */ - NOSYS, /* 208 */ - NOSYS, /* 209 */ - NOSYS, /* 210 */ - NOSYS, /* 211 */ - NOSYS, /* 212 */ - NOSYS, /* 213 */ - NOSYS, /* 214 */ - NOSYS, /* 215 */ - NOSYS, /* 216 */ - NOSYS, /* 217 */ - NOSYS, /* 218 */ - NOSYS, /* 219 */ - NOSYS, /* 220 */ - NOSYS, /* 221 */ - NOSYS, /* 222 */ - NOSYS, /* 223 */ - NOSYS, /* 224 */ - NOSYS, /* 225 */ - NOSYS, /* 226 */ - NOSYS, /* 227 */ - NOSYS, /* 228 */ - NOSYS, /* 229 */ - NOSYS, /* 230 */ - NOSYS, /* 231 */ - NOSYS, /* 232 */ - NOSYS, /* 233 */ - NOSYS, /* 234 */ - NOSYS, /* 235 */ - NOSYS, /* 236 */ - NOSYS, /* 237 */ - NOSYS, /* 238 */ - NOSYS, /* 239 */ - NOSYS, /* 240 */ - NOSYS, /* 241 */ - NOSYS, /* 242 */ - NOSYS, /* 243 */ - NOSYS, /* 244 */ - NOSYS, /* 245 */ - NOSYS, /* 246 */ - NOSYS, /* 247 */ - NOSYS, /* 248 */ - NOSYS, /* 249 */ - NOSYS, /* 250 */ - NOSYS, /* 251 */ - NOSYS, /* 252 */ - NOSYS, /* 253 */ - NOSYS, /* 254 */ - NOSYS /* 255 */ -}; diff --git a/usr/src/lib/brand/sngl/sngl_brand/i386/Makefile b/usr/src/lib/brand/sngl/sngl_brand/i386/Makefile deleted file mode 100644 index a0c4927252..0000000000 --- a/usr/src/lib/brand/sngl/sngl_brand/i386/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012, Joyent, Inc. All rights reserved. -# - -ISAOBJDIR = $(BRAND_SHARED)/brand/i386/pics - -include ../Makefile.com - -CPPFLAGS += -I$(BRAND_SHARED)/brand/i386 - -# -# see ../Makefile.com for why we explicity make ld.so.1 our interpreter -# -DYNFLAGS += -Wl,-I/lib/ld.so.1 - -# Note that we also set the runtime path for the emulation library to point -# into /system. This is an attempt to ensure that our brand library get's the -# native version of libmapmallc. -# -DYNFLAGS += -R/lib -R/system/usr/lib - -CLEANFILES += $(DYNLIB) -CLOBBERFILES += $(ROOTLIBS) - -install: all $(ROOTLIBS) diff --git a/usr/src/lib/brand/sngl/zone/Makefile b/usr/src/lib/brand/sngl/zone/Makefile deleted file mode 100644 index 42785deab3..0000000000 --- a/usr/src/lib/brand/sngl/zone/Makefile +++ /dev/null @@ -1,53 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright 2012 Joyent, Inc. All rights reserved. -# - -PROGS = sinstall -XMLDOCS= config.xml platform.xml -CLOBBERFILES= $(ROOTPROGS) $(ROOTXMLDOCS) - -include $(SRC)/cmd/Makefile.cmd -include ../Makefile.sngl - -.KEEP_STATE: - -all: $(PROGS) - -POFILES = -POFILE = - -install: $(PROGS) $(ROOTPROGS) $(ROOTXMLDOCS) - crle -c $(ROOTBRANDDIR)/ld.sys.config \ - -l /lib:/system/usr/lib \ - -s /lib/secure:/system/usr/lib/secure - crle -64 -c $(ROOTBRANDDIR)/ld.sys64.config \ - -l /lib/64:/system/usr/lib/64 \ - -s /lib/secure/64:/system/usr/lib/secure/64 - -lint: - -clean: - -$(RM) $(PROGS) - -include $(SRC)/cmd/Makefile.targ diff --git a/usr/src/lib/brand/sngl/zone/config.xml b/usr/src/lib/brand/sngl/zone/config.xml deleted file mode 100644 index b19f42932a..0000000000 --- a/usr/src/lib/brand/sngl/zone/config.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0"?> - -<!-- - CDDL HEADER START - - The contents of this file are subject to the terms of the - 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. - See the License for the specific language governing permissions - and limitations under the License. - - When distributing Covered Code, include this CDDL HEADER in each - file and include the License file at usr/src/OPENSOLARIS.LICENSE. - If applicable, add the following below this CDDL HEADER, with the - fields enclosed by brackets "[]" replaced with your own identifying - information: Portions Copyright [yyyy] [name of copyright owner] - - CDDL HEADER END - - Copyright 2015 Joyent, Inc. All rights reserved. - Use is subject to license terms. - - DO NOT EDIT THIS FILE. ---> - -<!DOCTYPE brand PUBLIC "-//Joyent Inc//DTD Brands//EN" - "file:///usr/share/lib/xml/dtd/brand.dtd.1"> - -<brand name="sngl"> - <modname>sngl_brand</modname> - - <initname>/system/sbin/init</initname> - <login_cmd>/system/usr/bin/login -z %Z %u</login_cmd> - <forcedlogin_cmd>/system/usr/bin/login -z %Z -f %u</forcedlogin_cmd> - <user_cmd>/system/usr/bin/getent passwd %u</user_cmd> - - <install>/usr/lib/brand/sngl/sinstall -z %z -R %R</install> - <installopts>R:t:U:q:z:</installopts> - <boot></boot> - <halt></halt> - <verify_cfg></verify_cfg> - <verify_adm></verify_adm> - <postclone></postclone> - <postinstall></postinstall> - <attach>/bin/true</attach> - <detach>/bin/true</detach> - <clone></clone> - <uninstall>/usr/lib/brand/joyent/juninstall -z %z -R %R</uninstall> - <prestatechange>/usr/lib/brand/joyent/prestate %z %R</prestatechange> - <poststatechange>/usr/lib/brand/joyent/poststate %z %R</poststatechange> - <query>/usr/lib/brand/joyent/query %z %R</query> - - <privilege set="default" name="contract_event" /> - <privilege set="default" name="contract_identity" /> - <privilege set="default" name="contract_observer" /> - <privilege set="default" name="dtrace_proc" /> - <privilege set="default" name="dtrace_user" /> - <privilege set="default" name="file_chown" /> - <privilege set="default" name="file_chown_self" /> - <privilege set="default" name="file_dac_execute" /> - <privilege set="default" name="file_dac_read" /> - <privilege set="default" name="file_dac_search" /> - <privilege set="default" name="file_dac_write" /> - <privilege set="default" name="file_owner" /> - <privilege set="default" name="file_setid" /> - <privilege set="default" name="ipc_dac_read" /> - <privilege set="default" name="ipc_dac_write" /> - <privilege set="default" name="ipc_owner" /> - <privilege set="default" name="net_bindmlp" /> - <privilege set="default" name="net_icmpaccess" /> - <privilege set="default" name="net_mac_aware" /> - <privilege set="default" name="net_observability" /> - <privilege set="default" name="net_privaddr" /> - <privilege set="default" name="net_rawaccess" ip-type="exclusive" /> - <privilege set="default" name="proc_chroot" /> - <privilege set="default" name="sys_audit" /> - <privilege set="default" name="proc_audit" /> - <privilege set="default" name="proc_lock_memory" /> - <privilege set="default" name="proc_owner" /> - <privilege set="default" name="proc_prioup" /> - <privilege set="default" name="proc_setid" /> - <privilege set="default" name="proc_taskid" /> - <privilege set="default" name="sys_acct" /> - <privilege set="default" name="sys_admin" /> - <privilege set="default" name="sys_fs_import" /> - <privilege set="default" name="sys_ip_config" ip-type="exclusive" /> - <privilege set="default" name="sys_iptun_config" ip-type="exclusive" /> - <privilege set="default" name="sys_mount" /> - <privilege set="default" name="sys_nfs" /> - <privilege set="default" name="sys_resource" /> - <privilege set="default" name="sys_ppp_config" ip-type="exclusive" /> - - <privilege set="prohibited" name="dtrace_kernel" /> - <privilege set="prohibited" name="proc_zone" /> - <privilege set="prohibited" name="sys_config" /> - <privilege set="prohibited" name="sys_devices" /> - <privilege set="prohibited" name="sys_ip_config" ip-type="shared" /> - <privilege set="prohibited" name="sys_linkdir" /> - <privilege set="prohibited" name="sys_net_config" /> - <privilege set="prohibited" name="sys_res_config" /> - <privilege set="prohibited" name="sys_suser_compat" /> - <privilege set="prohibited" name="xvm_control" /> - <privilege set="prohibited" name="virt_manage" /> - <privilege set="prohibited" name="sys_ppp_config" ip-type="shared" /> - - <privilege set="required" name="proc_exec" /> - <privilege set="required" name="proc_fork" /> - <privilege set="required" name="sys_ip_config" ip-type="exclusive" /> - <privilege set="required" name="sys_mount" /> -</brand> diff --git a/usr/src/lib/brand/sngl/zone/platform.xml b/usr/src/lib/brand/sngl/zone/platform.xml deleted file mode 100644 index 94ba5ca59c..0000000000 --- a/usr/src/lib/brand/sngl/zone/platform.xml +++ /dev/null @@ -1,161 +0,0 @@ -<?xml version="1.0"?> - -<!-- - CDDL HEADER START - - The contents of this file are subject to the terms of the - 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. - See the License for the specific language governing permissions - and limitations under the License. - - When distributing Covered Code, include this CDDL HEADER in each - file and include the License file at usr/src/OPENSOLARIS.LICENSE. - If applicable, add the following below this CDDL HEADER, with the - fields enclosed by brackets "[]" replaced with your own identifying - information: Portions Copyright [yyyy] [name of copyright owner] - - CDDL HEADER END - - Copyright (c) 2012 Joyent, Inc. All rights reserved. - Use is subject to license terms. - - DO NOT EDIT THIS FILE. ---> - -<!DOCTYPE platform PUBLIC "-//Joyent Inc//Zones Platform//EN" - "file:///usr/share/lib/xml/dtd/zone_platform.dtd.1"> - -<platform name="sngl" allow-exclusive-ip="true"> - - <!-- Global filesystems to mount when booting the zone --> - <global_mount special="/dev" directory="/dev" type="dev" - opt="attrdir=%R/root/dev"/> - - <global_mount special="/lib" directory="/lib" - opt="ro,nodevices" type="lofs" /> - <global_mount special="%P/manifests/joyent" - directory="/lib/svc/manifest" - opt="ro,nodevices" type="lofs" /> - <global_mount special="%R/site" directory="/lib/svc/manifest/site" - opt="nodevices" type="lofs" /> - <global_mount special="/sbin" directory="/sbin" - opt="ro,nodevices" type="lofs" /> - <global_mount special="/lib" directory="/system/lib" - opt="ro,nodevices" type="lofs" /> - <global_mount special="/sbin" directory="/system/sbin" - opt="ro,nodevices" type="lofs" /> - <global_mount special="/usr" directory="/system/usr" - opt="ro,nodevices" type="lofs" /> - - <!-- Local filesystems to mount when booting the zone --> - <mount special="/proc" directory="/proc" type="proc" /> - <mount special="ctfs" directory="/system/contract" type="ctfs" /> - <mount special="mnttab" directory="/etc/mnttab" type="mntfs" /> - <mount special="objfs" directory="/system/object" type="objfs" /> - <mount special="lxproc" directory="/system/lxproc" type="lxproc" /> - <mount special="swap" directory="/etc/svc/volatile" type="tmpfs" /> - - <!-- Devices to create under /dev --> - <device match="arp" /> - <device match="bpf" /> - <device match="conslog" /> - <device match="cpu/self/cpuid" /> - <device match="crypto" /> - <device match="cryptoadm" /> - <device match="dsk" /> - <device match="dtrace/*" /> - <device match="dtrace/provider/*" /> - <device match="fd" /> - <device match="ipnet" /> - <device match="kstat" /> - <device match="lo0" /> - <device match="lofictl" /> - <device match="lofi" /> - <device match="log" /> - <device match="logindmux" /> - <device match="nsmb" /> - <device match="net/*" /> - <device match="null" /> - <device match="openprom" arch="sparc" /> - <device match="poll" /> - <device match="pool" /> - <device match="ptmx" /> - <device match="pts/*" /> - <device match="random" /> - <device match="rdsk" /> - <device match="rlofi" /> - <device match="rmt" /> - <device match="sad/user" /> - <device match="svvslo0" /> - <device match="svvslo1" /> - <device match="svvslo2" /> - <device match="svvslo3" /> - <device match="swap" /> - <device match="sysevent" /> - <device match="tap" /> - <device match="tcp" /> - <device match="tcp6" /> - <device match="term" /> - <device match="ticlts" /> - <device match="ticots" /> - <device match="ticotsord" /> - <device match="tty" /> - <device match="tun" /> - <device match="udp" /> - <device match="udp6" /> - <device match="urandom" /> - <device match="vnd/*" /> - <device match="zero" /> - <device match="zfs" /> - <device match="zvol/dsk/%P/%z/*" /> - <device match="zvol/rdsk/%P/%z/*" /> - - <!-- Devices to create in exclusive IP zone only --> - <device match="dld" ip-type="exclusive" /> - <device match="icmp" ip-type="exclusive" /> - <device match="icmp6" ip-type="exclusive" /> - <device match="ip" ip-type="exclusive" /> - <device match="ip6" ip-type="exclusive" /> - <device match="ipauth" ip-type="exclusive" /> - <device match="ipd" ip-type="exclusive" /> - <device match="ipf" ip-type="exclusive" /> - <device match="ipl" ip-type="exclusive" /> - <device match="iplookup" ip-type="exclusive" /> - <device match="ipmpstub" ip-type="exclusive" /> - <device match="ipnat" ip-type="exclusive" /> - <device match="ipscan" ip-type="exclusive" /> - <device match="ipsecah" ip-type="exclusive" /> - <device match="ipsecesp" ip-type="exclusive" /> - <device match="ipstate" ip-type="exclusive" /> - <device match="ipsync" ip-type="exclusive" /> - <device match="keysock" ip-type="exclusive" /> - <device match="rawip" ip-type="exclusive" /> - <device match="rawip6" ip-type="exclusive" /> - <device match="rts" ip-type="exclusive" /> - <device match="sad/admin" ip-type="exclusive" /> - <device match="sctp" ip-type="exclusive" /> - <device match="sctp6" ip-type="exclusive" /> - <device match="spdsock" ip-type="exclusive" /> - <device match="sppp" ip-type="exclusive" /> - <device match="sppptun" ip-type="exclusive" /> - <device match="vni" ip-type="exclusive" /> - - <!-- Renamed devices to create under /dev --> - <device match="zcons/%z/zoneconsole" name="zconsole" /> - - <!-- Symlinks to create under /dev --> - <symlink source="console" target="zconsole" /> - <symlink source="dtremote" target="/dev/null" /> - <symlink source="msglog" target="zconsole" /> - <symlink source="stderr" target="./fd/2" /> - <symlink source="stdin" target="./fd/0" /> - <symlink source="stdout" target="./fd/1" /> - <symlink source="syscon" target="zconsole" /> - <symlink source="sysmsg" target="zconsole" /> - <symlink source="systty" target="zconsole" /> - -</platform> diff --git a/usr/src/lib/brand/sngl/zone/sinstall.sh b/usr/src/lib/brand/sngl/zone/sinstall.sh deleted file mode 100644 index 4928c36304..0000000000 --- a/usr/src/lib/brand/sngl/zone/sinstall.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/ksh -p -# -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright (c) 2014 Joyent, Inc. All rights reserved. -# - -# Does this brand support reprovisioning? -# jst_reprovision="yes" - -# Is a template image optional? -# jst_tmplopt="yes" - -. /usr/lib/brand/jcommon/libhooks.ksh - -function jcommon_attach_hook -{ - jattach_zone_final_setup -} - -. /usr/lib/brand/jcommon/cinstall diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules index e16f69e4d1..8d6e0d19be 100644 --- a/usr/src/uts/common/Makefile.rules +++ b/usr/src/uts/common/Makefile.rules @@ -109,10 +109,6 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/brand/sn1/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) -$(OBJS_DIR)/%.o: $(UTSBASE)/common/brand/sngl/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) - $(OBJS_DIR)/%.o: $(UTSBASE)/common/brand/solaris10/%.c $(COMPILE.c) -o $@ $< $(CTFCONVERT_O) @@ -1727,9 +1723,6 @@ $(LINTS_DIR)/%.ln: $(COMMONBASE)/ucode/%.c $(LINTS_DIR)/%.ln: $(UTSBASE)/common/brand/sn1/%.c @($(LHEAD) $(LINT.c) $< $(LTAIL)) -$(LINTS_DIR)/%.ln: $(UTSBASE)/common/brand/sngl/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) - $(LINTS_DIR)/%.ln: $(UTSBASE)/common/brand/solaris10/%.c @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/common/brand/sngl/sngl_brand.c b/usr/src/uts/common/brand/sngl/sngl_brand.c deleted file mode 100644 index 4a21cd1b6b..0000000000 --- a/usr/src/uts/common/brand/sngl/sngl_brand.c +++ /dev/null @@ -1,276 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2015, Joyent, Inc. All rights reserved. - */ - -#include <sys/errno.h> -#include <sys/exec.h> -#include <sys/file.h> -#include <sys/kmem.h> -#include <sys/modctl.h> -#include <sys/model.h> -#include <sys/proc.h> -#include <sys/syscall.h> -#include <sys/systm.h> -#include <sys/thread.h> -#include <sys/cmn_err.h> -#include <sys/archsystm.h> -#include <sys/pathname.h> -#include <sys/sunddi.h> - -#include <sys/machbrand.h> -#include <sys/brand.h> -#include "sngl_brand.h" - -char *sngl_emulation_table = NULL; - -void sngl_init_brand_data(zone_t *); -void sngl_free_brand_data(zone_t *); -void sngl_setbrand(proc_t *); -int sngl_getattr(zone_t *, int, void *, size_t *); -int sngl_setattr(zone_t *, int, void *, size_t); -int sngl_brandsys(int, int64_t *, uintptr_t, uintptr_t, uintptr_t, - uintptr_t, uintptr_t); -void sngl_copy_procdata(proc_t *, proc_t *); -void sngl_proc_exit(struct proc *); -void sngl_exec(); -void sngl_initlwp(klwp_t *, void *); -void sngl_forklwp(klwp_t *, klwp_t *); -void sngl_freelwp(klwp_t *); -void sngl_lwpexit(klwp_t *); -int sngl_elfexec(vnode_t *, execa_t *, uarg_t *, intpdata_t *, int, - long *, int, caddr_t, cred_t *, int *); - -/* SNGL brand */ -struct brand_ops sngl_brops = { - sngl_init_brand_data, /* b_init_brand_data */ - sngl_free_brand_data, /* b_free_brand_data */ - sngl_brandsys, /* b_brandsys */ - sngl_setbrand, /* b_setbrand */ - sngl_getattr, /* b_getattr */ - sngl_setattr, /* b_setattr */ - sngl_copy_procdata, /* b_copy_procdata */ - sngl_proc_exit, /* b_proc_exit */ - sngl_exec, /* b_exec */ - lwp_setrval, /* b_lwp_setrval */ - NULL, /* b_lwpdata_alloc */ - NULL, /* b_lwpdata_free */ - sngl_initlwp, /* b_initlwp */ - NULL, /* b_initlwp_post */ - sngl_forklwp, /* b_forklwp */ - sngl_freelwp, /* b_freelwp */ - sngl_lwpexit, /* b_lwpexit */ - sngl_elfexec, /* b_elfexec */ - NULL, /* b_sigset_native_to_brand */ - NULL, /* b_sigset_brand_to_native */ - NULL, /* b_sigfd_translate */ - NSIG, /* b_nsig */ - NULL, /* b_exit_with_sig */ - NULL, /* b_wait_filter */ - NULL, /* b_native_exec */ - NULL, /* b_map32limit */ - NULL, /* b_stop_notify */ - NULL, /* b_waitid_helper */ - NULL, /* b_sigcld_repost */ - NULL, /* b_issig_stop */ - NULL, /* b_sig_ignorable */ - NULL, /* b_savecontext */ -#if defined(_SYSCALL32_IMPL) - NULL, /* b_savecontext32 */ -#endif - NULL, /* b_restorecontext */ - NULL, /* b_sendsig_stack */ - NULL, /* b_sendsig */ - NULL, /* b_setid_clear */ - NULL /* b_pagefault */ -}; - -#ifdef __amd64 - -struct brand_mach_ops sngl_mops = { - sngl_brand_sysenter_callback, - sngl_brand_int91_callback, - sngl_brand_syscall_callback, - sngl_brand_syscall32_callback, - NULL -}; - -#else /* ! __amd64 */ - -struct brand_mach_ops sngl_mops = { - sngl_brand_sysenter_callback, - NULL, - sngl_brand_syscall_callback, - NULL, - NULL -}; -#endif /* __amd64 */ - -struct brand sngl_brand = { - BRAND_VER_1, - "sngl", - &sngl_brops, - &sngl_mops, - sizeof (brand_proc_data_t), -}; - -static struct modlbrand modlbrand = { - &mod_brandops, /* type of module */ - "SNGL Brand", /* description of module */ - &sngl_brand /* driver ops */ -}; - -static struct modlinkage modlinkage = { - MODREV_1, (void *)&modlbrand, NULL -}; - -void -sngl_setbrand(proc_t *p) -{ - brand_solaris_setbrand(p, &sngl_brand); -} - -/*ARGSUSED*/ -int -sngl_getattr(zone_t *zone, int attr, void *buf, size_t *bufsize) -{ - return (EINVAL); -} - -/*ARGSUSED*/ -int -sngl_setattr(zone_t *zone, int attr, void *buf, size_t bufsize) -{ - return (EINVAL); -} - -/*ARGSUSED*/ -int -sngl_brandsys(int cmd, int64_t *rval, uintptr_t arg1, uintptr_t arg2, - uintptr_t arg3, uintptr_t arg4, uintptr_t arg5) -{ - int res; - - *rval = 0; - res = brand_solaris_cmd(cmd, arg1, arg2, arg3, &sngl_brand, - SNGL_VERSION); - if (res >= 0) - return (res); - - return (EINVAL); -} - -void -sngl_copy_procdata(proc_t *child, proc_t *parent) -{ - brand_solaris_copy_procdata(child, parent, &sngl_brand); -} - -void -sngl_proc_exit(struct proc *p) -{ - brand_solaris_proc_exit(p, &sngl_brand); -} - -void -sngl_exec() -{ - brand_solaris_exec(&sngl_brand); -} - -void -sngl_initlwp(klwp_t *l, void *bd) -{ - brand_solaris_initlwp(l, &sngl_brand); -} - -void -sngl_forklwp(klwp_t *p, klwp_t *c) -{ - brand_solaris_forklwp(p, c, &sngl_brand); -} - -void -sngl_freelwp(klwp_t *l) -{ - brand_solaris_freelwp(l, &sngl_brand); -} - -void -sngl_lwpexit(klwp_t *l) -{ - brand_solaris_lwpexit(l, &sngl_brand); -} - -void -sngl_free_brand_data(zone_t *zone) -{ -} - -void -sngl_init_brand_data(zone_t *zone) -{ -} - -int -sngl_elfexec(vnode_t *vp, execa_t *uap, uarg_t *args, intpdata_t *idatap, - int level, long *execsz, int setid, caddr_t exec_file, cred_t *cred, - int *brand_action) -{ - return (brand_solaris_elfexec(vp, uap, args, idatap, level, execsz, - setid, exec_file, cred, brand_action, &sngl_brand, SNGL_BRANDNAME, - SNGL_LIB, SNGL_LIB32)); -} - -int -_init(void) -{ - int err; - - /* - * Set up the table to interpose on open. - */ - sngl_emulation_table = kmem_zalloc(NSYSCALL, KM_SLEEP); - sngl_emulation_table[SYS_open] = 1; /* 5 */ - - err = mod_install(&modlinkage); - if (err) { - cmn_err(CE_WARN, "Couldn't install brand module"); - kmem_free(sngl_emulation_table, NSYSCALL); - } - - return (err); -} - -int -_info(struct modinfo *modinfop) -{ - return (mod_info(&modlinkage, modinfop)); -} - -int -_fini(void) -{ - return (brand_solaris_fini(&sngl_emulation_table, &modlinkage, - &sngl_brand)); -} diff --git a/usr/src/uts/common/brand/sngl/sngl_brand.h b/usr/src/uts/common/brand/sngl/sngl_brand.h deleted file mode 100644 index 7c6cbd5412..0000000000 --- a/usr/src/uts/common/brand/sngl/sngl_brand.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2014, Joyent, Inc. All rights reserved. - */ - -#ifndef _SNGL_BRAND_H -#define _SNGL_BRAND_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/brand.h> - -#define SNGL_BRANDNAME "sngl" - -#define SNGL_VERSION 1 - -#define SNGL_LIB_NAME "sngl_brand.so.1" -#define SNGL_LIB32 "/system/usr/lib/" SNGL_LIB_NAME -#define SNGL_LIB64 "/system/usr/lib/64/" SNGL_LIB_NAME - -#if defined(_LP64) -#define SNGL_LIB SNGL_LIB64 -#else /* !_LP64 */ -#define SNGL_LIB SNGL_LIB32 -#endif /* !_LP64 */ - -#if defined(_KERNEL) - -void sngl_brand_syscall_callback(void); -void sngl_brand_sysenter_callback(void); - -#if defined(__amd64) -void sngl_brand_syscall32_callback(void); -void sngl_brand_int91_callback(void); -#endif /* __amd64 */ - -#endif /* _KERNEL */ - -#ifdef __cplusplus -} -#endif - -#endif /* _SNGL_BRAND_H */ diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files index 337ad94679..9a0a9d73c9 100644 --- a/usr/src/uts/intel/Makefile.files +++ b/usr/src/uts/intel/Makefile.files @@ -288,7 +288,6 @@ IOMMULIB_OBJS = iommulib.o # Brand modules # SN1_BRAND_OBJS = sn1_brand.o sn1_brand_asm.o -SNGL_BRAND_OBJS = sngl_brand.o sngl_brand_asm.o S10_BRAND_OBJS = s10_brand.o s10_brand_asm.o LX_BRAND_OBJS = \ lx_aio.o \ diff --git a/usr/src/uts/intel/Makefile.intel b/usr/src/uts/intel/Makefile.intel index 7972c61df2..78c2801cd2 100644 --- a/usr/src/uts/intel/Makefile.intel +++ b/usr/src/uts/intel/Makefile.intel @@ -526,7 +526,7 @@ MISC_KMODS += md_sp # # Brand modules # -BRAND_KMODS += sn1_brand sngl_brand s10_brand lx_brand +BRAND_KMODS += sn1_brand s10_brand lx_brand DRV_KMODS += lx_systrace lx_ptm lx_audio lx_netlink # diff --git a/usr/src/uts/intel/Makefile.rules b/usr/src/uts/intel/Makefile.rules index 65c31ba168..247fe0dffc 100644 --- a/usr/src/uts/intel/Makefile.rules +++ b/usr/src/uts/intel/Makefile.rules @@ -61,9 +61,6 @@ $(OBJS_DIR)/%.o: $(SRC)/common/util/i386/%.s $(OBJS_DIR)/%.o: $(UTSBASE)/intel/brand/sn1/%.s $(COMPILE.s) -o $@ $< -$(OBJS_DIR)/%.o: $(UTSBASE)/intel/brand/sngl/%.s - $(COMPILE.s) -o $@ $< - $(OBJS_DIR)/%.o: $(UTSBASE)/intel/brand/solaris10/%.s $(COMPILE.s) -o $@ $< @@ -326,9 +323,6 @@ $(LINTS_DIR)/%.ln: $(SRC)/common/util/i386/%.s $(LINTS_DIR)/%.ln: $(UTSBASE)/intel/brand/sn1/%.s @($(LHEAD) $(LINT.s) $< $(LTAIL)) -$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/brand/sngl/%.s - @($(LHEAD) $(LINT.s) $< $(LTAIL)) - $(LINTS_DIR)/%.ln: $(UTSBASE)/intel/brand/solaris10/%.s @($(LHEAD) $(LINT.s) $< $(LTAIL)) diff --git a/usr/src/uts/intel/brand/sngl/sngl_brand_asm.s b/usr/src/uts/intel/brand/sngl/sngl_brand_asm.s deleted file mode 100644 index 90932a9d6d..0000000000 --- a/usr/src/uts/intel/brand/sngl/sngl_brand_asm.s +++ /dev/null @@ -1,31 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * 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. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2012, Joyent, Inc. All rights reserved. - */ - -#define XXX_emulation_table sngl_emulation_table -#define XXX_brand_syscall32_callback sngl_brand_syscall32_callback -#define XXX_brand_syscall_callback sngl_brand_syscall_callback -#define XXX_brand_sysenter_callback sngl_brand_sysenter_callback -#define XXX_brand_int91_callback sngl_brand_int91_callback - -#include "../common/brand_solaris.s" diff --git a/usr/src/uts/intel/sngl_brand/Makefile b/usr/src/uts/intel/sngl_brand/Makefile deleted file mode 100644 index cec2141e89..0000000000 --- a/usr/src/uts/intel/sngl_brand/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2012, Joyent, Inc. All rights reserved. -# -# This makefile drives the production of the kernel component of -# the SNGL brand -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. -SNGL_BASE = $(UTSBASE)/common/brand/sngl - -# -# Define the module and object file sets. -# -MODULE = sngl_brand -OBJECTS = $(SNGL_BRAND_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(SNGL_BRAND_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(USR_BRAND_DIR)/$(MODULE) - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets -# -ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) - - -# -# Update compiler variables. -# -INC_PATH += -I$(SNGL_BASE) -I$(OBJS_DIR) -AS_INC_PATH += -I$(UTSBASE)/i86pc/genassym/$(OBJS_DIR) -LDFLAGS += -dy -Nexec/elfexec - -# -# Ugh, this is a gross hack. sngl_brand_asm.s uses lots of defines -# to simplify variable access. All these defines work fine for amd64 -# compiles because when compiling for amd64 we use the GNU assembler, -# gas. For 32-bit code we use the Sun assembler, as. Unfortunatly -# as does not handle certian constructs that gas does. So rather than -# make our code less readable, we'll just use gas to compile our 32-bit -# code as well. -# -i386_AS = $(amd64_AS) - -# -# Default build targets. -# -.KEEP_STATE: - -def: $(DEF_DEPS) - -all: $(ALL_DEPS) - -clean: $(CLEAN_DEPS) - -clobber: $(CLOBBER_DEPS) - -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - -install: $(INSTALL_DEPS) - -# -# Include common targets. -# -include $(UTSBASE)/intel/Makefile.targ |