From: Oren Laadan <orenl@cs.columbia.edu>
To: Masahiko Takahashi <m-takahashi@ex.jp.nec.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
linux-api@vger.kernel.org, containers@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
Dave Hansen <dave@linux.vnet.ibm.com>,
linux-mm@kvack.org, Alexander Viro <viro@zeniv.linux.org.uk>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC v8][PATCH 05/12] x86 support for checkpoint/restart
Date: Tue, 04 Nov 2008 10:32:26 -0500 [thread overview]
Message-ID: <49106B0A.8010205@cs.columbia.edu> (raw)
In-Reply-To: <1225791016.5940.33.camel@noir.spf.cl.nec.co.jp>
Masahiko Takahashi wrote:
> Hi Oren,
>
> I'm now trying to port your patchset to x86_64, and find a tiny
> inconsistency issue.
>
>
> On 2008-10-30 at 09:51 -0400, Oren Laadan wrote:
>> +/* dump the thread_struct of a given task */
>> +int cr_write_thread(struct cr_ctx *ctx, struct task_struct *t)
>> +{
>> + struct cr_hdr h;
>> + struct cr_hdr_thread *hh = cr_hbuf_get(ctx, sizeof(*hh));
>> + struct thread_struct *thread;
>> + struct desc_struct *desc;
>> + int ntls = 0;
>> + int n, ret;
>> +
>> + h.type = CR_HDR_THREAD;
>> + h.len = sizeof(*hh);
>> + h.parent = task_pid_vnr(t);
>> +
>> + thread = &t->thread;
>> +
>> + /* calculate no. of TLS entries that follow */
>> + desc = thread->tls_array;
>> + for (n = GDT_ENTRY_TLS_ENTRIES; n > 0; n--, desc++) {
>> + if (desc->a || desc->b)
>> + ntls++;
>> + }
>> +
>> + hh->gdt_entry_tls_entries = GDT_ENTRY_TLS_ENTRIES;
>> + hh->sizeof_tls_array = sizeof(thread->tls_array);
>> + hh->ntls = ntls;
>> +
>> + ret = cr_write_obj(ctx, &h, hh);
>> + cr_hbuf_put(ctx, sizeof(*hh));
>> + if (ret < 0)
>> + return ret;
>
> Please add
> if (ntls == 0)
> return ret;
> because, in restart phase, reading TLS entries from the image file
> is skipped if hh->ntls == 0, which may incur inconsistency and fail
> to restart.
>
Will fix, thanks.
Oren.
next prev parent reply other threads:[~2008-11-04 15:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-30 13:51 [RFC v8][PATCH 0/12] Kernel based checkpoint/restart Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 01/12] Create syscalls: sys_checkpoint, sys_restart Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 02/12] Checkpoint/restart: initial documentation Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 03/12] Make file_pos_read/write() public Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 04/12] General infrastructure for checkpoint restart Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 05/12] x86 support for checkpoint/restart Oren Laadan
2008-11-04 9:30 ` Masahiko Takahashi
2008-11-04 15:32 ` Oren Laadan [this message]
2008-10-30 13:51 ` [RFC v8][PATCH 06/12] Dump memory address space Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 07/12] Restore " Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 08/12] Infrastructure for shared objects Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 09/12] Dump open file descriptors Oren Laadan
2008-11-03 20:57 ` Serge E. Hallyn
2008-10-30 13:51 ` [RFC v8][PATCH 10/12] Restore open file descriprtors Oren Laadan
2008-10-30 13:51 ` [RFC v8][PATCH 11/12] External checkpoint of a task other than ourself Oren Laadan
2008-10-31 2:41 ` Serge E. Hallyn
2008-10-31 13:58 ` Serge E. Hallyn
2008-10-30 13:51 ` [RFC v8][PATCH 12/12] Track in-kernel when we expect checkpoint/restart to work Oren Laadan
2008-10-30 14:45 ` [Devel] [RFC v8][PATCH 0/12] Kernel based checkpoint/restart Andrey Mirkin
2008-10-30 15:59 ` Oren Laadan
2008-11-04 18:44 ` Serge E. Hallyn
2008-11-04 21:38 ` Serge E. Hallyn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49106B0A.8010205@cs.columbia.edu \
--to=orenl@cs.columbia.edu \
--cc=containers@lists.linux-foundation.org \
--cc=dave@linux.vnet.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m-takahashi@ex.jp.nec.com \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox