There are many source files that iterate over the entries of a vm_map. A change to the implementation of that iteration would require modifying all of them. Define a VME_FOREACH macro that encapsulates the current implementation, so that other files can be less sensitive to the changes in that implementation. Use the macro everywhere.
Details
I can install the modified kernel and use it to compile a kernel.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I ran tests on D21882.62858.diff for 5 1/2 hours without seeing any problems. I'll move on to 62874.
Combine two loops in ptrace_vm_entry into one, so that "entry->next" doesn't have to appear.
I would consider calling it VM_MAP_ENTRY_FOREACH(): it is a bit long, but there doesn't seem to be much risk of hitting the 80 column limit, and VME_FOREACH() seems a bit terse given that the macro is used outside of the VM subsystem. The change looks fine to me either way, so please keep the name if you prefer.
sys/vm/vm_object.c | ||
---|---|---|
2387 ↗ | (On Diff #62898) | What's the purpose of the counter? |
sys/vm/vm_object.c | ||
---|---|---|
2387 ↗ | (On Diff #62898) | r6129 | dg | 1995-02-02 03:09:15 -0600 (Thu, 02 Feb 1995) | 48 lines swap_pager.c: I'll remove the counter, if that's okay. |
sys/vm/vm_object.c | ||
---|---|---|
2387 ↗ | (On Diff #62898) | Looks like it should be fine to remove. |
sys/kern/sys_process.c | ||
---|---|---|
388 ↗ | (On Diff #62898) | I'm not sure that I see the point of checking the header repeatedly for an erroneous submap flag. But more generally, I can't make any sense out of the submap handling. Has this changed in the last year or so? |
sys/kern/sys_process.c | ||
---|---|---|
388 ↗ | (On Diff #62898) | The origin of the KASSERT is https://reviews.freebsd.org/D14005 |
sys/kern/sys_process.c | ||
---|---|---|
388 ↗ | (On Diff #62898) | I'll change the "repeated" checking to make it one-time. |