login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
1
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Serge E. Hallyn
Subject:
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
Date: Tuesday, April 1, 2008 - 7:15 am
Quoting Pavel Emelyanov (
xemul@openvz.org
):
quoted text
> Manfred Spraul wrote: > > Pavel Emelyanov wrote: > >> Manfred Spraul wrote: > >> > >>> Hi, > >>> > >>> the attached patch should fix the combination of CLONE_NEWIPC with > >>> shared sysv undo structures (the common case, just > >>> sys_unshare(CLONE_NEWIPC)): > >>> lookup_undo() now locates the undo array based on both semid and the > >>> namespace pointer. > >>> > >> If you start using any IPC object and then call unshare with CLONE_NEWIPC, > >> then it's your problem, but not the kernel. > >> > > The result is a kernel memory corruption, and kernel memory corruptions > > are always the kernel's problem. > > Agree. Must be fixed, but I'm not sure we should try handling this > case by trying to de-op semaphores for former task namespace. I think > that destroying this list or returning -EBUSY for this case is OK. > > > The code assumed that a semaphore id is globally unique. With > > namespaces, this is not true anymore. > > If two semaphore arrays exist with the same id, but different sizes, > > then semops will cause memory corruptions: The undo structure contains > > one element for each semaphore, thus the semop will write behind the end > > of the memory allocation. > > > >> I agree, that we should probably destroy this one when the task calls > >> unshare, but trying to keep this list relevant is useless. > >> > > A very tricky question: Let's assume we have a process with two threads. > > The undo structure is shared, as per opengroup standard. > > Now one thread calls unshare(CLONE_NEWIPC). What should happen? We > > cannot destroy the undo structure, the other thread might be still > > interested in it. > > If we allow sys_unshare() for multithreaded processes with CLONE_NEWIPC > > and without CLONE_SYSVSEM, then we must handle this case. > > Hm... I'd simply disable creating any new namespaces for threads. > I think other namespaces developers agree with me. Serge, Suka, Eric > what do you think?
Absolutely. -serge --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[RFC, PATCH] fix SEM_UNDO with namespaces
, Manfred Spraul
, (Sun Mar 30, 1:50 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Pavel Emelyanov
, (Mon Mar 31, 12:12 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Manfred Spraul
, (Mon Mar 31, 9:14 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Pavel Emelyanov
, (Tue Apr 1, 2:44 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Serge E. Hallyn
, (Tue Apr 1, 7:15 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Eric W. Biederman
, (Tue Apr 1, 8:25 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Andrew Morton
, (Thu Apr 3, 12:04 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Manfred Spraul
, (Thu Apr 3, 12:31 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Manfred Spraul
, (Thu Apr 3, 12:40 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Serge E. Hallyn
, (Thu Apr 3, 12:44 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Serge E. Hallyn
, (Thu Apr 3, 9:39 pm)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Manfred Spraul
, (Sun Apr 6, 8:11 am)
[PATCH] fix SEM_UNDO with namespaces, take 2
, Manfred Spraul
, (Sun Apr 6, 9:26 am)
Re: [PATCH] fix SEM_UNDO with namespaces, take 2
, Pavel Emelyanov
, (Mon Apr 7, 12:21 am)
Re: [PATCH] fix SEM_UNDO with namespaces, take 2
, Manfred Spraul
, (Mon Apr 7, 10:03 am)
Re: [PATCH] fix SEM_UNDO with namespaces, take 2
, Pavel Emelyanov
, (Tue Apr 8, 1:09 am)
Re: [RFC, PATCH] fix SEM_UNDO with namespaces
, Serge E. Hallyn
, (Mon Apr 14, 2:10 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge: remove TX lock and redo TX accounting.
Linux Kernel Mailing List
ixgbe: fix several counter register errata
Linux Kernel Mailing List
b43: fix build with CONFIG_SSB_PCIHOST=n
Linux Kernel Mailing List
9p: block-based virtio client
linux-netdev
:
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
Michael Breuer
Re: [PATCH] af_packet: Don't use skb after dev_queue_xmit()
David Daney
[PATCH 5/7] Staging: Octeon Ethernet: Convert to NAPI.
Wolfgang Grandegger
[PATCH net-next v4 1/3] can: mscan: fix improper return if dlc < 8 in start_xmi...
Amit Kumar Salecha
[PATCHv3 NEXT 2/2] NET: Add Qlogic ethernet driver for CNA devices
openbsd-misc
:
Theo de Raadt
Re: Old IPSEC bug
Tomáš Bodžár
Problem with vpnc connection - check group password !
Insan Praja SW
Mandoc Compiling Error
Carl Roberso