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: <4F79D1AF.7080100@openvz.org>
Date:	Mon, 02 Apr 2012 20:19:59 +0400
From:	Konstantin Khlebnikov <khlebnikov@...nvz.org>
To:	Oleg Nesterov <oleg@...hat.com>
CC:	Cyrill Gorcunov <gorcunov@...nvz.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Eric Paris <eparis@...hat.com>
Subject: Re: [PATCH 6/7] mm: kill vma flag VM_EXECUTABLE

Oleg Nesterov wrote:
> On 04/02, Konstantin Khlebnikov wrote:
>>
>> In this patch I leave mm->exe_file lockless.
>> After exec/fork we can change it only for current task and only if mm->mm_users == 1.
>>
>> something like this:
>>
>> task_lock(current);
>
> OK, this protects against the race with get_task_mm()
>
>> if (atomic_read(&current->mm->mm_users) == 1)
>
> this means PR_SET_MM_EXE_FILE can fail simply because someone did
> get_task_mm(). Or the caller is multithreaded.

This is sad, seems like we should keep mm->exe_file protection by mm->mmap_sem.
So, I'll rework this patch...

>
>> 	set_mm_exe_file(current->mm, new_file);
>
> No, fput() can sleep.

Yep

>
> Oleg.
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
> Don't email:<a href=mailto:"dont@...ck.org">  email@...ck.org</a>

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