Re: One question to commit 6cbdc7ba48dff850c233a1ea1abe87a6d0cde2dd in lucid kernel
On Tue, 2011-05-24 at 22:33 +0800, Jiang, Yunhong wrote:
> Hi, Leann, when I run KVM guest in ubuntu 10.04 (lucid amd64) with
> 32bit qemu, I noticed the 32bit qemu always seg fault because the %gs
> register is clobbered after KVM_RUN ioctl.
>
> After google and check the code, I noticed
> http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=47;bug=604956 and
> commit 6cbdc7ba48dff850c233a1ea1abe87a6d0cde2dd in
> git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git. But I'm a bit
> confused of this commit and hope get some help from you.
>
> According to comments, the commit
> 6cbdc7ba48dff850c233a1ea1abe87a6d0cde2dd is from upstream linux
> c8770e7ba63bb5dd8fe5f9d251275a8fa717fb78.
> However, comparing the two patchset, I noticed the ubuntu patch is a
> bit different with the upstream patch, especially, the ubuntu patch
> includes followed hunk, which removes the load_gs_index(). Will this
> change cause the gs index not be loaded, and thus the gs will possibly
> be 0? Are there any special reason to add this changes? I think I may
> missed some important reason, hope to get some hints from you.
>
> #ifdef CONFIG_X86_64
> - load_gs_index(vmx->host_state.gs_sel);
> wrmsrl(MSR_KERNEL_GS_BASE, current->thread.gs);
> #else
Hi Jiang,
Bah, good catch. I've obviously bodged the backport by accident. I've
opened up a new bug [1] to submit for Ubuntu SRU to get this properly
fixed up in Lucid. Care to subscribe to the bug and help test?
> Also I noticed the 2.6.35-28-50 tag in this git repo does not
> contained the related changeset, will they be ported also?
The fix in Maverick will actually be in the 2.6.35-29.51 release which
is currently in maverick-proposed. It will then propagate down in the
Maverick LTS backport kernel for Lucid.
Thanks,
Leann
[1] https://bugs.launchpad.net/ubuntu/lucid/+source/linux/+bug/787675
Reply to: