[DOC]: cuda.core 1.1.1 note misstates program cache permissions

Đang mở Phù hợp với người mới
#2,717 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc ghi chú phát hành cuda-core 1.1.1 được liên kết và so sánh với cuda_core/cuda/core/utils/_program_cache/_file_stream.py. Chạy ví dụ FileStreamProgramCache được cung cấp nếu cần để xác minh các quyền được nêu. Được coi là hoàn tất khi ghi chú mô tả chính xác thư mục gốc của cache, các mục nhập, các tệp mục nhập, thư mục tmp, hành vi của umask và mọi đánh đổi đã được tài liệu hóa của cache dùng chung.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage
  • 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

Ngôn ngữ chính
Cython
Star
3.4k
Fork
329
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
113

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuda-python

Tất cả issue của NVIDIA/cuda-python

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.