restart only same bit-ness
PATCH 1/1 restart only same bit-ness
v19-rc3 actually tries to reset the TIF_IA32 flag according to how it was set at checkpoint. It should not, at least for now.
Signed-off-by Serge E. Hallyn <serue-r/[email protected]>
--- arch/x86/kernel/checkpoint.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-)
arch/x86/kernel/checkpoint.c +15 -6
@@ -283,12 +283,21 @@ int restore_thread(struct ckpt_ctx *ctx)load_TLS (thread, cpu);put_cpu (); -#if defined(CONFIG_X86_64 ) && defined(CONFIG_COMPAT ) -if (h->thread_info_flags & _TIF_IA32) -set_thread_flag (TIF_IA32 ); -else -clear_thread_flag (TIF_IA32 ); -#endif + { +int pre, post; +/* +* Eventually we'd like to support mixed-bit restart, but for +* now don't pretend to. +*/ + pre =test_thread_flag (TIF_IA32 ); + post = h->thread_info_flags & _TIF_IA32; +if ((pre && !post) || (post && !pre)) { + ret = -EINVAL ; +ckpt_err (ctx, ret,"%d-bit restarting %d-bit\n" , + pre ?32 :64 , post ?32 :64 ); + goto out; + } + }/* TODO: restore TIF flags as necessary (e.g. TIF_NOTSC) */
Signature · 1 line
1.6.0.4
A message that is not in the archive (sent off-list or not yet received): 20100208170555.GA16943-r/[email protected]
Matt Helsley
Reviewed-byQuoted 4 lines · Serge E. Hallyn
v19-rc3 actually tries to reset the
TIF_IA32flag according to how it was set at checkpoint. It should not, at least for now.Signed-off-by Serge E. Hallyn <serue-r/[email protected]>
Reviewed-by Matt Helsley <matthltc-r/[email protected]>
Quoted 17 lines
--- arch/x86/kernel/checkpoint.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-)arch/x86/kernel/checkpoint.c +0
-5@@ -283,12 +283,21 @@ int restore_thread(struct ckpt_ctx *ctx)load_TLS (thread, cpu);put_cpu (); -#if defined(CONFIG_X86_64 ) && defined(CONFIG_COMPAT ) -if (h->thread_info_flags & _TIF_IA32) -set_thread_flag (TIF_IA32 ); -else -clear_thread_flag (TIF_IA32 );
arch/x86/kernel/checkpoint.c int restore_thread(struct ckpt_ctx *ctx) · line 294
Quoted 10 lines
arch/x86/kernel/checkpoint.c +9
-1-#endif + { +int pre, post; +/* +* Eventually we'd like to support mixed-bit restart, but for +* now don't pretend to. +*/ + pre =test_thread_flag (TIF_IA32 ); + post = h->thread_info_flags & _TIF_IA32; +if ((pre && !post) || (post && !pre)) {
This might be clearer:
pre = test_thread_flag(TIF_IA32);
post = !!(h->thread_info_flags & _TIF_IA32);
if (pre != post) {Cheers,
-Matt Helsley