---
# System prepended metadata

title: Meeting 2023-06-07
tags: [meeting notes]

---

# Meeting 2023-06-07
<!-- Leave your topic starting with ### in the relevant sections below -->

## Critical
<!-- bugs, soundness issues, urgent patches/reviews etc. -->

## Status Reports
<!-- You want to report on something you are working on/request reviews.
Or you want to know the status of something someone else is doing -->

### Kangrejos

* Waiting for sponsorships

### Rust 1.70

* Miguel has a branch https://github.com/ojeda/linux/tree/rust-1.70
* Has an issue of `.eh_frame` section being emitted
* Gary to look into this: https://github.com/rust-lang/rust/pull/112403

## Discussion Questions
<!-- Anything that requires lengthy discussion/more general questions also fit here -->

### Validity of references shallow vs deep

* https://github.com/rust-lang/unsafe-code-guidelines/issues/346

### `ptr_metadata`

Background: https://lore.kernel.org/rust-for-linux/87pm69zqya.fsf@metaspace.dk/T/#u

We have a lot of approaches:
* Wedson and Alice: Cast the pointer and then offset
* Andreas: Dissect the pointer, offset the pointer, cast the metadata, and reassemble
* Gary: Andreas', but change the cast to transmute_copy
* Boqun: `wrapping_byte_offset`

Two separate questions, layout vs metadata. Layout computation code is changed by Alice. Changed in v2 https://lore.kernel.org/rust-for-linux/20230523164333.2c4b0d85.gary@garyguo.net/

```rust=
    let ptr: *const T = ...;

    let ptr = core::ptr::metadata(ptr as *const ArcInner<T>);
```

```rust=
let ptr: *const T = ...;

//                                 v this might be a fat pointer cast (can't use `cast` method)
let ptr: *const ArcInner<T> = (ptr as *const ArcInner<T>).byte_offset(offset);
```

Gary: compiler know that `*const T` and `*const ArcInner<T>` has same metadata when you use `as _`, but, `<T as Pointee>::Metadata` and `<ArcInner<T> as Pointee>::Metadata` is not (yet) known to compiler to be the same.

Andreas: I'll be happy if there's a big fat comment block explaining pointer temporary out of scope.

Consensus: go with `byte_offset` for now since it's likely to be stabilised sooner, can always change later.


### KUnit doctest support

Miguel: Currently, the name of the test is the file path and line number of the test. However, 0-day does bisections based on the test name, which means it would break as soon as anything in the file moves. I suggested the 0-day team several alternatives on both the generation side or the bisecting procedure. For the moment, we will go with the current state to merge it soon.

Discussion about the different options. Rust item path may be a good compromise.



### Linked list bindings?




## Miscellaneous
<!-- stuff that does not fit into other categories -->
