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

Re: [MiNT] Memory protection for the FireBee?



On 26 Aug 2015 at 21:50, Vincent Rivière wrote:

> On 26/08/2015 10:51, markus@mubf.de wrote:
> 
> > ... and - just to add another level of complexity - Linux (and other
> > decent operating systems) for sure don't have stupid system calls
> > like Super() that allow arbitrary user processes to go into
> > supervisor mode at their own desire and open up a supervisor stack at
> > arbirtrary memory addresses.
> 
> Maybe the situation is not so bad.
> 
> Why do people want to use memory protection?
> Answer: to safely run clean software. And clean user software usually 
> don't switch to supervisor.
> 
> I saw in FreeMiNT sources something like "fake supervisor mode". From 
> what I understood, when that mode is enabled Super() does not really 
> switch to supervisor mode. It does some black magic (privilege violation 
> handler?) to get the program running, anyway. This can be acceptable if 
> the program just executes a few instructions in supervisor mode, such as 
> reading TOS variables. Maybe I'm completely mistaken, these are only old 
> reminiscences in my mind.
> 
> So IF FreeMiNT's "fake supervisor mode" works as I understood, it may be 
> a solution to workaround all supervisor stack trouble with MMU enabled: 
> FreeMiNT could take care of its own stacks, and the user programs would 
> never really switch to supervisor mode, anyway.
> 
I agree, this may be the best approach for managing the MMU under MiNT on the 
FireBee.

> BTW, why is it so important to enable memory protection on the FireBee? 
> Sure, that would be cleaner, but would it change something for real users?
> 
I don't think it would change anything for real users.  I think the call for 
memory protection is from developers.  But of course, at the moment on the 
FireBee, that's probably most users ;-).

Roger