diff options
author | Dan McDonald <danmcd@joyent.com> | 2021-09-20 11:34:51 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2021-09-20 11:34:51 -0400 |
commit | 3292aebaef670e65fad0c33d044aa434de77f55b (patch) | |
tree | cb1a3d9d13fb0c956239038377a5853f4797e663 | |
parent | 0bebf3fdebb55b6b9d066c34b50a1d44486b3829 (diff) | |
parent | 80cb7d835ea830bbb01519a84135ba3099446327 (diff) | |
download | illumos-joyent-3292aebaef670e65fad0c33d044aa434de77f55b.tar.gz |
[illumos-gate merge]
commit 80cb7d835ea830bbb01519a84135ba3099446327
14089 gfx_private: do not read from WC memory
commit 3ef858b31c01b625ea69d415521ccf427333f52d
14085 ASSERT failure in smb_sd_tofs
commit afe82bdcea10db1bde6221f8e9322146b418270d
14072 picl: cast between incompatible function types
commit aa2e4271d40e09086d298155a3a5342859fe4f99
14073 kdb/ldap: symbol referencing errors
commit 78ae253a3309cb154a6be6e052d996ecb62741c4
14071 picl: multiply-defined symbols
commit d14c75765f135e18be90138d0a8aed8c3f7395bf
14068 scadm: cast between incompatible function types
commit 50e803017668ce124e5b7c37cae78c397813805a
14074 sbd: macro expands to multiple statements
commit a0ff59d0a2ee2e2fae253ea72aa6e4b41d524191
14084 loader can't activate BEs
-rw-r--r-- | usr/src/boot/sys/boot/forth/support.4th | 2 | ||||
-rw-r--r-- | usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h | 20 | ||||
-rw-r--r-- | usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c | 9 | ||||
-rw-r--r-- | usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h | 10 | ||||
-rw-r--r-- | usr/src/cmd/scadm/sparc/mpxu/common/modem_setup.c | 19 | ||||
-rw-r--r-- | usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/uts/common/fs/smbsrv/smb_sd.c | 27 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c | 44 | ||||
-rw-r--r-- | usr/src/uts/sun4u/sys/sbdpriv.h | 8 |
9 files changed, 75 insertions, 66 deletions
diff --git a/usr/src/boot/sys/boot/forth/support.4th b/usr/src/boot/sys/boot/forth/support.4th index 50d368ef9f..961d3b528a 100644 --- a/usr/src/boot/sys/boot/forth/support.4th +++ b/usr/src/boot/sys/boot/forth/support.4th @@ -538,7 +538,7 @@ variable fd get-current ( -- wid ) previous definitions >search ( wid -- ) : reset_line_reading - 0 read_buffer .len ! + 0 to read_buffer_ptr ; : read_line diff --git a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h index 27051316c0..7be7a37cc2 100644 --- a/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h +++ b/usr/src/cmd/picl/plugins/sun4u/enchilada/envd/envd.h @@ -27,8 +27,6 @@ #ifndef _ENVD_H #define _ENVD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <libintl.h> @@ -208,7 +206,7 @@ typedef int16_t tempr_t; #define SENSOR_INT_AMB_1 "int-amb1" /* Bit Map of ADM 1031 Status 1/2 Registers */ -enum adm1031 { +typedef enum adm1031 { FANFAULT = 0x2, REMOTEHIGH = 0x4, REMOTELOW = 0x8, @@ -218,7 +216,7 @@ enum adm1031 { } adm1031_t; /* ADM Stat 1/2 Mask */ -enum adm1031Mask { +typedef enum adm1031Mask { STAT1MASK = 0xdc, STAT2MASK = 0x1c } adm1031Mask_t; @@ -386,11 +384,11 @@ typedef struct env_sensor { void *fanp; int fd; /* device file descriptor */ int error; /* error flag */ - boolean_t present; /* sensor present */ + boolean_t present; /* sensor present */ tempr_t cur_temp; /* current temperature */ time_t warning_tstamp; /* last warning time (secs) */ time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ + boolean_t shutdown_initiated; /* shutdown initated */ table_t *crtbl; /* Correction Table */ tempr_t tmin; } env_sensor_t; @@ -410,14 +408,14 @@ typedef struct env_disk { int current_temp; int ref_temp; int reliability_temp; - uchar_t high_shutdown; - uchar_t high_warning; - uchar_t low_warning; - uchar_t low_shutdown; + uchar_t high_shutdown; + uchar_t high_warning; + uchar_t low_warning; + uchar_t low_shutdown; time_t warning_start; /* warning start time (secs) */ time_t warning_tstamp; /* last warning time (secs) */ time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ + boolean_t shutdown_initiated; /* shutdown initated */ } env_disk_t; extern env_disk_t *disk_lookup(char *disk_name); diff --git a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c index d40a90b211..23f020218a 100644 --- a/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c +++ b/usr/src/cmd/picl/plugins/sun4u/psvc/psvcplugin/psvcplugin.c @@ -518,8 +518,10 @@ static void lock_and_run(ETask_t *tp, int32_t obj_num) (void) pthread_mutex_unlock(&env_lock_mutex); } -static void run_policies(EInterval_t *ip) +static void * +run_policies(void *ptr) { + EInterval_t *ip = ptr; ETask_t *tp; int32_t i, j; @@ -545,14 +547,15 @@ static void run_policies(EInterval_t *ip) break; } } while (ip->interval); + + return (NULL); } static void thread_setup(EInterval_t *ip) { int32_t status; - status = pthread_create(&ip->thread, NULL, (void *(*)())run_policies, - ip); + status = pthread_create(&ip->thread, NULL, run_policies, ip); if (status != 0) { if (debug_flag) syslog(LOG_ERR, "%s", strerror(errno)); diff --git a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h b/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h index 0dc89aeb2f..bce2529afd 100644 --- a/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h +++ b/usr/src/cmd/picl/plugins/sun4u/taco/envd/envd.h @@ -27,8 +27,6 @@ #ifndef _ENVD_H #define _ENVD_H -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> #include <libintl.h> @@ -138,7 +136,7 @@ typedef int16_t tempr_t; #define SENSOR_INT_AMB "int-amb" /* Bit Map of ADM 1031 Status 1/2 Registers */ -enum adm1031 { +typedef enum adm1031 { FANFAULT = 0x2, REMOTEHIGH = 0x4, REMOTELOW = 0x8, @@ -148,7 +146,7 @@ enum adm1031 { } adm1031_t; /* ADM Stat 1/2 Mask */ -enum adm1031Mask { +typedef enum adm1031Mask { STAT1MASK = 0xdc, STAT2MASK = 0x1c } adm1031Mask_t; @@ -305,11 +303,11 @@ typedef struct env_sensor { void *fanp; int fd; /* device file descriptor */ int error; /* error flag */ - boolean_t present; /* sensor present */ + boolean_t present; /* sensor present */ tempr_t cur_temp; /* current temperature */ time_t warning_tstamp; /* last warning time (secs) */ time_t shutdown_tstamp; /* shutdown temp time (secs) */ - boolean_t shutdown_initiated; /* shutdown initated */ + boolean_t shutdown_initiated; /* shutdown initated */ table_t *crtbl; /* Correction table */ tempr_t tmin; } env_sensor_t; diff --git a/usr/src/cmd/scadm/sparc/mpxu/common/modem_setup.c b/usr/src/cmd/scadm/sparc/mpxu/common/modem_setup.c index fa273e0219..03acf1ad66 100644 --- a/usr/src/cmd/scadm/sparc/mpxu/common/modem_setup.c +++ b/usr/src/cmd/scadm/sparc/mpxu/common/modem_setup.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * modem_setup.c: support for the scadm modem_setup option (access to the * service processor modem - if present) @@ -47,7 +45,7 @@ extern char *ADM_Get_Var(char *Variable); static void ADM_Send_Char(char C); -static void ADM_Modem_Listen(); +static void *ADM_Modem_Listen(void *); static void cleanup(); @@ -59,7 +57,7 @@ static pthread_t modemListen; void -ADM_Process_modem_setup() +ADM_Process_modem_setup(void) { rscp_msg_t msg; struct timespec timeout; @@ -95,8 +93,7 @@ ADM_Process_modem_setup() /* Create Listening Thread */ ADM_Continue = 1; - if (pthread_create(&modemListen, NULL, - (void * (*)(void *))ADM_Modem_Listen, (void *)NULL) != 0) { + if (pthread_create(&modemListen, NULL, ADM_Modem_Listen, NULL) != 0) { (void) fprintf(stderr, "\n%s\n\n", gettext("scadm: couldn't create thread")); exit(-1); @@ -120,7 +117,8 @@ ADM_Process_modem_setup() printw("\n%s\n\n", string); while (exitLoop) { - while ((Input = getch()) == ERR); + while ((Input = getch()) == ERR) + ; if (Input == 10) { State = ST_RESET; @@ -164,7 +162,7 @@ ADM_Process_modem_setup() /* Terminate Thread */ ADM_Continue = 0; - (void) sleep(3); /* Make sure thread has time to 'see' */ + (void) sleep(3); /* Make sure thread has time to 'see' */ /* termination */ msg.type = DP_MODEM_DISCONNECT; @@ -212,8 +210,8 @@ ADM_Send_Char(char C) } -static void -ADM_Modem_Listen() +static void * +ADM_Modem_Listen(void *arg __unused) { rscp_msg_t Message; struct timespec Timeout; @@ -237,6 +235,7 @@ ADM_Modem_Listen() (void) fflush(stdout); ADM_Free(&Message); } + return (NULL); } diff --git a/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com b/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com index 966241305e..67cdcc5980 100644 --- a/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com +++ b/usr/src/lib/krb5/plugins/kdb/ldap/Makefile.com @@ -66,7 +66,7 @@ CERRWARN += -_gcc=-Wno-unused-function DYNFLAGS += $(KERBRUNPATH) # setting -L $(ROOT)/usr/lib/gss because libkdb_ldap needs mech_krb5 -LDLIBS += -L $(ROOT)/usr/lib/gss -L $(ROOTLIBDIR) -lkdb_ldap +LDLIBS += -L $(ROOT)/usr/lib/gss -L $(ROOTLIBDIR) -lkdb_ldap -lc .KEEP_STATE: diff --git a/usr/src/uts/common/fs/smbsrv/smb_sd.c b/usr/src/uts/common/fs/smbsrv/smb_sd.c index f7e056c511..946503fa8f 100644 --- a/usr/src/uts/common/fs/smbsrv/smb_sd.c +++ b/usr/src/uts/common/fs/smbsrv/smb_sd.c @@ -22,7 +22,7 @@ * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. * - * Copyright 2020 Nexenta by DDN, Inc. All rights reserved. + * Copyright 2021 Tintri by DDN, Inc. All rights reserved. */ /* @@ -250,18 +250,29 @@ smb_sd_tofs(smb_sd_t *sd, smb_fssd_t *fs_sd) * SACL_SECINFO, but not SACL_PRESENT, and this means the client intends * to remove the SACL. * - * If the *_PRESENT bit isn't set, then the respective ACL will be NULL. - * [MS-DTYP] disallows providing an ACL when the PRESENT bit isn't set. - * This is enforced by smb_decode_sd(). + * Note that Windows behavior differs from that described in [MS-DTYP]. + * MS-DTYP states that the offset is nonzero if-and-only-if the PRESENT + * bit is set. It also states that a DACL that is marked non-present + * is equivalent to 'no security', but one that is marked present and + * provides no ACEs is equivalent to 'no access'. + * + * Windows, on the other hand, allows the offset to be 0 even when + * the PRESENT bit is set, and only provides security when the DACL + * offset is non-zero. It will also convert an SD where the DACL is + * marked not-present to one where the PRESENT bit is set and the + * offset is 0. * - * We allow the SACL to be NULL, but we MUST have a DACL. + * If the *_PRESENT bit isn't set, then the respective ACL will be NULL. + * For the fssd, we allow the SACL to be NULL, but we MUST have a DACL. * If the DACL is NULL, that's equivalent to "everyone:full_set:allow". + * + * The IMPLY's should be enforced by smb_decode_sd(). */ /* DACL */ if (fs_sd->sd_secinfo & SMB_DACL_SECINFO) { - ASSERT3U(((sd->sd_control & SE_DACL_PRESENT) != 0), ==, - (sd->sd_dacl != NULL)); + IMPLY(sd->sd_dacl != NULL, + (sd->sd_control & SE_DACL_PRESENT) != 0); status = smb_acl_to_zfs(sd->sd_dacl, flags, SMB_DACL_SECINFO, &fs_sd->sd_zdacl); if (status != NT_STATUS_SUCCESS) @@ -270,6 +281,8 @@ smb_sd_tofs(smb_sd_t *sd, smb_fssd_t *fs_sd) /* SACL */ if (fs_sd->sd_secinfo & SMB_SACL_SECINFO) { + IMPLY(sd->sd_sacl != NULL, + (sd->sd_control & SE_SACL_PRESENT) != 0); if (sd->sd_control & SE_SACL_PRESENT) { status = smb_acl_to_zfs(sd->sd_sacl, flags, SMB_SACL_SECINFO, &fs_sd->sd_zsacl); diff --git a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c index dce4562987..e2668b24db 100644 --- a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c +++ b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c @@ -424,12 +424,17 @@ bitmap_cons_display(struct gfxp_fb_softc *softc, struct vis_consdisplay *da) /* write all scanlines in rectangle */ for (i = 0; i < da->height; i++) { - uint8_t *dest = fbp + i * console->fb.pitch; + uint8_t *dest = sfbp + i * console->fb.pitch; uint8_t *src = da->data + i * size; - if (softc->mode == KD_TEXT) - bitmap_cpy(dest, src, size, console->fb.bpp); - dest = sfbp + i * console->fb.pitch; + + /* alpha blend bitmap to shadow fb. */ bitmap_cpy(dest, src, size, console->fb.bpp); + if (softc->mode == KD_TEXT) { + /* Copy from shadow to fb. */ + src = dest; + dest = fbp + i * console->fb.pitch; + (void) memcpy(dest, src, size); + } } } @@ -536,11 +541,10 @@ bitmap_display_cursor(struct gfxp_fb_softc *softc, struct vis_conscursor *ca) fb8 = console->fb.fb + offset + i * pitch; sfb8 = console->fb.shadow_fb + offset + i * pitch; for (j = 0; j < size; j += 1) { + sfb8[j] = (sfb8[j] ^ (fg & 0xff)) ^ (bg & 0xff); if (softc->mode == KD_TEXT) { - fb8[j] = (fb8[j] ^ (fg & 0xff)) ^ - (bg & 0xff); + fb8[j] = sfb8[j]; } - sfb8[j] = (sfb8[j] ^ (fg & 0xff)) ^ (bg & 0xff); } } break; @@ -556,12 +560,11 @@ bitmap_display_cursor(struct gfxp_fb_softc *softc, struct vis_conscursor *ca) sfb16 = (uint16_t *) (console->fb.shadow_fb + offset + i * pitch); for (j = 0; j < ca->width; j++) { - if (softc->mode == KD_TEXT) { - fb16[j] = (fb16[j] ^ (fg & 0xffff)) ^ - (bg & 0xffff); - } sfb16[j] = (sfb16[j] ^ (fg & 0xffff)) ^ (bg & 0xffff); + if (softc->mode == KD_TEXT) { + fb16[j] = sfb16[j]; + } } } break; @@ -576,22 +579,17 @@ bitmap_display_cursor(struct gfxp_fb_softc *softc, struct vis_conscursor *ca) fb8 = console->fb.fb + offset + i * pitch; sfb8 = console->fb.shadow_fb + offset + i * pitch; for (j = 0; j < size; j += 3) { - if (softc->mode == KD_TEXT) { - fb8[j] = (fb8[j] ^ ((fg >> 16) & 0xff)) - ^ ((bg >> 16) & 0xff); - fb8[j+1] = - (fb8[j+1] ^ ((fg >> 8) & 0xff)) ^ - ((bg >> 8) & 0xff); - fb8[j+2] = (fb8[j+2] ^ (fg & 0xff)) ^ - (bg & 0xff); - } - sfb8[j] = (sfb8[j] ^ ((fg >> 16) & 0xff)) ^ ((bg >> 16) & 0xff); sfb8[j+1] = (sfb8[j+1] ^ ((fg >> 8) & 0xff)) ^ ((bg >> 8) & 0xff); sfb8[j+2] = (sfb8[j+2] ^ (fg & 0xff)) ^ (bg & 0xff); + if (softc->mode == KD_TEXT) { + fb8[j] = sfb8[j]; + fb8[j+1] = sfb8[j+1]; + fb8[j+2] = sfb8[j+2]; + } } } break; @@ -604,9 +602,9 @@ bitmap_display_cursor(struct gfxp_fb_softc *softc, struct vis_conscursor *ca) sfb32 = (uint32_t *) (console->fb.shadow_fb + offset + i * pitch); for (j = 0; j < ca->width; j++) { - if (softc->mode == KD_TEXT) - fb32[j] = (fb32[j] ^ fg) ^ bg; sfb32[j] = (sfb32[j] ^ fg) ^ bg; + if (softc->mode == KD_TEXT) + fb32[j] = sfb32[j]; } } break; diff --git a/usr/src/uts/sun4u/sys/sbdpriv.h b/usr/src/uts/sun4u/sys/sbdpriv.h index 4f15ebb8c7..ddcd9d7ca3 100644 --- a/usr/src/uts/sun4u/sys/sbdpriv.h +++ b/usr/src/uts/sun4u/sys/sbdpriv.h @@ -27,8 +27,6 @@ #ifndef _SYS_SBDPRIV_H #define _SYS_SBDPRIV_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -105,7 +103,7 @@ typedef struct { SBDP_IOCTL_FLAG_FORCE : 0) typedef struct sbd_handle { - void *h_sbd; + void *h_sbd; sbderror_t *h_err; dev_t h_dev; /* dev_t of opened device */ int h_cmd; /* ioctl argument */ @@ -141,12 +139,14 @@ typedef struct sbd_handle { ((ep)->e_rsc[0] = '\0') #define SBD_GET_PERR(spe, ep) \ +{ \ (ep)->e_errno = EIO; \ (ep)->e_code = (spe)->e_code; \ if (*((spe)->e_rsc) != '\0') \ bcopy((caddr_t)((spe)->e_rsc), \ (caddr_t)((ep))->e_rsc, \ - sizeof (((ep))->e_rsc)); + sizeof (((ep))->e_rsc)); \ +} /* * dev_t is shared by PIM and PSM layers. |