Thanks to visit codestin.com
Credit goes to github.com

Skip to content

logger: cache local timezone before seccomp - #8327

Merged
rbradford merged 1 commit into
cloud-hypervisor:mainfrom
dgreid:topic/tz-cache
Jun 3, 2026
Merged

rbradford merged 1 commit into
cloud-hypervisor:mainfrom
dgreid:topic/tz-cache

Conversation

@dgreid

@dgreid dgreid commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

We saw some seccomp violations when the tz cache was dropped. manually cache it before enforcing seccomp so that can't happen

@dgreid
dgreid requested a review from a team as a code owner June 3, 2026 17:09
@dgreid
dgreid force-pushed the topic/tz-cache branch 2 times, most recently from 6b2c772 to e2e202d Compare June 3, 2026 17:47
Local-time log fields called `jiff::Zoned::now()`, which resolves the
system timezone on every record by reading
`/etc/localtime`/`/etc/timezone` if it doesn't hit the cached version.
This cache miss could then cause a seccomp violation depending on the
thread it was run from.

Avoid this by capturing the value in `Logger`. This avoids opening the
seccomp filter for the whole process.

Signed-off-by: Dylan Reid <[email protected]>
@rbradford
rbradford enabled auto-merge June 3, 2026 19:54
@rbradford
rbradford added this pull request to the merge queue Jun 3, 2026
Merged via the queue into cloud-hypervisor:main with commit b88d5de Jun 3, 2026
41 checks passed
@github-project-automation github-project-automation Bot moved this from 🆕 New to ✅ Done in Cloud Hypervisor Roadmap Jul 8, 2026
@rbradford rbradford added the bug-fix Bug fix to include in release notes label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Bug fix to include in release notes

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants