Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 0/5] IPC: checkpoint/restore in userspace enhancements

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


skinsbursky at parallels

Feb 9, 2012, 10:01 AM

Post #1 of 7 (46 views)
Permalink
[PATCH 0/5] IPC: checkpoint/restore in userspace enhancements

This patch set aimed to provide additional functionality for all IPC objects,
which is required for migration these objects by user-space checkpoint/restore
utils.
The main problem here was impossibility to set up object id. This patch set
solves the problem in two steps:
1) Makes it possible to create new object (shared memory, semaphores set or
messages queue) with ID, equal to passed key.
2) Makes it possible to change existent object key.

The following series consists of:

---

Stanislav Kinsbursky (5):
ipc: "use key as id" functionality for resource get system call introduced
ipc: segment key change helper introduced
ipc: add new SHM_SET command for sys_shmctl() call
ipc: add new MSG_SET command for sys_msgctl() call
ipc: add new SEM_SET command for sys_semctl() call


include/linux/ipc.h | 1 +
include/linux/msg.h | 1 +
include/linux/sem.h | 1 +
include/linux/shm.h | 1 +
ipc/compat.c | 9 +++++++
ipc/msg.c | 14 +++++++++-
ipc/sem.c | 11 +++++++-
ipc/shm.c | 14 +++++++++-
ipc/util.c | 59 +++++++++++++++++++++++++++++++++++++++++---
ipc/util.h | 3 ++
security/selinux/hooks.c | 3 ++
security/smack/smack_lsm.c | 3 ++
12 files changed, 110 insertions(+), 10 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


casey at schaufler-ca

Feb 10, 2012, 10:29 AM

Post #2 of 7 (41 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
> This patch set aimed to provide additional functionality for all IPC objects,
> which is required for migration these objects by user-space checkpoint/restore
> utils.
> The main problem here was impossibility to set up object id. This patch set
> solves the problem in two steps:
> 1) Makes it possible to create new object (shared memory, semaphores set or
> messages queue) with ID, equal to passed key.
> 2) Makes it possible to change existent object key.

Is there any chance you might include the LSM data as well?

>
> The following series consists of:
>
> ---
>
> Stanislav Kinsbursky (5):
> ipc: "use key as id" functionality for resource get system call introduced
> ipc: segment key change helper introduced
> ipc: add new SHM_SET command for sys_shmctl() call
> ipc: add new MSG_SET command for sys_msgctl() call
> ipc: add new SEM_SET command for sys_semctl() call
>
>
> include/linux/ipc.h | 1 +
> include/linux/msg.h | 1 +
> include/linux/sem.h | 1 +
> include/linux/shm.h | 1 +
> ipc/compat.c | 9 +++++++
> ipc/msg.c | 14 +++++++++-
> ipc/sem.c | 11 +++++++-
> ipc/shm.c | 14 +++++++++-
> ipc/util.c | 59 +++++++++++++++++++++++++++++++++++++++++---
> ipc/util.h | 3 ++
> security/selinux/hooks.c | 3 ++
> security/smack/smack_lsm.c | 3 ++
> 12 files changed, 110 insertions(+), 10 deletions(-)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
> the body of a message to majordomo [at] vger
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


skinsbursky at parallels

Feb 13, 2012, 3:03 AM

Post #3 of 7 (39 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

10.02.2012 22:29, Casey Schaufler пишет:
> On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
>> This patch set aimed to provide additional functionality for all IPC objects,
>> which is required for migration these objects by user-space checkpoint/restore
>> utils.
>> The main problem here was impossibility to set up object id. This patch set
>> solves the problem in two steps:
>> 1) Makes it possible to create new object (shared memory, semaphores set or
>> messages queue) with ID, equal to passed key.
>> 2) Makes it possible to change existent object key.
>
> Is there any chance you might include the LSM data as well?
>

Sorry, but I don't understand your question.
What is this "LSM"? Linux Shared Memory? If yes, and you mean SYSV IPC SHM, then
where do you want to include it?

--
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


serge.hallyn at canonical

Feb 13, 2012, 8:11 AM

Post #4 of 7 (40 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

Quoting Stanislav Kinsbursky (skinsbursky [at] parallels):
> 10.02.2012 22:29, Casey Schaufler пишет:
> >On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
> >>This patch set aimed to provide additional functionality for all IPC objects,
> >>which is required for migration these objects by user-space checkpoint/restore
> >>utils.
> >>The main problem here was impossibility to set up object id. This patch set
> >>solves the problem in two steps:
> >>1) Makes it possible to create new object (shared memory, semaphores set or
> >>messages queue) with ID, equal to passed key.
> >>2) Makes it possible to change existent object key.
> >
> >Is there any chance you might include the LSM data as well?
> >
>
> Sorry, but I don't understand your question.
> What is this "LSM"? Linux Shared Memory? If yes, and you mean SYSV
> IPC SHM, then where do you want to include it?

He means linux security modules. (see include/linux/security.h)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


skinsbursky at parallels

Feb 13, 2012, 8:48 AM

Post #5 of 7 (34 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

13.02.2012 20:11, Serge Hallyn пишет:
> Quoting Stanislav Kinsbursky (skinsbursky [at] parallels):
>> 10.02.2012 22:29, Casey Schaufler пишет:
>>> On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
>>>> This patch set aimed to provide additional functionality for all IPC objects,
>>>> which is required for migration these objects by user-space checkpoint/restore
>>>> utils.
>>>> The main problem here was impossibility to set up object id. This patch set
>>>> solves the problem in two steps:
>>>> 1) Makes it possible to create new object (shared memory, semaphores set or
>>>> messages queue) with ID, equal to passed key.
>>>> 2) Makes it possible to change existent object key.
>>>
>>> Is there any chance you might include the LSM data as well?
>>>
>>
>> Sorry, but I don't understand your question.
>> What is this "LSM"? Linux Shared Memory? If yes, and you mean SYSV
>> IPC SHM, then where do you want to include it?
>
> He means linux security modules. (see include/linux/security.h)

Ok, thanks for explanation.
Casey, what exactly you are asking about? Am I going to implement
security_*_set() functions?

--
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


casey at schaufler-ca

Feb 13, 2012, 9:39 AM

Post #6 of 7 (35 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

On 2/13/2012 8:48 AM, Stanislav Kinsbursky wrote:
> 13.02.2012 20:11, Serge Hallyn пишет:
>> Quoting Stanislav Kinsbursky (skinsbursky [at] parallels):
>>> 10.02.2012 22:29, Casey Schaufler пишет:
>>>> On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
>>>>> This patch set aimed to provide additional functionality for all
>>>>> IPC objects,
>>>>> which is required for migration these objects by user-space
>>>>> checkpoint/restore
>>>>> utils.
>>>>> The main problem here was impossibility to set up object id. This
>>>>> patch set
>>>>> solves the problem in two steps:
>>>>> 1) Makes it possible to create new object (shared memory,
>>>>> semaphores set or
>>>>> messages queue) with ID, equal to passed key.
>>>>> 2) Makes it possible to change existent object key.
>>>>
>>>> Is there any chance you might include the LSM data as well?
>>>>
>>>
>>> Sorry, but I don't understand your question.
>>> What is this "LSM"? Linux Shared Memory? If yes, and you mean SYSV
>>> IPC SHM, then where do you want to include it?
>>
>> He means linux security modules. (see include/linux/security.h)
>
> Ok, thanks for explanation.
> Casey, what exactly you are asking about? Am I going to implement
> security_*_set() functions?
>

The IPC objects are queer beasts in that they are both
volatile and persistent. If you restart a process that
uses IPC objects they may have to be recreated, which is
what your code is doing. If the system is using an LSM
there may be information attached to the IPC object that
can not be derived from the process being restarted.

That's a roundabout way of saying yes, you may need to
implement security_sem_set and friends
security_{sem,shm,msg}_[ge]et(). The good news is that
I know of at least one other project that is looking
to implement those functions for unrelated reasons.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


skinsbursky at parallels

Feb 14, 2012, 3:33 AM

Post #7 of 7 (34 views)
Permalink
Re: [PATCH 0/5] IPC: checkpoint/restore in userspace enhancements [In reply to]

13.02.2012 21:39, Casey Schaufler пишет:
> On 2/13/2012 8:48 AM, Stanislav Kinsbursky wrote:
>> 13.02.2012 20:11, Serge Hallyn пишет:
>>> Quoting Stanislav Kinsbursky (skinsbursky [at] parallels):
>>>> 10.02.2012 22:29, Casey Schaufler пишет:
>>>>> On 2/9/2012 10:01 AM, Stanislav Kinsbursky wrote:
>>>>>> This patch set aimed to provide additional functionality for all
>>>>>> IPC objects,
>>>>>> which is required for migration these objects by user-space
>>>>>> checkpoint/restore
>>>>>> utils.
>>>>>> The main problem here was impossibility to set up object id. This
>>>>>> patch set
>>>>>> solves the problem in two steps:
>>>>>> 1) Makes it possible to create new object (shared memory,
>>>>>> semaphores set or
>>>>>> messages queue) with ID, equal to passed key.
>>>>>> 2) Makes it possible to change existent object key.
>>>>>
>>>>> Is there any chance you might include the LSM data as well?
>>>>>
>>>>
>>>> Sorry, but I don't understand your question.
>>>> What is this "LSM"? Linux Shared Memory? If yes, and you mean SYSV
>>>> IPC SHM, then where do you want to include it?
>>>
>>> He means linux security modules. (see include/linux/security.h)
>>
>> Ok, thanks for explanation.
>> Casey, what exactly you are asking about? Am I going to implement
>> security_*_set() functions?
>>
>
> The IPC objects are queer beasts in that they are both
> volatile and persistent. If you restart a process that
> uses IPC objects they may have to be recreated, which is
> what your code is doing. If the system is using an LSM
> there may be information attached to the IPC object that
> can not be derived from the process being restarted.
>

Hmmm. If I understood you right, you are taking about kernel_ipc_perm->security
data migration, which is not supported yet.
Am I right?
If yes, then, in general, it would be great to migrate security data some day.
It you feel, that new interfaces are not suitable for security migration and you
can give me an advice how to update them - then it would be great.

> That's a roundabout way of saying yes, you may need to
> implement security_sem_set and friends
> security_{sem,shm,msg}_[ge]et(). The good news is that
> I know of at least one other project that is looking
> to implement those functions for unrelated reasons.

What project?

--
Best regards,
Stanislav Kinsbursky
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.