[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] kernel 1.15.10b fragmentation



Hi!

On Tue, Jan 02, 2001 at 01:13:20AM +0100, Guido Flohr wrote:
> Proposal for new kernel function:
> 
> 	long MAccess (unsigned long address, unsigned long size,
> 		      short int mode);
> 
> This function should allow "innocent" applications to check a pointer
> of foreign or otherwise dubious origin before it is being used.  The
> "mode" argument should hold a bit vector with the desired access method
> (read, write or both).

Mhmm. That sounds nice, and offers an easy way for non-C-programmers to
do such a check, as other languages usually don't have the possibility
to install signal handlers and/or some setjmp()/longjmp() functionality.

The main problem with that call is of course that it would not help at
all when the user doesn't run a MiNT kernel that already supports it.

> Such a call would probably be a little more performant than installing a
> signal handler for SIGSEGV.

It's SIGBUS, but anyway: I don't think that performance is actually
critical for such checks.


Ciao

Thomas


-- 
Thomas Binder (Gryf @ IRCNet)  gryf@hrzpub.tu-darmstadt.de
PGP-key available on request!  binder@rbg.informatik.tu-darmstadt.de
Vote against SPAM:             http://www.politik-digital.de/spam/

Attachment: pgpSHwicZNKSw.pgp
Description: PGP signature