[CRIU] Re: [PATCH RFC] IPC: message queue stealing feature introduced

Cyrill Gorcunov gorcunov at openvz.org
Fri Feb 10 13:05:58 EST 2012


On Fri, Feb 10, 2012 at 09:33:45PM +0400, Stanislav Kinsbursky wrote:
> This patch is required for checkpoint/restart ins userspace.
> IOW, c/r reuqires some way to get IPC messages without deleting them for the
> queue (checkpoint can fail and in this case tasks will be resumed, so queue
> have to be valid).
> To achive this, new operation flag MSG_STEAL for sys_msgrcv() system call
> introduced.
> If this flag is set, then passed struct msgbuf pointer will be used for storing
> array of structures:
> 
> struct msgbuf_a {
> 	long mtype;         /* type of message */
> 	size_t msize;       /* size of message */
> 	char mtext[0];      /* message text */
> };
> 
> where each of them is followed by respective message array.
> 

Looks interesting to me. Stas, I presume the permission check (ie who
_can_ steal messages) is done somewhere else?

	Cyrill


More information about the CRIU mailing list