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:	Tue, 14 Dec 2010 16:53:10 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	"Suzuki K. Poulose" <suzuki@...ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
	Christoph Hellwig <hch@....de>,
	Masami Hiramatsu <mhiramat@...hat.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Daisuke HATAYAMA <d.hatayama@...fujitsu.com>,
	Andi Kleen <andi@...stfloor.org>,
	Roland McGrath <roland@...hat.com>,
	Amerigo Wang <amwang@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [Patch 3/21] Make vma_dump_size() generic

Suzuki, I didn't read this series. Still I have some concerns after
the very brief look...

On 12/14, Suzuki K. Poulose wrote:
>
> @@ -114,10 +113,18 @@ unsigned long vma_dump_size(struct vm_ar
>  		 * Switch to the user "segment" for get_user(),
>  		 * then put back what elf_core_dump() had in place.
>  		 */
> -		set_fs(USER_DS);
> -		if (unlikely(get_user(word, header)))
> -			word = 0;
> -		set_fs(fs);
> +		if (p->group_leader == current->group_leader) {

same_thread_group() ?

> +			mm_segment_t fs = get_fs();
> +			set_fs(USER_DS);
> +			if (unlikely(get_user(word, header)))
> +				word = 0;
> +			set_fs(fs);
> +		} else {
> +			int bytes = access_process_vm(p, (unsigned long)header,
> +						&word, sizeof (word), 0);

Well. This adds a little pessimization. It is possible that the
"normal" coredump dumps the CLONE_VM process which doesn't below
to current's thread group.

May be you can compare ->mm's, but I am not sure.

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