Print this page
3830 SIGQUEUE_MAX's limit of 32 is too low

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/signal.h
          +++ new/usr/src/uts/common/sys/signal.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23      - * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  24      - * Use is subject to license terms.
       23 + * Copyright (c) 1988, 2012, Oracle and/or its affiliates. All rights reserved.
  25   24   */
  26   25  
  27   26  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  28   27  /*        All Rights Reserved   */
  29   28  
  30   29  /*
  31   30   * University Copyright- Copyright (c) 1982, 1986, 1988
  32   31   * The Regents of the University of California
  33   32   * All Rights Reserved
  34   33   *
↓ open down ↓ 261 lines elided ↑ open up ↑
 296  295  } sigsend_t;
 297  296  
 298  297  typedef struct {
 299  298          sigqueue_t      sn_sigq;        /* sigq struct for notification */
 300  299          u_longlong_t    sn_snid;        /* unique id for notification   */
 301  300  } signotifyq_t;
 302  301  
 303  302  
 304  303  typedef struct sigqhdr {                /* sigqueue pool header         */
 305  304          sigqueue_t      *sqb_free;      /* free sigq struct list        */
 306      -        uchar_t         sqb_count;      /* sigq free count              */
 307      -        uchar_t         sqb_maxcount;   /* sigq max free count          */
 308      -        ushort_t        sqb_size;       /* size of header+free structs  */
      305 +        int             sqb_count;      /* sigq free count              */
      306 +        uint_t          sqb_maxcount;   /* sigq max free count          */
      307 +        size_t          sqb_size;       /* size of header+free structs  */
 309  308          uchar_t         sqb_pexited;    /* process has exited           */
 310      -        uchar_t         sqb_sent;       /* number of sigq sent          */
      309 +        uint_t          sqb_sent;       /* number of sigq sent          */
 311  310          kcondvar_t      sqb_cv;         /* waiting for a sigq struct    */
 312  311          kmutex_t        sqb_lock;       /* lock for sigq pool           */
 313  312  } sigqhdr_t;
 314  313  
 315      -#define _SIGQUEUE_MAX   32
      314 +/*
      315 + * Limits on maximum number of sigqueue(3C) entries per process.
      316 + */
      317 +#define _SIGQSZ_DEFAULT         128     /* default number */
      318 +#define _SIGQSZ_PRIVILEGED      512     /* privilege required to set abouve */
      319 +#define _SIGQSZ_MAX             8192    /* max even with privilege */
      320 +
 316  321  #define _SIGNOTIFY_MAX  32
 317  322  
 318  323  extern  void    setsigact(int, void (*)(int), const k_sigset_t *, int);
 319  324  extern  void    sigorset(k_sigset_t *, const k_sigset_t *);
 320  325  extern  void    sigandset(k_sigset_t *, const k_sigset_t *);
 321  326  extern  void    sigdiffset(k_sigset_t *, const k_sigset_t *);
 322  327  extern  void    sigintr(k_sigset_t *, int);
 323  328  extern  void    sigunintr(k_sigset_t *);
 324  329  extern  void    sigreplace(k_sigset_t *, k_sigset_t *);
 325  330  
 326  331  extern  int     kill(pid_t, int);
 327  332  
 328  333  #endif /* _KERNEL */
 329  334  
 330  335  #ifdef  __cplusplus
 331  336  }
 332  337  #endif
 333  338  
 334  339  #endif /* _SYS_SIGNAL_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX