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]
Date:   Fri, 15 Sep 2023 14:15:15 +0200
From:   Oleg Nesterov <oleg@...hat.com>
To:     Ben Wolsieffer <ben.wolsieffer@...ring.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        Greg Ungerer <gerg@...inux.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Giulio Benetti <giulio.benetti@...ettiengineering.com>
Subject: Re: [PATCH] proc: nommu: /proc/<pid>/maps: release mmap read lock

On 09/14, Ben Wolsieffer wrote:
>
> Fixes: 47fecca15c09 ("fs/proc/task_nommu.c: don't use priv->task->mm")
> Signed-off-by: Ben Wolsieffer <ben.wolsieffer@...ring.com>
> ---
>  fs/proc/task_nommu.c | 27 +++++++++++++++------------
>  1 file changed, 15 insertions(+), 12 deletions(-)

Acked-by: Oleg Nesterov <oleg@...hat.com>


-------------------------------------------------------------------------------
Sorry for the offtopic question. I know NOTHING about nommu and when I tried to
review this patch I was puzzled by

	/* See m_next(). Zero at the start or after lseek. */
	if (addr == -1UL)
		return NULL;

at the start of m_start(). OK, lets look at

	static void *m_next(struct seq_file *m, void *_p, loff_t *pos)
	{
		struct vm_area_struct *vma = _p;

		*pos = vma->vm_end;
		return find_vma(vma->vm_mm, vma->vm_end);
	}

where does this -1UL come from? Does this mean that on nommu

	last_vma->vm_end == -1UL

or what?

fs/proc/task_mmu.c has the same check at the start, but in this case
the "See m_next()" comment actually helps.

Just curious, thanks.

Oleg.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ