Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 1999 17:41:33 -0300 (EST)
From:      Gustavo Vieira Goncalves Coelho Rios <grios@gabriel.netshell.com.br>
To:        Oscar Bonilla <obonilla@fisicc-ufm.edu>
Cc:        dan@jgl.reno.nv.us, grios@netshell.vicosa.com.br, freebsd-questions@FreeBSD.ORG, grog@lemis.com
Subject:   Re: assembly
Message-ID:  <Pine.LNX.4.10.9902241739570.29773-100000@gabriel.netshell.com.br>
In-Reply-To: <199902241758.LAA41672@fisicc-ufm.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Thank you for your nice answer! It was very, very good!
That's the way others should follow too!
If ones can contribute with answer, mail them, or else, don't send
nothing!

---
I use UNIX because reboots are for hardware upgrades.
You use windowze because the guy on TV told you to ...
--- Gustavo Rios - UIN 27456973 - UNIX Sys Admin -----

On Wed, 24 Feb 1999, Oscar Bonilla wrote:

> > I don't believe (i am sorry if i am wrong, but i am a beginner)!
> > If i use assembly i do not need to read a file via read API, i can
> > access the HD directly, without to check for access permissions, right ?
> > If so, i can hack a UNIX system (no matter which) using assembly!
> >
> > Am i wrong ?
> >
> YES!
> 
> i know you've been replied more than once on this, but here goes my reply too.
> 
> advice: get a book about operating systems and another book on computer
> architecture.
> 
> look up the following:
> 
> dual mode operation (kernel mode, user mode)
> protection
> address spaces
> memory translation
> 
> assembler is a programming language, and as such is no different than C.
> i mean, the c compiler translates your C code to assembler and the assembles
> it using an assembler (as). Anything you can do in assembler you can do in C.
> the protection is not in the C compiler, is in the way the cpu runs your programs.  in unix, the kernel runs in a higher level of protection than user programs.
> this means that some instruction are priviledged and can only be executed by
> the kernel.
> 
> if you write a program in assembler that tries to write directly to the
> hard drive without using the system call interface (API as you called it)
> the cpu will say "hey! this is a priviledged operation this user program is
> trying to execute, better check what the kernel has to say about it" and
> inform the kernel via a trap. the kernel will happily kill your process.
> end of story.
> 
> as i said before, get a book about OS's and CA.
> 
> regards,
> 
> -oscar
> 
> 



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.9902241739570.29773-100000>