apache / apache/teaclave-sgx-sdk

The reason for TCSPolicy requirement on env_logger?

Open
#271 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.2k
Forks
268
PR merge metrics
No merged PRs in 30d

Description

Hi!

I was trying to use the logging library within an enclave as described at https://github.com/apache/incubator-teaclave-sgx-sdk/tree/master/samplecode/logger#usage and came across the `TCSPolicy = 0` requirement. Everything works great with that setting. The problem is, unfortunately, I have a different library that needs `TCSPolicy = 1` (my colleague opened an issue about it some time ago: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/240). So there's a conflict.

Now, while I can see why a library won't work if it depends on Thread Local Storage (TLS), it's not clear to me why log/env_logger depends on `TCSPolicy = 1`. Can you shed some light on why the forked version of log/env_logger crates need that? Is it possible to bypass that requirement somehow?

Thanks in advance

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the samplecode/logger usage referenced in the issue and inspect the forked log/env_logger crates to trace their TCSPolicy requirement. Compare that behavior with issue #240 and determine whether the requirement is inherent or can be bypassed. Done means providing a documented explanation and any supported resolution for the TCSPolicy conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation, security
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.