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

cdl_utils: remove unmaintained python library #29

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Conversation

szhuang
Copy link
Contributor

@szhuang szhuang commented Sep 27, 2021

simpleeval is no longer maintained. As the python setuptool has dropped
python 2 support completely, it is unable to install simpleeval from
source. Replacing it with the builtin eval(). It only takes input from
camkes template, which is somewhat trusted. Simple sanity check is also
added to filter out unexpected inputs.

Signed-off-by: Siwei Zhuang [email protected]

@kent-mcleod
Copy link
Member

This package still seems to be available for python3 and it's source repository looks like it is still active. Do you have any links to more information about it not being maintained any more?

@szhuang
Copy link
Contributor Author

szhuang commented Sep 27, 2021

It is available via distribution's package manager or pip. But the installation fails with setuptools, which is how cameks installs its dependency. More info can be found here danthedeckie/simpleeval#90 and danthedeckie/simpleeval#91

tcb.ip = eval(str(tcb.ip), {"__builtins__": None}, funcs)
tcb.sp = eval(str(tcb.sp), {"__builtins__": None}, funcs)
tcb.addr = eval(str(tcb.addr), {"__builtins__": None}, funcs)
tcb.init = eval(re.match("\[[0-9]*\]", str(tcb.init)).string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are examples of tcb.init needing to call get_vaddr: https://github.com/seL4/sel4-tutorials/blob/master/tools/context.py#L143, but it doesn't look like funcs is passed into this eval call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing out, fixed.

@kent-mcleod
Copy link
Member

It is available via distribution's package manager or pip. But the installation fails with setuptools, which is how cameks installs its dependency. More info can be found here danthedeckie/simpleeval#90 and danthedeckie/simpleeval#91

Ok, thanks for the explanation

simpleeval is no longer maintained. As the python setuptool has dropped
python 2 support completely, it is unable to install simpleeval from
source. Replacing it with the builtin eval(). It only takes input from
camkes template, which is somewhat trusted. Simple sanity check is also
added to filter out unexpected inputs.

Signed-off-by: Siwei Zhuang <[email protected]>
@szhuang szhuang merged commit 55507a1 into seL4:master Sep 27, 2021
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 this pull request may close these issues.

2 participants