diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-09-20 11:59:56 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-09-20 11:59:56 +0000 |
| commit | a49e2686fd3e0bb76394296d7b3e5f9fea367525 (patch) | |
| tree | 2d52035b8f9e6cb0476ddb79034e4629f65f7176 | |
| parent | c9bb6e653d30a4879db3875d871d38cf65f9f3a5 (diff) | |
| parent | 067a68e3f9f9695a8a52350c0179d29947040ff8 (diff) | |
| download | illumos-joyent-a49e2686fd3e0bb76394296d7b3e5f9fea367525.tar.gz | |
[illumos-gate merge]
commit 067a68e3f9f9695a8a52350c0179d29947040ff8
11592 sdp: cast between incompatible function types
commit b79609a5823c681de453be676098d9635305e6a7
11591 usbser: cast between incompatible function types
commit d1704f8ef75a0e4e2dff36192648884817b6f076
11687 isaexec() leaks memory if realloc fails
commit 2b77347cd95dc12475fe2af8a715097166d0523a
11683 Automatically maintain whatis database
commit f5700834e5d27ffa87ba2d9ec0fe5b4e38f5bb1c
11702 loader: zalloc cstyle cleanup
commit 13027a8e96cb0ef5c5e3dbe2594f7a17b73a95b5
11615 should handle locale charmap aliases
commit e75b2cb046700ccab0100afdcd81f2b860fcca87
11706 crypto tests need to run 32-bit and 64-bit
Conflicts:
usr/src/test/crypto-tests/tests/modes/aes/gcm/Makefile
usr/src/test/crypto-tests/tests/modes/aes/ecb/Makefile
usr/src/test/crypto-tests/tests/modes/aes/ctr/Makefile
usr/src/test/crypto-tests/tests/modes/aes/cmac/Makefile
usr/src/test/crypto-tests/tests/modes/aes/ccm/Makefile
usr/src/test/crypto-tests/tests/modes/aes/cbc/Makefile
usr/src/test/crypto-tests/tests/modes/aes/Makefile.subdirs
usr/src/test/crypto-tests/tests/digest/Makefile
usr/src/test/crypto-tests/tests/common/Makefile
usr/src/test/crypto-tests/runfiles/default.run
usr/src/cmd/man/Makefile
| -rw-r--r-- | manifest | 2 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zalloc.c | 311 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zalloc_defs.h | 31 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zalloc_malloc.c | 160 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zalloc_mem.h | 26 | ||||
| -rw-r--r-- | usr/src/boot/lib/libstand/zalloc_protos.h | 9 | ||||
| -rw-r--r-- | usr/src/cmd/man/Makefile | 15 | ||||
| -rwxr-xr-x | usr/src/cmd/man/update-man-index | 56 | ||||
| -rw-r--r-- | usr/src/cmd/man/update-man-index.xml | 81 | ||||
| -rw-r--r-- | usr/src/lib/libc/port/gen/isaexec.c | 9 | ||||
| -rw-r--r-- | usr/src/lib/libc/port/locale/localeimpl.c | 32 | ||||
| -rw-r--r-- | usr/src/pkg/manifests/system-man.mf | 7 | ||||
| -rw-r--r-- | usr/src/pkg/manifests/system-test-cryptotest.mf | 162 | ||||
| -rw-r--r-- | usr/src/pkg/transforms/restart_fmri | 17 | ||||
| -rw-r--r-- | usr/src/test/crypto-tests/tests/common/Makefile | 4 | ||||
| -rw-r--r-- | usr/src/uts/common/io/ib/clients/sdp/sdpddi.c | 11 | ||||
| -rw-r--r-- | usr/src/uts/common/sys/usb/clients/usbser/usbser_rseq.h | 5 |
17 files changed, 623 insertions, 315 deletions
@@ -1758,6 +1758,7 @@ f lib/svc/manifest/system/svc/global.xml 0444 root sys f lib/svc/manifest/system/svc/restarter.xml 0444 root sys f lib/svc/manifest/system/sysevent.xml 0444 root sys f lib/svc/manifest/system/system-log.xml 0444 root sys +f lib/svc/manifest/system/update-man-index.xml 0444 root sys f lib/svc/manifest/system/utmp.xml 0444 root sys f lib/svc/manifest/system/vtdaemon.xml 0444 root sys f lib/svc/manifest/system/zones.xml 0444 root sys @@ -1854,6 +1855,7 @@ f lib/svc/method/svc-zones 0555 root sys f lib/svc/method/sysidtool-net 0555 root bin f lib/svc/method/sysidtool-system 0555 root bin f lib/svc/method/system-log 0555 root bin +f lib/svc/method/update-man-index 0555 root bin f lib/svc/method/vtdaemon 0555 root bin f lib/svc/method/yp 0555 root bin d lib/svc/monitor 0755 root bin diff --git a/usr/src/boot/lib/libstand/zalloc.c b/usr/src/boot/lib/libstand/zalloc.c index 4d1ec62912..546723617d 100644 --- a/usr/src/boot/lib/libstand/zalloc.c +++ b/usr/src/boot/lib/libstand/zalloc.c @@ -1,5 +1,5 @@ /* - * This module derived from code donated to the FreeBSD Project by + * This module derived from code donated to the FreeBSD Project by * Matthew Dillon <dillon@backplane.com> * * Copyright (c) 1998 The FreeBSD Project @@ -28,13 +28,12 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); /* - * LIB/MEMORY/ZALLOC.C - self contained low-overhead memory pool/allocation + * LIB/MEMORY/ZALLOC.C - self contained low-overhead memory pool/allocation * subsystem * - * This subsystem implements memory pools and memory allocation + * This subsystem implements memory pools and memory allocation * routines. * * Pools are managed via a linked list of 'free' areas. Allocating @@ -43,7 +42,7 @@ __FBSDID("$FreeBSD$"); * to allocate the entire pool without incuring any structural overhead. * * The system works best when allocating similarly-sized chunks of - * memory. Care must be taken to avoid fragmentation when + * memory. Care must be taken to avoid fragmentation when * allocating/deallocating dissimilar chunks. * * When a memory pool is first allocated, the entire pool is marked as @@ -53,7 +52,7 @@ __FBSDID("$FreeBSD$"); * available. * * z[n]xalloc() works like z[n]alloc() but the allocation is made from - * within the specified address range. If the segment could not be + * within the specified address range. If the segment could not be * allocated, NULL is returned. WARNING! The address range will be * aligned to an 8 or 16 byte boundry depending on the cpu so if you * give an unaligned address range, unexpected results may occur. @@ -75,7 +74,7 @@ __FBSDID("$FreeBSD$"); * They must also be aligned to MALLOCALIGN, which should normally be larger * than the struct, so assert that to be so at compile time. */ -typedef char assert_align[(sizeof(struct MemNode) <= MALLOCALIGN) ? 1 : -1]; +typedef char assert_align[(sizeof (struct MemNode) <= MALLOCALIGN) ? 1 : -1]; #define MEMNODE_SIZE_MASK MALLOCALIGN_MASK @@ -88,56 +87,54 @@ typedef char assert_align[(sizeof(struct MemNode) <= MALLOCALIGN) ? 1 : -1]; void * znalloc(MemPool *mp, uintptr_t bytes) { - /* - * align according to pool object size (can be 0). This is - * inclusive of the MEMNODE_SIZE_MASK minimum alignment. - * - */ - bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; - - if (bytes == 0) - return((void *)-1); - - /* - * locate freelist entry big enough to hold the object. If all objects - * are the same size, this is a constant-time function. - */ - - if (bytes <= mp->mp_Size - mp->mp_Used) { MemNode **pmn; MemNode *mn; - for (pmn = &mp->mp_First; (mn=*pmn) != NULL; pmn = &mn->mr_Next) { - if (bytes > mn->mr_Bytes) - continue; + /* + * align according to pool object size (can be 0). This is + * inclusive of the MEMNODE_SIZE_MASK minimum alignment. + * + */ + bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; + + if (bytes == 0) + return ((void *)-1); + + /* + * locate freelist entry big enough to hold the object. If all objects + * are the same size, this is a constant-time function. + */ - /* - * Cut a chunk of memory out of the beginning of this - * block and fixup the link appropriately. - */ + if (bytes > mp->mp_Size - mp->mp_Used) + return (NULL); - { + for (pmn = &mp->mp_First; (mn = *pmn) != NULL; pmn = &mn->mr_Next) { char *ptr = (char *)mn; + if (bytes > mn->mr_Bytes) + continue; + + /* + * Cut a chunk of memory out of the beginning of this + * block and fixup the link appropriately. + */ if (mn->mr_Bytes == bytes) { - *pmn = mn->mr_Next; + *pmn = mn->mr_Next; } else { - mn = (MemNode *)((char *)mn + bytes); - mn->mr_Next = ((MemNode *)ptr)->mr_Next; - mn->mr_Bytes = ((MemNode *)ptr)->mr_Bytes - bytes; - *pmn = mn; + mn = (MemNode *)((char *)mn + bytes); + mn->mr_Next = ((MemNode *)ptr)->mr_Next; + mn->mr_Bytes = ((MemNode *)ptr)->mr_Bytes - bytes; + *pmn = mn; } mp->mp_Used += bytes; - return(ptr); - } + return (ptr); } - } - /* - * Memory pool is full, return NULL. - */ + /* + * Memory pool is full, return NULL. + */ - return(NULL); + return (NULL); } /* @@ -147,99 +144,97 @@ znalloc(MemPool *mp, uintptr_t bytes) void zfree(MemPool *mp, void *ptr, uintptr_t bytes) { - /* - * align according to pool object size (can be 0). This is - * inclusive of the MEMNODE_SIZE_MASK minimum alignment. - */ - bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; - - if (bytes == 0) - return; + MemNode **pmn; + MemNode *mn; - /* - * panic if illegal pointer - */ + /* + * align according to pool object size (can be 0). This is + * inclusive of the MEMNODE_SIZE_MASK minimum alignment. + */ + bytes = (bytes + MEMNODE_SIZE_MASK) & ~MEMNODE_SIZE_MASK; - if ((char *)ptr < (char *)mp->mp_Base || - (char *)ptr + bytes > (char *)mp->mp_End || - ((uintptr_t)ptr & MEMNODE_SIZE_MASK) != 0) - panic("zfree(%p,%ju): wild pointer", ptr, (uintmax_t)bytes); + if (bytes == 0) + return; - /* - * free the segment - */ + /* + * panic if illegal pointer + */ - { - MemNode **pmn; - MemNode *mn; + if ((char *)ptr < (char *)mp->mp_Base || + (char *)ptr + bytes > (char *)mp->mp_End || + ((uintptr_t)ptr & MEMNODE_SIZE_MASK) != 0) + panic("zfree(%p,%ju): wild pointer", ptr, (uintmax_t)bytes); + /* + * free the segment + */ mp->mp_Used -= bytes; for (pmn = &mp->mp_First; (mn = *pmn) != NULL; pmn = &mn->mr_Next) { - /* - * If area between last node and current node - * - check range - * - check merge with next area - * - check merge with previous area - */ - if ((char *)ptr <= (char *)mn) { /* - * range check + * If area between last node and current node + * - check range + * - check merge with next area + * - check merge with previous area */ - if ((char *)ptr + bytes > (char *)mn) { - panic("zfree(%p,%ju): corrupt memlist1", ptr, - (uintmax_t)bytes); + if ((char *)ptr <= (char *)mn) { + /* + * range check + */ + if ((char *)ptr + bytes > (char *)mn) { + panic("zfree(%p,%ju): corrupt memlist1", ptr, + (uintmax_t)bytes); + } + + /* + * merge against next area or create independant area + */ + + if ((char *)ptr + bytes == (char *)mn) { + ((MemNode *)ptr)->mr_Next = mn->mr_Next; + ((MemNode *)ptr)->mr_Bytes = + bytes + mn->mr_Bytes; + } else { + ((MemNode *)ptr)->mr_Next = mn; + ((MemNode *)ptr)->mr_Bytes = bytes; + } + *pmn = mn = (MemNode *)ptr; + + /* + * merge against previous area (if there is a previous + * area). + */ + + if (pmn != &mp->mp_First) { + if ((char *)pmn + ((MemNode*)pmn)->mr_Bytes == + (char *)ptr) { + ((MemNode *)pmn)->mr_Next = mn->mr_Next; + ((MemNode *)pmn)->mr_Bytes += + mn->mr_Bytes; + mn = (MemNode *)pmn; + } + } + return; } - - /* - * merge against next area or create independant area - */ - - if ((char *)ptr + bytes == (char *)mn) { - ((MemNode *)ptr)->mr_Next = mn->mr_Next; - ((MemNode *)ptr)->mr_Bytes= bytes + mn->mr_Bytes; - } else { - ((MemNode *)ptr)->mr_Next = mn; - ((MemNode *)ptr)->mr_Bytes= bytes; - } - *pmn = mn = (MemNode *)ptr; - - /* - * merge against previous area (if there is a previous - * area). - */ - - if (pmn != &mp->mp_First) { - if ((char*)pmn + ((MemNode*)pmn)->mr_Bytes == (char*)ptr) { - ((MemNode *)pmn)->mr_Next = mn->mr_Next; - ((MemNode *)pmn)->mr_Bytes += mn->mr_Bytes; - mn = (MemNode *)pmn; - } + if ((char *)ptr < (char *)mn + mn->mr_Bytes) { + panic("zfree(%p,%ju): corrupt memlist2", ptr, + (uintmax_t)bytes); } - return; - /* NOT REACHED */ - } - if ((char *)ptr < (char *)mn + mn->mr_Bytes) { - panic("zfree(%p,%ju): corrupt memlist2", ptr, - (uintmax_t)bytes); - } } /* * We are beyond the last MemNode, append new MemNode. Merge against * previous area if possible. */ - if (pmn == &mp->mp_First || - (char *)pmn + ((MemNode *)pmn)->mr_Bytes != (char *)ptr - ) { - ((MemNode *)ptr)->mr_Next = NULL; - ((MemNode *)ptr)->mr_Bytes = bytes; - *pmn = (MemNode *)ptr; - mn = (MemNode *)ptr; + if (pmn == &mp->mp_First || + (char *)pmn + ((MemNode *)pmn)->mr_Bytes != (char *)ptr) { + ((MemNode *)ptr)->mr_Next = NULL; + ((MemNode *)ptr)->mr_Bytes = bytes; + *pmn = (MemNode *)ptr; + mn = (MemNode *)ptr; } else { - ((MemNode *)pmn)->mr_Bytes += bytes; - mn = (MemNode *)pmn; + ((MemNode *)pmn)->mr_Bytes += bytes; + mn = (MemNode *)pmn; } - } } /* @@ -256,26 +251,26 @@ zfree(MemPool *mp, void *ptr, uintptr_t bytes) void zextendPool(MemPool *mp, void *base, uintptr_t bytes) { - if (mp->mp_Size == 0) { - mp->mp_Base = base; - mp->mp_Used = bytes; - mp->mp_End = (char *)base + bytes; - mp->mp_Size = bytes; - } else { - void *pend = (char *)mp->mp_Base + mp->mp_Size; - - if (base < mp->mp_Base) { - mp->mp_Size += (char *)mp->mp_Base - (char *)base; - mp->mp_Used += (char *)mp->mp_Base - (char *)base; - mp->mp_Base = base; - } - base = (char *)base + bytes; - if (base > pend) { - mp->mp_Size += (char *)base - (char *)pend; - mp->mp_Used += (char *)base - (char *)pend; - mp->mp_End = (char *)base; + if (mp->mp_Size == 0) { + mp->mp_Base = base; + mp->mp_Used = bytes; + mp->mp_End = (char *)base + bytes; + mp->mp_Size = bytes; + } else { + void *pend = (char *)mp->mp_Base + mp->mp_Size; + + if (base < mp->mp_Base) { + mp->mp_Size += (char *)mp->mp_Base - (char *)base; + mp->mp_Used += (char *)mp->mp_Base - (char *)base; + mp->mp_Base = base; + } + base = (char *)base + bytes; + if (base > pend) { + mp->mp_Size += (char *)base - (char *)pend; + mp->mp_Used += (char *)base - (char *)pend; + mp->mp_End = (char *)base; + } } - } } #ifdef ZALLOCDEBUG @@ -283,34 +278,32 @@ zextendPool(MemPool *mp, void *base, uintptr_t bytes) void zallocstats(MemPool *mp) { - int abytes = 0; - int hbytes = 0; - int fcount = 0; - MemNode *mn; + int abytes = 0; + int hbytes = 0; + int fcount = 0; + MemNode *mn; - printf("%d bytes reserved", (int) mp->mp_Size); + printf("%d bytes reserved", (int)mp->mp_Size); - mn = mp->mp_First; + mn = mp->mp_First; - if ((void *)mn != (void *)mp->mp_Base) { - abytes += (char *)mn - (char *)mp->mp_Base; - } + if ((void *)mn != (void *)mp->mp_Base) { + abytes += (char *)mn - (char *)mp->mp_Base; + } - while (mn) { - if ((char *)mn + mn->mr_Bytes != mp->mp_End) { - hbytes += mn->mr_Bytes; - ++fcount; + while (mn != NULL) { + if ((char *)mn + mn->mr_Bytes != mp->mp_End) { + hbytes += mn->mr_Bytes; + ++fcount; + } + if (mn->mr_Next != NULL) { + abytes += (char *)mn->mr_Next - + ((char *)mn + mn->mr_Bytes); + } + mn = mn->mr_Next; } - if (mn->mr_Next) - abytes += (char *)mn->mr_Next - ((char *)mn + mn->mr_Bytes); - mn = mn->mr_Next; - } - printf(" %d bytes allocated\n%d fragments (%d bytes fragmented)\n", - abytes, - fcount, - hbytes - ); + printf(" %d bytes allocated\n%d fragments (%d bytes fragmented)\n", + abytes, fcount, hbytes); } #endif - diff --git a/usr/src/boot/lib/libstand/zalloc_defs.h b/usr/src/boot/lib/libstand/zalloc_defs.h index 7f2cc1202c..f0de227529 100644 --- a/usr/src/boot/lib/libstand/zalloc_defs.h +++ b/usr/src/boot/lib/libstand/zalloc_defs.h @@ -1,5 +1,5 @@ /* - * This module derived from code donated to the FreeBSD Project by + * This module derived from code donated to the FreeBSD Project by * Matthew Dillon <dillon@backplane.com> * * Copyright (c) 1998 The FreeBSD Project @@ -25,31 +25,32 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ /* * DEFS.H */ -#define USEGUARD /* use stard/end guard bytes */ -#define USEENDGUARD -#define DMALLOCDEBUG /* add debugging code to gather stats */ -#define ZALLOCDEBUG +#ifndef _ZALLOC_DEFS_H +#define _ZALLOC_DEFS_H + +#define USEGUARD /* use stard/end guard bytes */ +#define USEENDGUARD +#define DMALLOCDEBUG /* add debugging code to gather stats */ +#define ZALLOCDEBUG #include <sys/stdint.h> #include "stand.h" #include "zalloc_mem.h" -#define Library extern +#define Library extern /* * block extension for sbrk() */ -#define BLKEXTEND (4 * 1024) -#define BLKEXTENDMASK (BLKEXTEND - 1) +#define BLKEXTEND (4 * 1024) +#define BLKEXTENDMASK (BLKEXTEND - 1) /* * Required malloc alignment. @@ -68,11 +69,13 @@ #define MALLOCALIGN_MASK (MALLOCALIGN - 1) typedef struct Guard { - size_t ga_Bytes; - size_t ga_Magic; /* must be at least 32 bits */ + size_t ga_Bytes; + size_t ga_Magic; /* must be at least 32 bits */ } Guard; -#define GAMAGIC 0x55FF44FD -#define GAFREE 0x5F54F4DF +#define GAMAGIC 0x55FF44FD +#define GAFREE 0x5F54F4DF #include "zalloc_protos.h" + +#endif /* _ZALLOC_DEFS_H */ diff --git a/usr/src/boot/lib/libstand/zalloc_malloc.c b/usr/src/boot/lib/libstand/zalloc_malloc.c index b9a295fb38..2117804c5a 100644 --- a/usr/src/boot/lib/libstand/zalloc_malloc.c +++ b/usr/src/boot/lib/libstand/zalloc_malloc.c @@ -1,5 +1,5 @@ /* - * This module derived from code donated to the FreeBSD Project by + * This module derived from code donated to the FreeBSD Project by * Matthew Dillon <dillon@backplane.com> * * Copyright (c) 1998 The FreeBSD Project @@ -28,7 +28,6 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); /* * MALLOC.C - malloc equivalent, runs on top of zalloc and uses sbrk @@ -53,136 +52,142 @@ void mallocstats(void); void * Malloc(size_t bytes, const char *file, int line) { - Guard *res; + Guard *res; #ifdef USEENDGUARD - bytes += MALLOCALIGN + 1; + bytes += MALLOCALIGN + 1; #else - bytes += MALLOCALIGN; + bytes += MALLOCALIGN; #endif - while ((res = znalloc(&MallocPool, bytes)) == NULL) { - int incr = (bytes + BLKEXTENDMASK) & ~BLKEXTENDMASK; - char *base; + while ((res = znalloc(&MallocPool, bytes)) == NULL) { + int incr = (bytes + BLKEXTENDMASK) & ~BLKEXTENDMASK; + char *base; - if ((base = sbrk(incr)) == (char *)-1) - return(NULL); - zextendPool(&MallocPool, base, incr); - zfree(&MallocPool, base, incr); - } + if ((base = sbrk(incr)) == (char *)-1) + return (NULL); + zextendPool(&MallocPool, base, incr); + zfree(&MallocPool, base, incr); + } #ifdef DMALLOCDEBUG - if (++MallocCount > MallocMax) - MallocMax = MallocCount; + if (++MallocCount > MallocMax) + MallocMax = MallocCount; #endif #ifdef USEGUARD - res->ga_Magic = GAMAGIC; + res->ga_Magic = GAMAGIC; #endif - res->ga_Bytes = bytes; + res->ga_Bytes = bytes; #ifdef USEENDGUARD - *((signed char *)res + bytes - 1) = -2; + *((signed char *)res + bytes - 1) = -2; #endif - return((char *)res + MALLOCALIGN); + return ((char *)res + MALLOCALIGN); } void Free(void *ptr, const char *file, int line) { - size_t bytes; + size_t bytes; - if (ptr != NULL) { - Guard *res = (void *)((char *)ptr - MALLOCALIGN); + if (ptr != NULL) { + Guard *res = (void *)((char *)ptr - MALLOCALIGN); - if (file == NULL) - file = "unknown"; + if (file == NULL) + file = "unknown"; #ifdef USEGUARD - if (res->ga_Magic == GAFREE) { - printf("free: duplicate free @ %p from %s:%d\n", ptr, file, line); - return; - } - if (res->ga_Magic != GAMAGIC) - panic("free: guard1 fail @ %p from %s:%d", ptr, file, line); - res->ga_Magic = GAFREE; + if (res->ga_Magic == GAFREE) { + printf("free: duplicate free @ %p from %s:%d\n", + ptr, file, line); + return; + } + if (res->ga_Magic != GAMAGIC) + panic("free: guard1 fail @ %p from %s:%d", + ptr, file, line); + res->ga_Magic = GAFREE; #endif #ifdef USEENDGUARD - if (*((signed char *)res + res->ga_Bytes - 1) == -1) { - printf("free: duplicate2 free @ %p from %s:%d\n", ptr, file, line); - return; - } - if (*((signed char *)res + res->ga_Bytes - 1) != -2) - panic("free: guard2 fail @ %p + %zu from %s:%d", ptr, res->ga_Bytes - MALLOCALIGN, file, line); - *((signed char *)res + res->ga_Bytes - 1) = -1; + if (*((signed char *)res + res->ga_Bytes - 1) == -1) { + printf("free: duplicate2 free @ %p from %s:%d\n", + ptr, file, line); + return; + } + if (*((signed char *)res + res->ga_Bytes - 1) != -2) + panic("free: guard2 fail @ %p + %zu from %s:%d", + ptr, res->ga_Bytes - MALLOCALIGN, file, line); + *((signed char *)res + res->ga_Bytes - 1) = -1; #endif - bytes = res->ga_Bytes; - zfree(&MallocPool, res, bytes); + bytes = res->ga_Bytes; + zfree(&MallocPool, res, bytes); #ifdef DMALLOCDEBUG - --MallocCount; + --MallocCount; #endif - } + } } void * Calloc(size_t n1, size_t n2, const char *file, int line) { - uintptr_t bytes = (uintptr_t)n1 * (uintptr_t)n2; - void *res; + uintptr_t bytes = (uintptr_t)n1 * (uintptr_t)n2; + void *res; - if ((res = Malloc(bytes, file, line)) != NULL) { - bzero(res, bytes); + if ((res = Malloc(bytes, file, line)) != NULL) { + bzero(res, bytes); #ifdef DMALLOCDEBUG - if (++MallocCount > MallocMax) - MallocMax = MallocCount; + if (++MallocCount > MallocMax) + MallocMax = MallocCount; #endif - } - return(res); + } + return (res); } /* * realloc() - I could be fancier here and free the old buffer before - * allocating the new one (saving potential fragmentation + * allocating the new one (saving potential fragmentation * and potential buffer copies). But I don't bother. */ void * Realloc(void *ptr, size_t size, const char *file, int line) { - void *res; - size_t old; - - if ((res = Malloc(size, file, line)) != NULL) { - if (ptr) { - old = *(size_t *)((char *)ptr - MALLOCALIGN) - MALLOCALIGN; - if (old < size) - bcopy(ptr, res, old); - else - bcopy(ptr, res, size); - Free(ptr, file, line); - } else { + void *res; + size_t old; + + if ((res = Malloc(size, file, line)) != NULL) { + if (ptr != NULL) { + Guard *g = (Guard *)((char *)ptr - MALLOCALIGN); + + old = g->ga_Bytes - MALLOCALIGN; + if (old < size) + bcopy(ptr, res, old); + else + bcopy(ptr, res, size); + Free(ptr, file, line); + } else { #ifdef DMALLOCDEBUG - if (++MallocCount > MallocMax) - MallocMax = MallocCount; + if (++MallocCount > MallocMax) + MallocMax = MallocCount; #ifdef EXITSTATS - if (DidAtExit == 0) { - DidAtExit = 1; - atexit(mallocstats); - } + if (DidAtExit == 0) { + DidAtExit = 1; + atexit(mallocstats); + } #endif #endif + } } - } - return(res); + return (res); } void * Reallocf(void *ptr, size_t size, const char *file, int line) { - void *res; + void *res; - if ((res = Realloc(ptr, size, file, line)) == NULL) - Free(ptr, file, line); - return(res); + if ((res = Realloc(ptr, size, file, line)) == NULL) + Free(ptr, file, line); + return (res); } #ifdef DMALLOCDEBUG @@ -190,11 +195,10 @@ Reallocf(void *ptr, size_t size, const char *file, int line) void mallocstats(void) { - printf("Active Allocations: %d/%d\n", MallocCount, MallocMax); + printf("Active Allocations: %d/%d\n", MallocCount, MallocMax); #ifdef ZALLOCDEBUG - zallocstats(&MallocPool); + zallocstats(&MallocPool); #endif } #endif - diff --git a/usr/src/boot/lib/libstand/zalloc_mem.h b/usr/src/boot/lib/libstand/zalloc_mem.h index 26d388dfc7..fd11f2bd9a 100644 --- a/usr/src/boot/lib/libstand/zalloc_mem.h +++ b/usr/src/boot/lib/libstand/zalloc_mem.h @@ -1,5 +1,5 @@ /* - * This module derived from code donated to the FreeBSD Project by + * This module derived from code donated to the FreeBSD Project by * Matthew Dillon <dillon@backplane.com> * * Copyright (c) 1998 The FreeBSD Project @@ -25,8 +25,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ /* @@ -35,19 +33,23 @@ * Basic memory pool / memory node structures. */ +#ifndef _ZALLOC_MEM_H +#define _ZALLOC_MEM_H + typedef struct MemNode { - struct MemNode *mr_Next; - uintptr_t mr_Bytes; + struct MemNode *mr_Next; + uintptr_t mr_Bytes; } MemNode; typedef struct MemPool { - void *mp_Base; - void *mp_End; - MemNode *mp_First; - uintptr_t mp_Size; - uintptr_t mp_Used; + void *mp_Base; + void *mp_End; + MemNode *mp_First; + uintptr_t mp_Size; + uintptr_t mp_Used; } MemPool; -#define ZNOTE_FREE 0 -#define ZNOTE_REUSE 1 +#define ZNOTE_FREE 0 +#define ZNOTE_REUSE 1 +#endif /* _ZALLOC_MEM_H */ diff --git a/usr/src/boot/lib/libstand/zalloc_protos.h b/usr/src/boot/lib/libstand/zalloc_protos.h index 53a40e400d..0df9c91795 100644 --- a/usr/src/boot/lib/libstand/zalloc_protos.h +++ b/usr/src/boot/lib/libstand/zalloc_protos.h @@ -1,5 +1,5 @@ /* - * This module derived from code donated to the FreeBSD Project by + * This module derived from code donated to the FreeBSD Project by * Matthew Dillon <dillon@backplane.com> * * Copyright (c) 1998 The FreeBSD Project @@ -25,11 +25,14 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#ifndef _ZALLOC_PROTOS_H +#define _ZALLOC_PROTOS_H + Library void *znalloc(struct MemPool *mpool, uintptr_t bytes); Library void zfree(struct MemPool *mpool, void *ptr, uintptr_t bytes); Library void zextendPool(MemPool *mp, void *base, uintptr_t bytes); Library void zallocstats(struct MemPool *mp); + +#endif /* _ZALLOC_PROTOS_H */ diff --git a/usr/src/cmd/man/Makefile b/usr/src/cmd/man/Makefile index 7c7afebb10..cd0b875049 100644 --- a/usr/src/cmd/man/Makefile +++ b/usr/src/cmd/man/Makefile @@ -12,11 +12,20 @@ # # Copyright 2012 Nexenta Systems, Inc. All rights reserved. # Copyright 2014 Garrett D'Amore <garrett@damore.org> +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include Makefile.com +PROG= man +LINKS= apropos whatis catman +LIBLINKS = makewhatis +OBJS= makewhatis.o man.o stringlist.o +MANIFEST= update-man-index.xml +SVCMETHOD= update-man-index + include $(SRC)/cmd/Makefile.cmd +ROOTMANIFESTDIR= $(ROOTSVCSYSTEM) + CFLAGS += $(CCVERBOSE) ROOTLINKS= $(LINKS:%=$(ROOTBIN)/%) $(LIBLINKS:%=$(ROOTLIB)/%) @@ -28,9 +37,9 @@ all: $(PROG) clean: $(RM) $(OBJS) -install: all $(ROOTPROG) $(ROOTLINKS) +install: all $(ROOTPROG) $(ROOTLINKS) $(ROOTMANIFEST) $(ROOTSVCMETHOD) -lint: lint_SRCS +check: $(CHKMANIFEST) $(PROG): $(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) diff --git a/usr/src/cmd/man/update-man-index b/usr/src/cmd/man/update-man-index new file mode 100755 index 0000000000..c6c3dcaa63 --- /dev/null +++ b/usr/src/cmd/man/update-man-index @@ -0,0 +1,56 @@ +#!/bin/ksh +# +# 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 2019 OmniOS Community Edition (OmniOSce) Association. +# + +[ -f /lib/svc/share/smf_include.sh ] || exit 1 + +. /lib/svc/share/smf_include.sh + +# Associative array to hold unique components for manpath +typeset -A manpath + +default_system_path= +if [ -f /etc/default/login ]; then + default_system_path="`grep '^PATH=' /etc/default/login | sed -n ' + s/PATH=// + p + q + '`" +fi + +oIFS="$IFS"; IFS=":" +# The config/manpath property from the service will have been passed as +# arguments to this method script. +for p in $@; do + manpath["$p"]=1 +done + +# Add any additional man directories from the default system path +for p in $default_system_path; do + dir="`dirname "$p"`" + for suffix in man share/man; do + [ -d "$dir/$suffix" ] && manpath["$dir/$suffix"]=1 + done +done +IFS="$oIFS" + +MANPATH= +for p in "${!manpath[@]}"; do + MANPATH+="${MANPATH:+:}$p" +done + +echo "Rebuilding man page index using $MANPATH" +export MANPATH +/usr/bin/man -w + +exit 0 diff --git a/usr/src/cmd/man/update-man-index.xml b/usr/src/cmd/man/update-man-index.xml new file mode 100644 index 0000000000..989e86275a --- /dev/null +++ b/usr/src/cmd/man/update-man-index.xml @@ -0,0 +1,81 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> +<!-- + 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 2019 OmniOS Community Edition (OmniOSce) Association. +--> + +<service_bundle type='manifest' name='system/man:update-man-index'> + +<service + name='system/update-man-index' + type='service' + version='1'> + + <create_default_instance enabled='true' /> + + <single_instance/> + + <dependency + name='fs-local' + grouping='require_all' + restart_on='none' + type='service'> + <service_fmri value='svc:/system/filesystem/local' /> + </dependency> + + <exec_method + type='method' + name='start' + exec='/lib/svc/method/update-man-index %{config/manpath:}' + timeout_seconds='300' /> + + <exec_method + type='method' + name='stop' + exec=':true' + timeout_seconds='3' /> + + <exec_method + type='method' + name='refresh' + exec=':true' + timeout_seconds='3' /> + + <property_group name='startd' type='framework'> + <propval name='duration' type='astring' value='transient' /> + </property_group> + + <property_group name='config' type='application'> + <property name='manpath' type='astring'> + <astring_list> + <value_node value='/usr/share/man' /> + <value_node value='/usr/has/man' /> + </astring_list> + </property> + </property_group> + + <stability value='Unstable' /> + + <template> + <common_name> + <loctext xml:lang='C'> + Man page index database updater + </loctext> + </common_name> + <documentation> + <manpage title='man' section='1' + manpath='/usr/share/man' /> + </documentation> + </template> +</service> + +</service_bundle> diff --git a/usr/src/lib/libc/port/gen/isaexec.c b/usr/src/lib/libc/port/gen/isaexec.c index 9939b695f6..c3807ead39 100644 --- a/usr/src/lib/libc/port/gen/isaexec.c +++ b/usr/src/lib/libc/port/gen/isaexec.c @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + */ #pragma weak _isaexec = isaexec @@ -67,9 +69,10 @@ isaexec(const char *execname, char *const *argv, char *const *envp) } if (ret > isalen) { isalen = ret; - isalist = realloc(isalist, isalen); - } else + isalist = reallocf(isalist, isalen); + } else { break; + } } while (isalist != NULL); if (isalist == NULL) { diff --git a/usr/src/lib/libc/port/locale/localeimpl.c b/usr/src/lib/libc/port/locale/localeimpl.c index 24c03d558a..945fce2143 100644 --- a/usr/src/lib/libc/port/locale/localeimpl.c +++ b/usr/src/lib/libc/port/locale/localeimpl.c @@ -288,6 +288,19 @@ locdata_get_cache(int category, const char *locname) return (loc); } +/* Charmap aliases, mostly found in Linux */ +static const struct { + const char *alias; + const char *name; +} cmalias[] = { + { "utf8", "UTF-8" }, + { "iso88591", "ISO8859-1" }, + { "iso885915", "ISO8859-15" }, + { "gb18030", "GB18030" }, + { "koi8r", "KOI8-R" }, + { NULL, NULL } +}; + /* * Routine to get the locdata for a given category and locale. * This includes retrieving it from cache, retrieving it from @@ -297,9 +310,11 @@ static struct locdata * locdata_get(int category, const char *locname) { char scratch[ENCODING_LEN + 1]; - char *slash; + char scratch2[ENCODING_LEN + 1]; + char *slash, *cm; int cnt; int len; + int i; if (locname == NULL || *locname == 0) { locname = get_locale_env(category); @@ -329,6 +344,21 @@ locdata_get(int category, const char *locname) if ((strcmp(locname, "C") == 0) || (strcmp(locname, "POSIX") == 0)) return (posix_locale.locdata[category]); + /* Handle charmap aliases */ + for (i = 0; cmalias[i].alias != NULL; i++) { + if ((cm = strstr(locname, cmalias[i].alias)) != NULL && + strlen(cm) == strlen(cmalias[i].alias)) { + len = cm - locname + 1; + if (len + strlen(cmalias[i].name) >= sizeof (scratch2)) + break; + (void) strlcpy(scratch2, locname, len); + (void) strlcat(scratch2, cmalias[i].name, + sizeof (scratch2)); + locname = scratch2; + break; + } + } + if ((strcmp(locname, "C.UTF-8") == 0) && (category != LC_CTYPE)) return (&cutf_locdata[category]); diff --git a/usr/src/pkg/manifests/system-man.mf b/usr/src/pkg/manifests/system-man.mf index 31bccf54db..6b21bb432b 100644 --- a/usr/src/pkg/manifests/system-man.mf +++ b/usr/src/pkg/manifests/system-man.mf @@ -12,6 +12,7 @@ # # Copyright 2014 Garrett D'Amore <garrett@damore.org> # Copyright 2015 Nexenta Systems, Inc. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/system/man@$(PKGVERS) @@ -21,12 +22,18 @@ set name=pkg.summary value="Reference Manual Pages Tools" set name=info.classification \ value="org.opensolaris.category.2008:System/Text Tools" set name=variant.arch value=$(ARCH) +dir path=lib/svc +dir path=lib/svc/manifest group=sys +dir path=lib/svc/manifest/system group=sys +dir path=lib/svc/method dir path=usr/bin dir path=usr/share dir path=usr/share/man dir path=usr/share/man/man1 dir path=usr/share/man/man1m dir path=usr/share/man/man5 +file path=lib/svc/manifest/system/update-man-index.xml group=sys mode=0444 +file path=lib/svc/method/update-man-index mode=0555 file path=usr/bin/man mode=0555 file path=usr/bin/mandoc mode=0555 file path=usr/share/man/man1/apropos.1 diff --git a/usr/src/pkg/manifests/system-test-cryptotest.mf b/usr/src/pkg/manifests/system-test-cryptotest.mf index d480522d8b..9b4d8153b9 100644 --- a/usr/src/pkg/manifests/system-test-cryptotest.mf +++ b/usr/src/pkg/manifests/system-test-cryptotest.mf @@ -13,7 +13,7 @@ # Copyright (c) 2012 by Delphix. All rights reserved. # Copyright 2014, OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2015 Nexenta Systems, Inc. All rights reserved. -# Copyright 2018, Joyent, Inc. +# Copyright 2019 Joyent, Inc. # set name=pkg.fmri value=pkg:/system/test/cryptotest@$(PKGVERS) @@ -26,38 +26,146 @@ dir path=opt/crypto-tests dir path=opt/crypto-tests/bin dir path=opt/crypto-tests/runfiles dir path=opt/crypto-tests/tests +dir path=opt/crypto-tests/tests/aes group=root mode=0755 owner=root +dir path=opt/crypto-tests/tests/aes/kcf group=root mode=0755 owner=root +dir path=opt/crypto-tests/tests/aes/pkcs group=root mode=0755 owner=root dir path=opt/crypto-tests/tests/digest dir path=opt/crypto-tests/tests/digest/kcf dir path=opt/crypto-tests/tests/digest/pkcs -dir path=opt/crypto-tests/tests/kcf -dir path=opt/crypto-tests/tests/kcf/aes -dir path=opt/crypto-tests/tests/pkcs -dir path=opt/crypto-tests/tests/pkcs/aes file path=opt/crypto-tests/README mode=0444 file path=opt/crypto-tests/bin/cryptotest mode=0555 file path=opt/crypto-tests/runfiles/default.run mode=0444 -file path=opt/crypto-tests/tests/digest/kcf/sha1 mode=0555 -file path=opt/crypto-tests/tests/digest/kcf/sha256 mode=0555 -file path=opt/crypto-tests/tests/digest/kcf/sha384 mode=0555 -file path=opt/crypto-tests/tests/digest/kcf/sha512 mode=0555 -file path=opt/crypto-tests/tests/digest/pkcs/sha1 mode=0555 -file path=opt/crypto-tests/tests/digest/pkcs/sha256 mode=0555 -file path=opt/crypto-tests/tests/digest/pkcs/sha384 mode=0555 -file path=opt/crypto-tests/tests/digest/pkcs/sha512 mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_cbc mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_ccm mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_cmac mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_ctr mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_ecb mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/aes_gcm mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/cleanup mode=0555 -file path=opt/crypto-tests/tests/kcf/aes/setup mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_cbc mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_ccm mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_cmac mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_ctr mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_ecb mode=0555 -file path=opt/crypto-tests/tests/pkcs/aes/aes_gcm mode=0555 +file opt/crypto-tests/tests/aes/kcf/aes_cbc_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_cbc_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_cbc_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_cbc_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ccm_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ccm_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ccm_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ccm_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_cmac_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_cmac_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_cmac_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_cmac_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ctr_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ctr_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ctr_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ctr_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ecb_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ecb_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_ecb_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_ecb_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_gcm_32 \ + path=opt/crypto-tests/tests/aes/kcf/aes_gcm_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/aes_gcm_64 \ + path=opt/crypto-tests/tests/aes/kcf/aes_gcm_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/cleanup \ + path=opt/crypto-tests/tests/aes/kcf/cleanup group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/kcf/setup \ + path=opt/crypto-tests/tests/aes/kcf/setup group=root mode=0555 owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_cbc_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_cbc_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_cbc_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_cbc_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ccm_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ccm_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ccm_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ccm_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_cmac_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_cmac_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_cmac_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_cmac_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ctr_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ctr_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ctr_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ctr_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ecb_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ecb_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_ecb_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_ecb_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_gcm_32 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_gcm_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/aes/pkcs/aes_gcm_64 \ + path=opt/crypto-tests/tests/aes/pkcs/aes_gcm_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/cleanup \ + path=opt/crypto-tests/tests/digest/kcf/cleanup group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/setup \ + path=opt/crypto-tests/tests/digest/kcf/setup group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha1_32 \ + path=opt/crypto-tests/tests/digest/kcf/sha1_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha1_64 \ + path=opt/crypto-tests/tests/digest/kcf/sha1_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha256_32 \ + path=opt/crypto-tests/tests/digest/kcf/sha256_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha256_64 \ + path=opt/crypto-tests/tests/digest/kcf/sha256_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha384_32 \ + path=opt/crypto-tests/tests/digest/kcf/sha384_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha384_64 \ + path=opt/crypto-tests/tests/digest/kcf/sha384_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha512_32 \ + path=opt/crypto-tests/tests/digest/kcf/sha512_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/kcf/sha512_64 \ + path=opt/crypto-tests/tests/digest/kcf/sha512_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha1_32 \ + path=opt/crypto-tests/tests/digest/pkcs/sha1_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha1_64 \ + path=opt/crypto-tests/tests/digest/pkcs/sha1_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha256_32 \ + path=opt/crypto-tests/tests/digest/pkcs/sha256_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha256_64 \ + path=opt/crypto-tests/tests/digest/pkcs/sha256_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha384_32 \ + path=opt/crypto-tests/tests/digest/pkcs/sha384_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha384_64 \ + path=opt/crypto-tests/tests/digest/pkcs/sha384_64 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha512_32 \ + path=opt/crypto-tests/tests/digest/pkcs/sha512_32 group=root mode=0555 \ + owner=root +file opt/crypto-tests/tests/digest/pkcs/sha512_64 \ + path=opt/crypto-tests/tests/digest/pkcs/sha512_64 group=root mode=0555 \ + owner=root license cr_Sun license=cr_Sun license lic_CDDL license=lic_CDDL depend fmri=driver/crypto/dprov type=require diff --git a/usr/src/pkg/transforms/restart_fmri b/usr/src/pkg/transforms/restart_fmri index 4e20486bc9..d58018cf7d 100644 --- a/usr/src/pkg/transforms/restart_fmri +++ b/usr/src/pkg/transforms/restart_fmri @@ -21,11 +21,18 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -<transform file path=var/svc/manifest/.*\.xml -> add restart_fmri svc:/system/manifest-import:default> -<transform file path=lib/svc/manifest/.*\.xml -> add restart_fmri svc:/system/manifest-import:default> -<transform file path=etc/security/[^/]+_attr.d/.+ -> add restart_fmri svc:/system/rbac:default> -<transform file path=etc/user_attr.d/.+ -> add restart_fmri svc:/system/rbac:default> +<transform file path=var/svc/manifest/.*\.xml -> \ + add restart_fmri svc:/system/manifest-import:default> +<transform file path=lib/svc/manifest/.*\.xml -> \ + add restart_fmri svc:/system/manifest-import:default> +<transform file path=etc/security/[^/]+_attr.d/.+ -> \ + add restart_fmri svc:/system/rbac:default> +<transform file path=etc/user_attr.d/.+ -> \ + add restart_fmri svc:/system/rbac:default> <transform file path=usr/share/applications/.*\.desktop -> \ - add restart_fmri svc:/application/desktop-cache/desktop-mime-cache:default> + add restart_fmri svc:/application/desktop-cache/desktop-mime-cache:default> +<transform file link path=usr/(share|has)/man/.*\.\d[a-z]*$ -> \ + add restart_fmri svc:/system/update-man-index:default> diff --git a/usr/src/test/crypto-tests/tests/common/Makefile b/usr/src/test/crypto-tests/tests/common/Makefile index 8f818223d0..c1c9cfcf50 100644 --- a/usr/src/test/crypto-tests/tests/common/Makefile +++ b/usr/src/test/crypto-tests/tests/common/Makefile @@ -12,7 +12,7 @@ # # Copyright (c) 2012 by Delphix. All rights reserved. # Copyright 2015 Nexenta Systems, Inc. All rights reserved. -# Copyright (c) 2019, Joyent, Inc. +# Copyright 2019 Joyent, Inc. # include $(SRC)/cmd/Makefile.cmd @@ -35,7 +35,5 @@ all install: $(OBJS) $(COMPILE64.c) -o $@ $< $(POST_PROCESS_O) -lint: - clobber clean: -$(RM) $(OBJS) diff --git a/usr/src/uts/common/io/ib/clients/sdp/sdpddi.c b/usr/src/uts/common/io/ib/clients/sdp/sdpddi.c index 16aab2d75e..6ccd9a648c 100644 --- a/usr/src/uts/common/io/ib/clients/sdp/sdpddi.c +++ b/usr/src/uts/common/io/ib/clients/sdp/sdpddi.c @@ -126,7 +126,7 @@ sdp_gen_open(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *credp) /* open routine. */ /*ARGSUSED*/ static int -sdp_gen_close(queue_t *q, dev_t *devp, int flag, int sflag, cred_t *credp) +sdp_gen_close(queue_t *q, int flag, cred_t *credp) { qprocsoff(q); return (0); @@ -250,7 +250,7 @@ done: /* * Received a put from sockfs. We only support ndd get/set */ -static void +static int sdp_gen_wput(queue_t *q, mblk_t *mp) { switch (mp->b_datap->db_type) { @@ -266,8 +266,9 @@ sdp_gen_wput(queue_t *q, mblk_t *mp) break; default: freemsg(mp); - return; + return (0); } + return (0); } static struct module_info info = { @@ -275,12 +276,12 @@ static struct module_info info = { }; static struct qinit rinit = { - NULL, (pfi_t)NULL, (pfi_t)sdp_gen_open, (pfi_t)sdp_gen_close, NULL, + NULL, NULL, sdp_gen_open, sdp_gen_close, NULL, &info, NULL, NULL, NULL, STRUIOT_NONE }; static struct qinit winit = { - (pfi_t)sdp_gen_wput, NULL, (pfi_t)sdp_gen_open, (pfi_t)sdp_gen_close, + sdp_gen_wput, NULL, sdp_gen_open, sdp_gen_close, NULL, &info, NULL, NULL, NULL, STRUIOT_NONE }; diff --git a/usr/src/uts/common/sys/usb/clients/usbser/usbser_rseq.h b/usr/src/uts/common/sys/usb/clients/usbser/usbser_rseq.h index 4a9dc9e6bb..42652adee2 100644 --- a/usr/src/uts/common/sys/usb/clients/usbser/usbser_rseq.h +++ b/usr/src/uts/common/sys/usb/clients/usbser/usbser_rseq.h @@ -142,7 +142,8 @@ enum { /* * convenience macros for rseq definition */ -#define RSEQT(func, cb) { (rseq_func_t)(func), #func, (rseq_cb_t)(cb), 0 } +#define RSEQT(func, cb) { (rseq_func_t)(uintptr_t)(func), #func, \ + (rseq_cb_t)(uintptr_t)(cb), 0 } #define RSEQE(f1, cb1, f2, cb2) { RSEQT(f1, cb1), RSEQT(f2, cb2) } /* @@ -157,7 +158,7 @@ enum { * }; * * int my_do_cb(rseq_t *rseq, int num) - * { return (rseq[num].rval == 0) ? RSEQ_OK : RSEQ_UNDO; } + * { return (rseq[num].rval == 0) ? RSEQ_OK : RSEQ_UNDO; } * * int my_undo_cb(rseq_t *rseq, int num) * { return RSEQ_OK; } |
