link to sloonz's script master
authorRalf Jung <post@ralfj.de>
Mon, 15 Apr 2024 14:18:26 +0000 (16:18 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 15 Apr 2024 14:18:26 +0000 (16:18 +0200)
110 files changed:
personal/.htaccess [new file with mode: 0644]
personal/0x0CB18E521B24F3FF.asc [new file with mode: 0644]
personal/_config.yml [moved from ralf/_config.yml with 93% similarity]
personal/_includes/menu-level.html [moved from ralf/_includes/menu-level.html with 100% similarity]
personal/_includes/post-feed.html [moved from ralf/_includes/post-feed.html with 100% similarity]
personal/_includes/post-header.html [moved from ralf/_includes/post-header.html with 89% similarity]
personal/_includes/post-list.html [moved from ralf/_includes/post-list.html with 100% similarity]
personal/_layouts/category_feed.html [moved from ralf/_layouts/category_feed.html with 100% similarity]
personal/_layouts/category_index.html [moved from ralf/_layouts/category_index.html with 100% similarity]
personal/_layouts/default.html [moved from ralf/_layouts/default.html with 100% similarity]
personal/_layouts/feed.html [moved from ralf/_layouts/feed.html with 100% similarity]
personal/_layouts/page.html [moved from ralf/_layouts/page.html with 100% similarity]
personal/_layouts/post.html [moved from ralf/_layouts/post.html with 100% similarity]
personal/_plugins/categories.rb [moved from ralf/_plugins/categories.rb with 100% similarity]
personal/_plugins/menu.rb [moved from ralf/_plugins/menu.rb with 100% similarity]
personal/_plugins/readmes.rb [moved from ralf/_plugins/readmes.rb with 100% similarity]
personal/_plugins/rouge-rust.rb [moved from ralf/_plugins/rouge-rust.rb with 100% similarity]
personal/_posts/2015-10-08-welcome.md [moved from ralf/_posts/2015-10-08-welcome.md with 100% similarity]
personal/_posts/2015-10-09-breaking-all-the-way-out.md [moved from ralf/_posts/2015-10-09-breaking-all-the-way-out.md with 100% similarity]
personal/_posts/2015-10-12-formalizing-rust.md [moved from ralf/_posts/2015-10-12-formalizing-rust.md with 100% similarity]
personal/_posts/2016-01-09-the-scope-of-unsafe.md [moved from ralf/_posts/2016-01-09-the-scope-of-unsafe.md with 99% similarity]
personal/_posts/2017-01-20-paris-rust-meetup.md [moved from ralf/_posts/2017-01-20-paris-rust-meetup.md with 100% similarity]
personal/_posts/2017-05-23-internship-starting.md [moved from ralf/_posts/2017-05-23-internship-starting.md with 100% similarity]
personal/_posts/2017-06-06-MIR-semantics.md [moved from ralf/_posts/2017-06-06-MIR-semantics.md with 100% similarity]
personal/_posts/2017-06-09-mutexguard-sync.md [moved from ralf/_posts/2017-06-09-mutexguard-sync.md with 100% similarity]
personal/_posts/2017-07-08-rustbelt.md [moved from ralf/_posts/2017-07-08-rustbelt.md with 100% similarity]
personal/_posts/2017-07-14-undefined-behavior.md [moved from ralf/_posts/2017-07-14-undefined-behavior.md with 100% similarity]
personal/_posts/2017-07-17-types-as-contracts.md [moved from ralf/_posts/2017-07-17-types-as-contracts.md with 100% similarity]
personal/_posts/2017-08-11-types-as-contracts-evaluation.md [moved from ralf/_posts/2017-08-11-types-as-contracts-evaluation.md with 100% similarity]
personal/_posts/2017-08-12-internship-ending.md [moved from ralf/_posts/2017-08-12-internship-ending.md with 100% similarity]
personal/_posts/2017-12-15-people-of-pl-interview.md [moved from ralf/_posts/2017-12-15-people-of-pl-interview.md with 100% similarity]
personal/_posts/2017-12-26-lets-encrypt.md [moved from ralf/_posts/2017-12-26-lets-encrypt.md with 100% similarity]
personal/_posts/2018-01-21-rustbelt-talk.md [moved from ralf/_posts/2018-01-21-rustbelt-talk.md with 100% similarity]
personal/_posts/2018-01-31-sharing-for-a-lifetime.md [moved from ralf/_posts/2018-01-31-sharing-for-a-lifetime.md with 100% similarity]
personal/_posts/2018-04-05-a-formal-look-at-pinning.md [moved from ralf/_posts/2018-04-05-a-formal-look-at-pinning.md with 100% similarity]
personal/_posts/2018-04-10-safe-intrusive-collections-with-pinning.md [moved from ralf/_posts/2018-04-10-safe-intrusive-collections-with-pinning.md with 97% similarity]
personal/_posts/2018-05-28-cloudless-contact-sync.md [moved from ralf/_posts/2018-05-28-cloudless-contact-sync.md with 100% similarity]
personal/_posts/2018-06-02-mailman-subscription-spam.md [moved from ralf/_posts/2018-06-02-mailman-subscription-spam.md with 100% similarity]
personal/_posts/2018-06-10-mailman-subscription-spam-continued.md [moved from ralf/_posts/2018-06-10-mailman-subscription-spam-continued.md with 100% similarity]
personal/_posts/2018-07-11-research-assistant.md [moved from ralf/_posts/2018-07-11-research-assistant.md with 100% similarity]
personal/_posts/2018-07-13-arc-synchronization.md [moved from ralf/_posts/2018-07-13-arc-synchronization.md with 100% similarity]
personal/_posts/2018-07-19-const.md [moved from ralf/_posts/2018-07-19-const.md with 100% similarity]
personal/_posts/2018-07-24-pointers-and-bytes.md [moved from ralf/_posts/2018-07-24-pointers-and-bytes.md with 99% similarity]
personal/_posts/2018-08-07-stacked-borrows.md [moved from ralf/_posts/2018-08-07-stacked-borrows.md with 100% similarity]
personal/_posts/2018-08-22-two-kinds-of-invariants.md [moved from ralf/_posts/2018-08-22-two-kinds-of-invariants.md with 100% similarity]
personal/_posts/2018-11-16-stacked-borrows-implementation.md [moved from ralf/_posts/2018-11-16-stacked-borrows-implementation.md with 100% similarity]
personal/_posts/2018-12-12-google-scholar.md [moved from ralf/_posts/2018-12-12-google-scholar.md with 100% similarity]
personal/_posts/2018-12-26-stacked-borrows-barriers.md [moved from ralf/_posts/2018-12-26-stacked-borrows-barriers.md with 100% similarity]
personal/_posts/2019-01-12-rust-2019.md [moved from ralf/_posts/2019-01-12-rust-2019.md with 100% similarity]
personal/_posts/2019-02-12-all-hands-recap.md [moved from ralf/_posts/2019-02-12-all-hands-recap.md with 100% similarity]
personal/_posts/2019-03-09-firejail.md [moved from ralf/_posts/2019-03-09-firejail.md with 100% similarity]
personal/_posts/2019-03-26-miri-as-rustup-component.md [moved from ralf/_posts/2019-03-26-miri-as-rustup-component.md with 100% similarity]
personal/_posts/2019-04-30-stacked-borrows-2.md [moved from ralf/_posts/2019-04-30-stacked-borrows-2.md with 100% similarity]
personal/_posts/2019-05-15-typeclasses-exponential-blowup.md [moved from ralf/_posts/2019-05-15-typeclasses-exponential-blowup.md with 99% similarity]
personal/_posts/2019-05-21-stacked-borrows-2.1.md [moved from ralf/_posts/2019-05-21-stacked-borrows-2.1.md with 100% similarity]
personal/_posts/2019-07-14-uninit.md [moved from ralf/_posts/2019-07-14-uninit.md with 97% similarity]
personal/_posts/2019-10-20-type-soundness.md [moved from ralf/_posts/2019-10-20-type-soundness.md with 100% similarity]
personal/_posts/2019-11-18-stacked-borrows-paper.md [moved from ralf/_posts/2019-11-18-stacked-borrows-paper.md with 100% similarity]
personal/_posts/2019-11-25-how-to-panic-in-rust.md [moved from ralf/_posts/2019-11-25-how-to-panic-in-rust.md with 100% similarity]
personal/_posts/2020-04-04-layout-debugging.md [moved from ralf/_posts/2020-04-04-layout-debugging.md with 100% similarity]
personal/_posts/2020-07-15-unused-data.md [moved from ralf/_posts/2020-07-15-unused-data.md with 100% similarity]
personal/_posts/2020-07-24-outlook.com-considered-harmful.md [moved from ralf/_posts/2020-07-24-outlook.com-considered-harmful.md with 100% similarity]
personal/_posts/2020-09-03-phd.md [moved from ralf/_posts/2020-09-03-phd.md with 100% similarity]
personal/_posts/2020-09-28-miri.md [moved from ralf/_posts/2020-09-28-miri.md with 100% similarity]
personal/_posts/2020-12-14-provenance.md [moved from ralf/_posts/2020-12-14-provenance.md with 99% similarity]
personal/_posts/2021-03-23-safe-systems-programming-in-rust.md [moved from ralf/_posts/2021-03-23-safe-systems-programming-in-rust.md with 100% similarity]
personal/_posts/2021-06-10-ghostcell-podcast.md [moved from ralf/_posts/2021-06-10-ghostcell-podcast.md with 100% similarity]
personal/_posts/2021-11-18-ub-good-idea.md [new file with mode: 0644]
personal/_posts/2021-11-24-ub-necessary.md [new file with mode: 0644]
personal/_posts/2022-04-11-provenance-exposed.md [new file with mode: 0644]
personal/_posts/2022-07-02-miri.md [new file with mode: 0644]
personal/_posts/2022-08-08-minirust.md [new file with mode: 0644]
personal/_posts/2022-08-16-eth.md [new file with mode: 0644]
personal/_posts/2022-09-26-cargo-careful.md [new file with mode: 0644]
personal/_posts/2023-06-02-tree-borrows.md [new file with mode: 0644]
personal/_posts/2023-06-13-undefined-behavior-talk.md [new file with mode: 0644]
personal/_posts/2023-12-27-open-source-peer-bonus.md [new file with mode: 0644]
personal/_posts/2024-04-14-bubblebox.md [new file with mode: 0644]
personal/_sass/_base.scss [moved from ralf/_sass/_base.scss with 100% similarity]
personal/_sass/_layout.scss [moved from ralf/_sass/_layout.scss with 93% similarity]
personal/_sass/_normalize.scss [moved from ralf/_sass/_normalize.scss with 100% similarity]
personal/_sass/_syntax-highlighting.scss [moved from ralf/_sass/_syntax-highlighting.scss with 100% similarity]
personal/assets/azure-login.png [moved from ralf/assets/azure-login.png with 100% similarity]
personal/blog/archive.html [moved from ralf/blog/archive.html with 100% similarity]
personal/blog/feed.xml [moved from ralf/blog/feed.xml with 88% similarity]
personal/blog/index.html [moved from ralf/blog/index.html with 100% similarity]
personal/index.html [moved from ralf/index.html with 67% similarity]
personal/projects/.gitignore [moved from ralf/projects/.gitignore with 100% similarity]
personal/projects/index.md [moved from ralf/projects/index.md with 56% similarity]
personal/robots.txt [new file with mode: 0644]
personal/style.scss [moved from ralf/style.scss with 100% similarity]
personal/upload.sh [moved from ralf/upload.sh with 100% similarity]
ralf/.htaccess [deleted file]
research/.htaccess [deleted file]
research/_config.yml
research/_includes
research/_layouts
research/_plugins
research/_sass
research/contact.html
research/cv.pdf [new file with mode: 0644]
research/index.html
research/me-2x.jpg [new file with mode: 0644]
research/me.jpg
research/publications.html
research/research-statement.pdf
research/style.scss
research/thesis.html
research/upload.sh
upload.sh

diff --git a/personal/.htaccess b/personal/.htaccess
new file mode 100644 (file)
index 0000000..82a9324
--- /dev/null
@@ -0,0 +1,2 @@
+RedirectMatch "^/cs/(index.html?)?$" "/research"
+RedirectMatch "^/cs/bachelor(.*)$" "/research/bachelor/bachelor$1"
diff --git a/personal/0x0CB18E521B24F3FF.asc b/personal/0x0CB18E521B24F3FF.asc
new file mode 100644 (file)
index 0000000..f11e320
--- /dev/null
@@ -0,0 +1,612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7kmQy4Wpl5\r
+Ui3T05PEpA/1PYE777kbbZofq3NAJseZqQWOrnipFEXq/ZxYq3nmPWtOOpfCmKPl\r
+M7K2mw7rKOPmSJy6LKdwvG1srLaUeHeQDXVLDPjHEabW8AMELHuWjBWav+1DjrW3\r
+kZ2frYTU/YTuZOu5ho3lewm+rPQXUxTn/6u9Py6alp8AeLOnTCsZ28Z52FYaal0U\r
+eTG58VWRv1P3UNj5fdQ1ctGKHLbVQUVOEomijXMiybJJ65kQ7fTIKgKRXioopbmg\r
+cFeUg/rdEhIwezttwqYqivBXYnKzhSE7BsnPbrPesuLbedKI3WrQC29oOgHymm9o\r
+kciFzUteuD/OxC0ionItQat1bT1S06/R9QEJWe+PbMGAXHKmMD105AxJvkxunSYS\r
+XF3l1KzRTMvqHSKB2zu3Cc6VmaGHKqcIbUbIbrHcKBBJaJt1wANWqu+TGeEB/7ig\r
+vJ1FmkZOSu5tAaWXM7F4eglx3RhYW6k4SRm/JK+j6ZUDeYQBX3w+660IRamqWDNV\r
+1V8T51tlNkTm5Bz1rPAXT514y3LhIzYssQazOCBMifNFcTEf\r
+=44lh\r
+-----END PGP PUBLIC KEY BLOCK-----\r
similarity index 93%
rename from ralf/_config.yml
rename to personal/_config.yml
index 31c8333299f007f289f6064af64d9f43cde0e155..959b1047026d25901b01df67ab4d578ba430f78f 100644 (file)
@@ -12,13 +12,14 @@ readmes:
     src_base: "/home/r/src"
     out_base: "projects"
     projects:
-      - name: "lilass"
+      - name: "bubblebox"
       - name: "dyn-nsupdate"
-      - name: "zonemaker"
-      - name: "schsh"
-      - name: "rust-101"
-        src: "rust/my/rust-101"
       - name: "git-mirror"
+      - name: "lilass"
+      - name: "rust-101"
+        src: "rust/rust-101"
+      - name: "schsh"
+      - name: "zonemaker"
 
 defaults:
   - scope:
similarity index 89%
rename from ralf/_includes/post-header.html
rename to personal/_includes/post-header.html
index 1638d59a0536b3da132c5acdc92b335b97042510..36d4a82ae64bea65c0c579e31690c45296db2e63 100644 (file)
@@ -2,5 +2,5 @@
 {% if include.item.author %} • {{ include.item.author }}{% endif %}
 {% if include.item.meta %} • {{ include.item.meta }}{% endif %}
 {% if include.item.categories %}  • {{ include.item.categories | category_links }}{% endif %}
- • <a href="https://git.ralfj.de/web.git/history/refs/heads/master:/ralf/{{include.item.path}}">Edits</a>
+ • <a href="https://git.ralfj.de/web.git/history/refs/heads/master:/personal/{{include.item.path}}">Edits</a>
  • <a href="{{ include.item.url }}">Permalink</a>
similarity index 99%
rename from ralf/_posts/2016-01-09-the-scope-of-unsafe.md
rename to personal/_posts/2016-01-09-the-scope-of-unsafe.md
index 96a7eb41bb1fe91f41572200b806f4eccda87a2e..967b4a3e1b907d590bb661117b79488b1cda3f91 100644 (file)
@@ -16,7 +16,7 @@ What I am saying is that the scope of `unsafe` is larger than the `unsafe` block
 It turns out that the underlying reason for this observation is also a nice illustration for the concept of *semantic types* that comes up in my [work on formalizing Rust]({% post_url 2015-10-12-formalizing-rust %}) (or rather, its type system).
 Finally, this discussion will once again lead us to realize that we rely on our type systems to provide much more than just type safety.
 
-**Update (Jan 11th):** Clarified the role of privacy; argued why `evil` is the problem.
+**Update (2016-01-11):** Clarified the role of privacy; argued why `evil` is the problem.
 
 <!-- MORE -->
 
similarity index 97%
rename from ralf/_posts/2018-04-10-safe-intrusive-collections-with-pinning.md
rename to personal/_posts/2018-04-10-safe-intrusive-collections-with-pinning.md
index db706aefb07fab79d341e08795f92e28330d6409..0ffae029954225cbb383a9054919f62cdd757d4b 100644 (file)
@@ -459,7 +459,7 @@ Removing `Pin::deref` (or restricting it to types that implement `Unpin`) would
 I spelled out the details [in the RFC issue](https://github.com/rust-lang/rfcs/pull/2349#issuecomment-372109981).
 So, if we want to declare that shared pinning is a typestate in its own right---which overall seems desirable---do we want it to be restricted like this due to an implementation detail of arbitrary self types?
 
-**Update:** @Diggsey [points out](https://github.com/rust-lang/rfcs/pull/2349#issuecomment-379230538) that we can still have a `PinRefCell` with a method like `fn get_pin(self: Pin<PinRefCell<T>>) -> Pin<T>`, as long as the `PinRefCell` never gives out mutable references. So it turns out that combining interior mutability and pinning should work fine.  Later, @glaebhoerl suggested we can even [combine `RefCell` and `PinRefCell` into one type if we dynamically track the pinning state](https://internals.rust-lang.org/t/safe-intrusive-collections-with-pinning/7281/11?u=ralfjung).  **/Update**
+**Update:** @Diggsey [points out](https://github.com/rust-lang/rfcs/pull/2349#issuecomment-379230538) that we can still have a `PinRefCell` with a method like `fn get_pin(self: Pin<PinRefCell<T>>) -> Pin<T>`, as long as the `PinRefCell` never gives out mutable references. So it turns out that combining interior mutability and pinning should work fine.  Later, @glaebhoerl suggested we can even [combine `RefCell` and `PinRefCell` into one type if we dynamically track the pinning state](https://internals.rust-lang.org/t/safe-intrusive-collections-with-pinning/7281/11?u=ralfjung). **/Update**
 
 ## 4 Conclusion
 
@@ -472,4 +472,9 @@ The situation around shared pinning is still open, and it seems we need to have
 
 Anyway, as usual, please [let me know what you think](https://internals.rust-lang.org/t/safe-intrusive-collections-with-pinning/7281)!
 
+**Update:** Years later, I finally realized that there still is a major problem with intrusive collections -- it is basically impossible to have a by-reference iterator!
+With the collection not actually owning the memory the elements are stored in, it is basically impossible to guarantee that during the iteration, elements do not get removed from the collection, which would invalidate the reference.
+However, for many use-cases (like an intrusive queue) it is sufficient to just support by-value operations such as "enqueue" and "dequeue" over such a collection, and those can be given an entirely safe interface.
+If iteration is required, then more advanced [techniques to control sharing](https://plv.mpi-sws.org/rustbelt/ghostcell/) seem to be needed. **/Update**
+
 #### Footnotes
similarity index 99%
rename from ralf/_posts/2018-07-24-pointers-and-bytes.md
rename to personal/_posts/2018-07-24-pointers-and-bytes.md
index 636fa40edd65ea89291db7e669d51c543e37821b..6accd7dd68449b6e871ba4f3c9ac47ed2b34cafe 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: "Pointers Are Complicated, or: What's in a Byte?"
-categories: internship rust
+categories: internship rust programming
 forum: https://internals.rust-lang.org/t/pointers-are-complicated-or-whats-in-a-byte/8045
 ---
 
similarity index 99%
rename from ralf/_posts/2019-05-15-typeclasses-exponential-blowup.md
rename to personal/_posts/2019-05-15-typeclasses-exponential-blowup.md
index bc9a8c99f2534557e2c0e14192da183640a3bd9e..4c9f3cf20c58d2a74948560fb8a7d853fded7bca 100644 (file)
@@ -16,7 +16,7 @@ In this post, I will explain the cause of this exponential blowup.
 <!-- MORE -->
 
 I should note that this observation is not new, it already occurs in [François Garillot's PhD thesis](https://pastel.archives-ouvertes.fr/pastel-00649586), a [paper by the same author](https://hal.inria.fr/inria-00368403v2/document) and even the authors of the "unbundled" paper already note having performance problems when scaling up.
-The goal of this post is to provide a more self-contained presentation, not requiring all the context set up in that thesis and going into more details than the brief remarks the two papers.
+The goal of this post is to provide a more self-contained presentation, not requiring all the context set up in that thesis and going into more details than the brief remarks in the two papers.
 
 ## Unbundled groups
 
@@ -172,12 +172,12 @@ That's 4 nested indices, and hence the terms have size `O(n^5)`.
 More generally speaking, the term size is *exponential* in the height of our hierarchy.
 That hurts.
 
-[^1]: Note that the *number* of indices does not matter, like the fact that `Monoid` has both an `Op` and a `Unit` index. That just affects the constant factor. It's the nesting of indices that gets us here.
+[^1]: Note that the *number* of indices does not matter, like the fact that `Monoid` has both an `Op` and a `Unit` index. That just affects the constant factor. It's the nesting of indices that gets us into trouble here.
 
 ## Conclusion
 
 We have seen that the number of nested indices of a typeclass has exponential impact on the size of proof terms that arise when deriving typeclass instances for compound types.
-This effect has grinded the original Iris coq development back in 2015 to a halt: compiling the correctness proof of the logic itself took around 3.5 hours and needed more than the 4GB of RAM than my laptop had back then.
+This effect has grinded the original Iris coq development back in 2015 to a halt: compiling the correctness proof of the logic itself took around 3.5 hours and needed more than the 4GB of RAM that my laptop had back then.
 
 In my view, this basically rules out the unbundled approach for any serious formalization effort.
 But what are the alternatives?
similarity index 97%
rename from ralf/_posts/2019-07-14-uninit.md
rename to personal/_posts/2019-07-14-uninit.md
index 7af373fbf7b905276902a246cc1a024e3c82b286..bbb1468535f65b94a406fcf6b2d2205485484842 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: '"What The Hardware Does" is not What Your Program Does: Uninitialized Memory'
-categories: rust research
+categories: rust research programming
 forum: https://internals.rust-lang.org/t/what-the-hardware-does-is-not-what-your-program-does-uninitialized-memory/10561
 ---
 
@@ -40,14 +40,16 @@ fn always_returns_true(x: u8) -> bool {
 }
 
 fn main() {
-    let x: u8 = unsafe { mem::uninitialized() };
+    let x: u8 = unsafe { mem::MaybeUninit::uninit().assume_init() };
     assert!(always_returns_true(x));
 }
 {% endhighlight %}
+**Update (2022-11-17):** Switched to `MaybeUninit` to keep the example working in newer versions of Rust.
+
 `always_returns_true` is a function that, clearly, will return `true` for any possible 8-bit unsigned integer.
 After all, *every* possible value for `x` will be either less than 120, equal to 120, or bigger than 120.
 A quick loop [confirms this](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=65b690fa3c1691e11d4d45955358cdbe).
-However, if you [run the example](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=812fe3c8655bfedcea37bb18bb70a945), you can see the assertion fail.[^godbolt]
+However, if you [run the example](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=c17d299cacd626c572def0c4262aed69), you can see the assertion fail.[^godbolt]
 
 [^godbolt]: In case this changes with future Rust versions, [here is the same example on godbolt](https://godbolt.org/z/9G67hP); the `xor eax, eax` indicates that the function returns 0, aka `false`. And [here is a version for C++](https://godbolt.org/z/TWrvcq).
 
similarity index 99%
rename from ralf/_posts/2020-12-14-provenance.md
rename to personal/_posts/2020-12-14-provenance.md
index 4e95665df3daa7bc67ad5806493469143e2c6ee2..94040c417cecb1e86a83942f6530cd8fb0b22a2c 100644 (file)
@@ -1,6 +1,6 @@
 ---
 title: "Pointers Are Complicated II, or: We need better language specs"
-categories: rust research
+categories: rust research programming
 forum: https://internals.rust-lang.org/t/pointers-are-complicated-ii-or-we-need-better-language-specs/13562
 license: CC BY-SA 4.0
 license-url: https://creativecommons.org/licenses/by-sa/4.0/
@@ -55,10 +55,12 @@ int sum_up(int i, int j, unsigned int n) { // optimized version
 {% endhighlight %}
 However, that transformation is actually incorrect.
 If we imagine a caller using this function as `sum_up(INT_MAX, 1, 0)`, then this is a perfectly correct way to call `sum_up`: the loop is never entered, so the overflowing addition `INT_MAX+1` is never performed.
-However, after the desired optimization, the program now causes a signed integer overflow, which is UB (Undefined Behavior) and thus May Never Happen!
+However, after the desired optimization, the program now causes a signed integer overflow, which is UB (Undefined Behavior) and thus May Never Happen![^signed-int-overflow]
 
 [^loop]: If you are a regular reader of my blog, you will recognize this as the same optimization that already played a crucial role in [a previous post of mine]({% post_url 2020-07-15-unused-data %}). Loop-invariant code motion is a great optimization to look at when considering corner cases of IR semantics.
 
+[^signed-int-overflow]: If you are coming here with a Rust mindset, imagine `i + j` was written as `i.unchecked_add(j)`.
+
 One might be tempted to ignore this problem because the UB on integer overflow is a compiler-only concept; every target supported by the compiler will do the obvious thing and just produce an overflowing result.
 However, there might be other compiler passes running after the optimization we are considering.
 One such pass might inline `sum_up`, and another pass might notice the `INT_MAX+1` and replace it by `unreachable` since UB code is "by definition" unreachable, and another pass might then just remove all our code since it is unreachable.
@@ -88,7 +90,7 @@ All involved optimizations need to exactly agree on what is and is not UB, to en
 This is exactly what we also expect from the specification of a programming language such as C, which is why I think we should consider compiler IRs as proper programming languages in their own right, and specify them with the same diligence as we would specify "normal" languages.[^ub-difference]
 Sure, no human is going to write many programs in LLVM IR, so their syntax barely matters, but clang and rustc produce LLVM IR programs all the time, and as we have seen understanding the exact rules governing the behavior of programs is crucial to ensuring that the optimizations LLVM performs do not change program behavior.
 
-[^cheat]: If now you feel like we somehow cheated, since we can always translate the program from C to LLVM IR, optimize there, and translate back, consider this: translating from LLVM IR to C is really hard! In particular, singed integer addition in LLVM IR can *not* be translated into signed integer addition in C, since the former is well-defined with `poison` result in case of overflow, but the latter says overflow is UB. C has strictly more UB than LLVM IR (for integer arithmetic), which makes translation in one direction easy, while the other direction is hard.
+[^cheat]: If now you feel like we somehow cheated, since we can always translate the program from C to LLVM IR, optimize there, and translate back, consider this: translating from LLVM IR to C is really hard! In particular, signed integer addition in LLVM IR can *not* be translated into signed integer addition in C, since the former is well-defined with `poison` result in case of overflow, but the latter says overflow is UB. C has strictly more UB than LLVM IR (for integer arithmetic), which makes translation in one direction easy, while the other direction is hard.
 
 [^ub-difference]: In particular, two different variants of the IR with different rules for UB are really *two different programming languages*. A program that is well-defined in one language may have UB in another, so great care needs to be taken when the program is moved from being governed by one set of rules to another.
 
diff --git a/personal/_posts/2021-11-18-ub-good-idea.md b/personal/_posts/2021-11-18-ub-good-idea.md
new file mode 100644 (file)
index 0000000..19f8268
--- /dev/null
@@ -0,0 +1,165 @@
+---
+title: "Undefined Behavior deserves a better reputation"
+categories: rust research
+reddit: /rust/comments/qx168t/undefined_behavior_deserves_a_better_reputation/
+---
+
+*This is a cross-post of an [article that I wrote for the SIGPLAN blog](https://blog.sigplan.org/2021/11/18/undefined-behavior-deserves-a-better-reputation/).*
+
+"Undefined Behavior" often has a bad reputation. People see it as an excuse compiler writers use to break code, or an excuse by a lazy language designer to not complete the specification and properly define all this behavior.
+But what, really, is Undefined Behavior, and is it as bad as its reputation?
+In this blog post, I will look at this topic from a PL perspective, and argue that Undefined Behavior (or UB for short) is a valuable tool in a language designer's toolbox, and that it can be used responsibly to convey more of the programmer's insight about their code to the compiler with the goal of enabling more optimizations.
+I will also explain why I spent a significant amount of time adding *more* UB to Rust.
+
+<!-- MORE -->
+
+## A simple example
+
+In the best PL tradition, let us consider an artificial example to demonstrate the benefit of UB.
+Imagine we want to implement a function that returns the element in the middle of an array.
+If we are using Rust, we would probably write something like this:
+```rust
+fn mid(data: &[i32]) -> Option<i32> {
+  if data.is_empty() { return None; }
+  return Some(data[data.len()/2]);
+}
+```
+The argument is of type `&[i32]`, which is called a "slice" and consists of a pointer to some array and information about how long the array is.
+`mid` itself returns an integer wrapped in `Option` (corresponding to `Maybe` in Haskell) to properly signal the case where the array is empty.
+In the non-empty case, it computes the index in the middle of `data`, and returns that element.
+
+Now imagine this function is called in a tight loop in the benchmark for our next paper, so performance *really* matters.
+Is there any performance improvement we can hope to achieve in this function?
+It might seem like `mid` already does the absolute minimum amount of work required for the task, but there is some hidden cost in the array access `data[_]`:
+the compiler has to insert a bounds-check here to ensure that we do not access data beyond the size of the array that `data` points to.
+But as the programmer we know that bounds-check to be entirely unnecessary, since `data.len()/2` will always be smaller than `data.len()`!
+Wouldn't it be great if there was a way to tell the compiler about this, such that we can be sure no bounds check happens?
+
+Here is one way to accomplish that in Rust:
+```rust
+fn mid(data: &[i32]) -> Option<i32> {
+  if data.is_empty() { return None; }
+  match data.get(data.len()/2) {
+    Some(&x) => return Some(x),
+    None => unsafe { unreachable_unchecked() }
+  }
+}
+```
+We are now using the `get` operation to access the array, which returns an `Option` that is `None` for out-of-bounds accesses.
+And in case we get `None`, we call a special function `unreachable_unchecked` which makes a *binding promise to the compiler* that this piece of code is unreachable.
+The keyword `unsafe` here indicates that what we are doing is not covered by the type safety guarantees of the language: the compiler will not actually check that the promise we made holds true, it will just trust us on that.
+(The phrase "unchecked" is a Rust idiom; this is the "unchecked" version of `unreachable`, which inserts a run-time check that safely aborts the program should this code ever be reached -- or, to be more precise, it triggers a Rust panic.)
+
+After some inlining, the relevant part of this code looks as follows:
+```rust
+  let idx = data.len()/2;
+  if idx < data.len() { // Automatically inserted bounds-check.
+    ... // Access the array at `idx`.
+  } else {
+    unreachable_unchecked()
+  }
+```
+Since we told the compiler that the `else` branch is unreachable, it is easy to optimize away the conditional, so we end up with just a direct access to element `idx` in the array.
+Problem solved!
+(In fact, Rust provides `get_unchecked` as an alternative to `get` where the caller has to promise that the index is in-bounds, so a Rust programmer would just write `data.get_unchecked(data.len()/2)` to implement `mid` efficiently.)
+
+I expect some readers will not be happy with the way I achieved the desired optimization in the initial example, and argue that the compiler should be smart enough to do this automatically.
+I will get back to this point later; for now, just note that the latest stable version of Rust at the time of writing does [not perform this optimization](https://rust.godbolt.org/z/G34Ezzb9c) (as indicated by the call to `panic_bounds_check`).
+
+## Where is the Undefined Behavior?
+
+Hang on, you might say at this point, wasn't this blog post supposed to be about Undefined Behavior?
+That term did not even appear in the discussion of the example!
+Indeed, I was a bit sneaky and used different terminology that I think better captures a constructive way to think about Undefined Behavior.
+In the typical terminology, I would have said that calling the special function `unreachable_unchecked` causes immediate Undefined Behavior.
+Following the definition in the latest C standard (also shared by C++), the standard "imposes no requirements" on programs that exhibit Undefined Behavior.
+The compiler can hence basically replace the `else` branch by whatever code it wants, famously including "to make [demons fly out of your nose](http://www.catb.org/jargon/html/N/nasal-demons.html)", but also including just executing the `then` branch instead.
+
+This line of reasoning leads to the same result, but it paints an unnecessarily antagonistic picture of compiler writers. It makes it sound like compilers use complicated analyses to detect Undefined Behavior. Once they find UB, they have an excuse to emit broken code and hide behind the standard should anyone complain.
+This is not what actually happens.
+As we have seen in our example, the compiler really has no idea if this code has Undefined Behavior or not -- all it does is perform optimizations that are correct *under the extra assumption* that there is no Undefined Behavior.
+
+## UB is a double-edged sword
+
+Another reaction you might have is that `unreachable_unchecked` is not a "typical" example of UB.
+Most people probably associate that term with C or C++, which do not even have `unreachable_unchecked` (though many compilers provide an intrinsic with the same effect, e.g., `__builtin_unreachable` in GCC).
+So it may seem like I picked a strange example.
+Shouldn't I be talking about how, say, signed integer overflow is UB?
+
+This is the right time to admit that I am *not* going to defend all UB in C/C++.
+I think UB as a concept is a great idea, and `unreachable_unchecked` is the "most pure" form of UB that shows how it can be used by the programmer to convey extra information to the compiler -- but I also think that C and C++ are massively overusing UB.
+Of course, it is easy to say this with the benefit of hindsight; the first C compilers were extremely simple and today's use of UB for optimizations only emerged over time.
+It took a while for the implications of the modern interpretation of UB in the standard to become clear -- and C and C++, being very successful languages, have massive existing codebases which makes it super hard to revise any prior decision.
+This post is about defending and promoting UB as a concept, not UB in C/C++.
+
+Speaking of signed integer overflow, I think this is actually a good example for how to *not* use UB.
+An innocent-looking `+` turns into a promise of the programmer that this addition will never overflow, but the programmer probably will not carefully do a mental no-overflow proof for every single addition in their program.
+Instead, `+` could perform overflow checks or well-defined wrap-around, and the language could provide an `unchecked_add` function where overflows are UB.
+This lets the programmer opt in to providing extra no-overflow promises, to be used in situations where it is really beneficial for performance that the compiler can make this assumption (such as [this example](https://youtu.be/yG1OZ69H_-o?t=2357)).
+Basically, I am considering this a language (and library) design problem: UB is a sharp knife; when used well it gets the job done better, but it can also hurt a lot when used without enough care.
+
+Language and library design is not everything that can be used to tame UB, however.
+Good tooling can also make a big difference: if programmers can easily run their programs in "UB-checking mode", they can write tests to at least ensure the absence of UB for certain inputs.
+(Shameless plug: I am working on [Miri](https://github.com/rust-lang/miri/), a tool that provides exactly this for Rust.)
+Library authors can run their test suites with such a tool, and the tool can also be used exploratively to learn about what exactly is and is not UB in the first place.
+I think this is absolutely crucial, and language designers should design UB in a way that makes UB-checking tools more feasible.
+For the examples of UB we have seen so far (`unreachable_unchecked`, `get_unchecked`, and `unchecked_add`), this is obviously trivial.
+
+## How far can we push UB?
+
+That said, not all UB is that simple to teach and test.
+Even Rust, with its benefit of learning from several decades of experience with UB in C and C++, has UB that is a lot more subtle than this. The most glaring example of this is probably UB related to incorrect aliasing of mutable references.
+(Other, less extreme examples would be UB due to using uninitialized memory, or UB due to data races.)
+
+The Rust type system ensures that mutable references never alias any other reference that is currently being used in the program, i.e., they never point to the same memory as any other reference.
+This is a juicy guarantee for compiler writers, because while reordering memory accesses is often beneficial, it can be very hard to figure out if the transformation is even allowed -- if two accesses alias, then their original order must be preserved.
+
+However, `unsafe` code in Rust could easily create aliasing mutable references.
+So what can we do?
+We make the programmer promise that they do not do this!
+This is a lot like saying "the programmer promises that `unreachable_unchecked` is never called", so we can put on our UB lens and say that it is Undefined Behavior to have aliasing mutable references.
+
+The devil is of course in the details of defining what exactly this means.
+[Stacked Borrows](https://plv.mpi-sws.org/rustbelt/stacked-borrows/) (part of [my PhD thesis](https://www.ralfj.de/research/thesis.html) and also described in a series of blog posts: [v1.0](https://www.ralfj.de/blog/2018/11/16/stacked-borrows-implementation.html), [v2.0](https://www.ralfj.de/blog/2019/04/30/stacked-borrows-2.html), [v2.1](https://www.ralfj.de/blog/2019/05/21/stacked-borrows-2.1.html)) goes into all that detail by giving an operational semantics that exactly defines the promises programmers have to make.
+And that semantics is non-trivial!
+According to Stacked Borrows, the following code has UB:
+```rust
+let x = &mut 42; // Safely create a reference.
+let xptr = x as *mut i32; // Turn that reference into a raw (unchecked) pointer.
+let x1 = unsafe { &mut *xptr }; // Turn the pointer back into a reference...
+let x2 = unsafe { &mut *xptr }; // ...twice, so uniqueness is violated.
+*x1 = 0; // Undefined Behavior!
+```
+The reason this code has UB is that creating `x2` makes a promise that this is the unique reference created from `xptr`, so the previously created `x1` is invalidated when `x2` gets created.
+This means future uses of `x1` are Undefined Behavior.
+
+So this raises the question: can we really expect every author of `unsafe` Rust code to internalize Stacked Borrows to the extent that they can faithfully promise to the Rust compiler that their code will comply by this bespoke set of rules?
+Is it a good idea to interpret `&mut expr` as a promise that all aliasing was carefully checked and this reference is definitely unique?
+As with other UB, we can help programmers by providing tools; Miri contains an implementation of Stacked Borrows which both helps us to evaluate whether actual Rust code is compatible (or can reasonably be made compatible) with Stacked Borrows, and it helps Rust programmers by giving them a way to at least test for aliasing violations, and to interactively play with the semantics to gain a better understanding.
+I think that puts us in a pretty good spot overall, but some people still argue that Stacked Borrows goes too far and Rust will end up in a situation similar to the one C and C++ find themselves in -- where too few programmers actually know how to write UB-free code, and a significant amount of the code people rely on exhibits UB.
+
+Stacked Borrows is not part of the Rust spec, and is not the final word for aliasing-related UB in Rust.
+So there is still the chance that future revisions of this model can be made to better align with programmer intuition.
+The above code might get accepted because `x2` is not actually being used to access memory.
+Or maybe `&mut expr` should only make such promises when used outside an `unsafe` block -- but then, should adding `unsafe` really change the semantics of the program?
+As usual, language design is a game of trade-offs.
+
+## Conclusion
+
+I have presented Undefined Behavior as a tool that enables the programmer to write code that the compiler cannot check for correctness, and argued that -- used responsibly -- it is a useful component in a language designer's toolbox.
+
+As I alluded to earlier, the "obvious" alternative would be to make the compiler smarter.
+However, real programs are typically a lot more complicated than my simple example (which already outsmarts Rust's LLVM backend), and the reasoning required to justify an optimization can become arbitrarily complicated.
+Language designers should acknowledge that optimizers have their limitations and give programmers the tools they need to help the optimizer.
+Indeed, I think the fact that Rust combines a clever type checker with the idea of using `unsafe` code for the cases where the type checker is not clever enough is crucial for its success: `unsafe` is not a bug; it is a feature without which Rust would not be able to make systems programming safer in practice.
+It is also worth mentioning that many languages that we all know and love provide comparable "trusted" operations or annotations, e.g., `Obj.magic` in OCaml or the rewrite rules in GHC.
+Rust only differs in how prevalent unsafe code is in the ecosystem (and in emphasizing the importance of [encapsulating such code within safe APIs](https://blog.sigplan.org/2019/10/17/what-type-soundness-theorem-do-you-really-want-to-prove/)).
+
+In closing, I would like to propose that "Undefined Behavior" might need a rebranding.
+The term focuses on the negative case, when really all we ever care about as programmers or compiler authors is that programs do *not* have Undefined Behavior.
+Can we get rid of this double negation?
+Maybe we should talk about "ensuring Well-Defined Behavior" instead of "avoiding Undefined Behavior".
+
+To sum up: most of the time, ensuring Well-Defined Behavior is the responsibility of the type system, but as language designers we should not rule out the idea of sharing that responsibility with the programmer.
+
+*Thanks to Anish Athalye and Adrian Sampson for feedback on earlier drafts of this post.*
diff --git a/personal/_posts/2021-11-24-ub-necessary.md b/personal/_posts/2021-11-24-ub-necessary.md
new file mode 100644 (file)
index 0000000..970db70
--- /dev/null
@@ -0,0 +1,116 @@
+---
+title: "Do we really need Undefined Behavior?"
+categories: rust research
+---
+
+I recently published a [blog post on why Undefined Behavior is actually not a bad idea]({% post_url 2021-11-18-ub-good-idea %}).
+Coincidentally, this is just a few weeks after the publication of [this paper by Victor Yodaiken](https://dl.acm.org/doi/pdf/10.1145/3477113.3487274) which basically argues that Undefined Behavior (UB for short) made C unusable for one of its core audiences, OS developers.
+Here I refer to the typical modern interpretation of UB: assumptions the compiler may trust, without bounds on what happens if they are violated.
+The paper makes many good points, but I think the author is throwing out the baby with the bathwater by concluding that we should entirely get rid of this kind of Undefined Behavior.
+The point of this blog post is to argue that we do need UB by showing that even some of the most basic optimizations that all compilers perform require this far-reaching notion of Undefined Behavior.
+
+<!-- MORE -->
+
+To avoid ambiguity, I will refer to the above notion of UB as "unrestricted UB".
+The alternative interpretation of UB promoted by Yodaiken is what one might call "platform-specific UB".
+This requires that even programs with Undefined Behavior should behave in a consistent way: for example, the result of an out-of-bounds write may be 'unpredictable', it may either not actually happen or mutate some data somewhere.
+However, if a write occurs, the program must still behave in a way that is consistent with performing a write to the given address in the target platform.
+(At least, that is my understanding. I hope I am not misrepresenting their position here. The paper does not go into a lot of detail on how the situation could be improved, but it mentions proposals "where compilers map source operations to well-defined instruction sequences, in either a virtual or real machine, from which compiler optimisations may not observably stray".)[^N2769]
+
+[^N2769]: The paper also cites [C committee proposal N2769](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2769.pdf). However, N2769 explicitly says that `a + 1 < a` can still be optimized to `false`, while Yodaiken mentions this as an undesirable optimization. In fact, N2769 says it is okay and of "great value" to "assume the absence of UB". I admit I do not understand the distinction N2769 makes between "assuming the absence of UB" and "making assumptions about the result of UB", but it seems clear that Yodaiken goes even further than N2769 in restricting UB-based optimizations.
+
+## Examples of unrestricted UB
+
+So what is the problem with platform-specific UB?
+First of all, it does not reflect what the major compilers actually do in practice.
+I have seen claims in the past that GCC and LLVM are the only compilers making use of unrestricted UB; this is simply not true.
+Here is an [example of ICC performing such an optimization](https://godbolt.org/z/j18oW6YaE) (based on example code by Yodaiken):
+
+{% highlight c %}
+#include <stdlib.h>
+#include <stdio.h>
+
+int main () {
+  int *i = malloc(sizeof(int));
+  *i = 1;
+  int *j = malloc(sizeof(int));
+  *j = 1;
+  int *k = malloc(sizeof(int));
+  *k = 1;
+
+  int *x = j+(32/4);
+  *x = 40;
+  printf("*i=%d (%p) *j=%d (%p) *k=%d (%p)  *x=%d (%p)", *i, i, *j, j, *k, k, *x, x);
+}
+{% endhighlight %}
+
+This program prints the values and addresses of a few pointers.
+The concrete addresses are different on each execution, but the pattern is always the same:
+```
+*i=1 (0x1aef2a0) *j=1 (0x1aef2c0) *k=1 (0x1aef2e0)  *x=40 (0x1aef2e0)
+```
+Notice how `k` and `x` point to the same address (`0x1aef2e0` in this particular execution), but seem to contain different values.
+This is impossible under "platform-specific UB": no sequence of target platform operations can lead to a situation where the same address contains two different values.[^N2769-2]
+This example demonstrates that even ICC with `-O1` already requires unrestricted UB.
+(For completeness' sake, [here is a similar example for GCC](https://godbolt.org/z/c8qaWhnEG); at the time of writing, `i` and `x` have the same address but different values.
+And [here is an example for clang/LLVM](https://godbolt.org/z/r8TM7Ga8q), this time it's again `k` and `x` that behave inconsistently.
+godbolt supports MSVC but does not seem to be willing to execute the generated programs, but I have no doubt that similar examples can be found for this compiler.)
+
+[^N2769-2]: I assume N2769 would also not be happy with this outcome of our example program.
+
+What about niche compilers specifically built for reliable software?
+In their paper, Yodaiken claims that the verified C compiler CompCert "does not do any undefined behavior based optimization"
+(with a footnote saying "Except for assuming objects do not overlap in memory"; I am not quite sure what exactly is meant by this).
+This is incorrect.
+First of all, since CompCert has a proof of correctness, we can have a look at its specification to see what exactly it promises to its users---and that specification quite clearly follows the "unrestricted UB" approach, allowing the compiled program to produce arbitrary results if the source program has Undefined Behavior.
+Secondly, while CompCert's optimizer is very limited, it is still powerful enough that we can actually demonstrate inconsistent behavior for UB programs in practice:
+
+{% highlight c %}
+#include <stdio.h>
+
+int y, x;
+
+int f(void)
+{
+  y = 0;
+  *(&x + 1) = 1;
+  return y;
+}
+
+int main()
+{
+  int eq = (&x+1 == &y);
+  if (eq) {
+    printf("%d ", f());
+    printf("%d\n", y);
+  }
+  return 0;
+}
+{% endhighlight %}
+
+(Putting the result of the comparison into a local variable `eq` prevents CompCert from optimizing away the entire conditional.)
+This program, after being compiled with CompCert, prints "0 1".
+Again, this is printing "the same thing" twice, in this case the value stored at `y`, and produces two different results.
+CompCert exploited UB in a way that leads to a situation which should be "impossible" on the underlying machine.
+
+## Platform-specific UB is not an option
+
+Both of these examples highlight a fundamental problem with "platform-specific UB": *any* out-of-bounds write could potentially modify any other variable (at least any variable that has an address in memory).
+This can make even the most basic parts of high-quality code generation, such as register allocation, tricky or impossible: a variable that has its address taken has to be re-loaded from that same address any time an out-of-bounds write might have happened, since that write might just have hit the right address to change this variable's value.
+This applies even if the address has not yet been leaked to the outside world, as the first example shows.
+This is probably why there is hardly any compiler that follows the platform-specific interpretation of UB.
+(I say "hardly any" without knowing a counterexample, but I would not be surprised if some compilers for high-assurance embedded code are so simple that platform-specific UB is sufficient for them. But that is hardly representative for how C is used---and as we have seen with CompCert, even some high-assurance compilers do rely on unrestricted UB.)
+
+I honestly think *trying* to write a highly optimizing compiler based on a different interpretation of UB would be a worthwhile experiment.
+We sorely lack data on how big the performance gain of exploiting UB actually is.
+However, I strongly doubt that the result would even come close to the most widely used compilers today---and programmers that can accept such a big performance hit would probably not use C to begin with.
+Certainly, any proposal for *requiring* compilers to curtail their exploitation of UB must come with evidence that this would even be possible while keeping C a viable language for performance-sensitive code.
+
+To conclude, I fully agree with Yodaiken that C has a problem, and that reliably writing C has become incredibly hard since undefined behavior is so difficult to avoid.
+It is certainly worth reducing the amount of things that can cause UB in C, and developing practical tools to detect more advanced kinds of UB such as strict aliasing violations.
+I also wonder whether strict aliasing can be made more compatible with low-level programming patterns---or whether C should provide alternative means of alias control to programmers, such as `restrict` (not that its specification doesn't have its own set of problems, but an opt-in mechanism like `restrict` seems fundamentally more suited when the goal is to ensure compatibility with existing code).
+
+However, I do not think this problem can be solved with a platform-specific interpretation of UB.
+That would declare all but the most basic C compilers as non-compliant.
+We need to find some middle ground that actually permits compilers to meaningfully optimize the code, while also enabling programmers to actually write standards-compliant programs.
+I am not involved in the work that happens here on the C side, but for Rust, I think we can achieve this through a combination of being diligent about how much UB we really need, using language and API design to make it easier for the programmer to be aware of UB requirements imposed by the code they write, and providing [tools](https://github.com/rust-lang/miri/) that help programmers determine if their code exhibits UB or not.
diff --git a/personal/_posts/2022-04-11-provenance-exposed.md b/personal/_posts/2022-04-11-provenance-exposed.md
new file mode 100644 (file)
index 0000000..6d0d7d3
--- /dev/null
@@ -0,0 +1,491 @@
+---
+title: "Pointers Are Complicated III, or: Pointer-integer casts exposed"
+categories: rust research programming
+license: CC BY-SA 4.0
+license-url: https://creativecommons.org/licenses/by-sa/4.0/
+reddit: /rust/comments/u1bbqn/pointers_are_complicated_iii_or_pointerinteger/
+---
+
+In my [previous blog post on pointer provenance]({% post_url 2020-12-14-provenance %}), I have shown that not thinking carefully about pointers can lead to a compiler that is internally inconsistent:
+programs that are intended to be well-behaved get miscompiled by a sequence of optimizations, each of which seems intuitively correct in isolation.
+We thus have to remove or at least restrict at least one of these optimizations.
+In this post I will continue that trend with another example, and then I will lay down my general thoughts on how this relates to the recent [Strict Provenance](https://github.com/rust-lang/rust/issues/95228) proposal, what it could mean for Rust more generally, and compare with C's PNVI-ae-udi.
+We will end on a very hopeful note about what this could all mean for Rust's memory model.
+There's a lot of information packed into this post, so better find a comfortable reading position. :)
+
+<!-- MORE -->
+
+In case you don't know what I mean by "pointer provenance", you can either read that previous blog post or the [Strict Provenance documentation](https://doc.rust-lang.org/nightly/core/ptr/index.html#provenance).
+The gist of it is that a pointer consists not only of the address that it points to in memory, but also of its *provenance*: an extra piece of "shadow state" that is carried along with each pointer and that tracks which memory the pointer has permission to access and when.
+This is required to make sense of restrictions like "use-after-free is Undefined Behavior, even if you checked that there is a new allocation at the same address as the old one".
+Architectures like CHERI make this "shadow state" explicit (pointers are bigger than usual so that they can explicitly track which part of memory they are allowed to access),
+but even when compiling for AMD64 CPUs, compilers act "as if" pointers had such extra state -- it is part of the specification, part of the Abstract Machine, even if it is not part of the target CPU.
+
+## Dead cast elimination considered harmful
+
+The key ingredient that will help us understand the nuances of provenance is `restrict`, a C keyword to promise that a given pointer `x` does not alias any other pointer not derived from `x`.[^restrict]
+This is comparable to the promise that a `&mut T` in Rust is unique.
+However, just like last time, we want to consider the limits that `restrict` combined with integer-pointer casts put on an optimizing compiler -- so the actual programming language that we have to be concerned with is the IR of that compiler.
+Nevertheless I will use the more familiar C syntax to write down this example; you should think of this just being notation for the "obvious" equivalent function in LLVM IR, where `restrict` is expressed via `noalias`.
+Of course, if we learn that the IR has to put some limitations on what code may do, this also applies to the surface language -- so we will be talking about all three (Rust, C, LLVM) quite a bit.
+
+[^restrict]: The exact semantics of `restrict` are subtle and I am not aware of a formal definition. (Sadly, the one in the C standard does not really work, as you can see when you try to apply it to my example.) My understanding is as follows: `restrict` promises that this pointer, and all pointers derived from it, will not be used to perform memory accesses that *conflict* with any access done by pointers outside of that set. A "conflict" arises when two memory accesses overlap and at least one of them is a write. This promise is scoped to the duration of the function call when `restrict` appears in an argument type; I have no good idea for what the scope of the promise is in other situations.
+
+With all that out of the way, consider the following program:
+{% highlight c %}
+#include <stdio.h>
+#include <stdint.h>
+
+static int uwu(int *restrict x, int *restrict y) {
+  *x = 0;
+
+  uintptr_t xaddr = (uintptr_t)x;
+  int *y2 = y-1;
+  uintptr_t y2addr = (uintptr_t)y2;
+  if (xaddr == y2addr) {
+    int *ptr = (int*)xaddr;
+    *ptr = 1;
+  }
+
+  return *x;
+}
+
+int main() {
+  int i[2] = {0, 0};
+  int res = uwu(&i[0], &i[1]);
+  // Always prints 1.
+  printf("%d\n", res);
+}
+{% endhighlight %}
+This function takes as argument two `restrict` pointers `x` and `y`. We first write `0` into `*x`.
+Then we compute `y2` as pointing to the `int` right before `*y`, and cast that and `x` to integers.
+If the addresses we get are the same, we cast `xaddr` back to a pointer and write `1` to it.
+Finally, we return the value stored in `*x`.
+
+The `main` function simply calls `uwu` with two pointers pointing to the first two elements of an array.
+Note, in particular, that this *will* make `xaddr` and `y2addr` always equal!
+`&i[1] - 1` denotes the same address as `&i[0]`.
+
+Now, let us imagine we run a few seemingly obvious optimizations on `uwu`:
+- Inside the `if`, we can replace `xaddr` by `y2addr` since they are both equal integers.
+- Since this is a `static` function and the only caller makes `y2addr` always equal to `xaddr`, we know that the conditional in the `if` will always evaluate to `true`. We thus remove the test. (Alternatively, the same transformation can happen by inlining `uwu` into `main` while preserving the alias information, which [LLVM explicitly aims for](https://lists.llvm.org/pipermail/llvm-dev/2019-March/131127.html).)
+- Finally, we observe that `xaddr` is unused, so we can remove it entirely.
+
+`uwu` now looks as follows:
+{% highlight c %}
+static int uwu(int *restrict x, int *restrict y) {
+  *x = 0;
+
+  int *y2 = y-1;
+  uintptr_t y2addr = (uintptr_t)y2;
+  int *ptr = (int*)y2addr; // <-- using y2addr
+  *ptr = 1;
+
+  return *x;
+}
+{% endhighlight %}
+
+This might still look harmless.
+However, we can do even more!
+Notice how this function now consists of a store of `0` to `*x`, then a bunch of code *that does not involve `x` at all*, and then a load from `*x`.
+Since `x` is a `restrict` pointer, this "code that does not involve `x`" cannot possibly mutate `*x`, as that would be a violation of the `restrict`/`noalias` guarantee.
+Hence we can optimize the `return *x` to `return 0`.
+This kind of optimization is the primary reason to have `restrict` annotations in the first place, so this should be uncontroversial.
+Formally speaking: only pointers "derived from" `x` may access `*x`, and while the details of defining "derived from" are nasty, it should be clear that doing a bunch of operations that literally don't involve `x` at all cannot by any stretch of the imagination produce a result that is "derived from" `x`.
+(If they could, `restrict` would be basically worthless.)
+
+Now, the whole program looks like this:
+{% highlight c %}
+static int uwu(int *restrict x, int *restrict y) {
+  *x = 0;
+
+  int *y2 = y-1;
+  uintptr_t y2addr = (uintptr_t)y2;
+  int *ptr = (int*)y2addr;
+  *ptr = 1;
+
+  return 0; // <-- hard-coded return value
+}
+
+int main() {
+  int i[2] = {0, 0};
+  int res = uwu(&i[0], &i[1]);
+  // Now this prints 0!
+  printf("%d\n", res);
+}
+{% endhighlight %}
+We started out with a program that always prints `1`, and ended up with a program that always prints `0`.
+This is bad news. Our optimizations changed program behavior. That must not happen! What went wrong?
+
+Fundamentally, this is the same situation as in the previous blog post: this example demonstrates that either the original program already had Undefined Behavior, or (at least) one of the optimizations is wrong.
+However, the only possibly suspicious part of the original program is a pointer-integer-pointer round-trip -- and if casting integers to pointers is allowed, *surely* that must work.
+I will, for the rest of this post, assume that replacing `x` by `(int*)(uintptr_t)x` is always allowed.
+So, which of the optimizations is the wrong one?
+
+## The blame game
+
+Remember what I said earlier about `restrict` and how it matters which pointer `ptr` is "derived from"?
+If we follow this lead, it may seem like the bogus optimization is the one that replaced `xaddr` by `y2addr`.
+After this transformation, `ptr` is obviously "derived from" `y2` (and thus transitively from `y`) and not `x`, and so obviously `uwu` (as called from `main`) is wrong since we are doing two memory accesses (at least one of which is a write) to the same location, using two pointers that are "derived from" different `restrict` pointers!
+
+However, that optimization doesn't even have anything to do with pointers.
+It just replaces one equal integer by another!
+How can that possibly be incorrect?
+
+What this example shows is that the notion of one value being "derived from" another is not very meaningful when considering an optimizing compiler.[^consume]
+It *is* possible to "fix" this problem and have a notion of "derived from" that works correctly even with pointer-integer round-trips.
+However, this requires saying that not only pointers but also *integers carry provenance*, such that casting a pointer to an integer can preserve the provenance.
+We solved one problem and created many new ones.
+For once, we have to stop doing optimizations that replace one `==`-equal integer by another, unless we know they carry no provenance.
+(Alternatively we could say `==`-comparing such integers is Undefined Behavior. But clearly we want to allow people to `==`-compare integers they obtained from pointer-integer casts, so this is not an option.)
+That seems like a bad deal, since the code that benefits from such optimizations doesn't even do anything shady -- it is the pointer-manipulating code that is causing trouble.
+The list doesn't end here though, and because of that, this option was discarded by the C standardization process during its provenance work, and they ended up picking a "PNVI" model -- provenance *not* via integers.
+I think Rust should follow suit.
+
+[^consume]: This is, in fact, a common problem -- it is what makes the `consume` memory order for atomic accesses basically impossible to specify in a programming language! While instruction sets often have very explicit rules about which instructions are assumed to "depend" on which previous instructions, that notion is hard to rationalize in a language where the compiler can replace `a + (b-a)` by `b` -- and thus *remove* dependencies from the program.
+
+But, if it's not the replacement of `xaddr` by `y2addr` that is wrong, then which optimization *is* the wrong one?
+I will argue that the incorrect optimization is the one that removed `xaddr`.
+More specifically, the bad step was removing the cast `(uintptr_t)x`, irrespective of whether the result of that cast is used or not.
+Had this cast been preserved, it would have been a marker for the compiler to know that "the `restrict` guarantee of `x` ends here", and it would not have done the final optimization of making `uwu` always return `0`.
+
+## Casts have a side-effect
+
+How can it *not* be correct to remove an operation if its result is unused?
+If we take a step back, then in general, the answer is simple -- if calling `foo()` has some side-effect on the global state, like changing the value of a global variable, then of course we have to keep the call to `foo` around even if we ignore its return value.
+But in this case, the operation in question is `(uintptr_t)x`, which has no side-effect -- right?
+
+Wrong.
+This is exactly the key lesson that this example teaches us: casting a pointer to an integer *has a side-effect*, and that side-effect has to be preserved even if we don't care about the result of the cast (in this case, the reason we don't care is that we *already know* that `x` and `y2` will cast to the same `uintptr_t`).
+
+To explain what that side-effect is, we have to get deep into the pointer provenance mindset.
+`x` and `y` are both pointers, so they carry provenance that tracks which memory they have permission to access.
+Specifically, `x` has permission to access `i[0]` (declared in `main`), and `y` has permission to access `i[1]`.[^dyn]
+`y2` just inherits the permission from `y`.
+
+[^dyn]: As mentioned in a previous footnote, this is not actually how `restrict` works. The exact set of locations these pointers can access is determined *dynamically*, and the only constraint is that they cannot be used to access *the same location* (except if both are just doing a load). However, I carefully picked this example so that these subtleties should not change anything.
+
+But which permission does `ptr` get?
+Since integers do not carry provenance, the details of this permission information are lost during a pointer-integer cast, and have to somehow be 'restored' at the integer-pointer cast.
+And that is exactly the point where our problems begin.
+In the original program, we argued that doing a pointer-integer-pointer round-trip is allowed (as is the intention of the C standard).
+It follows that `ptr` must pick up the permission from `x` (or else the write to `*ptr` would be Undefined Behavior: `x` is `restrict`, nothing else can access that memory).
+However, in the final program, `x` plays literally no role in computing `ptr`!
+It would be a disaster to say that `ptr` could pick up the permission of `x` -- just imagine all that `y`-manipulating code is moved into a different function.
+Do we have to assume that any function we call can just do a cast to "steal" `x`'s permission?
+That would entirely defeat the point of `restrict` and make `noalias` optimizations basically impossible.
+
+But how can it be okay for `ptr` to pick up `x`'s permission in the original program, and *not* okay for it to pick up the same permission in the final program?
+The key difference is that in the original program, `x` *has been cast to an integer*.
+When you cast a pointer to an integer, you are basically declaring that its permission is "up for grabs", and any future integer-pointer cast may end up endowing the resulting pointer with this permission.
+We say that the permission has been "exposed".
+And *that* is the side-effect that `(uintptr_t)x` has!
+
+Yes, this way of resolving the conflict *does* mean we will lose some optimizations.
+We *have to* lose some optimization, as the example shows.
+However, the crucial difference to the previous section is that *only code which casts pointers to integers is affected*.
+This means we can keep the performance cost localized to code that does 'tricky things' around pointers -- that code needs the compiler to be a bit conservative, but all the other code can be optimized without regard for the subtleties of pointer-integer-pointer round-trips.
+(Specifically, *both* pointer-integer and integer-pointer casts have to be treated as impure operations, but for different reasons.
+Pointer-integer casts have a side-effect as we have seen.
+Integer-pointer casts are *non-deterministic* -- they can produce different results even for identical inputs.
+I moved the discussion of this point into the appendix below.)
+
+## Strict provenance: pointer-integer casts *without* side-effects
+
+This may sound like bad news for low-level coding tricks like pointer tagging (storing a flag in the lowest bit of a pointer).
+Do we have to optimize this code less just because of corner cases like the above?
+As it turns out, no we don't -- there are some situations where it is perfectly fine to do a pointer-integer cast *without* having the "exposure" side-effect.
+Specifically, this is the case if we never intend to cast the integer back to a pointer!
+That might seem like a niche case, but it turns out that most of the time, we can avoid 'bare' integer-pointer casts, and instead use an operation like [`with_addr`](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.with_addr) that explicitly specifies which provenance to use for the newly created pointer.[^with_addr]
+This is more than enough for low-level pointer shenanigans like pointer tagging, as [Gankra demonstrated](https://gankra.github.io/blah/tower-of-weakenings/#strict-provenance-no-more-getting-lucky).
+Rust's [Strict Provenance experiment](https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) aims to determine whether we can use operations like `with_addr` to replace basically all integer-pointer casts.
+
+[^with_addr]: `with_addr` has been unstably added to the Rust standard library very recently. Such an operation has been floating around in various discussions in the Rust community for quite a while, and it has even made it into [an academic paper](https://iris-project.org/pdfs/2022-popl-vip.pdf) under the name of `copy_alloc_id`. Who knows, maybe one day it will find its way into the C standard as well. :)
+
+As part of Strict Provenance, Rust now has a second way of casting pointers to integers, `ptr.addr()`, which does *not* "expose" the permission of the underlying pointer, and hence can be treated like a pure operation![^experiment]
+We can do shenanigans on the integer representation of a pointer *and* have all these juicy optimizations, as long as we don't expect bare integer-pointer casts to work.
+As a bonus, this also makes Rust work nicely on CHERI *without* a 128bit wide `usize`, and it helps Miri, too.
+
+[^experiment]: My lawyers advised me to say that all of this is provisional and the specification for `addr` and all other Strict Provenance operations might change until their eventual stabilization.
+
+But that is not the focus of this blog post, Gankra has [already written most of what there is to say here](https://gankra.github.io/blah/tower-of-weakenings/).
+For this blog post, we are happy with what we learned about casts between pointers and integers.
+We have found a way to resolve the conflict uncovered by the example, while keeping performance cost (due to lost optimizations) confined to just the code that is truly ambiguous, and even found alternative APIs that can be used to replace most (all?) uses of ambiguous integer-pointer casts.
+All is well that ends well?
+Unfortunately, no -- we are not quite done yet with pointer provenance nightmares.
+
+## Let's do some transmutation magic
+
+Languages like C or Rust typically allow programmers to re-interpret the underlying representation of a value at a different type.
+In Rust, this is often called "transmutation"; in C, a common term for this is "type punning".
+The easiest way to do this in Rust is via the [`mem::transmute`](https://doc.rust-lang.org/std/mem/fn.transmute.html) function, but alternatively transmutation is possible via `union`s or by casting a `*mut T` raw pointer to `*mut U`.
+In C, the easiest way is to use a `memcpy` between variables of different types, but `union`-based type punning is also sometimes allowed, as is loading data of arbitrary type using a character-typed pointer.
+(Other kinds of pointer-based type punning are forbidden by C's strict aliasing rules, but Rust has no such restriction.)
+The next question we are going to treat in this blog post is: what happens when we transmute a pointer to an integer?
+
+Basically, imagine the original example after we replace the two casts (computing `xaddr` and `y2addr`) with a call to a function like
+{% highlight c %}
+static uintptr_t transmute_memcpy(int *ptr) {
+    uintptr_t res;
+    memcpy(&res, &ptr, sizeof(uintptr_t));
+    return res;
+}
+{% endhighlight %}
+or
+{% highlight c %}
+static uintptr_t transmute_union(int *ptr) {
+    typedef union { uintptr_t res; int *ptr; } Transmute;
+    Transmute t;
+    t.ptr = ptr;
+    return t.res;
+}
+{% endhighlight %}
+All the same optimizations still apply -- right?
+This requires a compiler that can "see through" `memcpy` or union field accesses, but that does not seem too much to ask.
+But now we have the same contradiction as before!
+Either the original program already has Undefined Behavior, or one of the optimizations is incorrect.
+
+Previously, we resolved this conundrum by saying that removing the "dead cast" `(uintptr_t)x` whose result is unused was incorrect, because that cast had the side-effect of "exposing" the permission of `x` to be picked up by future integer-pointer casts.
+We could apply the same solution again, but this time, we would have to say that a `union` access (at integer type) or a  `memcpy` (to an integer) can have an "expose" side-effect and hence cannot be entirely removed even if its result is unused.
+And that sounds quite bad!
+`(uintptr_t)x` only happens in code that does tricky things with pointers, so urging the compiler to be careful and optimize a bit less seems like a good idea (and at least in Rust, `x.addr()` even provides a way to opt-out of this side-effect).
+However, `union` and `memcpy` are all over the place.
+Do we now have to treat *all* of them as having side-effects?
+In Rust, due to the lack of a strict aliasing restriction (or in C with `-fno-strict-aliasing`), things get even worse, since literally *any* load of an integer from a raw pointer might be doing a pointer-integer transmutation and thus have the "expose" side-effect!
+
+To me, and speaking from a Rust perspective, that sounds like bad idea.
+Sure, we want to make it as easy as possible to write low-level code in Rust, and that code sometimes has to do unspeakable things with pointers.
+But we *don't* like the *entire ecosystem* to carry the cost of that decision by making it harder to remove every raw pointer load everywhere!
+So what are the alternatives?
+
+Well, I would argue that the alternative is to treat the original program (after translation to Rust) as having Undefined Behavior.
+There are, to my knowledge, generally two reasons why people might want to transmute a pointer to an integer:
+- Chaining many `as` casts is annoying, so calling `mem::transmute` might be shorter.
+- The code doesn't actually care about the *integer* per se, it just needs *some way* to hold arbitrary data in a container of a given type.
+
+The first kind of code should just use `as` casts, and we should do what we can (via lints, for example) to identify such code and get it to use casts instead.[^compat]
+Maybe we can adjust the cast rules to remove the need for chaining, or add some [helper methods](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.expose_addr) that can be used instead.
+
+[^compat]: We could even, if we are really desperate, decide to special-case `mem::transmute::<*const T, usize>` (and likewise for `*mut T`) and declare that it *does* have the "expose" side-effect if the current crate is using some old edition. Sometimes, you have to do ugly things to move forwards. This would not apply to `union`- or raw-pointer-based transmutation.
+
+The second kind of code should not use integers!
+Putting arbitrary data into an integer type is already somewhat suspicious due to the trouble around padding (if we want to make use of those shiny new `noundef` annotations that LLVM offers, we have to disallow transmuting data with padding to integer types).
+The right type to use for holding arbitrary data is `MaybeUninit`, so e.g. `[MaybeUninit<u8>; 1024]` for up to 1KiB of arbitrary data.
+`MaybeUninit` can also hold pointers with their provenance without any trouble.
+
+Because of that, I think we should move towards discouraging, deprecating, or even entirely disallowing pointer-integer transmutation in Rust.
+That means a cast is the only legal way to turn a pointer into an integer, and after the discussion above we got our casts covered.
+A [first careful step](https://github.com/rust-lang/rust/pull/95547) has recently been taken on this journey; the `mem::transmute` documentation now cautions against using this function to turn pointers into integers.
+
+**Update (2022-09-14):** After a lot more discussion, the current model pursued by the Unsafe Code Guidelines WG is to say that pointer-to-integer transmutation is permitted, but just strips provenance without exposing it.
+That means the program with the casts replaced by transmutation is UB, because the `ptr` it ends up dereferencing has invalid provenance.
+However, the transmutation itself is not UB.
+Basically, pointer-to-integer transmutation is equivalent to [the `addr` method](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.addr), with all its caveats -- in particular, transmuting a pointer to an integer and back is like calling `addr` and then calling [`ptr::invalid`](https://doc.rust-lang.org/nightly/std/ptr/fn.invalid.html).
+That is a *lossy* round-trip: it loses provenance information, making the resulting pointer invalid to dereference.
+It is lossy even if we use a regular integer-to-pointer cast (or `from_exposed_addr`) for the conversion back to a pointer, since the original provenance might never have been exposed.
+Compared to declaring the transmutation itself UB, this model has some nice properties that help compiler optimizations (such as removing unnecessary store-load round-trips). **/Update**
+
+## A new hope for Rust
+
+All in all, while the situation may be very complicated, I am actually more hopeful than ever that we can have both -- a precise memory model for Rust *and* all the optimizations we can hope for!
+The three core pillars of this approach are:
+- making pointer-integer casts "expose" the pointer's provenance,
+- offering `ptr.addr()` to learn a pointer's address *without* exposing its provenance,
+- and making pointer-integer transmutation round-trips lossy (such that the resulting pointer cannot be dereferenced).
+
+Together, they imply that we can optimize "nice" code (that follows Strict Provenance, and does not "expose" or use integer-pointer casts) perfectly, without any risk of breaking code that does use pointer-integer round-trips.
+In the easiest possible approach, the compiler can simply treat pointer-integer and integer-pointer casts as calls to some opaque external function.
+Even if the rest of the compiler literally entirely ignores the existence of pointer-integer round-trips, it will still support such code correctly!
+
+However, it's not just compilers and optimizers that benefit from this approach.
+One of my biggest quests is giving a [precise model](https://plv.mpi-sws.org/rustbelt/stacked-borrows/) of the Rust aliasing rules, and that task has just gotten infinitely easier.
+I used to worry *a lot* about pointer-integer round-trips while developing Stacked Borrows.
+This is the entire reason why all of this "untagged pointer" mess exists.
+
+Under this brave new world, I can entirely ignore pointer-integer round-trips when designing memory models for Rust.
+Once that design is done, support for pointer-integer round-trips can be added as follows:
+- When a pointer is cast to an integer, its provenance (whatever information it is that the model attaches to pointers -- in Stacked Borrows, this is called the pointer's *tag*) is marked as "exposed".
+- When an integer is cast to a pointer, we *guess* the provenance that the new pointer should have from among all the provenances that have been previously marked as "exposed".
+  (And I mean *all* of them, not just the ones that have been exposed "at the same address" or anything like that. People will inevitably do imperfect round-trips where the integer is being offset before being cast back to a pointer, and we should support that. As far as I know, this doesn't really cost us anything in terms of optimizations.)
+
+This "guess" does not need to be described by an algorithm.
+Through the magic that is formally known as [angelic non-determinism](https://en.wikipedia.org/wiki/Angelic_non-determinism), we can just wave our hands and say "the guess will be maximally in the programmer's favor": if *any* possible choice of (previously exposed) provenance makes the program work, then that is the provenance the new pointer will get.
+Only if *all* choices lead to Undefined Behavior, do we consider the program to be ill-defined.
+This may sound like cheating, but it is actually a legit technique in formal specifications.
+
+Also note how it's really *just* the integer-pointer casts that are making things so complicated here.
+If it weren't for them, we would not even need all that "exposure" machinery.
+Pointer-integer casts on their own are perfectly fine!
+That's why [`addr`](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.addr)+[`with_addr`](https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.with_addr) is such a nice API from a memory model perspective.[^fake_alloc]
+
+[^fake_alloc]: Even more specifically, it's the integer-pointer cast as part of a pointer-integer round-trip that are a problem. If you are just casting an integer constant to a pointer because on your platform that's where some fixed memory region lies, and if that memory is entirely outside of the global, stack, and heap allocations that the Rust language itself is aware of, we can still be friends.
+
+This approach *does* have the disadvantage that it becomes near impossible to write a tool like Miri that precisely matches the specification, since Miri cannot possibly implement this "guessing" accurately.
+However, Miri can still properly check code that uses Strict Provenance operations, so hopefully this is just yet another incentive (besides the more precise specification and better optimization potential) for programmers to move their code away from integer-pointer casts and towards Strict Provenance.
+And who knows, maybe there *is* a clever way that Miri can actually get reasonably close to checking this model?
+It doesn't have to be perfect to be useful.
+
+What I particularly like about this approach is that it makes pointer-integer round-trips a purely local concern.
+With an approach like Stacked Borrows "untagged pointers", *every* memory operation has to define how it handles such pointers.
+Complexity increases globally, and even when reasoning about Strict Provenance code we have to keep in mind that some pointers in other parts of the program might be "untagged".
+In contrast, this "guessing maximally in your favor"-based approach is entirely local; code that does not syntactically contain exposing pointer-integer or integer-pointer casts can literally forget that such casts exist at all.
+This is true both for programmers thinking about their `unsafe` code, and for compiler authors thinking about optimizations.
+Compositionality at its finest!
+
+## But what about C?
+
+I have talked a lot about my vision for "solving" pointer provenance in Rust.
+What about other languages?
+As you might have heard, C is moving towards making [PNVI-ae-udi](http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2676.pdf) an official recommendation for how to interpret the C memory model.
+With C having so much more legacy code to care about and many more stakeholders than Rust does, this is an impressive achievement!
+How does it compare to all I said above?
+
+First of all, the "ae" part of the name refers to "address-exposed" -- that's exactly the same mechanism as what I described above!
+In fact, I have taken the liberty to use their terminology.
+So, on this front, I see Rust and C as moving into the same direction, which is great.
+(Now we just need to get LLVM to also move in that direction.)
+I should mention that PNVI-ae-udi does *not* account for the `restrict` modifier of C, so in a sense it is solving an easier problem than the Rust memory model which has no choice but to contend with interesting questions around aliasing restrictions.
+However, if/when a more precise model of C with `restrict` emerges, I don't think they will be moving away from the "address-exposed" model -- to the contrary, as I just argued this model means we can specify `restrict` without giving a thought to pointer-integer round-trips.
+
+The "udi" part of the name means "user disambiguation", and is basically the mechanism by which an integer-pointer cast in C "guesses" the provenance it has to pick up.
+The details of this are complicated, but the end-to-end effect is basically exactly the same as in the "best possible guess" model I have described above!
+Here, too, my vision for Rust aligns very well with the direction C is taking.
+(The set of valid guesses in C is just a lot more restricted since they do not have `wrapping_offset`, and the model does not cover `restrict`.
+That means they can actually feasibly give an algorithm for how to do the guessing.
+They don't have to invoke scary terms like "angelic non-determinism", but the end result is the same -- and to me, the fact that it is equivalent to angelic non-determinism is what justifies this as a reasonable semantics.
+Presenting this as a concrete algorithm to pick a suitable provenance is then just a stylistic choice.)
+Kudos go to Michael Sammler for opening my eyes to this interpretation of "user disambiguation", and arguing that angelic non-determinism might not be such a crazy idea after all.
+
+What is left is the question of how to handle pointer-integer transmutation, and this is where the roads are forking.
+PNVI-ae-udi explicitly says loading from a union field at integer type exposes the provenance of the pointer being loaded, if any.
+So, the example with `transmute_union` would be allowed, meaning the optimization of removing the "dead" load from the `union` would *not* (in general) be allowed.
+Same for `transmute_memcpy`, where the proposal says that when we access the contents of `ret` at type `uintptr_t`, that will again implicitly expose the provenance of the pointer.
+
+I think there are several reasons why this choice makes sense for C, that do not apply to Rust:
+- There is a *lot* of legacy code. A *LOT*.
+- There is no alternative like `MaybeUninit` that could be used to hold data without losing provenance.
+- Strict aliasing means that not *all* loads at integer type have to worry about provenance; only loads at character type are affected.
+
+On the other hand, I am afraid that this choice might come with a significant cost in terms of lost optimizations.
+As the example above shows, the compiler has to be very careful when removing any operation that can expose a provenance, since there might be integer-pointer casts later that rely on this.
+(Of course, until this is actually implemented in GCC or LLVM, it will be hard to know the actual cost.)
+Because of all that, I think it is reasonable for Rust to make a different choice here.
+
+## Conclusion
+
+This was a long post, but I hope you found it worth reading. :)
+To summarize, my concrete calls for action in Rust are:
+- Code that uses pointer-integer transmutation round-trips should migrate to regular casts or `MaybeUninit` transmutation ASAP.
+  I think we should declare pointer-integer transmutation as "losing" provenance, so code that assumes a lossless transmutation round-trip has Undefined Behavior.
+- Code that uses pointer-integer or integer-pointer *casts* might consider migrating to the Strict Provenance APIs.
+  You can do this even on stable with [this polyfill crate](https://crates.io/crates/sptr).
+  However, such code *is and remains* well-defined. It just might not be optimized as well as one could hope, it might not compile on CHERI, and Miri will probably miss some bugs.
+  If there are important use-cases not covered by Strict Provenance, we'd like to hear about them!
+
+This is a large undertaking and will require a lot of work!
+However, at the end of this road is a language with a coherent, well-defined memory model *and* support for doing unspeakable things to pointers *without* incurring a (reasoning or optimization) cost on code that is perfectly nice to its pointers.
+Let us work towards this future together. :)
+
+## Appendix
+
+#### Integer-pointer casts are not pure, either
+
+I promised an example of how integer-pointer casts are "impure", in the sense that two casts with the same input integer can produce different pointers:
+
+{% highlight c %}
+static int uwu(int *restrict x, int *restrict y) {
+  *x = 0;
+  *y = 0;
+
+  uintptr_t xaddr = (uintptr_t)x;
+  int *y2 = y-1;
+  uintptr_t y2addr = (uintptr_t)y2;
+  assert(xaddr == y2addr);
+
+  int *xcopy = (int*)xaddr;
+  int *y2copy = (int*)y2addr;
+  int *ycopy = y2copy+1;
+
+  return *xcopy + *ycopy;
+}
+
+int main() {
+  int i[2] = {0, 0};
+  uwu(&i[0], &i[1]);
+}
+{% endhighlight %}
+
+If we ignore the pointer-integer round-trips, this uses `x` and `xcopy` to access `i[0]`, while using `y` and `ycopy` to access `i[1]`, so this should be uncontroversial.
+`ycopy` is computed via `(y-1)+1`, but hopefully nobody disagrees with that.
+Then we just add some pointer-integer round-trips.
+
+But now, consider that `(int*)xaddr` and `(int*)y2addr` take the same integer as input!
+If the compiler were to treat integer-pointer casts as a pure, deterministic operation, it could replace `(int*)y2addr` by `xcopy`.
+However, that would mean `xcopy` and `ycopy` have the same provenance!
+And there exists no provenance in this program that has access to both `i[0]` and `i[1]`.
+So, either the cast has to synthesize a new provenance that has never been seen before, or doing common subexpression elimination on integer-pointer casts is wrong.
+
+My personal stance is that we should not let the cast synthesize a new provenance.
+This would entirely lose the benefit I discussed above of making pointer-integer round-trips a *local* concern -- if these round-trips produce new, never-before-seen kinds of provenance, then the entire rest of the memory model has to define how it deals with those provenances.
+We already have no choice but treat pointer-integer casts as an operation with side-effects; let's just do the same with integer-pointer casts and remain sure that no matter what the aliasing rules are, they will work fine even in the presence of pointer-integer round-trips.
+
+That said, under this model integer-pointer casts still have no side-effect, in the sense that just removing them (if their result is unused) is fine.
+Hence, it *could* make sense to implicitly perform integer-pointer casts in some situations, like when an integer value (without provenance) is used in a pointer operation (due to an integer-to-pointer transmutation).
+This breaks some optimizations like load fusion (turning two loads into one assumes the same provenance was picked both times), but most optimizations (in particular dead code elimination) are unaffected.
+
+#### What about LLVM?
+
+I discussed above how my vision for Rust relates to the direction C is moving towards.
+What does that mean for the design space of LLVM?
+Which changes would have to be made to fix (potential) miscompilations in LLVM and to make it compatible with these ideas for C and/or Rust?
+Here's the list of open problems I am aware of:
+- LLVM would have to to stop [removing `inttoptr(ptrtoint(_))`](https://github.com/llvm/llvm-project/issues/33896) and stop doing [replacement of `==`-equal pointers](https://github.com/llvm/llvm-project/issues/34577).
+- As the first example shows, LLVM also needs to treat `ptrtoint` as a side-effecting operation that has to be kept around even when its result is unused. (Of course, as with everything I say here, there can be special cases where the old optimizations are still correct, but they need extra justification.)
+- I think LLVM should also treat `inttoptr` as a side-effecting (and, in particular, non-deterministic) operation, as per the last example. However, this could possibly be avoided with a `noalias` model that specifically accounts for new kinds of provenance being synthesized by casts. (I am being vague here since I don't know what that provenance needs to look like.)
+
+So far, this all applies to LLVM as a Rust and C backend equally, so I don't think there are any good alternatives.
+On the plus side, adapting this strategy for `inttoptr` and `ptrtoint` means that the recent LLVM ["Full Restrict Support"](https://lists.llvm.org/pipermail/llvm-dev/2019-March/131127.html) can also handle pointer-integer round-trips "for free"!
+
+Adding `with_addr`/`copy_alloc_id` to LLVM is not strictly necessary, since it can be implemented with `getelementptr` (without `inbounds`).
+However, optimizations don't seem to always deal well with that pattern, so it might still be a good idea to add this as a primitive operation to LLVM.
+
+Where things become more subtle is around pointer-integer transmutation.
+If LLVM wants to keep doing replacement of `==`-equal integers (which I strongly assume to be the case), *something* needs to give: my first example, with casts replaced by transmutation, shows a miscompilation.
+If we focus on doing an `i64` load of a pointer value (e.g. as in the LLVM IR produced by `transmute_union`, or pointer-based transmutation in Rust), what are the options?
+Here are the ones I have seen so far (but there might be more, of course):
+1. The load could be said to behave like `ptrtoint`. This means it strips provenance and as a side-effect, it also exposes the pointer.
+2. The load could be said to just strip provenance *without* exposing the pointer.
+3. The load could be simply UB or return `poison`.
+4. The load could produce an integer with provenance, *and moreover* any computation on such an integer (including `icmp`) is UB (or returns `poison`).
+  This has some subtle consequences, but they might be mostly harmless. For example, `x` can no longer be replaced by `x+0`.
+  We cannot assume that it is safe to compare arbitrary `i64` and branch on the result, even if they are `noundef`. Or maybe `noundef` also excludes provenance?
+  This is certainly the least obvious alternative.
+
+Except for the first option, these all say that my example with transmutation instead of the pointer-integer casts is UB, which avoids the optimization problems that arise from accepting that example.
+That is fine for my vision for Rust, but a problem for C with PNVI-ae-udi.
+Only the first option is compatible with that, but that option also means entirely removing a load is non-trivial even if its result is unused!
+I hope we can avoid that cost for Rust.
+
+Another interesting difference between these options is whether the resulting semantics are "monotone" with respect to provenance: is "increasing" the provenance of a value (i.e., letting it access more memory) a legal program transformation?
+With the last two options, it is not, since adding provenance to a value that did not have it can introduce Undefined Behavior.
+The first two options are "monotone" in this sense, which seems like a nice property.
+(This is comparable to how the semantics are "monotone" with respect to `undef` and `poison`: replacing either of them by a fixed value is a legal program transformation. For `undef`/`poison` this is crucially important, for provenance it seems more like a sanity check of the semantics.)
+
+In all of these cases except the last one, LLVM would probably need something like a [byte type](https://gist.github.com/georgemitenkov/3def898b8845c2cc161bd216cbbdb81f) so that a load of arbitrary data (including a pointer with provenance) can be done without losing the provenance attached to the data.
+
+A similar question arises for doing a pointer-typed load of a bare integer (integer-pointer transmutation):
+1. The load could have the effects of a `inttoptr`. This is less clearly bad than a `ptrtoint`, but is still tricky since (at least without extra work) `inttoptr` is non-deterministic and depends on the global set of exposed provenances (so, it cannot be easily reordered up across potentially exposing operations).
+  I also have [another example](https://github.com/rust-lang/unsafe-code-guidelines/issues/286#issuecomment-860189806) showing that if *both* pointer-integer transmutation and integer-pointer transmutation work like the corresponding casts (i.e., if the first of my options is picked for both loads of pointers at integer type, and integers at pointer type), then more optimizations fail:
+  removing a store that follows a load and just writes back the same value that has just been loaded is no longer correct.
+  Yet, I think this is what PNVI-ae-udi mandates. Again I hope Rust can opt-out of this.
+2. The load could create a pointer with "invalid" provenance.
+  That means transmutation of a pointer to an integer and back produces a pointer that cannot be used to access memory, but avoids all the analysis difficulties that come with an `inttoptr`.
+  This is what I think would be best for Rust.
+3. The load could produce `poison`, but I see no good reason for doing that.
+
+Since LLVM generally errs on the side of delaying UB as long as possible if that is not in conflict with optimizations, the second option for both questions feels most "on-brand" to me personally -- but in the end, these are some hard choices that the LLVM community will have to make.
+I can help evaluate these trade-offs by giving structure to the design space and pointing out the inevitable consequences of certain decisions, but I can only lend a hand here -- while I think and care a lot about LLVM semantics, I haven't done any direct work on LLVM myself.
+I am also not enough of an expert for which optimizations are important and the performance impact of the various options here, so I hope we can get people with that kind of background involved in the discussion as well.
+For the sake of the entire ecosystem I mostly hope that LLVM will make *some* choice so that we can, eventually, leave this limbo state we are currently in.
+
+#### Footnotes
diff --git a/personal/_posts/2022-07-02-miri.md b/personal/_posts/2022-07-02-miri.md
new file mode 100644 (file)
index 0000000..41022f1
--- /dev/null
@@ -0,0 +1,245 @@
+---
+title: "The last two years in Miri"
+categories: rust
+reddit: /rust/comments/vq3mmu/the_last_two_years_in_miri/
+---
+
+It has been [almost two years]({% post_url 2020-09-28-miri %}) since my last Miri status update.
+A lot has happened in the mean time that I would like to tell you all about!
+If you are using Miri, you might also be seeing new errors in code that previously worked fine; read on for more details on that.
+
+For the uninitiated, [Miri](https://github.com/rust-lang/miri/) is an interpreter that runs your Rust code and checks if it triggers any [Undefined Behavior](https://doc.rust-lang.org/reference/behavior-considered-undefined.html) (UB for short).
+You can think of it a as very thorough (and very slow) version of valgrind/ASan/TSan/UBSan:
+Miri will detect when your program uses uninitialized memory incorrectly, performs out-of-bounds memory accesses or pointer arithmetic, causes a data race, violates key language invariants, does not ensure proper pointer alignment, or causes incorrect aliasing.
+As such, it is most helpful when writing unsafe code, as it aids in ensuring that you follow all the rules required for unsafe code to be correct and safe.
+Miri also detects memory leaks, i.e., it informs you at the end of program execution if there is any memory that was not deallocated properly.
+
+<!-- MORE -->
+
+Moreover, Miri is able to run code for other targets: for example, you might be developing code on x86_64, a 64-bit little-endian architecture.
+When you do low-level bit manipulation, it is easy to introduce bugs that only show up on 32-bit systems or big-endian architectures.
+You can run Miri with `--target i686-unknown-linux-gnu` and `--target mips64-unknown-linux-gnuabi64` to test your code in those situations -- and this will work even if your host OS is macOS or Windows!
+
+That said, it's not all roses and rainbows.
+Since Miri just knows how to interpret Rust code, it will get stuck when you call into C code.
+Miri knows how to execute a certain small set of well-known C functions (e.g. to access environment variables or open files), but it is still easy to run into an "unsupported operation" error due to missing C library implementations.
+In many cases you should be able to still write tests that cover the remaining code that does not need to, for example, directly access the network;
+but I also hope that Miri will keep growing its support for key platform APIs.
+
+## Miri progress
+
+So, what progress has Miri made in the last two years?
+
+### Concurrency
+
+The story of concurrency in Miri continues to surprise me: I had not even planned for Miri to support concurrency, but people just keep showing up and implement one part of it after the other, so now we have pretty good support for finding concurrency bugs!
+
+In that spirit, @JCTyblaidd implemented a data race detector.
+So if your code does not use appropriate atomic operations to make sure all accesses are suitably synchronized, Miri will now detect that problem and report Undefined Behavior.
+[Here's a demo](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2dc29d339658dd2e1e74b84fcffc3926).
+(Click that link and then select "Tools - Miri" to see this in action.)
+Our data race error reports could be improved a lot (in particular they only show one of the two conflicting accesses involved in a data race), but they are still useful and have already found several data races in the wild.
+
+@thomcc changed our `compare_exchange_weak` implementation so that it randomly just fails with 80% probability.
+(The exact rate is adjustable via `-Zmiri-compared-exchange-weak-failure-rate=<x>`.)
+[Here's a demo](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0af8443b760985ce01640135ffb83749).
+This is super useful to find issues where code uses `compare_exchange_weak` but cannot handle spurious failures, since those are very unlikely to occur in the wild.
+
+@henryboisdequin added support for the atomic `fetch_min` and `fetch_max` operations, completing our support of the `Atomic*` types.
+
+And finally, @cbeuw showed up and added "weak memory emulation".
+This means that when you do an atomic load, you might not observe the latest value written to that location; instead, a previous value can be returned.
+[Here's a demo](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7809a750bda54f0cc458b81823c79db7).
+This happens on real hardware, so having this supported in Miri helps to find more potential bugs.
+The caveat is that Miri still cannot produce *all* the behaviors that the actual program might exhibit.
+Also, the C++20 revision of the C++ memory model disallowed some possible behaviors that were previously allowed, but Miri might produce those behaviors -- there is currently no known algorithm that would prevent that.
+This should be very rare though.
+
+I then just put the icing on the cake by fixing some long-standing issues in our scheduler, so that it no longer gets stuck in spin loops.
+Miri now has a chance to preempt the running thread at the end of each basic block; the preemption probability is 1% but you can adjust it (using `-Zmiri-preemption-rate=<x>`).
+
+All of this made our concurrency support sufficiently solid that it no longer shows any warning about being "experimental".
+For example, it has already found a [data race in the standard library](https://github.com/rust-lang/rust/issues/98498).
+I can barely express how happy and proud I am that I had to do basically none of this work. :)
+
+One warning though: several of the improvements mentioned above rely on doing random choices.
+So, it is now more likely than before that Miri will work fine one day, and then show an error after some seemingly inconsequential change to the program the next day.
+I will get back to these problems later.
+
+### Pointer provenance and Stacked Borrows
+
+One of the most subtle aspects of Miri is [Stacked Borrows](https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md).
+The aliasing model is already quite complicated, and actually debugging what happens when Miri finds an aliasing violation in your code can be pretty tricky.
+However, @saethlin made this a lot easier!
+The error messages now show a lot more detail and point to several relevant locations in the code: not only where the bad access happened, but also where the pointer tag used for that access was created, and where that tag was invalidated.
+I am very impressed by how good some of these errors are, just [check this out](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=e831ed0f262e039dda4d24c159a9f5b0).
+
+Another big thing that happened recently is the entire ["Strict Provenance" story](https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance).
+I am super excited by these developments, because they offer the chance to fix some long-standing open problems in Miri:
+the issues with "untagged" raw pointers in Stacked Borrows, and Miri not properly supporting integer-to-pointer casts.
+
+After a lot of work by @carbotaniuman and myself, the situation now is as follows:
+- Miri always properly tags raw pointers.
+  So there are no longer any counter-intuitive behaviors caused by Miri "mixing up" two raw pointers that point to the same address, but were computed in a different way.
+    (We had a `-Zmiri-tag-raw-pointers` flag for a while that also achieves this; that flag is now on-by-default.)
+- If you do not use any integer-to-pointer casts, then you can stop reading here!
+  You can pass `-Zmiri-strict-provenance` to Miri to ensure that this is indeed the case.
+- If you *are* using integer-to-pointer casts, then Miri will warn about that. You now have two options.
+  - The ideal solution is to avoid using integer-to-pointer casts, and to follow Strict Provenance instead.
+    The [pointer library docs](https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) explain in more detail what exactly that means.
+    Note that the APIs described there are still unstable, but a [polyfill](https://crates.io/crates/sptr) is available for stable Rust.
+    Also see [Gankra's blog post](https://gankra.github.io/blah/tower-of-weakenings/) and [my own blog post]({% post_url 2022-04-11-provenance-exposed %}) for some more background on this subject.
+  - If the casts are in code you do not control, or if you cannot currently avoid integer-to-pointer casts, you can pass `-Zmiri-permissive-provenance` to Miri to silence the warning.
+    Know that this means that Miri might miss some bugs in your code:
+    integer-to-pointer casts make it impossible to precisely track which pointer came from where, so Miri will conservatively accept some code that actually should be rejected.
+
+This is overall much better than previously -- there is nothing funky going on with raw pointers any more, and we should never incorrectly report UB any more even when integer-to-pointer casts are used.
+:-)
+
+### Other areas
+
+Concurrency and pointer aliasing are the two big changes, but there is also a long tail of smaller changes that together make Miri a hack of a lot more useful than it used to be:
+
+- @teryror made Miri support doctests, so now `cargo miri test` will also check your doctests for UB!
+- @Smittyvb fixed our fast-math intrinsics to properly report UB when they are used on non-finite values.
+- @hyd-dev added "symbol resolution" support to Miri, so if one part of your Rust code defines a function with a given `link_name`, and another piece of Rust code imports that function via an `extern` block, Miri now knows how to find the right function implementation.
+- @atsmtat added a `-Zmiri-isolation-error=<action>` flag so when a function call is rejected due to isolation, evaluation can continue by reporting an error code to the interpreted program.
+- @landaire added `-Zmiri-panic-on-unsupported`, which makes Miri raise a panic rather than stopping evaluation when an unsupported system function is encountered.
+This can be useful to keep going with the next test in a test suite.
+However, it also raises panics where usually that would be impossible, which can lead to surprising behavior.
+- @DrMeepster added support for running programs that use the `#[start]` attribute, and @oli-obk made that work even for targets without `libstd`.
+(You need to set `MIRI_NO_STD=1` to make the latter work.)
+- @DrMeepster also implemented support for the `#[global_allocator]` attribute.
+- @camelid made Miri optionally detect UB due to uninitialized integers, which has since become the default.
+- @saethlin made our errors more readable by pruning irrelevant details from the backtraces.
+- I have implemented support for calling methods on types like `Pin<Box<dyn Trait>>`.
+- @oli-obk fixed our handling of types like `MaybeUninit<u64>`, where previously we did not properly support only *some* of the bytes being initialized.
+
+We also improved out platform API and intrinsic support:
+
+- Thanks to @m-ou-se Miri now supports the Linux futex APIs used by the Rust standard library.
+  This was crucial for std's `park()` and `unpark()`, but meanwhile is also used for many other synchronization primitives.
+- On the file system side, @Aaron1011 implemented `readlink`, which makes `std::fs::read_link` work on Linux and macOS.
+- @asquared31415 made the three-argument form of `open` work.
+- @tavianator implemented `readdir64` so we can still list directories on Linux (the Rust standard library was changed to use that function rather than `readdir64_r`).
+- @Aaron1011 has also improved the rendering of panic backtraces inside the interpreter.
+- @frewsxcv implemented the missing bits to make the aarch64-apple-darwin target work in Miri.
+- I implemented the intrinsics required by `std::simd`, so portable-simd code should work with Miri.
+  It will not be very fast, though...
+- @V0ldek made our Windows `GetSystemInfo` shim work in more situations.
+- @saethlin added support for `*_COARSE` clocks on Linux.
+- @InfRandomness has started on getting Miri to work on FreeBSD targets (but this support is still incomplete).
+
+### Bugfixes and cleanup
+
+And of course there were tons of bugfixes.
+I want to particularly call out @hyd-dev who fixed a *lot* of issues in our `cargo miri` frontend.
+@dtolnay did a lot of code cleanup, making Miri pass by clippy's critical eyes and ensuring all our tests are properly formatted.
+And last not least, @oli-obk completely re-wrote our test suite so that we can finally actually test the full output of Miri.
+
+I have probably forgotten to mention something interesting as well.
+[See here](https://github.com/rust-lang/miri/graphs/contributors?from=2020-09-29&to=2022-07-02&type=c) for the full list of amazing people who contributed to Miri since my last update.
+I cannot thank all of you enough! <3
+
+## Help, Miri suddenly says my code is broken
+
+Several of the changes mentioned above, in particular with regards to concurrency and Stacked Borrows, mean that Miri is now able to detect more problems than before.
+On the one hand, that's of course great, but on the other hand, it can mean that when you re-test Miri on some code that seemed fine, it might suddenly complain!
+And because of all the non-determinism, it might also be the case that Miri *sometimes* complains, and sometimes doesn't (or that it works fine locally but complains on CI).
+What can you do when that happens?
+
+If Miri shows a new Stacked Borrows error, then that is probably caused by raw pointers now being properly tagged.
+The new Stacked Borrows messages should make it easier than before to diagnose these problems, but in the end this still remains a case-by-case issue.
+For example, [this program](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=14ddec169895d111578ec96757df95d1) will print:
+```
+error: Undefined Behavior: attempting a read access using <3255> at alloc1770[0x4], but that tag does not exist in the borrow stack for this location
+ --> src/main.rs:4:25
+  |
+4 |     let _val = unsafe { *ptr.add(1) }; // ...and use it to access the *second* element.
+  |                         ^^^^^^^^^^^
+  |                         |
+  |                         attempting a read access using <3255> at alloc1770[0x4], but that tag does not exist in the borrow stack for this location
+  |                         this error occurs as part of an access at alloc1770[0x4..0x8]
+  |
+  = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
+  = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
+help: <3255> was created by a retag at offsets [0x0..0x4]
+ --> src/main.rs:3:15
+  |
+3 |     let ptr = &x[0] as *const i32; // We create a pointer to the *first* element...
+  |               ^^^^^
+  = note: backtrace:
+  = note: inside `main` at src/main.rs:4:25
+```
+In this case, the clue is in the offsets: note that the tag was created for offsets `[0x0..0x4]` (as usual in Rust, this *excludes* `0x4`), and the access was at `alloc1770[0x4]`.
+The pointer was thus used outside the offset range for which its tag (`<3255>`) is valid.
+The fix is to use `x.as_ptr()` rather than `&x[0] as *const i32` to get a pointer that is valid for the entire array.
+
+If the error only shows up sometimes, then it probably has something to do with concurrency.
+Miri is not *truly* random, but uses a pseudo-random number generator to make all concurrency-related choices (such as when to schedule another thread).
+This means you can explore various different possible choices by passing different *seeds* for Miri to use for its pseudo-random number generator.
+The following little shell snippet will run Miri with many different seeds, which is great to be able to locally reproduce a failure that you saw on CI, but that you are having trouble reproducing:
+```
+for SEED in $({ echo obase=16; seq 0 255; } | bc); do
+  echo "Trying seed: $SEED"
+  MIRIFLAGS=-Zmiri-seed=$SEED cargo miri test || { echo "Failing seed: $SEED"; break; };
+done
+```
+It is important that you use exactly the same `MIRIFLAGS` as CI to ensure the failure can even happen!
+It is also a good idea to use a filter with `cargo miri test FILTER` to ensure only the test you care about is being run.
+
+Once you confirmed that this is indeed a non-deterministic test failure, you can narrow it down further by reducing Miri's non-determinism:
+- You can pass `-Zmiri-preemption-rate=0` to make the scheduler non-preemptive (only schedule to other threads when a thread explicitly yields).
+  This *can* lead to infinite loops if there are spin-loops that do not yield, but if it makes the problem go away, then the problem needs some very particular scheduling decisions to surface, which might help you track down its source.
+- You can also pass `-Zmiri-disable-weak-memory-emulation` which has the effect of making atomic loads always return the latest value stored in that location.
+  If that makes the problem go away, then the issue is likely caused by insufficient synchronization somewhere. It might be a missing fence, or a `Relaxed` access that should be `Release`/`Acquire`.
+- Finally, `-Zmiri-compare-exchange-weak-failure-rate=0` makes `compared_exchange_weak` behave exactly like `compare_exchange`.
+  If that makes the problem go away, then some code using `compared_exchange_weak` is not properly handling spurious failures.
+
+Passing all of these flags will make Miri's concurrency entirely deterministic.
+That can be useful to avoid non-deterministic test failures, but note that this will also mask many real-world bugs.
+Those test failures are often real, even if they can be hard to track down!
+
+If you are still having trouble, feel free to come visit us in our [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri), which is the official communication channel for Miri.
+
+By the way, if you are still disabling some tests on Miri because Miri used to not support panics/concurrency, it's time to give those tests another try. :)
+So this is a good opportunity to go over your `cfg(miri)` and similar attributes and re-evaluate if they are still needed.
+
+## Using Miri
+
+If this post made you curious and you want to give Miri a try, here's how to do that.
+Assuming you have a crate with some unsafe code, and you already have a test suite (you are testing your unsafe code, right?), you can just install Miri (`rustup +nightly component add miri`) and then run `cargo +nightly miri test` to execute all tests in Miri.
+Note that this requires the nightly toolchain as Miri is still an experimental tool.
+
+Miri is very slow, so it is likely that some tests will take way too long to be feasible.
+You can adjust iteration counts in Miri without affecting non-Miri testing as follows:
+{% highlight rust %}
+let limit = if cfg!(miri) { 10 } else { 10_000 };
+{% endhighlight %}
+If your test suite needs to access OS facilities such as timers or the file system, set `MIRIFLAGS=-Zmiri-disable-isolation` to enable those.
+(Miri will tell you when that is necessary.)
+If your test suite runs into an unsupported operation, please [report an issue](https://github.com/rust-lang/miri/issues).
+However, note that we can only really support sufficiently "generic" operations -- like accessing file systems and network sockets.
+To implement things like `Py_IsInitialized` would mean putting a Python interpreter into Miri; that is not going to happen. ;)
+
+If you want to add Miri to your CI to ensure your test suite keeps working in Miri, please consult our [README](https://github.com/rust-lang/miri/#running-miri-on-ci).
+That document is also a great starting point for any other questions you might have.
+
+Miri is also integrated into the [Rust Playground](https://play.rust-lang.org/): you can select Miri in the "Tools" menu to check the code for Undefined Behavior.
+
+If Miri complains about your code and you do not understand why, we are happy to help!
+The best place to ask for support is our [Zulip stream](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri).
+Questions are much easier to answer if you manage to reproduce the problem in a small self-contained bit of example code (ideally on the playground), but feel free to ask even if you do not know how to reduce the problem.
+
+## Helping Miri
+
+If you want to help improve Miri, that's awesome!
+The [issue tracker](https://github.com/rust-lang/miri/issues) is a good place to start; the list of issues is short enough that you can just browse through it rather quickly to see if anything pikes your interest.
+The ones that are particularly suited for getting started are marked with a green label, but notice that even "E-easy" issues can require some amount of Rust experience -- Miri is not a good codebase for your first steps in Rust.
+Another good starting point is to try to implement the missing bit of functionality that keeps your test suite from working.
+If you need any mentoring, just [get in touch](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri). :)
+
+That's it for now.
+I am totally blown away by how many people (and companies!) are already using and even contributing to Miri.
+This endeavor of re-shaping the way we approach correctness of unsafe code has been way more successful than my wildest dreams.
+I hope Miri can also help you to ensure correctness of your unsafe code, and I am excited for what the next year(s) of Miri development will bring. :D
diff --git a/personal/_posts/2022-08-08-minirust.md b/personal/_posts/2022-08-08-minirust.md
new file mode 100644 (file)
index 0000000..8158cb0
--- /dev/null
@@ -0,0 +1,60 @@
+---
+title: "Announcing: MiniRust"
+categories: rust research
+reddit: /rust/comments/wiwjch/announcing_minirust/
+---
+
+I have been thinking about the semantics of Rust -- as in, the intended behavior of Rust programs when executed, in particular those containing unsafe code -- a lot.
+Probably too much.
+But all of these thoughts are just in my head, which is not very useful when someone else wants to try and figure out how some tricky bit of unsafe Rust code behaves.
+As part of the [Unsafe Code Guidelines](https://github.com/rust-lang/unsafe-code-guidelines/) project, we often get questions asking whether a *concrete* piece of code is fine or whether it has Undefined Behavior.
+But clearly, that doesn't scale: there are just too many questions to be asked, and figuring out the semantics by interacting with an oracle with many-day latency is rather frustrating.
+We have [Miri](https://github.com/rust-lang/miri/), which is a much quicker oracle, but it's also not always right and even then, it can just answer questions of the form "is this particular program fine"; users have to do all the work of figuring out the model that *generates* those answers themselves.
+
+<!-- MORE -->
+
+So I have promised for a long time to find some more holistic way to write down my thoughts on unsafe Rust semantics.
+I thought I could do it in 2021, but I, uh, "slightly" missed that deadline... but better late than never!
+At long last, I can finally present to you: [**MiniRust**](https://github.com/RalfJung/minirust).[^name]
+
+[^name]: I am beginning to wonder if this name was a bad choice. Naming is not my strong suit. Maybe "CoreRust" would have been better? Alas...
+
+The purpose of MiniRust is to describe the semantics of an interesting fragment of Rust in a way that is both precise and understandable to as many people as possible.
+These goals are somewhat at odds with each other -- the most precise definitions, e.g. carried out in the Coq Proof Assistant, tend to not be very accessible.
+English language, on the other hand, is not very precise.
+So my compromise solution is to write down the semantics in a format that is hopefully known to everyone who could be interested: in Rust code.
+Specifically, MiniRust is specified by a *reference interpreter* that describes the step-by-step process of executing a MiniRust program, *including* checking at each step whether the program has Undefined Behavior.
+
+"Hold on", I hear a [Cool Bear](https://fasterthanli.me/articles/) say, "you are defining Rust in Rust code? Isn't that cyclic?"[^bear]
+Well, yes and no. It's not *really* Rust code.
+It's what I call "pseudo Rust", uses only a tiny fragment of the language (in particular, no `unsafe`), and then extends the language with some conveniences to make things less verbose.
+The idea is that anyone who knows Rust should immediately be able to understand what this code means, but also hopefully eventually if this idea pans out we can have tooling to translate pseudo Rust into "real" languages -- in particular, real Rust and Coq.
+Translating it to real Rust means we can actually execute the reference interpreter and test it, and translating it to Coq means we can start proving theorems about it.
+But I am getting waaaay ahead of myself, these are rather long-term plans.
+
+[^bear]: Thanks to fasterthanlime for facilitating the bear's appearance on this blog.
+
+**Update (2023-02-13):** "Pseudo Rust" has now been renamed to "specr lang", the language of the work-in-progress "specr" tool that can translate specr lang into Rust code to make specifications executable. **/Update**
+
+So, if you want to look into my brain to see how I see Rust programs, then please go check out [MiniRust](https://github.com/RalfJung/minirust).
+The README explains the scope and goals, the general structure, and the details of ~~pseudo Rust~~ specr lang, as well as a comparison with some related efforts.
+
+In particular I find that the concept of "places" and "values", which can be rather mysterious, becomes a lot clearer when spelled out like that, but that might just be me.
+I hasten to add that this is *very early work-in-progress*, and it is *my own personal experiment*, not necessarily reflecting the views of anyone else.
+It is also *far from feature-complete*, in fact it has just barely enough to be interesting.
+There are lots of small things missing (like integers that aren't exactly 2 bytes in size, or tuples that don't have exactly 2 elements), but the biggest omission by far is the total lack of an aliasing model.
+And unsized types. And concurrency. And probably other things.
+
+On the other hand, there are many things that it *can* explain in full precision:
+- validity invariants, and how they arise from the mapping between a high-level concept of "values" and a low-level concept of "sequences of bytes"
+- the basic idea of provenance tracking the "allocation" a pointer points to, and how that interacts with pointer arithmetic (including `offset` and `wrapping_offset`)
+- how pointer provenance behaves when doing transmutation between pointers and integers
+- what happens when *casting* between pointers and integers
+- padding (that's why tuples can have 2 elements, so there can be padding between them)
+
+If you are not used to reading interpreter source code, then I guess this can be rather jarring, and there is certainly a *lot* of work that could and should be done to make this more accessible.
+(Like, examples. I hear people like examples.)
+But just being able to talk about these questions with precision *at all* has already lead to some interesting discussions in the UCG WG, some of which made me change my mind -- thanks in particular to @digama0, @JakobDegen, and @alercah for engaging deeply with my ideas.
+So for now it is serving its purpose, and maybe some of you can find it useful, too.
+Hopefully we can even use this as a starting place for seriously tackling the issue of an *official* specification of Rust.
+More on that soon. :)
diff --git a/personal/_posts/2022-08-16-eth.md b/personal/_posts/2022-08-16-eth.md
new file mode 100644 (file)
index 0000000..86ad9ee
--- /dev/null
@@ -0,0 +1,32 @@
+---
+title: "A New Beginning"
+categories: research rust
+---
+
+I have some very exciting news to share: starting November 1st, I will work at ETH Zürich as an assistant professor!
+Becoming a professor in the first place is a dream come true, and becoming a professor at a place like ETH Zürich is not something I even dared to dream of.
+I still cannot quite believe that this is actually happening (I will be *professor*?!??), but [the news is out](https://twitter.com/CSatETH/status/1548944615285350400) so I guess this is real. :D
+
+<!-- MORE -->
+
+I feel excited and terrified in about equal parts.
+Excited by all the new possibilities, by the prospect of working with students and inspiring the next generation of researchers;
+terrified by all the responsibility and the prospect of having to stand in a classroom and give a lecture in only a few months' time.
+But somehow everyone else seems confident that I can do this, so I guess I'll just play along and hope that I will not prove them wrong...
+
+I am also humbled and eternally thankful for being given this opportunity.
+Being able to work in an environment like ETH is a privilege beyond imagination, and I don't know how I got so lucky.
+I&nbsp;probably used up all my Karma points for the rest of my life, and will do my best to honor this privilege.
+I&nbsp;feel hugely indebted to everyone I worked with, first and foremost of course my PhD advisor [Derek Dreyer](https://people.mpi-sws.org/~dreyer/).
+But I would also like to specifically call out the Rust community, because I don't think this would have happened without Rust -- thanks to *everyone* who contributed to this language that I am essentially building my career on[^rust], and thanks in particular to everyone who indulged in my ideas for how Rust should approach unsafe code and helped me shape that corner of the language.
+
+[^rust]: Before anyone gets worried, I also have some [ideas](https://iris-project.org/) I want to pursue that are unrelated to Rust. But Rust is currently by far the biggest inspiration for new research problems for me, and without Rust I don't think my research would be anywhere near as applied and impactful as it is today, which I am sure played a key role in the decision of ETH to hire me.
+
+So what's next?
+I will soon finish my post-doc at MIT and move back to Europe, and then move to Zürich in October.
+And then I will have to figure out how this being-a-professor thing works. ;)
+My first main priority is building a research group: the "Programming Language Foundations Lab"[^lab].
+So if you are interested in doing a PhD or post-doc working on, well, programming language foundations, and in particular formal foundations for Rust, or if you are an ETH student interested in a Master Thesis in that area -- please [reach out](https://research.ralfj.de/contact.html)!
+I am still figuring out how to do things like hiring people and finding suitable projects, but there is no shortage of open problems that need solving and theorems that need proving. :)
+
+[^lab]: Yes, I have a lab coat. I don't usually wear it though... and if you want to see me wear it, that will cost you some beer.
diff --git a/personal/_posts/2022-09-26-cargo-careful.md b/personal/_posts/2022-09-26-cargo-careful.md
new file mode 100644 (file)
index 0000000..28a85c9
--- /dev/null
@@ -0,0 +1,27 @@
+---
+title: "cargo careful: run your Rust code with extra careful debug checking"
+categories: rust
+reddit: /rust/comments/xogayv/cargo_careful_run_your_rust_code_with_extra/
+---
+
+Did you know that the standard library is full of useful checks that users never get to see?
+There are plenty of debug assertions in the standard library that will do things like check that `char::from_u32_unchecked` is called on a valid `char`, that `CStr::from_bytes_with_nul_unchecked` does not have internal nul bytes, or that pointer functions such as `copy` or `copy_nonoverlapping` are called on suitably aligned non-null (and non-overlapping) pointers.
+However, the regular standard library that is distributed by rustup is compiled without debug assertions, so there is no easy way for users to benefit from all this extra checking.
+
+<!-- MORE -->
+
+[`cargo careful`](https://github.com/RalfJung/cargo-careful) is here to close this gap:
+when invoked the first time, it builds a standard library with debug assertions from source, and then runs your program or test suite with that standard library.
+Installing `cargo careful` is as easy as `cargo install cargo-careful`, and then you can do `cargo +nightly careful run`/`cargo +nightly careful test` to execute your binary crates and test suites with an extra amount of debug checking.
+
+This will naturally be slower than a regular debug or release build, but it is *much* faster than executing your program in [Miri](https://github.com/rust-lang/miri) and still helps find some Undefined Behavior.
+Unlike Miri, it is fully FFI-compatible (though the code behind the FFI barrier is completely unchecked).
+Of course Miri is much more thorough and `cargo careful` will miss many problems (for instance, it cannot detect out-of-bounds pointer arithmetic -- but it *does* perform bounds checking on `get_unchecked` slice accesses).
+
+Note that for now, some of these checks (in particular for raw pointer methods) cause an abrupt abort of the program via SIGILL without a nice error message or backtrace.
+There are probably ways to improve this in the future.
+Meanwhile, if you have some `unsafe` code that for one reason or another you cannot test with Miri, give [`cargo careful`] a try and let me know how it is doing. :)
+
+[`cargo careful`]: https://github.com/RalfJung/cargo-careful
+
+*By the way, I am soon [starting as a professor at ETH Zürich]({% post_url 2022-08-16-eth %}), so if you are interested in working with me on programming language theory as a master student, PhD student, or post-doc, then please [reach out](https://research.ralfj.de/contact.html)!*
diff --git a/personal/_posts/2023-06-02-tree-borrows.md b/personal/_posts/2023-06-02-tree-borrows.md
new file mode 100644 (file)
index 0000000..8c82a20
--- /dev/null
@@ -0,0 +1,225 @@
+---
+title: "From Stacks to Trees: A new aliasing model for Rust"
+categories: rust research
+reddit: /rust/comments/13y8a9b/from_stacks_to_trees_a_new_aliasing_model_for_rust/
+---
+
+Since last fall, [Neven](https://perso.crans.org/vanille/) has been doing an internship to develop a new aliasing model for Rust: Tree Borrows.
+Hang on a second, I hear you say -- doesn't Rust already have an aliasing model?
+Isn't there this "Stacked Borrows" that Ralf keeps talking about?
+Indeed there is, but Stacked Borrows is just one proposal for a possible aliasing model -- and it [has its problems](https://github.com/rust-lang/unsafe-code-guidelines/issues?q=is%3Aopen+is%3Aissue+label%3AA-stacked-borrows).
+The purpose of Tree Borrows is to take the lessons learned from Stacked Borrows to build a new model with fewer issues, and to take some different design decisions such that we get an idea of some of the trade-offs and fine-tuning we might do with these models before deciding on the official model for Rust.
+
+Neven has written a detailed introduction to Tree Borrows [on his blog](https://perso.crans.org/vanille/treebor/), which you should go read first.
+He presented this talk at a recent RFMIG meeting, so you can also [watch his talk here](https://www.youtube.com/watch?v=zQ76zLXesxA).
+In this post, I will focus on the differences to Stacked Borrows.
+I assume you already know Stacked Borrows and want to understand what changes with Tree Borrows and why.
+
+<!-- MORE -->
+
+As a short-hand, I will sometimes write SB for Stacked Borrows and TB for Tree Borrows.
+
+## Two-phase borrows
+
+The main novelty in Tree Borrows is that it comes with proper support for two-phase borrows.
+Two-phase borrows are a mechanism introduced with NLL which allows code like the following to be accepted:
+
+```rust
+fn two_phase(mut x: Vec<usize>) {
+    x.push(x.len());
+}
+```
+
+The reason this code is tricky is that it desugars to something like this:
+
+```rust
+fn two_phase(mut x: Vec<usize>) {
+    let arg0 = &mut x;
+    let arg1 = Vec::len(&x);
+    Vec::push(arg0, arg1);
+}
+```
+
+This code clearly violates the regular borrow checking rules since `x` is mutably borrowed to `arg0` when we call `x.len()`!
+And yet, the compiler will accept this code.
+The way this works is that the `&mut x` stored in `arg0` is split into two phases:
+in the *reservation* phase, `x` can still be read via other references.
+Only when we actually need to write to `arg0` (or call a function that might write to it) will the reference be "activated", and it is from that point onwards (until the end of the lifetime of the borrow) that no access via other references is allowed.
+For more details, see [the RFC](https://github.com/rust-lang/rfcs/blob/master/text/2025-nested-method-calls.md) and [the rustc-dev-guide chapter on two-phase borrows](https://rustc-dev-guide.rust-lang.org/borrow_check/two_phase_borrows.html).
+The only point relevant for this blog post is that when borrowing happens implicitly for a method call (such as `x.push(...)`), Rust will treat this as a two-phase borrow.
+When you write `&mut` in your code, it is treated as a regular mutable reference without a "reservation" phase.
+
+For the aliasing model, two-phase borrows are a big problem: by the time `x.len()` gets executed, `arg0` already exists, and as a mutable reference it really isn't supposed to allow reads through other pointers.
+Therefore Stacked Borrows just [gives up](https://github.com/rust-lang/unsafe-code-guidelines/issues/85) here and basically treats two-phase borrows like raw pointers.
+That is of course unsatisfying, so for Tree Borrows we are adding proper support for two-phase borrows.
+What's more, we are treating *all* mutable references as two-phase borrows: this is more permissive than what the borrow checker accepts, but lets us treat mutable references entirely uniformly.
+(This is a point we might want to tweak, but as we will see soon this decision actually has some major unexpected benefits.)
+
+This is why we need a tree in the first place: `arg0` and the reference passed to `Vec::len` are both children of `x`.
+A stack is no longer sufficient to represent the parent-child relationships here.
+Once the use of a tree is established, modeling of two-phase borrows is fairly intuitive: they start out in a `Reserved` state which tolerates reads from other, unrelated pointers.
+Only when the reference (or one of its children) is written to for the first time, its state transitions to `Active` and now reads from other, unrelated pointers are not accepted any more.
+(See Neven's post for more details. In particular note that there is one unpleasant surprise lurking here: if there are `UnsafeCell` involved, then a reserved mutable reference actually has to tolerate *mutation* via unrelated pointers!
+In other words, the aliasing rules of `&mut T` are now affected by the presence of `UnsafeCell`. I don't think people realized this when two-phase borrows were introduced, but it also seems hard to avoid so even with hindsight, it is not clear what the alternative would have been.)
+
+## Delayed uniqueness of mutable references
+
+One of the most common source of Stacked Borrows issues is its [very eager enforcement of uniqueness of mutable references](https://github.com/rust-lang/unsafe-code-guidelines/issues/133).
+For example, the following code is illegal under Stacked Borrows:
+
+```rust
+let mut a = [0, 1];
+let from = a.as_ptr();
+let to = a.as_mut_ptr().add(1); // `from` gets invalidated here
+std::ptr::copy_nonoverlapping(from, to, 1);
+```
+
+The reason it is illegal is that `as_mut_ptr` takes `&mut self`, which asserts unique access to the entire array, therefore invalidating the previously created `from` pointer.
+In Tree Borrows, however, that `&mut self` is a two-phase borrow! `as_mut_ptr` does not actually perform any writes, so the reference remains reserved and never gets activated.
+That means the `from` pointer remains valid and the entire program is well-defined.
+The call to `as_mut_ptr` is treated like a read of `*self`, but `from` (and the shared reference it is derived from) are perfectly fine with reads via unrelated pointers.
+
+It happens to be the case that swapping the `from` and `to` lines actually makes this code work in Stacked Borrows.
+However, this is not for a good reason: this is a consequence of the rather not-stack-like rule in SB which says that on a read, we merely *disable all `Unique`* above the tag used for the access, but we keep raw pointers derived from those `Unique` pointers enabled.
+Basically, raw pointers can live longer than the mutable references they are derived from, which is highly non-intuitive and potentially problematic for program analyses.
+With TB, the swapped program is still fine, but for a different reason:
+when `to` gets created first, it remains a reserved two-phase borrow.
+This means that creating a shared reference and deriving `from` from it (which acts like a read on `self`) is fine; reserved two-phase borrows tolerate reads via unrelated pointers.
+Only when `to` is written to does it (or rather the `&mut self` it was created from) become an active mutable reference that requires uniqueness, but that is after `as_ptr` returns so there is no conflicting `&self` reference.
+
+It turns out that consistently using two-phase borrows lets us entirely eliminate this hacky SB rule and also fix one of the most common sources of UB under SB.
+I didn't expect this at all, so this is a happy little accident. :)
+
+However, note that the following program is fine under SB but invalid under TB:
+
+```rust
+let mut a = [0, 1];
+let to = a.as_mut_ptr().add(1);
+to.write(0);
+let from = a.as_ptr();
+std::ptr::copy_nonoverlapping(from, to, 1);
+```
+
+Here, the write to `to` activates the two-phase borrow, so uniqueness is enforced.
+That means the `&self` created for `as_ptr` (which is considered reading all of `self`) is incompatible with `to`, and so `to` is invalidated (well, it is made read-only) when `from` gets created.
+So far, we do not have evidence that this pattern is common in the wild.
+The way to avoid issues like the code above is to *set up all your raw pointers before you start doing anything*.
+Under TB, calling reference-receiving methods like `as_ptr` and `as_mut_ptr` and using the raw pointers they return on disjoint locations is fine even if these references overlap, but you must call all those methods before the first write to a raw pointer.
+Once the first write happens, creating more references can cause aliasing violations.
+
+## No strict confinement of the accessible memory range
+
+The other major source of trouble with Stacked Borrows is [restricting raw pointers to the type and mutability they are initially created with](https://github.com/rust-lang/unsafe-code-guidelines/issues/134).
+Under SB, when a reference is cast to `*mut T`, the resulting raw pointer is confined to access only the memory covered by `T`.
+This regularly trips people up when they take a raw pointer to one element of an array (or one field of a struct) and then use pointer arithmetic to access neighboring elements.
+Moreover, when a reference is cast to `*const T`, it is actually read-only, even if the reference was mutable!
+Many people expect `*const` vs `*mut` not to matter for aliasing, so this is a regular source of confusion.
+
+Under TB, we resolve this by no longer doing any retagging for reference-to-raw-pointer casts.
+A raw pointer simply uses the same tag as the parent reference it is derived from, thereby inheriting its mutability and the range of addresses it can access.
+Moreover, references are not strictly confined to the memory range described by their type:
+when an `&mut T` (or `&T`) gets created from a parent pointer, we initially record the new reference to be allowed to access the memory range describe by `T` (and we consider this a read access for that memory range).
+However, we also perform *lazy initialization*: when a memory location outside this initial range is accessed, we check if the parent pointer would have had access to that location, and if so then we also give the child the same access.
+This is repeated recursively until we find a parent that has sufficient access, or we reach the root of the tree.
+
+This means TB is compatible with [`container_of`-style pointer arithmetic](https://github.com/rust-lang/unsafe-code-guidelines/issues/243) and [`extern` types](https://github.com/rust-lang/unsafe-code-guidelines/issues/276), overcoming two more SB limitations.
+
+This also means that the following code becomes legal under TB:
+
+```rust
+let mut x = 0;
+let ptr = std::ptr::addr_of_mut!(x);
+x = 1;
+ptr.read();
+```
+
+Under SB, `ptr` and direct access to the local `x` used two different tags, so writing to the local invalidated all pointers to it.
+Under TB, this is no longer the case; a raw pointer directly created to the local is allowed to alias arbitrarily with direct accesses to the local.
+
+Arguably the TB behavior is more intuitive, but it means we can no longer use writes to local variables as a signal that all possible aliases have been invalidated.
+However, note that TB only allows this if there is an `addr_of_mut` (or `addr_of`) immediately in the body of a function!
+If a reference `&mut x` is created, and then some other function derives a raw pointer from that, those raw pointers *do* get invalidated on the next write to `x`.
+So to me this is a perfect compromise: code that uses raw pointers has a lower risk of UB, but code that does not use raw pointers (which is easy to see syntactically) can be optimized as much as with SB.
+
+Note that this entire approach in TB relies on TB *not* needing the stack-violating hack mentioned in the previous section.
+If raw pointers in SB just inherited their parent tag, then they would get invalidated together with the unique pointer they are derived from, disallowing all the code that this hack was specifically added to support.
+This means that backporting these improvements to SB is unlikely to be possible.
+
+## `UnsafeCell`
+
+The handling of `UnsafeCell` also changed quite a bit with TB.
+First of all, another [major issue](https://github.com/rust-lang/unsafe-code-guidelines/issues/303) with SB was fixed: turning an `&i32` into an `&Cell<i32>` *and then never writing to it* is finally allowed.
+This falls out of how TB handles the aliasing allowed with `UnsafeCell`: they are treated like casts to raw pointers, so reborrowing an `&Cell<i32>` just inherits the tag (and therefore the permissions) of the parent pointer.
+
+More controversially, TB also changes how precisely things become read-only when an `&T` involves `UnsafeCell` somewhere inside `T`.
+In particular, for `&(i32, Cell<i32>)`, TB allows mutating *both* fields, including the first field which is a regular `i32`, since it just treats the entire reference as "this allows aliasing".[^1]
+In contrast, SB actually figured out that the first 4 bytes are read-only and only the last 4 bytes allow mutation via aliased pointers.
+
+[^1]: This does not mean that we bless such mutation! It just means that the compiler cannot use immutability of the first field for its optimizations. Basically, immutability of that field becomes a [safety invariant instead of a validity invariant]({% post_url 2018-08-22-two-kinds-of-invariants %}): when you call foreign code, you can still rely on it not mutating that field, but within the privacy of your own code you are allowed to mutate it. See [my response here](https://www.reddit.com/r/rust/comments/13y8a9b/comment/jmlvgun/) for some more background.
+
+The reason for this design decision is that the general philosophy with TB was to err on the side of allowing more code, having less UB (which is the opposite direction than what I used with SB).
+This is a deliberate choice to uncover as much of the design space as we can with these two models.
+Of course we wanted to make sure that TB still allows all the desired optimizations, and still has enough UB to justify the LLVM IR that rustc generates -- those were our "lower bounds" for the minimum amount of UB we need.
+And it turns out that under these constraints, we can support `UnsafeCell` with a fairly simple approach: for the aliasing rules of `&T`, there are only 2 cases.
+Either there is no `UnsafeCell` anywhere, then this reference is read-only, or else the reference allows aliasing.
+As someone who thinks a lot about proving theorems about the full Rust semantics including its aliasing model, this approach seemed pleasingly simple. :)
+
+I expected this decision to be somewhat controversial, but the amount of pushback we received has still been surprising.
+The good news is that this is far from set in stone: we can [change TB to treat `UnsafeCell` more like SB did](https://github.com/rust-lang/unsafe-code-guidelines/issues/403).
+Unlike the previously described differences, this one is entirely independent of our other design choices.
+While I prefer the TB approach, the way things currently stand, I do expect that we will end up with SB-like `UnsafeCell` treatment eventually.
+
+## What about optimizations?
+
+I have written a lot about how TB differs from SB in terms of which coding patterns are UB.
+But what about the other side of the coin, the optimizations?
+Clearly, since SB has more UB, we have to expect TB to allow fewer optimizations.
+And indeed there is a major class of optimizations that TB loses: speculative writes, i.e. inserting writes in code paths that would not previously have written to this location.
+This is a powerful optimization and I was quite happy that SB could pull it off, but it also comes at a major cost: mutable references have to be "immediately unique".
+Given how common of a problem "overeager uniqueness" is, my current inclination is that we most likely would rather make all that code legal than allow speculative writes.
+We still have extremely powerful optimization principles around reads, and when the code *does* perform a write that gives rise to even more optimizations, so my feeling is that insisting on speculative writes is just pushing things too far.
+
+On another front, TB actually allows a set of crucial optimizations that SB ruled out by accident: reordering of reads!
+The issue with SB is that if we start with "read mutable reference, then read shared reference", and then reorder to "read shared reference, then read mutable reference", then in the new program, reading the shared reference might invalidate the mutable reference -- so the reordering might have introduced UB!
+This optimization is possible without having any special aliasing model, so SB not allowing it is a rather embarrassing problem.
+If it weren't for the stack-violating hack that already came up several times above, I think there would be a fairly easy way of fixing this problem in SB, but alas, that hack is load-bearing and too much existing code is UB if we remove it.
+Meanwhile, TB does not need any such hack, so we can do the Right Thing (TM): when doing a read, unrelated mutable references are not entirely disabled, they are just made read-only.
+This means that "read shared reference, then read mutable reference" is equivalent to "read mutable reference, then read shared reference" and the optimization is saved.
+(A consequence of this is that retags can also be reordered with each other, since they also act as reads. Hence the order in which you set up various pointers cannot matter, until you do the first write access with one of them.)
+
+## Future possibility: `Unique`
+
+Tree Borrows paves the way for an extension that we have not yet implemented, but that I am quite excited to explore: giving meaning to `Unique`.
+`Unique` is a private type in the Rust standard library that was originally meant to express `noalias` requirements.
+However, it was never actually wired up to emit that attribute on the LLVM level.
+`Unique` is mainly used in two places in the standard library: `Box` and `Vec`.
+SB (and TB) treat `Box` special (matching rustc itself), but not `Unique`, so `Vec` does not come with any aliasing requirements.
+And indeed the SB approach totally does not work for `Vec`, since we don't actually know how much memory to make unique here.
+However, with TB we have lazy initialization, so we don't need to commit to a memory range upfront -- we can make it unique "when accessed".
+This means we can explore giving meaning to the `Unique` in `Vec`.
+
+Now, this might not actually work.
+People actually do blatantly-aliasing things with `Vec`, e.g. to implement arenas.
+On the other hand, `Vec`'s uniqueness would only come in when it is moved or passed *by value*, and only for the memory ranges that are actually being accessed.
+So it is quite possible that this is compatible with arenas.
+I think the best way to find out is to implement `Unique` semantics behind a flag and experiment.
+If that works out, we might even be able to remove all special handling of `Box` and rely on the fact that `Box` is defined as a newtype over `Unique`.
+This would slightly reduce the optimization potential (`Box<T>` is known to point to a memory range at least the size of `T`, whereas `Unique` has no such information), but making `Box` less magic is a long-standing quest so this might be an acceptable trade-off.
+
+I should note that there are many people who think neither `Box` nor `Vec` should have any aliasing requirements. I think it's worth first exploring whether we can have aliasing requirements which are sufficiently light-weight that they are compatible with common coding patterns, but even if we end up saying `Box` and `Vec` behave like raw pointers, it can still be useful to have `Unique` in our toolbox and expose it for unsafe code authors to eke out the last bits of performance.
+
+## Conclusion
+
+These are the major differences between Stacked Borrows and Tree Borrows.
+As you can see, almost all of them are cases where TB allows more code than SB, and indeed TB fixes what I consider to be SB's two biggest problems: overeager uniqueness for mutable references, and confining references and raw pointers to the size of the type they are created with.
+These are great news for unsafe code authors!
+
+What TB *doesn't* change is the presence of "protectors" to enforce that certain references remain valid for the duration of an entire function call (whether they are used again or not); protectors are absolutely required to justify the LLVM `noalias` annotations we would like to emit and they also do enable some stronger optimizations than what would otherwise be possible.
+I do expect protectors to be the main remaining source of unexpected UB from Tree Borrows, and I don't think there is a lot of wiggle-room that we have here, so this might just be a case where we have to tell programmers to adjust their code, and invest in documentation material to make this subtle issue as widely known as possible.
+
+Neven has implemented Tree Borrows in Miri, so you can play around with it and check your own code by setting `MIRIFLAGS=-Zmiri-tree-borrows`.
+If you run into any surprises or concerns, please let us know!
+The [t-opsem Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem) and the [UCG issue tracker](https://github.com/rust-lang/unsafe-code-guidelines/) are good places for such questions.
+
+That's all I got, thanks for reading -- and a shout out to Neven for doing all the actual work here (and for giving feedback on this blog post), supervising this project has been a lot of fun!
+Remember to read [his write up](https://perso.crans.org/vanille/treebor/) and [watch his talk](https://www.youtube.com/watch?v=zQ76zLXesxA).
diff --git a/personal/_posts/2023-06-13-undefined-behavior-talk.md b/personal/_posts/2023-06-13-undefined-behavior-talk.md
new file mode 100644 (file)
index 0000000..583aa9d
--- /dev/null
@@ -0,0 +1,9 @@
+---
+title: "Talk about Undefined Behavior, unsafe Rust, and Miri"
+categories: rust
+---
+
+I recently gave a talk at a local Rust meetup in Zürich about Undefined Behavior, unsafe Rust, and Miri.
+The recording is available [here](https://www.youtube.com/watch?v=svR0p6fSUYY).
+It targets an audience that is familiar with Rust but not with the nasty details of unsafe code, so I hope many of you will enjoy it!
+Have fun. :)
diff --git a/personal/_posts/2023-12-27-open-source-peer-bonus.md b/personal/_posts/2023-12-27-open-source-peer-bonus.md
new file mode 100644 (file)
index 0000000..6214be7
--- /dev/null
@@ -0,0 +1,22 @@
+---
+title: "Google Open Source Peer Bonus"
+categories: rust
+---
+
+We are all used to spam emails, supposedly from Google, that say "You won" and I just need to send all my data to somewhere to receive my lottery payout.
+When I recently received an email about Google's "Open Source Peer Bonus" program, I almost discarded it as yet another version of that kind of spam.
+But it turns out sometimes these emails are real!
+Meanwhile the [official announcement](https://opensource.googleblog.com/2023/12/google-open-source-peer-bonus-program-announces-second-group-of-2023-winners.html) has been released which lists me as a recipient of this bonus as a thank you for my work on Rust.
+So this one time, it wasn't spam after all!
+
+<!-- MORE -->
+
+Thanks a lot to Google for this program at the $250 reward; it is great to see open source work honored this way.
+I have donated the amount in full to [noyb](https://noyb.eu/en), who I'm sure will be using it [for good](https://noyb.eu/en/noyb-win-first-major-fine-eu-1-million-using-google-analytics).
+
+**Update (2024-01-07):**
+In fact, this is already my second Google Open Source Peer Bonus.
+The first was in the [first half of 2023](https://opensource.googleblog.com/2023/05/google-open-source-peer-bonus-program-announces-first-group-of-winners-2023.html).
+Due to issues with the payment process, it took a while for that bonus to be transferred, but I can confirm that it has now arrived in my bank account.
+I will have to find a suitable non-for-profit to donate this to... or it might be noyb again, we will see.
+**/Update**
diff --git a/personal/_posts/2024-04-14-bubblebox.md b/personal/_posts/2024-04-14-bubblebox.md
new file mode 100644 (file)
index 0000000..56a23a6
--- /dev/null
@@ -0,0 +1,75 @@
+---
+title: "Sandboxing All The Things with Flatpak and BubbleBox"
+categories: sysadmin
+---
+
+A few years ago, I have [blogged]({% post_url 2019-03-09-firejail %}) about my approach to sandboxing less-trusted applications that I have to or want to run on my main machine.
+The approach has changed since then, so it is time for an update.
+
+<!-- MORE -->
+
+Over time I grew increasingly frustrated with Firejail: configurations would frequently break on updates,
+and debugging Firejail profiles is extremely hard. When considering all the included files, we are talking
+about many hundred lines of configuration with a subtle interplay of allowlists and blocklists.
+Even when I knew which folder I wanted to give access to, it was often non-trivial to ensure that
+this access would actually be possible.
+
+Now I am instead using a combination of two different approaches: Flatpak and BubbleBox.
+
+## Flatpak
+
+The easiest sandbox to maintain is the sandbox maintained by someone else.
+So when a Flatpak exists for software I want to or have to use, such as Signal or Zoom, that is generally my preferred approach.
+
+Unfortunately, Flatpaks can come with extremely liberal default profiles that make the sandbox mostly pointless.
+The following global overrides help ensure that this does not happen:
+```
+[Context]
+sockets=!gpg-agent;!pcsc;!ssh-auth;!system-bus;!session-bus
+filesystems=~/.XCompose:ro;xdg-config/fontconfig:ro;!~/.gnupg;!~/.ssh;!xdg-documents;!home;!host
+
+[Session Bus Policy]
+org.freedesktop.Flatpak=none
+org.freedesktop.secrets=none
+```
+
+I also use [Flatseal], an amazing application that helps to check which permissions applications get, and change them if necessary.
+
+[Flatseal]: https://flathub.org/apps/com.github.tchx84.Flatseal
+
+## BubbleBox
+
+However, not all software exists as Flatpak.
+Also, sometimes I want software to run basically on my host system (i.e., to use the regular `/usr`), just without access to literally *everything* in my home directory.
+Examples of this are Factorio and VSCodium.
+The latter doesn't work in Flatpak as I want to use it with LaTeX, and realistically this means it needs to run the LaTeX installed via `apt`.
+The official recommendation is to effectively disable the Flatpak sandbox, but that entirely defeats the point, so I went looking for alternatives.
+
+[bubblewrap] provides a very convenient solution: it can start an application in its own private filesystem namespace with full control over which part of the host file system is accessible from inside the sandbox.
+I wrote a small wrapper around bubblewrap to make this configuration a bit more convenient to write and manage;
+this project is called [BubbleBox].
+This week-end I finally got around to adding support for [xdg-dbus-proxy] so that sandboxed applications can now access particular D-Bus functions without having access to the entire bus (which is in general not safe to expose to a sandboxed application).
+That means it's finally time to blog about this project, so here we go -- if you are interested, check out [BubbleBox];
+the project page explains how you can use it to set up your own sandboxing.[^1]
+
+[^1]: One day I should probably rewrite this in Rust... maybe this will be my test project for when [cargo-script](https://rust-lang.github.io/rfcs/3424-cargo-script.html) becomes available.
+
+I should also note that this is not the only bubblewrap-based sandboxing solution.
+[bubblejail] is fairly similar but provides a configuration GUI and a good set of default provides;
+it was a very useful resource when figuring out the right bubblewrap flags to make complex GUI applications work properly.
+(Incidentally, "bubblejail" is also how I called my own script originally, but then I realized that the name is already taken.)
+Joachim Breitner also recently [blogged](https://www.joachim-breitner.de/blog/812-Convenient_sandboxed_development_environment) about his own bubblewrap-based sandboxing script.
+sloonz has a similar [script](https://gist.github.com/sloonz/4b7f5f575a96b6fe338534dbc2480a5d) as well, with a nice yaml-based configuration format and [great explanations](https://sloonz.github.io/posts/sandboxing-1/) for what all the flags exactly do.
+Had their script existed when I started what eventually became BubbleBox, I would have used it as a starting point.
+But it was also fun to figure out my own solution.
+
+Using bubblewrap and xdg-dbus-proxy for this was an absolute joy.
+Both of these components came out of the Flatpak project, but the authors realized that they could be independently useful,
+so in best Unix tradition they turned them into tools that provide all the required mechanism without hard-coding any sort of policy.
+Despite doing highly non-trivial tasks, they are both pretty easy to use and compose and very well-documented.
+Thanks a lot to everyone involved!
+
+[bubblewrap]: https://github.com/containers/bubblewrap
+[BubbleBox]: {{ site.baseurl }}/projects/bubblebox
+[xdg-dbus-proxy]: https://github.com/flatpak/xdg-dbus-proxy
+[bubblejail]: https://github.com/igo95862/bubblejail
similarity index 93%
rename from ralf/_sass/_layout.scss
rename to personal/_sass/_layout.scss
index 8859ce17d1e4d4f9c8898562320e3314fe0b1ce5..0054a61f22c7cd9aa21a0270ffa4333097e1e936 100644 (file)
@@ -192,3 +192,17 @@ body { /* This centers us in the page, and handles the "too wide" case */
         margin-top: 0.8em;
     }
 }
+
+/* Images (~350px wide) floating to the right but only if there is enough space */
+.float-right-350 {
+  float: right;
+  margin-left: 0.8em;
+  margin-bottom: 0.3em;
+}
+@media screen and (max-width:600px) {
+    .float-right-350 {
+        max-width: 300px;
+        float: none;
+        margin: auto;
+    }
+}
similarity index 88%
rename from ralf/blog/feed.xml
rename to personal/blog/feed.xml
index 305ea9f630395147320a5a5c87d86003f637393e..ea1b93e25a26115c1194839f872a66944133e483 100644 (file)
@@ -1,6 +1,6 @@
 ---
 layout: feed
-slug: Subscribe
+slug: RSS Feed
 ---
 
 <title>{{ site.blog.title | xml_escape }}</title>
similarity index 67%
rename from ralf/index.html
rename to personal/index.html
index 32683c850cfceae67fb82c7c55c90870c9631277..0d66b23fe0dcc3fc3b53f22ac9f1c4e5004c6af4 100644 (file)
@@ -5,22 +5,22 @@ title: ralfj.de
 <div>
 <h2>Welcome</h2>
 <p>
-Welcome at ralfj.de, my server for experiments and digital independence.
-On this machine I maintain several services which are part of modern life, and which I would rather not entrust to data krakens in some cloud (what if it's raining?):
+Welcome at ralfj.de, my server for experiments and digital self-sufficiency.
+On this machine I maintain several services which are part of modern life, and which I would rather not entrust to data krakens and the cloud (what if it's raining?):
 </p>
 <ul>
     <li><a href="mailto:post-AT-ralfj-DOT-de">E-Mail</a>,</li>
-    <li>Jabber: My Jabber-ID is <a href="xmpp:ralf-AT-jabber-DOT-ralfj-DOT-de">ralf-AT-jabber-DOT-ralfj-DOT-de</a> (also see <a href="https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">the Wikipedia article about Jabber</a>),</li>
+    <li>Jabber (also see <a href="https://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">the Wikipedia article about Jabber</a>),</li>
     <li><a href="https://git.ralfj.de/">Git repositories</a>,</li>
     <li><a href="https://lists.ralfj.de/">Mailing lists</a>,</li>
     <li>a DNS server (incl. DynDNS and DNSSEC),</li>
     <li>and more.</li>
 </ul>
 <p>
-All software running on my server is of course <a href="https://en.wikipedia.org/wiki/Free_Software" target="_blank">free</a>.
-This is the only way for me to expect that it is not actually acting against my interests.
-Besides, all communication (if at all possible) is encrypted. This self-defense is seemingly necessary today to achieve freedom and basic rights (like privacy of telecommunications) in the digital world.<br>
-Speaking of which, my GPG key has the ID 0x1B24F3FF. You can find it <a href="0x1B24F3FF.asc">here</a> or on any <a href="https://sks-keyservers.net/" target="_blank">keyserver of the SKS network</a>.
+All software running on my server is of course <a href="https://en.wikipedia.org/wiki/Free_Software" target="_blank">free</a> (as in freedom, not just free beer).
+That way, I can expect it to not act against my interests.
+Besides, all communication (if at all possible) is encrypted. This self-defense is seemingly necessary today to achieve basic civil rights (like privacy of telecommunications) in the digital world.<br>
+Speaking of which, my GPG key has the ID 0x0CB18E521B24F3FF. You can find it <a href="0x0CB18E521B24F3FF.asc">here</a> or on <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/BD3F5AF6D95D77C48A85AF680CB18E521B24F3FF" target="_blank">keys.openpgp.org</a>.
 </p>
 <p>
 You may wonder why I spend so much time on this. Well, I already mentioned independence of the usual internet giants.
@@ -38,12 +38,12 @@ Use the menu at the left to browse this site for information about me and my pro
 <div lang="de">
 <h2>Willkommen</h2>
 <p>
-Willkommen auf ralfj.de, meinem Server für Experimente und digitale Unabhängigkeit.
+Willkommen auf ralfj.de, meinem Server für Experimente und digitale Eigenversorgung.
 Auf dieser Maschine laufen diverse Dienste, die zum modernen Alltag gehören, und die ich ungern Datenkraken in irgendwelchen Wolken anvertrauen möchte (was, wenn es regnet?):
 </p>
 <ul>
     <li><a href="mailto:post-ÄT-ralfj-PUNKT-de">E-Mail</a>,</li>
-    <li>Jabber: Meine Jabber-ID lautet <a href="xmpp:ralf-ÄT-jabber-PUNKT-ralfj-PUNKT-de">ralf-ÄT-jabber-PUNKT-ralfj-PUNKT-de</a> (siehe auch <a href="https://de.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">den Wikipedia-Artikel zu Jabber</a>),</li>
+    <li>Jabber (siehe auch <a href="https://de.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" target="_blank">den Wikipedia-Artikel zu Jabber</a>),</li>
     <li><a href="https://git.ralfj.de/">Git-Repositories</a>,</li>
     <li><a href="https://lists.ralfj.de/">Mailing-Listen</a>,</li>
     <li>ein DNS-Server (inkl. DynDNS und DNSSEC),</li>
@@ -52,8 +52,8 @@ Auf dieser Maschine laufen diverse Dienste, die zum modernen Alltag gehören, un
 <p>
 Alle Software, die auf meinem Server läuft, ist selbstverständlich <a href="https://de.wikipedia.org/wiki/Freie_Software" target="_blank">frei</a>.
 Nur so kann ich davon ausgehen, dass sie nicht gegen mich bzw. meine Interessen handelt.
-Zudem läuft alle Kommunikation (soweit irgend möglich) verschlüsselt ab. Diese Art von Selbstverteidigung ist heutzutage offenbar nötig, um verbriefte Rechte (wie das Postgeheimnis) und unsere Freiheit auch im Internet durchzusetzen.<br>
-Mein GPG-Schlüssel hat übrigens die ID 0x1B24F3FF. Du kannst ihn <a href="0x1B24F3FF.asc">hier</a> oder von einem beliebigen <a href="https://sks-keyservers.net/" target="_blank">Schlüsselserver des SKS-Netzes</a> herunterladen.
+Zudem läuft alle Kommunikation (soweit irgend möglich) verschlüsselt ab. Diese Art von Selbstverteidigung ist heutzutage offenbar nötig, um verbriefte Rechte (wie das Postgeheimnis) auch im Internet durchzusetzen.<br>
+Mein GPG-Schlüssel hat übrigens die ID 0x0CB18E521B24F3FF. Du kannst ihn <a href="0x0CB18E521B24F3FF.asc">hier</a> oder von <a href="https://keys.openpgp.org/vks/v1/by-fingerprint/BD3F5AF6D95D77C48A85AF680CB18E521B24F3FF" target="_blank">keys.openpgp.org</a> herunterladen.
 </p>
 <p>
 Warum ich mir diese Mühe mache? Nun, die Unabhängigkeit von den üblichen Internetgiganten habe ich ja schon erwähnt.
similarity index 56%
rename from ralf/projects/index.md
rename to personal/projects/index.md
index c5d3f4aa47753dbf3db6dfbe80087bec6e1b60f9..f8728452e8f7568e4d59ccf116ed3cb65556f8dc 100644 (file)
@@ -7,17 +7,18 @@ To solve some issue I was having, or to facilitate my daily computer usage.
 The tools were usually not written with general re-usability in mind.
 But maybe you are having just the same problem as I did, in which case I hope they can be helpful.
 
-* [LiLaSS](lilass/): A simple xrandr-based application to configure laptop screens on Linux. If you are using a
+* [BubbleBox](bubblebox): A simple script to sandbox Linux applications.
+* [dyn-nsupdate](dyn-nsupdate): A tool to dynamically and securely update DNS zones via CGI.
+  This provides self-hosted DynDNS services.
+* [git-mirror](git-mirror): This can keep multiple git repositories of the same project in sync automatically.
+* [LiLaSS](lilass): A simple xrandr-based application to configure laptop screens on Linux. If you are using a
   Laptop, frequently work both with and without an external screen, and you are not happy with
   the configuration options your desktop provides, this may be for you.
-* [dyn-nsupdate](dyn-nsupdate/): A tool to dynamically and securely update DNS zones via CGI.
-  This provides self-hosted DynDNS services.
-* [zonemaker](zonemaker/): A small script to generate DNS zone files from Python.
-* [schsh](schsh/): A collection of scripts and configuration files which can be used to grant
+* [Rust-101](rust-101): A small tutorial for the [Rust language](https://www.rust-lang.org).
+* [schsh](schsh): A collection of scripts and configuration files which can be used to grant
   someone secure (SSH-based) access to a machine, without giving them a shell or read access
   to the entire file system.
-* [Rust-101](rust-101/): A small tutorial for the [Rust language](https://www.rust-lang.org).
-* [git-mirror](git-mirror/): This can keep multiple git repositories of the same project in sync automatically.
+* [zonemaker](zonemaker): A small script to generate DNS zone files from Python.
 
 For some more of my projects, check out the [public git repositories](https://www.ralfj.de/git/)
 hosted on my server and my [GitHub profile](https://github.com/RalfJung/).
diff --git a/personal/robots.txt b/personal/robots.txt
new file mode 100644 (file)
index 0000000..e69de29
similarity index 100%
rename from ralf/style.scss
rename to personal/style.scss
similarity index 100%
rename from ralf/upload.sh
rename to personal/upload.sh
diff --git a/ralf/.htaccess b/ralf/.htaccess
deleted file mode 100644 (file)
index 1293249..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-RedirectMatch "^/cs/(index.html?)?$" "https://people.mpi-sws.org/~jung"
-RedirectMatch "^/cs/bachelor(.*)$" "https://people.mpi-sws.org/~jung/bachelor/bachelor$1"
-Redirect /research https://people.mpi-sws.org/~jung
diff --git a/research/.htaccess b/research/.htaccess
deleted file mode 100644 (file)
index 985ed3d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Redirect /~jung/iris/iris.pdf https://plv.mpi-sws.org/iris/paper.pdf
-Redirect /~jung/iris/logatom-talk-2019.pdf /~jung/iris/talk-iris2019.pdf
index 4c1f1f93290ba95ad351966e37abf4929b71a64f..110ebaf7e751d614b4735b77c644289b1be67112 100644 (file)
@@ -1,6 +1,6 @@
 # Site settings
-baseurl: "/~jung"
-url: "https://www.mpi-sws.org"
+baseurl: ""
+url: "https://research.ralfj.de"
 timezone: "Europe/Berlin"
 
 defaults:
@@ -14,4 +14,4 @@ markdown: kramdown
 exclude: ['*.sh']
 
 # Custom settings
-mpi_sws_imprint: True
+mpi_sws_imprint: False
index 418ae8fa3a30337f266adeeadde82dfdabc7f33f..5b818c7e054ad443716e7a27db7733ec39b379fb 120000 (symlink)
@@ -1 +1 @@
-../ralf/_includes/
\ No newline at end of file
+../personal/_includes
\ No newline at end of file
index c8d359b9a1b651f4599c411428e1fb01c6d2e2ce..e779e9dbc9df7ec681ffe73d6f3f4b393392d62a 120000 (symlink)
@@ -1 +1 @@
-../ralf/_layouts/
\ No newline at end of file
+../personal/_layouts
\ No newline at end of file
index 88f67d570f4b7f9cca1afa7d9bfc9c2f83d0f872..28c4700a8f01c9ffaaadacdf5940ff1d65b4f5fd 120000 (symlink)
@@ -1 +1 @@
-../ralf/_plugins/
\ No newline at end of file
+../personal/_plugins
\ No newline at end of file
index 3cd73fa6d1101af286a930ad4b8f00fca434791b..e7881878e50604870d6b1563bcd198a12f9c7ca1 120000 (symlink)
@@ -1 +1 @@
-../ralf/_sass/
\ No newline at end of file
+../personal/_sass
\ No newline at end of file
index 042437280446753fbf039bc4e369ab08d0462ffb..d43ad95786f12b65580127ef29ecb18fffca7da7 100644 (file)
@@ -3,19 +3,13 @@ title: Contact
 sort: 2
 ---
 
-<h3>E-Mail Address</h3>
+<p><b>Email:</b> ralf DOT jung AT inf DOT ethz DOT ch</p>
 
-<p>jung AT mpi-sws DOT org</p>
+<p><b>Phone:</b> +41 44 632 5598</p>
 
-<h3>Phone Number</h3>
-
-<p>+49 (681) 9303 8717</p>
-
-<h3>Work Address</h3>
-
-<p>
-Room 336<br/>
-MPI-SWS (Campus E1.5)<br/>
-66123 Saarbr&uuml;cken<br/>
-Germany 
+<p><b>Office / Mail:</b><br/>
+<a href='https://ethz.ch/staffnet/de/service/raeume-gebaeude/orientierung/gebaeude.html?args0=CNB' target='_blank'>CNB</a> H 109<br/>
+Universitätstrasse 6<br/>
+8092 Zürich<br/>
+Switzerland
 </p>
diff --git a/research/cv.pdf b/research/cv.pdf
new file mode 100644 (file)
index 0000000..1030d4c
Binary files /dev/null and b/research/cv.pdf differ
index b41df18553494f9523937cb32d87c7c5b6d8e6e4..bd7b1742448255a03c6f0100f3ce83297dc65df6 100644 (file)
@@ -2,17 +2,29 @@
 title: Ralf Jung
 ---
 
-<div style="float:right; margin-left:0.8em; margin-bottom: 0.3em"><img src="me.jpg"></div>
+<div class="float-right-350"><img style="max-width: 350px; width: 100%;" src="me.jpg" srcset="me.jpg, me-2x.jpg 2x"></div>
 
-<p>I am a post-doctoral researcher at <a href="https://www.mpi-sws.org/" target="_blank">Max Planck Institute for Software Systems (MPI-SWS)</a> under the supervision of <a href="https://www.mpi-sws.org/~dreyer/" target="_blank">Derek Dreyer</a>, head of the <a href="https://plv.mpi-sws.org/" target="_blank">Foundations of Programming group</a>.
-I am also a research affiliate of <a href="https://pdos.csail.mit.edu/">PDOS at MIT</a>.</p>
+<p>I am assistant professor at <a href='https://ethz.ch' target="_blank">ETH Zürich</a>, leading the <a href="https://plf.inf.ethz.ch/" target="_blank">Programming Language Foundations Lab</a>.
+We are part of the <a href='https://pls.inf.ethz.ch/' target="_blank">Institute for Programming Languages and Systems</a>.</br>
+Previously, I completed my <a href="thesis.html">PhD</a> at <a href="https://www.mpi-sws.org/">MPI-SWS</a> and <a href="https://www.uni-saarland.de/" target="_blank">Saarland University</a> in Saarbrücken, Germany; my advisor was <a href="https://people.mpi-sws.org/~dreyer/">Derek Dreyer</a>.
+I also did a post-doc in the <a href="https://pdos.csail.mit.edu/">PDOS group</a> at <a href="https://www.csail.mit.edu/" target="_blank">MIT CSAIL</a>.
+</p>
 
-<p>Previously, I completed my <a href="thesis.html">PhD thesis</a> at MPI-SWS and <a href="https://www.uni-saarland.de/" target="_blank">Saarland University</a>.</p>
+<!-- <p><i>I am offering up to two fully funded PhD positions in my newly founded research group at <a href="https://ethz.ch/en/the-eth-zurich/working-teaching-and-research.html">ETH Zürich</a>, with flexible start date.
+I am looking for strong students that want to do research at the foundations of programming language theory, in program verification and separation logic, with a focus on Rust and Iris.
+Knowledge of Coq is greatly appreciated. Interested candidates can <a href="contact.html">contact me directly</a>.
+Please explain why you are interested in a PhD in this field and what your prior experience is. Also include a CV and possible contacts for recommendation letters.
+Note that doing a PhD at ETH Zürich generally requires a Master's degree, but there is a <a href="https://inf.ethz.ch/doctorate/direct-doctorate-computer-science.html">direct doctorate program</a> that you can enter with a Bachelor's degree (application deadline December 15th).</i></p> -->
 
-<p>I am currently working on giving a formal model to <a href="https://www.rust-lang.org/">Rust's</a> type system.
-This work is part of the <a href="https://plv.mpi-sws.org/rustbelt/">RustBelt</a> project. <br/>
-The Rust work builds on my previous work on <a href="https://iris-project.org/">Iris</a>, a logic to support modular reasoning about higher-order concurrent imperative programs. The focus there was on providing simple building blocks that are powerful enough to recover more sophisticated reasoning techniques that were often axiomatized in previous logics. <br/>
-For some more information, check out my <a href="https://www.ralfj.de/blog/categories/research.html">research blog</a> and my <a href="research-statement.pdf">research statement</a>.</p>
+<p>My two main lines of work are about <a href="https://www.rust-lang.org/">Rust</a> and <a href="https://iris-project.org/">Iris</a>.<br>
+On the Rust side, me and my group are working (also in collaboration with the Rust language team) towards a solid formal foundation for the language, including in particular the unsafe parts.
+As part of this we are developing <a href="https://github.com/rust-lang/miri/">Miri</a>, a practical tool for detecting Undefined Behavior bugs in unsafe Rust code, which has become a part of the standard toolbox of unsafe code authors.
+Meanwhile, <a href="https://github.com/minirust/minirust">MiniRust</a> is our work-in-progress proposal for a precise specification of unsafe Rust, that I hope to integrate into an official Rust specification eventually.
+My long-term goal is to make unsafe Rust just as safe as safe Rust by means of formal verification based on rigorous foundations for all key components of the language.<br>
+On the Iris side, I am continuing development of its logical foundations.
+We are making Iris fit for specifying and verifying programming languages at scale using a more modular approach.
+The long-term goal is for Iris to be able to handle the full scale of complexities that arise when doing foundational verification of real languages.<br>
+For some more information, check out my <a href="https://www.ralfj.de/blog/categories/research.html">research blog</a>, my <a href="cv.pdf">CV</a>, and my <a href="research-statement.pdf">research statement</a>.</p>
 
 <p>In my free time, I like to run internet services myself and work on free software.
 This goes hand-in-hand with my pursuit of defending our privacy rights and our freedom in the digital world.
diff --git a/research/me-2x.jpg b/research/me-2x.jpg
new file mode 100644 (file)
index 0000000..4b04f1a
Binary files /dev/null and b/research/me-2x.jpg differ
index f9c3fc7bba3b6bff6838aea164f04d56fd4db8d0..016137983a7a2ce717be722d26fb1f8000e26581 100644 (file)
Binary files a/research/me.jpg and b/research/me.jpg differ
index cf13a0add5b4126c36edaac566c991b496b7fcbe..902fb5203c7f06b4c3c9d2aa2087b05296d0849e 100644 (file)
@@ -5,12 +5,51 @@ slug: Publications
 
 <h2>Conference and journal papers</h2>
 
+<h3>2023</h3>
+
+<ul><li>
+  <b>Grove: a Separation-Logic Library for Verifying Distributed Systems</b><br/>
+  Upamanyu Sharma, Ralf Jung, Joseph Tassarotti, M. Frans Kaashoek, Nickolai Zeldovich <br>
+  <i>In <a href="https://sosp2023.mpi-sws.org/index.html">SOSP 2023</a></i><br>
+  [<a href="https://iris-project.org/pdfs/2023-sosp-grove.pdf">paper</a>] [<a href="https://arxiv.org/abs/2309.03046">extended version</a>]
+</li></ul>
+
+<ul><li>
+  <b>Verifying vMVCC, a high-performance transaction library using multi-version concurrency control</b><br/>
+  Yun-Sheng Chang, Ralf Jung, Upamanyu Sharma, Joseph Tassarotti, M. Frans Kaashoek, Nickolai Zeldovich <br>
+  <i>In <a href="https://www.usenix.org/conference/osdi23">OSDI 2023</a></i><br>
+  [<a href="https://pdos.csail.mit.edu/papers/vmvcc:osdi23.pdf">paper</a>] [<a href="https://pdos.csail.mit.edu/projects/vmvcc.html#vmvcc">paper website</a> (incl. Coq formalization)]
+</li></ul>
+
+<h3>2022</h3>
+
+<ul><li>
+  <b>Later Credits: Resourceful Reasoning for the Later Modality</b><br/>
+  Simon Spies, Lennard Gäher, Joseph Tassarotti, Ralf Jung, Robbert Krebbers, Lars Birkedal, Derek Dreyer <br>
+  <i>In <a href="https://icfp22.sigplan.org/">ICFP 2022</a></i><br>
+  [<a href="https://plv.mpi-sws.org/later-credits/paper-later-credits.pdf">paper</a>] [<a href="https://plv.mpi-sws.org/later-credits/">paper website</a>  (incl. Coq formalization)]
+</li></ul>
+
+<ul><li>
+  <b>Simuliris: A separation logic framework for verifying concurrent program optimizations</b><br/>
+  Lennard Gäher, Michael Sammler, Simon Spies, Ralf Jung, Hoang-Hai Dang, Robbert Krebbers, Jeehoon Kang, Derek Dreyer<br>
+  <i>In <a href="https://popl22.sigplan.org/">POPL 2022</a>, <b>Distinguished Paper Award</b></i><br>
+  [<a href="https://iris-project.org/pdfs/2022-popl-simuliris.pdf">paper</a>]
+</li></ul>
+
 <h3>2021</h3>
 
+<ul><li>
+  <b>GhostCell: Separating Permissions from Data in Rust</b><br/>
+  Joshua Yanovski, Hoang-Hai Dang, Ralf Jung, Derek Dreyer<br>
+  <i>In <a href="https://icfp21.sigplan.org/">ICFP 2021</a></i><br>
+  [<a href="https://plv.mpi-sws.org/rustbelt/ghostcell/paper.pdf">paper</a>] [<a href="https://plv.mpi-sws.org/rustbelt/ghostcell/">paper website</a>  (incl. Coq formalization)]
+</li></ul>
+
 <ul><li>
   <b>GoJournal: a verified, concurrent, crash-safe journaling system</b><br/>
   Tej Chajed, Joseph Tassarotti, Mark Theng, Ralf Jung, M. Frans Kaashoek, Nickolai Zeldovich<br>
-  <i>In OSDI 2021</i><br>
+  <i>In <a href="https://www.usenix.org/conference/osdi21">OSDI 2021</a></i><br>
   [<a href="perennial/gojournal.pdf">paper</a>]
 </li></ul>
 
@@ -155,6 +194,6 @@ slug: Publications
 <ul><li>
   <b>Unifying Worlds and Resources</b><br/>
   Ralf Jung, Derek Dreyer<br>
-  <i>At <a href="http://users-cs.au.dk/birke/hope-2015/">HOPE 2015</a>: 4th ACM SIGPLAN Workshop on Higher-Order Programming with Effects</i><br>
+  <i>At <a href="https://users-cs.au.dk/birke/hope-2015/">HOPE 2015</a>: 4th ACM SIGPLAN Workshop on Higher-Order Programming with Effects</i><br>
   [<a href="iris/talk-hope2015.pdf">slides</a>] [<a href="https://www.youtube.com/watch?v=9Dyna88piek&amp;list=PLnqUlCo055hX6SsmMr1AmW6quMjvdMPvK&amp;index=10" target="_blank">YouTube</a>]
 </li></ul>
index 18ed1902776cf276748b96ca15c9febdf9f0205c..225a9402478a14cd69425fd6d5cc3b6ad7be1328 100644 (file)
Binary files a/research/research-statement.pdf and b/research/research-statement.pdf differ
index fbd42b93eb4a4281f0e127d9260fdb45eb8a59f6..74a641e937d2212118c37a4efe39ec7ca3a07c79 120000 (symlink)
@@ -1 +1 @@
-../ralf/style.scss
\ No newline at end of file
+../personal/style.scss
\ No newline at end of file
index 74784b304255888f6d3b7368eb319c5e6dc48743..89f73286a99f4ba2b11a3280e282e31ba8e397d8 100644 (file)
@@ -3,6 +3,11 @@ title: Understanding and Evolving the Rust Programming Language
 slug: Thesis
 ---
 
+<i>PhD Thesis, Defended in August 2020</i>
+
+
+<h3>Abstract</h3>
+
 <p><em>Rust</em> is a young systems programming language that aims to fill the gap between <em>high-level languages</em>—which provide strong static guarantees like memory and thread safety—and <em>low-level languages</em>—which give the programmer fine-grained control over data layout and memory management. This dissertation presents two projects establishing the first formal foundations for Rust, enabling us to better <em>understand</em> and <em>evolve</em> this important language: <em>RustBelt</em> and <em>Stacked Borrows</em>.</p>
 
 <p><em>RustBelt</em> is a formal model of Rust’s type system, together with a soundness proof establishing memory and thread safety. The model is designed to verify the safety of a number of intricate APIs from the Rust standard library, despite the fact that the implementations of these APIs use <em>unsafe</em> language features.</p>
@@ -11,8 +16,12 @@ slug: Thesis
 
 <p>RustBelt is built on top of <em>Iris</em>, a language-agnostic framework, implemented in the Coq proof assistant, for building higher-order concurrent separation logics. This dissertation begins by giving an introduction to Iris, and explaining how Iris enables the derivation of complex high-level reasoning principles from a few simple ingredients. In RustBelt, this technique is exploited crucially to introduce the <em>lifetime logic</em>, which provides a novel separation-logic account of <em>borrowing</em>, a key distinguishing feature of the Rust type system.</p>
 
-<p style="color:red">
-This thesis has received a <a href="https://www.mpi-sws.org/news/" style="color:red;font-weight:bold;">2021 Otto Hahn Medal</a> and the <a href="https://etaps.org/2021/doctoral-dissertation-award" style="color:red;font-weight:bold;">2021 ETAPS Doctoral Dissertation Award</a>.
+<p style="font-weight:bold">
+This thesis has received an <a href="https://awards.acm.org/about/2020-doctoral-dissertation" style="font-weight:bold;">Honorable Mention for the ACM Doctoral Dissertation Award</a>,
+the <a href="https://sigplan.org/Awards/Dissertation/#2021_Ralf_Jung__Max_Planck_Institute_for_Software_Systems_and_Saarland_University" style="font-weight:bold;">ACM SIGPLAN John C. Reynolds Doctoral Dissertation Award</a> (as one of two recipients),
+an <a href="https://www.mpg.de/prizes/otto-hahn-medal" style="font-weight:bold;">Otto Hahn Medal</a>,
+the <a href="https://etaps.org/2021/doctoral-dissertation-award" style="font-weight:bold;">ETAPS Doctoral Dissertation Award</a>,
+and the Saarland University <a href="https://www.uni-saarland.de/universitaet/aktuell/news/artikel/nr/24072.html" style="font-weight:bold;">Dr. Eduard Martin-Preis</a>.
 </p>
 
 <h3>Download and references</h3>
index f0268be2af25c0261ef733555fc96e12eeee0ea6..249ef6bb473e9bb2d8db38ffa6b94c4048b7853a 100755 (executable)
@@ -8,4 +8,4 @@ git add .
 git diff --cached
 git commit -m "site upload"
 
-rsync ./ mpi-contact:public_html/ -aP --exclude .git
+rsync ./ ralfj.de:/srv/research.ralfj.de/docroot/ -aP --exclude .git
index 18eaa9934318e3727c991494c7ad1f93a7542f83..3869f770888f783a913f72542f6fb440e44b345d 100755 (executable)
--- a/upload.sh
+++ b/upload.sh
@@ -1,5 +1,5 @@
 #/bin/bash
 cd "$(dirname "$0")"
 
-ralf/upload.sh
+personal/upload.sh
 research/upload.sh