Mercurial > illumos > illumos-gate
changeset 13244:664a5b7b18e3
298 SPARC build fails in smt_pause.o
Reviewed by: gwr@nexenta.com
Reviewed by: albert.lee@nexenta.com
Reviewed by: estseg@gmail.com
Approved by: gwr@nexenta.com
author | Garrett D'Amore <garrett@nexenta.com> |
---|---|
date | Fri, 19 Nov 2010 19:58:46 +0100 |
parents | 259bb55df8a9 |
children | 24c98ecd58de |
files | exception_lists/closed-bins usr/src/lib/libc/Makefile usr/src/lib/libc/sparc/Makefile.com usr/src/lib/libc/sparcv9/Makefile.com usr/src/pkg/manifests/SUNWn2cp.mf usr/src/pkg/manifests/driver-crypto-n2cp.mf usr/src/pkg/manifests/system-boot-real-mode.mf usr/src/pkg/manifests/system-kernel-platform.mf usr/src/uts/sun4u/Makefile.files usr/src/uts/sun4v/Makefile.files usr/src/uts/sun4v/io/n2rng/n2rng.c usr/src/uts/sun4v/io/n2rng/n2rng_post.c usr/src/uts/sun4v/io/n2rng/n2rng_provider.c usr/src/uts/sun4v/sys/n2rng.h |
diffstat | 14 files changed, 20 insertions(+), 176 deletions(-) [+] |
line wrap: on
line diff
--- a/exception_lists/closed-bins Thu Nov 18 10:08:59 2010 -0800 +++ b/exception_lists/closed-bins Fri Nov 19 19:58:46 2010 +0100 @@ -18,6 +18,8 @@ ./lib/libc_i18n.a ./lib/amd64/libc_i18n.a ./lib/sparcv9/libc_i18n.a +./platform/sun4v/kernel/drv/ncp.conf +./platform/sun4v/kernel/drv/n2cp.conf ./usr/has ./usr/has/bin ./usr/has/bin/patch
--- a/usr/src/lib/libc/Makefile Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/lib/libc/Makefile Fri Nov 19 19:58:46 2010 +0100 @@ -142,7 +142,7 @@ exit 1; \ fi -$(MACHLIBS): $(MACH_COMP) +$(MACHLIBS): $(MACH_COMP) $(MACH)/assym.h lib64: $(MACH_COMP) $(MACHLIBS64) $(MACH64)/$(LIB_PIC) $(VARIANTLIBS64) @if $(ELFDUMP) -r $(MACH64)/$(DYNLIB) | $(GREP) -w environ ; then \ @@ -151,7 +151,10 @@ exit 1; \ fi -$(MACHLIBS64): $(MACH_COMP) +$(MACHLIBS64): $(MACH_COMP) $(MACH64)/assym.h + +$(MACH)/assym.h $(MACH64)/assym.h: + @cd $(@D); $(MAKE) assym.h $(VARIANTLIBS): FRC @cd $(@D); pwd; VERSION='$(VERSION)' $(MAKE) $(@F)
--- a/usr/src/lib/libc/sparc/Makefile.com Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/lib/libc/sparc/Makefile.com Fri Nov 19 19:58:46 2010 +0100 @@ -1344,8 +1344,10 @@ # XXX A hack. Perhaps this should be 'CPPFLAGS.native' and # live in Makefile.master +assym.h := CFLAGS += -g + CPPFLAGS.genassym = \ - $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) + $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) -I. genassym: $(GENASSYM_C) $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
--- a/usr/src/lib/libc/sparcv9/Makefile.com Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/lib/libc/sparcv9/Makefile.com Fri Nov 19 19:58:46 2010 +0100 @@ -1263,13 +1263,15 @@ # assym.h build rules +assym.h := CFLAGS64 += -g + GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c # XXX A hack. Perhaps this should be 'CPPFLAGS.native' and # live in Makefile.master CPPFLAGS.genassym = \ - $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) + $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) -I. genassym: $(GENASSYM_C) $(NATIVECC) -I$(LIBCBASE)/inc -I$(LIBCDIR)/inc \
--- a/usr/src/pkg/manifests/SUNWn2cp.mf Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/pkg/manifests/SUNWn2cp.mf Fri Nov 19 19:58:46 2010 +0100 @@ -23,7 +23,6 @@ # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # -set name=pkg.fmri value=pkg:/SUNWn2cp@0.5.11,5.11-0.133 -set name=pkg.renamed value=true +set name=pkg.fmri value=pkg:/SUNWn2cp@0.5.11,5.11-0.148 +set name=pkg.obsolete value=true set name=variant.arch value=sparc -depend fmri=pkg:/driver/crypto/n2cp@0.5.11,5.11-0.133 type=require
--- a/usr/src/pkg/manifests/driver-crypto-n2cp.mf Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/pkg/manifests/driver-crypto-n2cp.mf Fri Nov 19 19:58:46 2010 +0100 @@ -23,30 +23,6 @@ # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # -# -# The default for payload-bearing actions in this package is to appear in the -# global zone only. See the include file for greater detail, as well as -# information about overriding the defaults. -# -<include global_zone_only_component> -set name=pkg.fmri value=pkg:/driver/crypto/n2cp@$(PKGVERS) -set name=pkg.description value="UltraSPARC-T2 Crypto Provider" -set name=pkg.summary value="UltraSPARC-T2 Crypto Provider" -set name=info.classification \ - value=org.opensolaris.category.2008:System/Hardware +set name=pkg.fmri value=pkg:/driver/crypto/n2cp@0.5.11,5.11-0.148 +set name=pkg.obsolete value=true set name=variant.arch value=sparc -dir path=platform group=sys -dir path=platform/sun4v group=sys -dir path=platform/sun4v/kernel group=sys -dir path=platform/sun4v/kernel/drv group=sys -dir path=platform/sun4v/kernel/drv/$(ARCH64) group=sys -driver name=n2cp \ - alias=SUNW,kt-cwq \ - alias=SUNW,n2-cwq \ - alias=SUNW,vf-cwq -file path=platform/sun4v/kernel/drv/$(ARCH64)/n2cp group=sys -file path=platform/sun4v/kernel/drv/n2cp.conf group=sys -legacy pkg=SUNWn2cp.v arch=$(ARCH).sun4v desc="UltraSPARC-T2 Crypto Provider" \ - name="UltraSPARC-T2 Crypto Provider" -license cr_Sun license=cr_Sun -license lic_CDDL license=lic_CDDL
--- a/usr/src/pkg/manifests/system-boot-real-mode.mf Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/pkg/manifests/system-boot-real-mode.mf Fri Nov 19 19:58:46 2010 +0100 @@ -46,7 +46,7 @@ original_name=SUNWrmod:boot/solaris/devicedb/master preserve=true $(i386_ONLY)file path=boot/splashimage.xpm group=sys $(i386_ONLY)file path=usr/lib/fs/ufs/mboot mode=0444 -hardlink path=boot/solaris.xpm target=splashimage.xpm +$(i386_ONLY)hardlink path=boot/solaris.xpm target=splashimage.xpm $(i386_ONLY)legacy pkg=SUNWrmodr desc="Realmode Modules, (Root)" \ name="Realmode Modules, (Root)" $(i386_ONLY)legacy pkg=SUNWrmodu desc="Realmode Modules, (Usr)" \
--- a/usr/src/pkg/manifests/system-kernel-platform.mf Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/pkg/manifests/system-kernel-platform.mf Fri Nov 19 19:58:46 2010 +0100 @@ -441,11 +441,6 @@ alias=SUNW,kt-rng \ alias=SUNW,n2-rng \ alias=SUNW,vf-rng -$(sparc_ONLY)driver name=ncp \ - alias=SUNW,kt-mau \ - alias=SUNW,n2-mau \ - alias=SUNW,sun4v-ncp \ - alias=SUNW,vf-mau $(i386_ONLY)driver name=npe alias=pciex_root_complex $(sparc_ONLY)driver name=ntwdt perms="* 0644 root sys" $(sparc_ONLY)driver name=oplmsu alias=FJSV,oplmsu @@ -1126,7 +1121,6 @@ $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/glvc group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/mdesc group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/n2rng group=sys -$(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/ncp group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/ntwdt group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/px group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/$(ARCH64)/qcn group=sys @@ -1138,7 +1132,6 @@ $(sparc_ONLY)file path=platform/sun4v/kernel/drv/bmc.conf group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/mdesc.conf group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/n2rng.conf group=sys -$(sparc_ONLY)file path=platform/sun4v/kernel/drv/ncp.conf group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/ntwdt.conf group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/drv/trapstat.conf group=sys $(sparc_ONLY)file path=platform/sun4v/kernel/misc/$(ARCH64)/bootdev group=sys \
--- a/usr/src/uts/sun4u/Makefile.files Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/uts/sun4u/Makefile.files Fri Nov 19 19:58:46 2010 +0100 @@ -148,7 +148,7 @@ BIGNUM_PSR_OBJS += mont_mulf_kernel_v9.o -AES_OBJS += aes.o aes_impl.o aes_modes.o aes_crypt_asm.o fips_aes_util.o +AES_OBJS += aes.o aes_impl.o aes_modes.o aes_crypt_asm.o DES_OBJS += des_crypt_asm.o
--- a/usr/src/uts/sun4v/Makefile.files Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/uts/sun4v/Makefile.files Fri Nov 19 19:58:46 2010 +0100 @@ -125,7 +125,7 @@ NIUMX_OBJS += niumx.o niumx_tools.o N2RNG_OBJS += n2rng.o n2rng_debug.o n2rng_hcall.o n2rng_kcf.o \ n2rng_entp_algs.o n2rng_entp_setup.o n2rng_kstat.o \ - n2rng_provider.o n2rng_post.o + n2rng_provider.o # # CPU/Memory Error Injector (memtest) sun4v driver
--- a/usr/src/uts/sun4v/io/n2rng/n2rng.c Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/uts/sun4v/io/n2rng/n2rng.c Fri Nov 19 19:58:46 2010 +0100 @@ -47,7 +47,6 @@ #include <sys/machsystm.h> #include <sys/hypervisor_api.h> #include <sys/n2rng.h> -#include <fips/fips_checksum.h> static int n2rng_attach(dev_info_t *, ddi_attach_cmd_t); static int n2rng_detach(dev_info_t *, ddi_detach_cmd_t); @@ -300,17 +299,6 @@ goto errorexit; } - if (n2rng->n_is_fips == B_TRUE) { - /* - * FIPs Post test: Feed the known seed and make sure it - * produces the known random number. - */ - if (n2rng_fips_rng_post() != CRYPTO_SUCCESS) { - n2rng_diperror(dip, "n2rng: FIPs POST test failed\n"); - goto errorexit; - } - } - return (DDI_SUCCESS); errorexit: @@ -1076,11 +1064,6 @@ DDI_PROP_CANSLEEP | DDI_PROP_DONTPASS, "hc_seconds", RNG_DEFAULT_HC_SECS); - /* get fips configuration : FALSE by default */ - n2rng->n_is_fips = ddi_getprop(DDI_DEV_T_ANY, n2rng->n_dip, - DDI_PROP_CANSLEEP | DDI_PROP_DONTPASS, - N2RNG_FIPS_STRING, B_FALSE); - /* API versions prior to 2.0 do not support health checks */ if ((n2rng->n_hvapi_major_version < 2) && (n2rng->n_ctl_data->n_hc_secs > 0)) { @@ -1092,15 +1075,6 @@ } - if (n2rng->n_is_fips == B_TRUE) { - /* When in FIPs mode, run the module integrity test */ - if (fips_check_module("drv/n2rng", (void *)_init) != 0) { - cmn_err(CE_WARN, "n2rng: FIPs Software Integrity Test " - "failed\n"); - return (DDI_FAILURE); - } - } - /* Calculate watchdog timeout value */ if (n2rng->n_ctl_data->n_hc_secs <= 0) { n2rng->n_ctl_data->n_watchdog_cycles = 0;
--- a/usr/src/uts/sun4v/io/n2rng/n2rng_post.c Thu Nov 18 10:08:59 2010 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +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) 2010, Oracle and/or its affiliates. All rights reserved. - */ - -#include <sys/types.h> -#include <sys/param.h> -#include <sys/errno.h> -#include <sys/kmem.h> -#include <sys/systm.h> -#include <sys/sha1.h> -#include <sys/crypto/common.h> -#include <sys/cmn_err.h> -#include <rng/fips_random.h> - - -int -n2rng_fips_rng_post(void) -{ - static uint8_t XKeyValue[] = { - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 - }; - - static uint8_t XSeed[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 - }; - - static uint8_t rng_known_GENX[] = { - 0xda, 0x39, 0xa3, 0xee, 0x5e, 0x6b, 0x4b, 0x0d, - 0x32, 0x55, 0xbf, 0xef, 0x95, 0x60, 0x18, 0x90, - 0xaf, 0xd8, 0x07, 0x09 - }; - - uint8_t GENX[SHA1_HASH_SIZE]; - uint8_t XKey[SHA1_HASH_SIZE]; - - (void) memcpy(XKey, XKeyValue, SHA1_HASH_SIZE); - - /* Generate X with a known seed. */ - fips_random_inner( - (uint32_t *)(void *)XKey, - (uint32_t *)(void *)GENX, - (uint32_t *)(void *)XSeed); - - /* Verify GENX to perform the RNG integrity check */ - if ((memcmp(GENX, rng_known_GENX, (SHA1_HASH_SIZE)) != 0)) - return (CRYPTO_DEVICE_ERROR); - else - return (CRYPTO_SUCCESS); -}
--- a/usr/src/uts/sun4v/io/n2rng/n2rng_provider.c Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/uts/sun4v/io/n2rng/n2rng_provider.c Fri Nov 19 19:58:46 2010 +0100 @@ -141,33 +141,6 @@ /* nbytes - i is bytes to go */ fips_random_inner(frsp->XKEY, tempout, entropy.as32); - /* - * Compare last round with the results of this round, fail - * if identical. Save for next round. - */ - if (n2rng->n_is_fips == B_TRUE) { - uint32_t differ = 0; - int j; - - for (j = 0; j < 5; j++) { - differ |= tempout[j] ^ frsp->x_jminus1[j]; - frsp->x_jminus1[j] = tempout[j]; - } - if (differ == 0) { - /* - * If differ == 0, the RNG produced the same - * answer twice. By FIPS 140-2 Section 4.9 we - * must enter an error state. - */ - mutex_exit(&frsp->mtx); - n2rng_failure(n2rng); - cmn_err(CE_WARN, - "n2rng: Continuous random number generator" - " test of FIPS-140 RNG failed."); - return (EIO); - } - } - bcopy(tempout, &out[i], min(nbytes - i, SHA1BYTES)); mutex_exit(&frsp->mtx);
--- a/usr/src/uts/sun4v/sys/n2rng.h Thu Nov 18 10:08:59 2010 -0800 +++ b/usr/src/uts/sun4v/sys/n2rng.h Fri Nov 19 19:58:46 2010 +0100 @@ -120,11 +120,6 @@ #define N2RNG_NOANALOGOUT 0x2 /* - * n2rng: config variable in the n2rng.conf file - */ -#define N2RNG_FIPS_STRING "n2rng-fips-140" - -/* * There can only be N2_RNG_FIPS_INSTANCES concurrent RNG requsts from * the framework. Making this value large helps benchmarks. It * should probably come from a conf file, but for now it is hard @@ -239,7 +234,6 @@ md_t *n_mdp; uint64_t n_sticks_per_usec; ddi_taskq_t *n_taskq; - boolean_t n_is_fips; } n2rng_t; typedef kstat_named_t n2rng_kstat_bias_t[N2RNG_MAX_RNGS][N2RNG_NOSC];