-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mm/map: Remove MM_MAP_COUNT_MAX Kconfig and related check #14819
Conversation
since it's not necessary to limit the number of map entries. Signed-off-by: Xiang Xiao <[email protected]>
[Experimental Bot, please feedback here] No, this PR does not meet the NuttX requirements. The provided information is far too vague and lacks crucial details. Here's why:
In short, the PR description needs significantly more detail and concrete information to be considered acceptable. It needs to provide a clear understanding of the change, its implications, and thorough verification through testing. |
config MM_MAP_COUNT_MAX | ||
int "The maximum number of memory map areas for each task" | ||
default 1024 | ||
---help--- | ||
The maximum number of memory map areas for each task. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiaoxiang781216 could you please elaborate further? Why isn't it necessary to limit the number of map entries? Which other alternative do we have? Please include this information in the commit message!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation could support any number map if the system has enough memory, so it's an artificial limitation and better to remove to simplify the configuration.
LTP test will fail if it's removed. |
This could be security problem couldn't it? Any user application could cause a kernel simply by consuming memory regions. Linux, apparently, restricts the number of regions to 65535. But this can be changed by writing to a proc file sysem entry: See https://www.ibm.com/docs/en/safer-payments/6.5?topic=settings-increasing-virtual-memory-map-size That is a better solution than a configuration setting, but functionally very similar. This option should only be available to privileged applications. |
POSIX permits implementation-specific limits on the number of memory regions, but does not require them. For example for mmap(): https://pubs.opengroup.org/onlinepubs/9799919799/functions/mmap.html |
Summary
since it's not necessary to limit the number of map entries.
Impact
remove the artificial limitation
Testing
ci