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

Linux procfs PoC #1174

Merged
merged 1 commit into from
Jul 7, 2022
Merged

Linux procfs PoC #1174

merged 1 commit into from
Jul 7, 2022

Conversation

elicn
Copy link
Member

@elicn elicn commented Jun 14, 2022

Introduce procfs to Linux OS
This is just a minimal PoC; looking for feedback.

Added mappings:

  • /proc/self/auxv
  • /proc/self/cmdline
  • /proc/self/environ
  • /proc/self/exe

Notes:

  • The implementation of /proc/self/exe just mimics a symlink behvaior, and could be generalized if we had a full virtualized file system
  • As long as Qiling doesn't have a full virtualized file system, it would be hard to maintain both "real" files and pseudo files seamelessly
  • This somewhat repeats code patterns from ql_file and QlFsMappedObject, but till those modules are appropriately generalized, I figured it would be cleaner this way

@wtdcode
Copy link
Member

wtdcode commented Jun 19, 2022

Regarding the repeat pattern between ql_file and QlFsMappedObject, the original motivation mostly is backward compatibility since ql_file was the only choice for users at that time and I didn’t want to break everything. Maybe we can safely merge the two base class nowadays.

@elicn elicn marked this pull request as ready for review July 4, 2022 07:49
@elicn
Copy link
Member Author

elicn commented Jul 4, 2022

Guess there is no more further feedback; ready for review.

@xwings xwings merged commit 057a9fd into qilingframework:dev Jul 7, 2022
@elicn elicn deleted the procfs-poc branch July 8, 2022 10:09
@wtdcode wtdcode mentioned this pull request Jul 10, 2022
15 tasks
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.

4 participants