mm-madvise-split-out-madvise-behavior-execution.patch removed from -mm tree
The quilt patch titled
Subject: mm/madvise: split out madvise() behavior execution
has been removed from the -mm tree. Its filename was
mm-madvise-split-out-madvise-behavior-execution.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/madvise: split out madvise() behavior execution
Date: Wed, 5 Feb 2025 22:15:16 -0800
Split out the madvise behavior applying logic from do_madvise() to make it easier to reuse from the following change.
---
mm/madvise.c | 53 +++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 23 deletions(-)
mm/madvise.c renamed from mm/madvise.c~mm-madvise-split-out-madvise-behavior-execution +30 -23
@@ -1639,6 +1639,35 @@ static bool is_valid_madvise(unsigned loreturn true; } +static int madvise_do_behavior (struct mm_struct *mm, +unsigned long start,size_t len_in,size_t len,int behavior) +{ +struct blk_plug plug; +unsigned long end; +int error; + +#ifdef CONFIG_MEMORY_FAILURE +if (behavior ==MADV_HWPOISON || behavior ==MADV_SOFT_OFFLINE ) +return madvise_inject_error (behavior, start, start + len_in); +#endif + start =untagged_addr_remote (mm, start); + end = start + len; + +blk_start_plug (&plug); +switch (behavior) { +case MADV_POPULATE_READ : +case MADV_POPULATE_WRITE : + error =madvise_populate (mm, start, end, behavior); +break ; +default : + error =madvise_walk_vmas (mm, start, end, behavior, + madvise_vma_behavior); +break ; + } +blk_finish_plug (&plug); +return error; +} +/* * The madvise(2) system call. *
@@ -1716,7 +1745,6 @@ int do_madvise(struct mm_struct *mm, unsunsigned long end;int error;size_t len; -struct blk_plug plug;if (!is_valid_madvise (start, len_in, behavior))return -EINVAL ;
@@ -1730,28 +1758,7 @@ int do_madvise(struct mm_struct *mm, uns error =madvise_lock (mm, behavior);if (error)return error; - -#ifdef CONFIG_MEMORY_FAILURE -if (behavior ==MADV_HWPOISON || behavior ==MADV_SOFT_OFFLINE ) -return madvise_inject_error (behavior, start, start + len_in); -#endif - - start =untagged_addr_remote (mm, start); - end = start + len; - -blk_start_plug (&plug); -switch (behavior) { -case MADV_POPULATE_READ : -case MADV_POPULATE_WRITE : - error =madvise_populate (mm, start, end, behavior); -break ; -default : - error =madvise_walk_vmas (mm, start, end, behavior, - madvise_vma_behavior); -break ; - } -blk_finish_plug (&plug); - + error =madvise_do_behavior (mm, start, len_in, len, behavior);madvise_unlock (mm, behavior);return error;
_
Patches currently in -mm which might be from [email protected] are
mm-damon-sysfs-schemes-let-damon_sysfs_scheme_set_filters-be-used-for-different-named-directories.patch mm-damon-sysfs-schemes-implement-core_filters-and-ops_filters-directories.patch mm-damon-sysfs-schemes-commit-filters-in-coreops_filters-directories.patch mm-damon-core-expose-damos_filter_for_ops-to-damon-kernel-api-callers.patch mm-damon-sysfs-schemes-record-filters-of-which-layer-should-be-added-to-the-given-filters-directory.patch mm-damon-sysfs-schemes-return-error-when-for-attempts-to-install-filters-on-wrong-sysfs-directory.patch docs-abi-damon-document-coreops_filters-directories.patch docs-admin-guide-mm-damon-usage-update-for-coreops_filters-directories.patch mm-damon-sysfs-validate-user-inputs-from-damon_sysfs_commit_input.patch mm-damon-core-invoke-kdamond_call-after-merging-is-done-if-possible.patch mm-damon-core-make-damon_set_attrs-be-safe-to-be-called-from-damon_call.patch mm-damon-sysfs-handle-commit-command-using-damon_call.patch mm-damon-sysfs-remove-damon_sysfs_cmd_request-code-from-damon_sysfs_handle_cmd.patch mm-damon-sysfs-remove-damon_sysfs_cmd_request_callback-and-its-callers.patch mm-damon-sysfs-remove-damon_sysfs_cmd_request-and-its-readers.patch mm-damon-sysfs-schemes-remove-obsolete-comment-for-damon_sysfs_schemes_clear_regions.patch mm-damon-remove-damon_callback-private.patch mm-damon-remove-before_start-of-damon_callback.patch mm-damon-remove-damon_callback-after_sampling.patch mm-damon-remove-damon_callback-before_damos_apply.patch mm-damon-remove-damon_operations-reset_aggregated.patch mm-damon-sysfs-schemes-avoid-wformat-security-warning-on-damon_sysfs_access_pattern_add_range_dir.patch mm-madvise-use-is_memory_failure-from-madvise_do_behavior.patch mm-madvise-split-out-populate-behavior-check-logic.patch mm-madvise-deduplicate-madvise_do_behavior-skip-case-handlings.patch mm-madvise-remove-len-parameter-of-madvise_do_behavior.patch