[DOC]: cuda.core 1.1.1 note misstates program cache permissions
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Documentación
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- documentation
Línea de trabajo
Lee la nota de lanzamiento vinculada de cuda-core 1.1.1 y compárala con cuda_core/cuda/core/utils/_program_cache/_file_stream.py. Ejecuta el ejemplo proporcionado de FileStreamProgramCache si es necesario para verificar los permisos indicados. Se considera terminado cuando la nota describe con precisión la raíz de la caché, las entradas, los archivos de las entradas, el directorio tmp, el comportamiento de umask y cualquier compromiso documentado de una caché compartida.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
- 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
- Lenguaje dominante
- Cython
- Estrellas
- 3.4k
- Forks
- 329
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 113
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NVIDIA/cuda-python
-
bug cuda.core
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NVIDIA/cuda-python#2886 · 1 comentario ·
-
triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
NVIDIA/cuda-python#2712 ·
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookup Abiertotriage
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NVIDIA/cuda-python#2646 · 1 reacción ·
-
cuda.core triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA/cuda-python#2435 · 1 comentario ·
-
CI/CD
NVIDIA/cuda-python#2926 · 1 asignado ·
Todos los issues de NVIDIA/cuda-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
qgis/QGIS-Documentation#11275 ·
-
Change observation tooltip text Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
CSCfi/sd-search-api#39 ·
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
-
sync-en
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
-
automated broken-link
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100