[squeak-dev] Mirror primitives

Igor Stasenko siguctua at gmail.com
Mon Sep 7 21:55:27 UTC 2009


2009/9/7 Jecel Assumpcao Jr <jecel at merlintec.com>:
> I would just like to mention that Self (and it is likely that Newspeak
> too, but I haven't looked) has mirror *objects* and not mirror
> *primitives*. Yes, these objects actually use primitives to get their
> work done but these primitives don't work for any objects other than
> mirrors (and if Self didn't have a global namespace for primitives, this
> check wouldn't even be necessary since non mirror objects wouldn't even
> have a way to try to invoke these primitives).
>

is this means that mirror primitive implemented to look at some slot
of the receiver
object instead of taking a message argument to reflect the properties
of object to be mirrored?
If so, then it is better, because it makes a bit harder to abuse the prims.

> The mirror objects operate on only one object that is stored as an
> "instance variable" when the mirror was created, so you can't pass
> random objects as parameters. To have a secure system you would only
> have to control the code that allows new mirrors to be created.
> Unfortunately, Self didn't do that but instead allows anybody to create
> a mirror on anybody else. It wouldn't be very hard to do, however. Of
> course, as has already been pointed out this wouldn't get you much in
> terms of security if you keep all the current holes that Squeak has.
>

If we will go at some point to make a secure system, then we should
care at least to not
add a new security gaps and holes in addition to what we already
having - means less work
for people who would want to make a secure system (like Mike van der Gulik)

> One possible objection to mirror objects is that you might need to
> create them exactly in situations where creating new objects might cause
> problems (low memory or certain kinds of bugs).
>
> http://bracha.org/mirrors.pdf has good background information for
> anybody having problems keeping up with this thread.
>
> -- Jecel
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list