Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
    usr/src/uts/common/fs/proc/prcontrol.c
    usr/src/uts/intel/os/archdep.c
    usr/src/uts/intel/sys/ucontext.h
    usr/src/uts/intel/syscall/getcontext.c

Split Close
Expand all
Collapse all
          --- old/usr/src/head/ucontext.h
          +++ new/usr/src/head/ucontext.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*      Copyright (c) 1988 AT&T */
  22   22  /*        All Rights Reserved   */
  23   23  
  24   24  
  25   25  /*
  26   26   * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       27 + * Copyright 2023 Oxide Computer Company
  27   28   *
  28   29   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  29   30   * Use is subject to license terms.
  30   31   */
  31   32  
  32   33  #ifndef _UCONTEXT_H
  33   34  #define _UCONTEXT_H
  34   35  
  35   36  #include <sys/ucontext.h>
  36   37  /*
↓ open down ↓ 3 lines elided ↑ open up ↑
  40   41   * due to those defines unexpectedly polluting the namespace.
  41   42   * On the other hand, several existing applications assume that
  42   43   * the regset names are defined after an include <ucontext.h>.
  43   44   * To solve both problems at once: <ucontext.h> (this file)
  44   45   * DOES include sys/regset.h for you but <sys/ucontext.h>
  45   46   * does NOT include sys/regset.h anymore.
  46   47   */
  47   48  #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
  48   49  #include <sys/regset.h>
  49   50  #include <sys/siginfo.h>
       51 +#include <sys/int_types.h>
  50   52  #endif
  51   53  
  52   54  #ifdef  __cplusplus
  53   55  extern "C" {
  54   56  #endif
  55   57  
  56   58  #ifdef __sparc
  57   59  #ifdef __PRAGMA_REDEFINE_EXTNAME
  58   60  #pragma redefine_extname        makecontext     __makecontext_v2
  59   61  #else
  60   62  #define makecontext     __makecontext_v2
  61   63  #endif
  62   64  #endif
  63   65  
  64   66  extern int getcontext(ucontext_t *) __RETURNS_TWICE;
  65   67  #pragma unknown_control_flow(getcontext)
  66      -extern int setcontext(const ucontext_t *) __NORETURN;
       68 +extern int setcontext(const ucontext_t *);
  67   69  extern int swapcontext(ucontext_t *_RESTRICT_KYWD,
  68   70                  const ucontext_t *_RESTRICT_KYWD);
  69   71  extern void makecontext(ucontext_t *, void(*)(), int, ...);
  70   72  
  71   73  #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
       74 +extern ucontext_t *ucontext_alloc(uint32_t);
       75 +extern void ucontext_free(ucontext_t *);
       76 +extern int getcontext_extd(ucontext_t *, uint32_t) __RETURNS_TWICE;
       77 +#pragma unknown_control_flow(getcontext_extd)
       78 +extern int swapcontext_extd(ucontext_t *_RESTRICT_KYWD, uint32_t,
       79 +                const ucontext_t *_RESTRICT_KYWD);
  72   80  extern int walkcontext(const ucontext_t *, int (*)(uintptr_t, int, void *),
  73   81      void *);
  74   82  extern int printstack(int);
  75   83  extern int addrtosymstr(void *, char *, int);
  76   84  extern int getustack(stack_t **);
  77   85  extern int setustack(stack_t *);
  78   86  
  79   87  extern int stack_getbounds(stack_t *);
  80   88  extern int stack_setbounds(const stack_t *);
  81   89  extern int stack_inbounds(void *);
  82   90  extern int stack_violation(int, const siginfo_t *, const ucontext_t *);
  83   91  
  84   92  extern void *_stack_grow(void *);
  85   93  #endif  /* !_XPG4_2 || __EXTENSIONS__ */
  86   94  
  87   95  #ifdef  __cplusplus
  88   96  }
  89   97  #endif
  90   98  
  91   99  #endif  /* _UCONTEXT_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX