sandboxpolicy: size the verdict ring buffers and report drops

オープン
#1,107 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go, kubernetes

調査の方向性

Start with enforce_file/program.bpf.c and its events ring buffer, then locate the privilege and network gadget buffers and the code that builds policy status and exports metrics. Measure event and drop rates under a file-heavy workload on AL2023 kernels 6.12 and 6.18, and record the buffer budget in the README. Done means drops appear in status and exported metrics, with a test that fills a buffer and verifies the report.

索引モデルが issue の本文から書いたものです。

説明

Follow-up from the review of #1075.

Problem

The file gadget sends its verdict events through one ring buffer of 256 KiB (events in enforce_file/program.bpf.c). Under a file-heavy workload the buffer can fill. A full buffer drops the event; the drop is counted (VERDICT_COUNT_DROPPED), but:

  • the size was not derived from a measured event rate;
  • a sustained drop rate is not visible in the policy status;
  • the same question applies to the privilege and network gadgets, which have their own buffers.

Enforcement itself is not affected: the hook decides before it reserves the event. What is lost is the verdict record (audit trail and export).

Proposal

  • Measure the event rate and the drop rate under a file-heavy workload on the fleet kernels (AL2023 6.12 and 6.18).
  • Size each section's buffer from that measurement, with a documented budget per node.
  • Report sustained drops in status (for example a Degraded notice with the drop count), and export the count.
  • Consider aggregating repeated identical allow verdicts in the kernel before they reach the buffer.

Done when

  • Buffer sizes are justified by a measurement recorded in the README.
  • A drop is visible in status and in the exported metrics.
  • A test fills the buffer and checks that the drop is reported.
主要言語
Go
スター
39
フォーク
42
平均マージ
2日 16時間
マージ済み PR(30日)
48

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

kubescape/node-agent のほかの issue

kubescape/node-agent の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。