lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKPOu+9MBokh6z2o8=GKwTeU61Ce8Pbs7zjTSxo9=d+vKCYZWw@mail.gmail.com>
Date: Sat, 30 Aug 2025 08:26:07 +0200
From: Max Kellermann <max.kellermann@...os.com>
To: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
Cc: akpm@...ux-foundation.org, david@...hat.com, axelrasmussen@...gle.com, 
	yuanchu@...gle.com, willy@...radead.org, hughd@...gle.com, mhocko@...e.com, 
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, lorenzo.stoakes@...cle.com, 
	Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org, surenb@...gle.com
Subject: Re: [PATCH 05/12] mm/oom_kill: add `const` to pointer parameter

On Sat, Aug 30, 2025 at 1:03 AM Vishal Moola (Oracle)
<vishal.moola@...il.com> wrote:
> > -extern bool process_shares_mm(struct task_struct *p, struct mm_struct *mm);
> > +extern bool process_shares_mm(struct task_struct *p, const struct mm_struct *mm);
>
> Nowadays we're dropping the extern keyword.

I can do that - is it acceptable to do that in the same patch?

> Also, Is there any reason you didn't also make the task_struct pointer const?

I wasn't sure whether for_each_thread() is const-safe. I think I
looked at the wrong definition; for_each_thread() looks safe, only
for_other_threads() is not because it uses next_thread() which takes a
non-const pointer. I'll amend the patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ