harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [jira] Created: (HARMONY-2544) [drlvm][jvmti] Check of settable system properties
Date Mon, 25 Dec 2006 21:53:23 GMT
On Monday 18 December 2006 15:38 Geir Magnusson Jr. wrote:
> Ivan Popov wrote:
> > I think VM should protect those properties which can affect VM
> > behavior and lead to VM crash or malfunction if are set incorrectly in
> > command line or by a JVMTI tools. I don't see any need for protecting
> > other properties.
>
> I agree - also, any security implications for allowing some of these to
> be changed?

The properties which may lead to VM malfunction are those that are related to 
paths, like library and bootclasspath. Those which are protected by this 
patch are java.vm.vendor, java.vm.version, java.vm.name and java.vm.info. 
They may be changed safely I think.

I could imagine an application which would depend on java.vm.vendor to be Sun 
and work differently in other cases. To debug such application the developer 
would probably want to change java.vm.vendor property to pretend that VM is 
Sun's. So there is a valid use case for changing this property, probably for 
other java.vm.* too.

I think I'll close HARMONY-2544 as invalid. Reopen it if you disagree.

> > Thanks.
> > Ivan
> >
> > On 12/15/06, Gregory Shimansky <gshimansky@gmail.com> wrote:
> >> I could argue with Pavel that we have to have read only system
> >> properties which cannot be set from JVMTI. The specification doesn't say
> >> that it is necessary to have read only properties, it just mentions that
> >> SetSystemProperty may return an error
> >> JVMTI_ERROR_NOT_AVAILABLE<http://java.sun.com/j2se/1.5.0/docs/guide/jvmt
> >>i/jvmti.html#JVMTI_ERROR_NOT_AVAILABLE>if
> >>
> >> a property is not writable. But which properties are writable or not
> >> is
> >> not specified.
> >>
> >> From the patch it seems Sun doesn't allow JVMTI to set java.vm.vendor,
> >> java.vm.version, java.vm.name and java.vm.info. But I don't really
> >> like to
> >> disallow things for no apparent reason. So my question is, should be
> >> have read only properties like Sun? What do you think?
> >>
> >> 2006/12/8, Pavel Rebriy (JIRA) <jira@apache.org>:
> >> > [drlvm][jvmti] Check of settable system properties
> >> > --------------------------------------------------
> >> >
> >> >                  Key: HARMONY-2544
> >> >                  URL:
> >> > http://issues.apache.org/jira/browse/HARMONY-2544 Project: Harmony
> >> >           Issue Type: Bug
> >> >           Components: DRLVM
> >> >             Reporter: Pavel Rebriy
> >> >
> >> >
> >> > According to Java Specification [1] it is necessary to have some
> >>
> >> read only
> >>
> >> > system properties.
> >> >
> >> > Here is a test created on reference VM behavior to check if system
> >> > property is settable or not.
> >> >
> >> > [1]
> >>
> >> http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#SetSystemProp
> >>erty
> >>
> >> > --
> >> > This message is automatically generated by JIRA.
> >> > -
> >> > If you think it was sent incorrectly contact one of the
> >> > administrators:
> >> > http://issues.apache.org/jira/secure/Administrators.jspa
> >> > -
> >> > For more information on JIRA, see:
> >>
> >> http://www.atlassian.com/software/jira
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Gregory Shimansky, Intel Middleware Products Division

-- 
Gregory

Mime
View raw message