[lkml]   [1997]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux for JavaVM
Followup to:  <5bi7jd$2gd$>
By author: (Matthias Urlichs)
In newsgroup:
> >
> Yes: you are wrong. The bytecode does NOT support such C features as
> "dereference an arbitrary pointer". The Java VM is supposed to afford a
> safe, "boxed", environment for arbitrary Java code snippets. You can't do
> that if you would ever allow the bytecode equivalent of perfectly-legal C
> code such as "*(char *)0x123456 = 0x78" to run.

Sure you can. You just have to either make sure 0x123456 is a memory
location the applet is allowed to access, or fault. This is a
function of the byte code interpreter. The Linux kernel allows C
programs to do *(char *)0x123456 = 0x78; for example, but that doesn't
give them access to arbitrary memory locations. This is a feature of
the CPUs used. When you write a byte code interpreter (or compiler)
you are doing a "virtual CPU", in effect, so you can define it to have
whatever security features you choose.

Note that that doesn't mean the Java spec supports this kinds of
operations (AFAIK it doesn't) but it doesn't mean it isn't possible.

This space intentionally has nothing but text explaining why this
space has nothing but text explaining that this space would otherwise
have been left blank, and would otherwise have been left blank.

 \ /
  Last update: 2005-03-22 13:38    [W:0.051 / U:1.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site