Does inline assembly need to have permission in linux?

Can any user run inline assembly for current linux kernel or does that require special permission?

Answers


Inline assembly has nothing to do with the kernel. So the answer is no.

Anyone can write inline assembly and compile it into the program. It isn't any different from compiler generated code.

As for your comment, the answer is no it's not possible because of memory protection. As soon as you try to access memory that isn't mapped or you're not allowed to (whether it'd be in C or via inline assembly), you'll get a seg-fault.


In other words, the layer of protection is not between the C code and the compiler. It's between the compiled code and the operating system.

So you can't damage the kernel using C or inline assembly - unless you have acquired the permissions to do so.


Need Your Help

iOS/iPhone app seems to add a color mask/color shade to my text

ios iphone xcode xcode6 apple-watch

I have some colored images and same colored text on an iPhone App screen. The images show as expected, but when I use the same RGB color code on the text, it appears different on the finished app (...

how to connect to another sql server database(server pc) in local area network

sql-server-2005 sql-server-2005-express

i m creating an application, inwhich client has to acces a database stored in a remote location connnected through a live ip. how can i connect simply with a database server placed in LAN. both us...