|
|
Log in / Subscribe / Register

A crazy thought

A crazy thought

Posted Jan 20, 2026 18:48 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)
In reply to: A crazy thought by aszs
Parent article: Task-level io_uring restrictions

> We are literally going in circles. How would your in-kernel wasm jit handle the task_struct pointer returned by bpf_get_current_task_btf()?

Would you read the WASM spec, please? The task_struct will be modeled as a WASM structure type: https://webassembly.github.io/spec/core/syntax/types.html... It's accessible via _references_ only ( https://webassembly.github.io/spec/core/syntax/types.html... ):

> Reference types are opaque, meaning that neither their size nor their bit pattern can be observed. Values of reference type can be stored in tables but not in memories.

It will NOT be accessible using pointer operations from any memory blocks. That's how browsers expose complex objects into the WASM world.

Just like in eBPF (does that phrase sound familiar by now?).

> And do stuff like that safely without overhead?

Yes. Just like in eBPF.

Again, this is not something theoretical or exotic. That's how browsers work RIGHT NOW.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds