Make shadow limit configurable with bounds#63
Open
ArBin1020 wants to merge 1 commit intosysprog21:mainfrom
Open
Make shadow limit configurable with bounds#63ArBin1020 wants to merge 1 commit intosysprog21:mainfrom
ArBin1020 wants to merge 1 commit intosysprog21:mainfrom
Conversation
Address the inherent 256MB capacity limitation on shadow FDs - CLI Configurability: Introduced the --shadow-limit option. The default remains 256MB to preserve existing behavior, but users can now raise it for specific workloads. - Host OOM Prevention: Enforced a hard upper bound (MAX_SHADOW_LIMIT = 512MB). Inputs exceeding this bound are automatically clamped to 512MB. - Type Safety for Parsing: Migrated the internal limit representation to uint64_t to prevent integer wraparound and overflow when handling custom CLI inputs. - Input Validation: Clamp negative inputs to MAX_SHADOW_LIMIT, and reject invalid or >64-bit strings with an error. Change-Id: I814b9edb6b17b0cf3762cc95938410ecbb577f8c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Address the inherent 256MB capacity limitation on shadow FDs
Change-Id: I814b9edb6b17b0cf3762cc95938410ecbb577f8c
Summary by cubic
Add a configurable shadow FD size limit via the new
--shadow-limitflag. Default stays 256MB; values above the 512MB hard cap are clamped to prevent host OOM.--shadow-limit BYTESto raise the shadow FD cap (0 keeps default).uint64_tfor safe parsing and comparisons.Written for commit 0000edd. Summary will update on new commits.