Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Sep 1999 14:43:41 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        Alan Cox <alc@cs.rice.edu>
Cc:        current@freebsd.org
Subject:   Re: Now that sigcontext is gone ...
Message-ID:  <XFMail.990930144341.jdp@polstra.com>
In-Reply-To: <19990930162834.C20978@nonpc.cs.rice.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Alan Cox wrote:

>         /* kludge to pass faulting virtual address to sendsig */
>         frame->tf_err = eva;
> 
>         return((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
> }
> 
> Up until this point, frame->tf_err tells me details about the page
> fault, such as whether it was a read or a write access.  I'd really
> like that information to make it out to user-level in addition
> to the faulting address.  In other words, we should find another
> way to pass the faulting address to sendsig than by overwriting
> frame->tf_err.

Sounds reasonable to me.

> P.S.  This also reminds me that FreeBSD is non-standard relative
> to Linux and all of the major vender commercial Unices in that a disallowed
> access, such as a write to a read-only region of memory, generates
> a SIGBUS rather than a SIGSEGV.

Yes, this even violates the 1996 POSIX spec.

John
---
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "No matter how cynical I get, I just can't keep up."        -- Nora Ephron



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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