[erlang-questions] Preventing calling some functions

Vlad Dumitrescu vladdu55@REDACTED
Fri Dec 11 11:31:57 CET 2009


On Fri, Dec 11, 2009 at 11:07, Joe Armstrong <erlang@REDACTED> wrote:
> It's a but tricky but doable.
> You need to do a parse transform of the source code, the parse transform can
> decide which functions are legal.

This only addresses calling code, but one might even want to be able
to filter out certain processes so that messages can't be sent to them
(given that many APIs can be bypassed by directly sending a message to
the process that handles the functionality).

This is much more difficult to do. If the plugin doesn't use
processes, then it's possible to filter out all 'send's with the parse
transform above, but if they must be able to communicate with some
processes but not with others, then the current architecture makes it
difficult without support from the VM.

It is interesting to think about creating "process sandboxes" inside
the VM, where processes aren't allowed to communicate across the
boundaries (some API should allow to specify exceptions, otherwise
they would be utterly useless). This can be achieved today by using a
separate VM and a custom communication layer, but it feels too
heavyweight if we are talking about running possibly many small

best regards,

More information about the erlang-questions mailing list