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

Discourage use of tags to implement logic #37

Open
kwitaszczyk opened this issue Apr 28, 2023 · 1 comment
Open

Discourage use of tags to implement logic #37

kwitaszczyk opened this issue Apr 28, 2023 · 1 comment

Comments

@kwitaszczyk
Copy link
Member

Tags could be seen as an interesting feature to implement logic that behaves differently depending on whether a pointer or an integer value was passed to a function. This triggers two issues:

  1. Relying on tags to distinguish pointers from integer values does not distinguish valid and invalid pointers, and it's simply invalid.
  2. Relying on tags makes it harder to upstream changes.

The document should make a developer aware of consequences of such decision.

@bsdjhb
Copy link
Contributor

bsdjhb commented Apr 28, 2023

It also violates the principle of intentional use (one of the two underlying principles of CHERI).

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

No branches or pull requests

2 participants