Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(backend): refine approach of funds forbidding #4399

Open
breathx opened this issue Dec 12, 2024 · 0 comments · May be fixed by #4409
Open

refactor(backend): refine approach of funds forbidding #4399

breathx opened this issue Dec 12, 2024 · 0 comments · May be fixed by #4409
Assignees

Comments

@breathx
Copy link
Member

breathx commented Dec 12, 2024

Currently blacklisting funds is implemented on env definition process:

if self.forbidden_funcs.contains(&name) {
self.env_def_builder
.add_host_func("env", name.to_str(), wrap_syscall!(forbidden));
} else {
self.env_def_builder.add_host_func("env", name.to_str(), f);
}

This should be replaced with checking by each sys call on backend isn't it forbidden (by calling some context funcs like self.ext.forbidden_funcs.contains(my_name)). If forbidden, return trap.

It's required to implement dynamic context changing for Environment as wasm module processor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants