* fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
@ 2025-10-23 7:29 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2025-10-23 7:29 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Liam R. Howlett" <Liam.Howlett@oracle.com>
CC: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Hi Lorenzo,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 43e9ad0c55a369ecc84a4788d06a8a6bfa634f1c
commit: d14d3f535e13ff0661b9a74133a8d6b9f9950712 mm: convert remaining users to mm_flags_*() accessors
date: 6 weeks ago
:::::: branch date: 6 hours ago
:::::: commit date: 6 weeks ago
config: m68k-randconfig-r063-20251023 (https://download.01.org/0day-ci/archive/20251023/202510231541.uVpbrSce-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202510231541.uVpbrSce-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
fs/proc/base.c:3286:4-29: opportunity for str_yes_no(ksm_process_mergeable ( mm ))
>> fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
vim +3279 fs/proc/base.c
7c23b3300116907 Josh Poimboeuf 2017-02-13 3251
7609385337a4feb xu xin 2022-04-28 3252 #ifdef CONFIG_KSM
7609385337a4feb xu xin 2022-04-28 3253 static int proc_pid_ksm_merging_pages(struct seq_file *m, struct pid_namespace *ns,
7609385337a4feb xu xin 2022-04-28 3254 struct pid *pid, struct task_struct *task)
7609385337a4feb xu xin 2022-04-28 3255 {
7609385337a4feb xu xin 2022-04-28 3256 struct mm_struct *mm;
7609385337a4feb xu xin 2022-04-28 3257
7609385337a4feb xu xin 2022-04-28 3258 mm = get_task_mm(task);
7609385337a4feb xu xin 2022-04-28 3259 if (mm) {
7609385337a4feb xu xin 2022-04-28 3260 seq_printf(m, "%lu\n", mm->ksm_merging_pages);
7609385337a4feb xu xin 2022-04-28 3261 mmput(mm);
7609385337a4feb xu xin 2022-04-28 3262 }
7609385337a4feb xu xin 2022-04-28 3263
7609385337a4feb xu xin 2022-04-28 3264 return 0;
7609385337a4feb xu xin 2022-04-28 3265 }
cb4df4cae4f2bd8 xu xin 2022-08-30 3266 static int proc_pid_ksm_stat(struct seq_file *m, struct pid_namespace *ns,
cb4df4cae4f2bd8 xu xin 2022-08-30 3267 struct pid *pid, struct task_struct *task)
cb4df4cae4f2bd8 xu xin 2022-08-30 3268 {
cb4df4cae4f2bd8 xu xin 2022-08-30 3269 struct mm_struct *mm;
3ab76c767bc783c xu xin 2025-01-10 3270 int ret = 0;
cb4df4cae4f2bd8 xu xin 2022-08-30 3271
cb4df4cae4f2bd8 xu xin 2022-08-30 3272 mm = get_task_mm(task);
cb4df4cae4f2bd8 xu xin 2022-08-30 3273 if (mm) {
cb4df4cae4f2bd8 xu xin 2022-08-30 3274 seq_printf(m, "ksm_rmap_items %lu\n", mm->ksm_rmap_items);
c2dc78b86e0821e Chengming Zhou 2024-05-28 3275 seq_printf(m, "ksm_zero_pages %ld\n", mm_ksm_zero_pages(mm));
d21077fbc2fc987 Stefan Roesch 2023-04-17 3276 seq_printf(m, "ksm_merging_pages %lu\n", mm->ksm_merging_pages);
d21077fbc2fc987 Stefan Roesch 2023-04-17 3277 seq_printf(m, "ksm_process_profit %ld\n", ksm_process_profit(mm));
3ab76c767bc783c xu xin 2025-01-10 3278 seq_printf(m, "ksm_merge_any: %s\n",
d14d3f535e13ff0 Lorenzo Stoakes 2025-08-12 @3279 mm_flags_test(MMF_VM_MERGE_ANY, mm) ? "yes" : "no");
3ab76c767bc783c xu xin 2025-01-10 3280 ret = mmap_read_lock_killable(mm);
3ab76c767bc783c xu xin 2025-01-10 3281 if (ret) {
3ab76c767bc783c xu xin 2025-01-10 3282 mmput(mm);
3ab76c767bc783c xu xin 2025-01-10 3283 return ret;
3ab76c767bc783c xu xin 2025-01-10 3284 }
3ab76c767bc783c xu xin 2025-01-10 3285 seq_printf(m, "ksm_mergeable: %s\n",
3ab76c767bc783c xu xin 2025-01-10 3286 ksm_process_mergeable(mm) ? "yes" : "no");
3ab76c767bc783c xu xin 2025-01-10 3287 mmap_read_unlock(mm);
cb4df4cae4f2bd8 xu xin 2022-08-30 3288 mmput(mm);
cb4df4cae4f2bd8 xu xin 2022-08-30 3289 }
cb4df4cae4f2bd8 xu xin 2022-08-30 3290
cb4df4cae4f2bd8 xu xin 2022-08-30 3291 return 0;
cb4df4cae4f2bd8 xu xin 2022-08-30 3292 }
7609385337a4feb xu xin 2022-04-28 3293 #endif /* CONFIG_KSM */
7609385337a4feb xu xin 2022-04-28 3294
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
@ 2026-02-04 5:34 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-02-04 5:34 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Liam R. Howlett" <Liam.Howlett@oracle.com>
CC: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Hi Lorenzo,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5fd0a1df5d05ad066e5618ccdd3d0fa6cb686c27
commit: d14d3f535e13ff0661b9a74133a8d6b9f9950712 mm: convert remaining users to mm_flags_*() accessors
date: 5 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 5 months ago
config: openrisc-randconfig-r063-20260204 (https://download.01.org/0day-ci/archive/20260204/202602041313.xxJ2J4v0-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 13.4.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202602041313.xxJ2J4v0-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
fs/proc/base.c:3286:4-29: opportunity for str_yes_no(ksm_process_mergeable ( mm ))
>> fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
vim +3279 fs/proc/base.c
7c23b3300116907 Josh Poimboeuf 2017-02-13 3251
7609385337a4feb xu xin 2022-04-28 3252 #ifdef CONFIG_KSM
7609385337a4feb xu xin 2022-04-28 3253 static int proc_pid_ksm_merging_pages(struct seq_file *m, struct pid_namespace *ns,
7609385337a4feb xu xin 2022-04-28 3254 struct pid *pid, struct task_struct *task)
7609385337a4feb xu xin 2022-04-28 3255 {
7609385337a4feb xu xin 2022-04-28 3256 struct mm_struct *mm;
7609385337a4feb xu xin 2022-04-28 3257
7609385337a4feb xu xin 2022-04-28 3258 mm = get_task_mm(task);
7609385337a4feb xu xin 2022-04-28 3259 if (mm) {
7609385337a4feb xu xin 2022-04-28 3260 seq_printf(m, "%lu\n", mm->ksm_merging_pages);
7609385337a4feb xu xin 2022-04-28 3261 mmput(mm);
7609385337a4feb xu xin 2022-04-28 3262 }
7609385337a4feb xu xin 2022-04-28 3263
7609385337a4feb xu xin 2022-04-28 3264 return 0;
7609385337a4feb xu xin 2022-04-28 3265 }
cb4df4cae4f2bd8 xu xin 2022-08-30 3266 static int proc_pid_ksm_stat(struct seq_file *m, struct pid_namespace *ns,
cb4df4cae4f2bd8 xu xin 2022-08-30 3267 struct pid *pid, struct task_struct *task)
cb4df4cae4f2bd8 xu xin 2022-08-30 3268 {
cb4df4cae4f2bd8 xu xin 2022-08-30 3269 struct mm_struct *mm;
3ab76c767bc783c xu xin 2025-01-10 3270 int ret = 0;
cb4df4cae4f2bd8 xu xin 2022-08-30 3271
cb4df4cae4f2bd8 xu xin 2022-08-30 3272 mm = get_task_mm(task);
cb4df4cae4f2bd8 xu xin 2022-08-30 3273 if (mm) {
cb4df4cae4f2bd8 xu xin 2022-08-30 3274 seq_printf(m, "ksm_rmap_items %lu\n", mm->ksm_rmap_items);
c2dc78b86e0821e Chengming Zhou 2024-05-28 3275 seq_printf(m, "ksm_zero_pages %ld\n", mm_ksm_zero_pages(mm));
d21077fbc2fc987 Stefan Roesch 2023-04-17 3276 seq_printf(m, "ksm_merging_pages %lu\n", mm->ksm_merging_pages);
d21077fbc2fc987 Stefan Roesch 2023-04-17 3277 seq_printf(m, "ksm_process_profit %ld\n", ksm_process_profit(mm));
3ab76c767bc783c xu xin 2025-01-10 3278 seq_printf(m, "ksm_merge_any: %s\n",
d14d3f535e13ff0 Lorenzo Stoakes 2025-08-12 @3279 mm_flags_test(MMF_VM_MERGE_ANY, mm) ? "yes" : "no");
3ab76c767bc783c xu xin 2025-01-10 3280 ret = mmap_read_lock_killable(mm);
3ab76c767bc783c xu xin 2025-01-10 3281 if (ret) {
3ab76c767bc783c xu xin 2025-01-10 3282 mmput(mm);
3ab76c767bc783c xu xin 2025-01-10 3283 return ret;
3ab76c767bc783c xu xin 2025-01-10 3284 }
3ab76c767bc783c xu xin 2025-01-10 3285 seq_printf(m, "ksm_mergeable: %s\n",
3ab76c767bc783c xu xin 2025-01-10 3286 ksm_process_mergeable(mm) ? "yes" : "no");
3ab76c767bc783c xu xin 2025-01-10 3287 mmap_read_unlock(mm);
cb4df4cae4f2bd8 xu xin 2022-08-30 3288 mmput(mm);
cb4df4cae4f2bd8 xu xin 2022-08-30 3289 }
cb4df4cae4f2bd8 xu xin 2022-08-30 3290
cb4df4cae4f2bd8 xu xin 2022-08-30 3291 return 0;
cb4df4cae4f2bd8 xu xin 2022-08-30 3292 }
7609385337a4feb xu xin 2022-04-28 3293 #endif /* CONFIG_KSM */
7609385337a4feb xu xin 2022-04-28 3294
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
@ 2026-08-31 18:10 kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2026-08-31 18:10 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Julia Lawall
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux Memory Management List <linux-mm@kvack.org>
CC: "Liam R. Howlett" <Liam.Howlett@oracle.com>
CC: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Hi Lorenzo,
FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cee9395acd8043be0644b25c34bfa86623f2b935
commit: d14d3f535e13ff0661b9a74133a8d6b9f9950712 mm: convert remaining users to mm_flags_*() accessors
date: 12 months ago
:::::: branch date: 21 hours ago
:::::: commit date: 12 months ago
config: arc-randconfig-r053-20260831 (https://download.01.org/0day-ci/archive/20260901/202609010248.vFbMtF1I-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 9.5.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: d14d3f535e13 ("mm: convert remaining users to mm_flags_*() accessors")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Julia Lawall <julia.lawall@inria.fr>
| Closes: https://lore.kernel.org/r/202609010248.vFbMtF1I-lkp@intel.com/
cocci warnings: (new ones prefixed by >>)
fs/proc/base.c:3286:4-29: opportunity for str_yes_no(ksm_process_mergeable ( mm ))
>> fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm ))
vim +3279 fs/proc/base.c
7c23b330011690 Josh Poimboeuf 2017-02-13 3251
7609385337a4fe xu xin 2022-04-28 3252 #ifdef CONFIG_KSM
7609385337a4fe xu xin 2022-04-28 3253 static int proc_pid_ksm_merging_pages(struct seq_file *m, struct pid_namespace *ns,
7609385337a4fe xu xin 2022-04-28 3254 struct pid *pid, struct task_struct *task)
7609385337a4fe xu xin 2022-04-28 3255 {
7609385337a4fe xu xin 2022-04-28 3256 struct mm_struct *mm;
7609385337a4fe xu xin 2022-04-28 3257
7609385337a4fe xu xin 2022-04-28 3258 mm = get_task_mm(task);
7609385337a4fe xu xin 2022-04-28 3259 if (mm) {
7609385337a4fe xu xin 2022-04-28 3260 seq_printf(m, "%lu\n", mm->ksm_merging_pages);
7609385337a4fe xu xin 2022-04-28 3261 mmput(mm);
7609385337a4fe xu xin 2022-04-28 3262 }
7609385337a4fe xu xin 2022-04-28 3263
7609385337a4fe xu xin 2022-04-28 3264 return 0;
7609385337a4fe xu xin 2022-04-28 3265 }
cb4df4cae4f2bd xu xin 2022-08-30 3266 static int proc_pid_ksm_stat(struct seq_file *m, struct pid_namespace *ns,
cb4df4cae4f2bd xu xin 2022-08-30 3267 struct pid *pid, struct task_struct *task)
cb4df4cae4f2bd xu xin 2022-08-30 3268 {
cb4df4cae4f2bd xu xin 2022-08-30 3269 struct mm_struct *mm;
3ab76c767bc783 xu xin 2025-01-10 3270 int ret = 0;
cb4df4cae4f2bd xu xin 2022-08-30 3271
cb4df4cae4f2bd xu xin 2022-08-30 3272 mm = get_task_mm(task);
cb4df4cae4f2bd xu xin 2022-08-30 3273 if (mm) {
cb4df4cae4f2bd xu xin 2022-08-30 3274 seq_printf(m, "ksm_rmap_items %lu\n", mm->ksm_rmap_items);
c2dc78b86e0821 Chengming Zhou 2024-05-28 3275 seq_printf(m, "ksm_zero_pages %ld\n", mm_ksm_zero_pages(mm));
d21077fbc2fc98 Stefan Roesch 2023-04-17 3276 seq_printf(m, "ksm_merging_pages %lu\n", mm->ksm_merging_pages);
d21077fbc2fc98 Stefan Roesch 2023-04-17 3277 seq_printf(m, "ksm_process_profit %ld\n", ksm_process_profit(mm));
3ab76c767bc783 xu xin 2025-01-10 3278 seq_printf(m, "ksm_merge_any: %s\n",
d14d3f535e13ff Lorenzo Stoakes 2025-08-12 @3279 mm_flags_test(MMF_VM_MERGE_ANY, mm) ? "yes" : "no");
3ab76c767bc783 xu xin 2025-01-10 3280 ret = mmap_read_lock_killable(mm);
3ab76c767bc783 xu xin 2025-01-10 3281 if (ret) {
3ab76c767bc783 xu xin 2025-01-10 3282 mmput(mm);
3ab76c767bc783 xu xin 2025-01-10 3283 return ret;
3ab76c767bc783 xu xin 2025-01-10 3284 }
3ab76c767bc783 xu xin 2025-01-10 3285 seq_printf(m, "ksm_mergeable: %s\n",
3ab76c767bc783 xu xin 2025-01-10 3286 ksm_process_mergeable(mm) ? "yes" : "no");
3ab76c767bc783 xu xin 2025-01-10 3287 mmap_read_unlock(mm);
cb4df4cae4f2bd xu xin 2022-08-30 3288 mmput(mm);
cb4df4cae4f2bd xu xin 2022-08-30 3289 }
cb4df4cae4f2bd xu xin 2022-08-30 3290
cb4df4cae4f2bd xu xin 2022-08-30 3291 return 0;
cb4df4cae4f2bd xu xin 2022-08-30 3292 }
7609385337a4fe xu xin 2022-04-28 3293 #endif /* CONFIG_KSM */
7609385337a4fe xu xin 2022-04-28 3294
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-31 18:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 18:10 fs/proc/base.c:3279:4-39: opportunity for str_yes_no(mm_flags_test ( MMF_VM_MERGE_ANY , mm )) kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-02-04 5:34 kernel test robot
2025-10-23 7:29 kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox