Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upLeast Authority rust std/core libs #2
Comments
This comment has been minimized.
This comment has been minimized.
|
mkdtemp() |
This comment has been minimized.
This comment has been minimized.
|
rust rt/args has a FIXME for args (which are ambient authority) TODO: find the haskell compiler history around global args and how it prevents parallel compilation or some such. 2012-08-09 03:20:30 +0200 DanC: http://www.aosabook.org/en/ghc.html , look for "crime doesn't pay" |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
|
see also rust-lang#3094 (comment) Non-determinism as an effect. |
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Nov 5, 2016
|
Doesn't the entire design of futures.rs require ambient authority? My understanding is that all the scheduling is handled through a hidden back channel of mutable global state. |
This comment has been minimized.
This comment has been minimized.
|
Yes, it does look that way: thread_local!(static CURRENT_TASK: Cell<(*const Task, *const data::LocalMap)> = {
Cell::new((0 as *const _, 0 as *const _))
});-- task/mod.rs This comes back part of my original Oct 2012 comment:
("task" back then is closer to "thread" now.) I'm still thinking this through... |
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Nov 6, 2016
|
It seems like this should be combined with a lint addition prohibiting |
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Nov 8, 2016
|
https://github.com/NuxiNL/cloudlibc has some interesting ideas, such as passing the application a file descriptor to the directory/directories it is allowed to access, instead of letting it open files by path. Presumably paths have to be constructed relative to those root file descriptors. |
This comment has been minimized.
This comment has been minimized.
|
Right... That's what I meant in #2 (comment):
|
This comment has been minimized.
This comment has been minimized.
|
tag_safe looks handy! issue 1: can we use it to tag std functions? |
This comment has been minimized.
This comment has been minimized.
ratmice
commented
Sep 11, 2017
•
|
lacking an heap allocations is there actually any ambient authority in the core library? then building up a variation of std which just drops the file/time/randomness leaving the portions of std wanted intact |
This comment has been minimized.
This comment has been minimized.
|
right... a variation of std is what I'm hoping for:
|
This comment has been minimized.
This comment has been minimized.
|
More motivation:
|
This comment has been minimized.
This comment has been minimized.
|
and more:
|
This comment has been minimized.
This comment has been minimized.
briansmith
commented
Oct 24, 2017
|
It would be great to somehow combine this effort with the steed effort, and/or perhaps redo steed as an incremental rewrite of the linux-musl-libc target and/or the cloud to a pure Rust libstd that removes all the stuff that is problematic with respect to this (perhaps using CloudABI as inspiration). LMK if you'd be interested in pursing any such efforts. See also https://lwn.net/Articles/433326/, which people mentioned recently as motivation for a capability-based stdlib. See also https://github.com/benlaurie/go-capsicum. |
This comment has been minimized.
This comment has been minimized.
|
Steed? oh... https://github.com/japaric/steed . nifty. Thanks. |
This comment has been minimized.
This comment has been minimized.
|
Note discussion of malicious crates. |
dckc commentedOct 25, 2012
goal: libraries get no ambient authority; all authority comes from main programs
audit for ambient authority (random, time, ...)
task local storage is global mutable state? or is it folly to try to isolate less than a task?