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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Apr 2009 10:53:05 +0200
From:	Ingo Molnar <mingo@...e.hu>
To:	Alexey Dobriyan <adobriyan@...il.com>,
	Matt Helsley <matthltc@...ibm.com>, yamamoto@...inux.co.jp,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	akpm@...ux-foundation.org, containers@...ts.linux-foundation.org,
	xemul@...allels.com, serue@...ibm.com, dave@...ux.vnet.ibm.com,
	orenl@...columbia.edu, hch@...radead.org,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/30] Remove struct mm_struct::exe_file et al


* Alexey Dobriyan <adobriyan@...il.com> wrote:

> Commit 925d1c401fa6cfd0df5d2e37da8981494ccdec07 aka "procfs task 
> exe symlink". introduced struct mm_struct::exe_file and struct 
> mm_struct::num_exe_file_vmas.
> 
> The rationale is weak: unifying MMU and no-MMU version of 
> /proc/*/exe code. For this a) struct mm_struct becomes bigger, b) 
> mmap/munmap/exit become slower, c) patch adds more code than 
> removes in fact.

Hm, nommu unification was not the only effect of that original 
patch.

The other effect was to introduce a managed 'which is the first 
executable vma in the mm' abstraction in struct mm. Your patch 
removes that abstraction and re-introduces a linear ->vma_next walk:

> +	down_read(&mm->mmap_sem);
> +	for (vma = mm->mmap; vma; vma = vma->vm_next) {
> +		if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file) {

Which can walk along thousands (or tens of thousands) of vmas until 
it finds the first executable vma. For example on PIE binaries it's 
quite possible to have a lot of non-PROT_EXEC vmas before the first 
EXEC vma is met.

So your revert reintroduces that linear walk. It might not matter 
much (/proc/*/exe might be sufficiently uninteresting in practice to 
not deserve an optimization), but it's still worth a mention and a 
discussion in the changelog.

Thanks,

	Ingo
--
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