Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion internal/controller/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func (cfg *Config) Validate() error {
return fmt.Errorf("invalid sampling frequency: %d", cfg.SamplesPerSecond)
}

if cfg.MapScaleFactor > 8 {
if cfg.MapScaleFactor > MaxArgMapScaleFactor {
return fmt.Errorf(
"eBPF map scaling factor %d exceeds limit (max: %d)",
cfg.MapScaleFactor, MaxArgMapScaleFactor,
Expand Down Expand Up @@ -105,6 +105,10 @@ func (cfg *Config) Validate() error {
"should be in the range [0..1]. 0 disables off-cpu profiling")
}

if cfg.MaxRPCMsgSize <= 0 {
return fmt.Errorf("invalid max-rpc-msg-size: got %d, must be greater than 0", cfg.MaxRPCMsgSize)
}

if !cfg.NoKernelVersionCheck {
major, minor, patch, err := tracer.GetCurrentKernelVersion()
if err != nil {
Expand Down