Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 1997 21:00:05 -0600 (CST)
From:      jlemon@americantv.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   i386/2682: sigreturn() error code disagrees with man page
Message-ID:  <199702070300.VAA07321@sumatra.americantv.com>
Resent-Message-ID: <199702070320.TAA27304@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         2682
>Category:       i386
>Synopsis:       sigreturn() error code disagrees with man page
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb  6 19:20:04 PST 1997
>Last-Modified:
>Originator:     Jonathan Lemon
>Organization:
>Release:        FreeBSD 2.2-961014-SNAP i386
>Environment:
	-current

>Description:

	The manual page for sigreturn() says:

     [EFAULT]  Scp points to memory that is not a valid part of the process
               address space.

     [EINVAL]  The process status longword is invalid or would improperly
               raise the privilege level of the process.

	But sigreturn() returns EINVAL for all cases.

>How-To-Repeat:
>Fix:
	Change the manual page, or apply the following patch:

*** machdep.c   Thu Feb  6 20:34:22 1997
--- machdep.c.new       Thu Feb  6 20:36:04 1997
***************
*** 617,623 ****
        regs[tISP] = scp->sc_isp;
  
        if (useracc((caddr_t)scp, sizeof (*scp), B_WRITE) == 0)
!               return(EINVAL);
  
        if (scp->sc_onstack & 01)
                p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
--- 617,623 ----
        regs[tISP] = scp->sc_isp;
  
        if (useracc((caddr_t)scp, sizeof (*scp), B_WRITE) == 0)
!               return(EFAULT);
  
        if (scp->sc_onstack & 01)
                p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702070300.VAA07321>