From owner-freebsd-current Sat Oct 2 16:43:27 1999 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id C86E114FDF; Sat, 2 Oct 1999 16:43:01 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from d244.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id JAA13348; Sun, 3 Oct 1999 09:44:06 +1000 Date: Sun, 3 Oct 1999 09:42:45 +1000 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: John Polstra Cc: "David O'Brien" , current@FreeBSD.ORG, Alan Cox Subject: Re: Now that sigcontext is gone ... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > >> > 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. > > > > So lets make the change for 4.0. :-) > > Hang on, hang on. This has been discussed in the mailing list > before. Bruce pointed out that it's useful for distinguishing between > protection violations and unmapped pages. He requested that we I think the POSIX way is to use an auxiliary error code in siginfo_t to distinguish the causes of the signal. This only works for SA_SIGINFO handlers. We do something similar using the signal code of 3-arg signal handlers. > first implement the SA_SIGINFO support to the point where it could > accomplish that before changing SIGBUS to SIGSEGV. I think that makes > sense. SA_SIGINFO is implemented now. More details on the POSIX signal numbers: SIGBUS is mainly for accesses beyond the end of mmap()ed objects. It's not clear what this means in an address space with multiple mmap()ed objects and/or non-mmap()ed objects. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message