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

Increase file upload size limit in iis6

.net iis-6 file-upload uploading

Is there any other place besides the metabase.xml file where the file upload size can be modified?

stack traces stop before getting to my code (on Android using NDK)

c++ android gdb android-ndk

I'm developing on Android 2.3.x using NDK r5b. Occasionally my code crashes and I'd like to know where. I already know how to get the corresponding line in my application when I have a have a pointer

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.