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: <47FA53F1.1030509@colorfullife.com>
Date:	Mon, 07 Apr 2008 19:03:45 +0200
From:	Manfred Spraul <manfred@...orfullife.com>
To:	Pavel Emelyanov <xemul@...nvz.org>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"Serge E. Hallyn" <serue@...ibm.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Sukadev Bhattiprolu <sukadev@...ibm.com>
Subject: Re: [PATCH] fix SEM_UNDO with namespaces, take 2

Pavel Emelyanov wrote:
> No, switch_task_namespaces is the wrong place to do this. It is to be 
> done in copy_ipc_ns. If you need a task for which a new namespace is 
> being prepared, then pass one into it.
>
>   
copy_ipc_ns() is also the wrong place:
There are calls after copy_ipc_ns() that can fail (e.g. copy_pid_ns()), 
and if they fail, then the whole syscall is aborted.
But undoing outstanding semaphore operations cannot be undone.
Or simpler: the copy_whatever() functions do not modify current.

Another option would be within sys_unshare():
sys_unshare() first creates all new pointers, and then actual unsharing 
is performed.

What do you think? I that the right place? The implementation could be 
moved into a seperate function, perhaps some of the NULL tests are 
superflous, too.

--
    Manfred

View attachment "patch-detach-in-sys_unshare" of type "text/plain" (1275 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ