Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds Go-Landlock support for Scoped access rights for IPC between processes,
which were added by @tahifahimi in
https://lore.kernel.org/all/cover.1725657727.git.fahimitahera@gmail.com/
and https://lore.kernel.org/all/cover.1725494372.git.fahimitahera@gmail.com/
Known bug about IPC between goroutines
A noteworthy difference to C is that in Go, we technically create multiple Landlock domains. All Go programs inherently have multiple goroutines and OS threads. We enforce the Landlock ruleset on each of these OS threads, but they do technically become separate Landlock domains. As a result, it becomes dependent on Goroutine scheduling whether IPC between two goroutines is considered to cross the boundary to an "unrelated" Landlock domain.
In order to fix that, I think we'd need to address landlock-lsm/linux#2 first, so that we could apply the same domain on all threads of a process.
Also see the section I added to the documentation:
To reproduce the issue:
Observed behaviour:
Desired behaviour: