[DOC]: cuda.core 1.1.1 note misstates program cache permissions
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
Read the linked cuda-core 1.1.1 release note and compare it with cuda_core/cuda/core/utils/_program_cache/_file_stream.py. Run the supplied FileStreamProgramCache example if needed to verify the stated permissions. Done means the note accurately describes the cache root, entries, entry files, tmp directory, umask behavior, and any documented shared-cache trade-off.
Written by the indexing model from the issue text.
Description
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Is this for new documentation, or an update to existing docs?
Update
Describe the incorrect/future/missing documentation
The cuda.core 1.1.1 release note says the on-disk program cache directory is created with owner-only permissions (0o700), that those permissions are re-asserted on each use, and that this prevents other local users from reading or injecting cached device code regardless of the process umask. Only the tmp/ staging directory is created 0o700. The cache root, entries/ and the shard directories inherit the umask, and no permissions are re-asserted, so a cache created under a permissive umask stays world-writable after a write.
import os, stat, tempfile
from pathlib import Path
from cuda.core.utils import FileStreamProgramCache
os.umask(0o000)
root = Path(tempfile.mkdtemp()) / "pc"
FileStreamProgramCache(path=root)["k"] = b"hello"
for p in (root, root / "entries", root / "tmp"):
print(p.name, oct(stat.S_IMODE(os.stat(p).st_mode)))
pc 0o777
entries 0o777
tmp 0o700
Expected: the note describes what shipped. Cache entry files are 0o600 and tmp/ is 0o700, so cached device code is not readable by other users, but the cache root and entries/ follow the umask and a pre-existing shared cache directory is used as-is.
cuda_core/cuda/core/utils/_program_cache/_file_stream.py also records the trade-off this leaves (a deliberately shared writable entries/ lets a co-owner replace a cached file). Whether the note should state that as well is your call.
If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.
https://nvidia.github.io/cuda-python/cuda-core/latest/release/1.1.1-notes.html
- Dominant language
- Cython
- Stars
- 3.4k
- Forks
- 329
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 113
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-python
-
bug cuda.core
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NVIDIA/cuda-python#2886 · 1 comment ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
NVIDIA/cuda-python#2712 ·
-
triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
-
cuda.core triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NVIDIA/cuda-python#2435 · 1 comment ·
-
CI/CD
NVIDIA/cuda-python#2926 · 1 assignee ·
All issues in NVIDIA/cuda-python
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100