Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented Jan 14, 2024

Pull Request Overview

This changes the Compress trait to:

pub trait Compress {
    fn to_short_id(process: &dyn Process, credentials: &TbfFooterV2Credentials) -> ShortID;
}

The TRD mentions that short IDs can be based on things like process names, but the to_short_id() function didn't have access to any process information.

Testing Strategy

Working on a new capsule.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Need to implement any sort of short id based on process name or other
process fields.
@lschuermann
Copy link
Member

lschuermann commented Jan 14, 2024

I cannot speak to how much TBF-specifics are already embedded in the general AppID infrastructure, but I do recall that it was supposed to be mostly independent of the particular application binary format, loading procedure, or other specifics. So that would make me hesitant to include this type in a core AppID-API such as Compress. Could this information also be provided on the Process trait, or perhaps an extension trait?

Besides, this would warrant an update of the (non-finalized) TRD. Nevermind, I can't read.

@bradjc
Copy link
Contributor Author

bradjc commented Jan 14, 2024

Are you looking at the TRD or the actual code? The TRD had &Process being the argument, and I updated that to have both process and the credentials. The actual code only had the credentials, and I updated that to have the &Process as well.

@lschuermann
Copy link
Member

Sorry, I clearly got confused by what's been changed here and the discrepancy between the TRD and the implementation. With this actual change I fully agree -- although I'm still unsure whether the TbfFooterV2Credentials should be passed at all.

@bradjc
Copy link
Contributor Author

bradjc commented Jan 15, 2024

although I'm still unsure whether the TbfFooterV2Credentials should be passed at all.

I think this is a good question. I do think we agree that for apps that use TbfFooterV2Credentials the compress trait should have access to them. This is I believe the only way to get access to them at the moment, so I think it makes sense to leave it there for now. If we decide to reorganize this further, they could be provided through ProcessStandard somehow.

@lschuermann lschuermann added the last-call Final review period for a pull request. label Jan 22, 2024
@lschuermann lschuermann added this pull request to the merge queue Jan 24, 2024
Merged via the queue into master with commit 88e8302 Jan 24, 2024
@lschuermann lschuermann deleted the appchecker-compress-process branch January 24, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel last-call Final review period for a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants