From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: KVM build warnings Date: Mon, 30 May 2011 14:46:00 +0200 Message-ID: <20110530124600.GB494@eferding.osrc.amd.com> References: <20110530094604.GC21833@liondog.tnic> <20110530191426.336d23f4.yoshikawa.takuya@oss.ntt.co.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, takuya.yoshikawa@gmail.com To: Takuya Yoshikawa Return-path: Content-Disposition: inline In-Reply-To: <20110530191426.336d23f4.yoshikawa.takuya@oss.ntt.co.jp> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, May 30, 2011 at 07:14:26PM +0900, Takuya Yoshikawa wrote: > On Mon, 30 May 2011 11:46:04 +0200 > Borislav Petkov wrote: >=20 > > I get the following > >=20 > > In file included from arch/x86/kvm/mmu.c:2856: > > arch/x86/kvm/paging_tmpl.h: In function =E2=80=98paging32_walk_addr= _generic=E2=80=99: > > arch/x86/kvm/paging_tmpl.h:124: warning: =E2=80=98ptep_user=E2=80=99= may be used uninitialized in this function > > In file included from arch/x86/kvm/mmu.c:2852: > > arch/x86/kvm/paging_tmpl.h: In function =E2=80=98paging64_walk_addr= _generic=E2=80=99: > > arch/x86/kvm/paging_tmpl.h:124: warning: =E2=80=98ptep_user=E2=80=99= may be used uninitialized in this function > >=20 > > when building -rc1. It looks like it is caused by > > 6e2ca7d1802bf8ed9908435e34daa116662e7790 and sticking uninitialized= _var() around > > the ptep_user declaration looks like the easiest solution. But the = code should > > still be audited by someone who's familiar with it whether shutting= up the > > compiler doesn't cause an actual bug. >=20 > Sorry, it is my commit. >=20 > I think the logic guarantees that ptep_user won't be used until it is > assigned some value. >=20 > It seems to be safe, IIUC. Ok, thanks for confirming. I'll send a fix soon if no one beats me to it. --=20 Regards/Gruss, Boris.