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: <20150714174703.GA8088@redhat.com>
Date:	Tue, 14 Jul 2015 19:47:03 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrey Vagin <avagin@...nvz.org>
Cc:	linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Cyrill Gorcunov <gorcunov@...nvz.org>,
	Pavel Emelyanov <xemul@...allels.com>,
	Roger Luethi <rl@...lgate.ch>, Arnd Bergmann <arnd@...db.de>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	David Ahern <dsahern@...il.com>,
	Andy Lutomirski <luto@...capital.net>,
	Pavel Odintsov <pavel.odintsov@...il.com>
Subject: Re: [PATCH 20/24] task_diag: Only add VMAs for thread_group leader

On 07/06, Andrey Vagin wrote:
>
> From: David Ahern <dsahern@...il.com>
>
> threads of a process share the same VMAs, so when dumping all threads
> for all processes only push vma data for group leader.

...

> @@ -492,6 +493,13 @@ static int task_diag_fill(struct task_struct *tsk, struct sk_buff *skb,
>  	}
>  
>  	if (show_flags & TASK_DIAG_SHOW_VMA) {
> +		/* if the request is to dump all threads of all processes
> +		 * only show VMAs for group leader.
> +		 */
> +		if (req->dump_strategy == TASK_DIAG_DUMP_ALL_THREAD &&
> +		    !thread_group_leader(tsk))
> +			goto done;
> +

This doesn't look right, group leader can be a zombie with ->mm == NULL,

>  		if (i >= n)
>  			err = fill_vma(tsk, skb, cb, &progress, show_flags);

so this probably needs something like find_lock_task_mm().

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ